How can I set the timezone please?

I tried many methods, but it still showed UTC. I tried three methods as follows:
1 RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime
2 RUN echo "Asia/Shanghai" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
3 ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
I wrote these commands in the Dockerfile respectively,  none of them did work.
Could  you tell me how to set the timezone please? Thanks very much

I think that first line is correct, but you need to install the "tzdata"
package first.

Thanks, I go to have a try now

Based on the Dockerfile shown it looks like tzdata may have indeed been missing. Please reopen if this is still an issue for you. We do pull in tzdata at build time to specifically grab just the UTC timezone file. So, if that is causing issues this could be considered a bug.

Why does this not work? (Usually people set a soft link, but even copy doesn't do the trick.)
ENV TERM=xterm \
TZ=Europe/Berlin

RUN apk --update add nginx php-fpm php-memcache php-mysqli php-ctype php-zlib tzdata && \
... (some stuff)
cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
apk del tzdata

On the alpine bug list, Christian Kampka advised
docker run -it --rm alpine /bin/sh
/ # date
Sun May 8 20:46:18 UTC 2016
/ # apk add -U tzdata
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
(1/1) Installing tzdata (2015g-r0)
Executing busybox-1.24.1-r7.trigger
OK: 8 MiB in 12 packages
/ # cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime
/ # date
Sun May 8 22:46:45 CEST 2016
/ #

He also said

As a side note, if you want to rely on the TZ environment variable, you cannot remove tzdata, but that should not apply if you set /etc/localtime correctly.

I don't understand this, but after adding -U and substituting TZ in the Dockerfile it works now as intended.

Install base packages
RUN apk update
RUN apk upgrade
RUN apk add ca-certificates && update-ca-certificates

Change TimeZone
RUN apk add --update tzdata
ENV TZ=America/Bahia

Clean APK cache
RUN rm -rf /var/cache/apk/*

Sorry for commenting on a closed issue, but sometimes I just want to deploy a simple application using Docker Compose with some alpine-based containers inside... then I'm forced to override every dockerfile (or use on-the-fly configuration).
TZ variable works for debian-based images, and it's great :-) Why not for alpine?
Even if it's not a bug, would we consider taking it as an usage issue?

After using previous code it started to show current time zone as I understand, but time stays as before.
Wed Nov  1 12:12:45 +06>-6 2017
But real time is 18:12:45. Could someone explain me what this is +06>-6 and how setup time correctly?

@StalkAlex no idea where that +06>-6 is coming from, but the following works fine for me:
$ docker run -it --rm alpine:3.6
/ # apk add --no-cache tzdata
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
(1/1) Installing tzdata (2017a-r0)
Executing busybox-1.26.2-r7.trigger
OK: 7 MiB in 12 packages
/ # export TZ='America/Los_Angeles'
/ # date
Wed Nov  1 10:09:26 PDT 2017

In a Dockerfile, that would look something like this:
FROM alpine:3.6
RUN apk add --no-cache tzdata
ENV TZ America/Los_Angeles

It's OK in 3.6, but has the described behavior in 3.4, PHP alpine <7.2 is built on it.
> docker run -it alpine:3.4 sh

/ # date
Thu Nov  2 04:42:58 UTC 2017
/ # export TZ='Asia/Almaty'
/ # date
Thu Nov  2 04:43:10 GMT 2017

Strangely it switches to GMT here (no tzdata installed)?!
/ #  apk add --no-cache tzdata
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
(1/1) Installing tzdata (2016d-r0)
Executing busybox-1.24.2-r13.trigger
OK: 8 MiB in 12 packages
/ # date
Thu Nov  2 04:43:33 +06>-6 2017

On the alpine bug list, Christian Kampka advised
docker run -it --rm alpine /bin/sh
/ # date
Sun May 8 20:46:18 UTC 2016
/ # apk add -U tzdata
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
(1/1) Installing tzdata (2015g-r0)
Executing busybox-1.24.1-r7.trigger
OK: 8 MiB in 12 packages
/ # cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime
/ # date
Sun May 8 22:46:45 CEST 2016
/ #

He also said

As a side note, if you want to rely on the TZ environment variable, you cannot remove tzdata, but that should not apply if you set /etc/localtime correctly.

I don't understand this, but after adding -U and substituting TZ in the Dockerfile it works now as intended.

This Work like a charm however, I simply extracted timezone file for my timezone and did COPY mytimezone /etc/localtime without installing tzdata in dockerfile. This also works same, and saves almost ~3MB of container image size.

I am using alpine v3.9 and none of method works!
bash-4.4# date
Fri Nov  8 23:21:50 CST 2019
bash-4.4# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
bash-4.4# date
Fri Nov  8 23:22:27 CST 2019
bash-4.4# export TZ='Asia/Shanghai'
bash-4.4# date
Fri Nov  8 23:23:45 CST 2019

PS I  apk add bash b/c I need bash

# Install base packages
RUN apk update
RUN apk upgrade
RUN apk add ca-certificates && update-ca-certificates
# Change TimeZone
RUN apk add --update tzdata
ENV TZ=America/Bahia
# Clean APK cache
RUN rm -rf /var/cache/apk/*

It works, Thank you very much. (Node 12.14.0 Alpine)

As the wiki said:
https://wiki.alpinelinux.org/wiki/Setting_the_timezone
You can now remove the other timezones using "apk del tzdata"
But it doesn't work after "apk del tzdata"
FROM alpine:3.11

ARG TZ='Europe/Brussels'

ENV TZ ${TZ}

RUN apk upgrade --update \
    && apk add -U tzdata \
    && cp /usr/share/zoneinfo/${TZ} /etc/localtime \
    # && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
    && echo "${TZ}" > /etc/timezone \
    && apk del tzdata \
    && rm -rf \
    /var/cache/apk/*

CMD ["sh"]

docker build --force-rm -t tz_test .
docker run -it --rm tz_test sh
date

The date is stil UTC datetime.

@kzhui125 If you like to use ENV don't use ENV named TZ.
FROM alpine:3.11
ARG ARG_TZ='Europe/Brussels'
ENV ENV_TZ ${ARG_TZ}
RUN apk upgrade --update
&& apk add -U tzdata
&& cp /usr/share/zoneinfo/${ENV_TZ} /etc/localtime
# && ln -sf /usr/share/zoneinfo/${ENV_TZ} /etc/localtime
&& echo "${ENV_TZ}" > /etc/timezone
&& apk del tzdata
&& rm -rf
/var/cache/apk/*
CMD ["sh"]
docker build --force-rm -t tz_test .
docker run -it --rm tz_test
date

If you have the timezone configured in the host system you can mount these volumes without installing tzdata
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro

Referring to the previous comment:
Couldn't get that working without having package tzdata in alpine 3.15.3.
Some want to save space or do not have the option to install packages in their use case, so this worked for me and maybe it is helpful for others as well:

Install tzdata package
Copy the the timezone info of whatever timezone you need (f.e. /usr/share/zoneinfo/Europe/Berlin)
Uninstall tzdata
Recreate folder /usr/share/zoneinfo/Europe/ (because uninstall deletes it)
Place previously copied file back to that dir
Done. I worked with timezone set in /etc/timezone, but it may also work with timezone set via environment i don't know.
(Found this out by analysing the "date" call with strace)

Referring to the previous comment:
Couldn't get that working without having package tzdata in alpine 3.15.3.
Some want to save space or do not have the option to install packages in their use case, so this worked for me and maybe it is helpful for others as well:

Install tzdata package
Copy the the timezone info of whatever timezone you need (f.e. /usr/share/zoneinfo/Europe/Berlin)
Uninstall tzdata
Recreate folder /usr/share/zoneinfo/Europe/ (because uninstall deletes it)
Place previously copied file back to that dir
Done. I worked with timezone set in /etc/timezone, but it may also work with timezone set via environment i don't know.
(Found this out by analysing the "date" call with strace)

/ # cat /etc/timezone Europe/Bucharest
the date command still shows UTC

@mihalycsaba Tried again, looks like i had TZ also set, sorry to have confused you.

Somewhat related:
If you set the localtime mount AND the TZ ENV variable, then Alpine I guess cries and reverts to UTC. If you ONLY use the /etc/localtime mount without the TZ ENV, then all is good.


Login doesn't work

I tried to log in today but when clicking on LogIn nothing happens.

Duplicate of #250 -- should be resolved now.


Mapbox access token

Hello, I've added my Mapbox token to the environmental variables of my Mac and am not yet able to access Mapbox because of an API issue.  The key was generated yesterday and I've tested it to make sure it works.
I then added it as a parameter to the script itself and still the same issue.
Not sure what I'm doing wrong but any help would be great!
Thanks!
Ryan

Strange... must be something wrong with you access token?
I just tested the mapbox provider on my computer right now and it works.
Here are the steps I did:
$ export MAPBOX_ACCESS_TOKEN=pk.eyJ1IjoiZG5vbWFkYiIs...
$ geocode "Ottawa ON" -p mapbox | jq .
{
  "status": "OK",
  "confidence": 1,
  "ok": true,
  "encoding": "utf-8",
  "country": "Canada",
  "provider": "mapbox",
  "state": "Ontario",
  "bbox": {
    "northeast": [
      45.5369839930512,
      -75.2459327878018
    ],
    "southwest": [
      44.962213116635,
      -76.3539711072854
    ]
  },
  "status_code": 200,
  "address": "Ottawa, Ontario, Canada",
  "lat": 45.421,
  "lng": -75.69,
  "postal": "K2P 0B9",
  "quality": 0.998,
  "location": "Ottawa ON"
}

Thanks for the help.  I put it the key in the source and forgot about it.  Sorry to have brought you my error.  Thanks though for responding.  Your geocoder is exactly what I needed thanks for putting it out there.

Awesome! I'm no longer doing maintenance on this library since I'd have to fully re-write the source code to fix many of the existing issues.
I've started a new geocoder library written in Javascript that will essentially do the same thing as this library but with less headaches for me as a developer.
https://github.com/DenisCarriere/geocoder-geojson


Bible Story name not visible

In bible stories panel , story name box is not visible fully.
Bible story name drop-down is not visible fully.

Completed Testing and the issue is fixed. As discussed moving this issue to done.


Replace System.getProperty with SystemPropertyUtil for http client and server

Motivation:
Replace System.getProperty with SystemPropertyUtil for http client and server, please review this pr,thk
Modification:
Replace System.getProperty with SystemPropertyUtil for http client and server
Result:
If there is no issue then describe the changes introduced by this PR.

@skyguard1 I think we should better not do this as this is an example and users should not use stuff from our internal package


Axis labels should respect the theme (#142) and fix #96 whilst I'm at it.

Fixes #142 by reapplying the colour scheme before canvas.draw in NapariMPLWidget._draw (cheers @dstansby!).
Since fixing the colour for axis labels means I need to regenerate the reference scatter plots, I thought I might as well fix #96 by setting the viewer.theme for every test that is marked @pytest.mark.mpl_image_compare. It's not a fix via a nice global stylesheet setting but... you can now read the axes on the baseline figures. (Which is maybe nice??)
Testing:

A somewhat trustworthy TDD reproduction is added into test_theme.

Notes for reviewers:
Please double-check for me that a) main really does have #142, and that b) this really does solve it. I have had some strangeness that I am currently blaming on pip install  without -e.

Works locally, but tests are failing on tox because the existing baseline images are using the default theme so adding the them causes a difference

Works locally, but tests are failing on tox because the existing baseline images are using the default theme so adding the them causes a difference. Can figure out why next week.

I was replacing the plots in tests/baseline but didn't see there are also some baseline plots in tests/scatter/baseline.
Do I need to get into the habit of running pytest with --mpl-generate-path pointing to two directories (I guess with a -k to separate the plots into the scatter subdir?

Works locally, but tests are failing on tox because the existing baseline images are using the default theme so adding the them causes a difference. Can figure out why next week.

I was replacing the plots in tests/baseline but didn't see there are also some baseline plots in tests/scatter/baseline.
Do I need to get into the habit of running pytest with --mpl-generate-path pointing to two directories (I guess with a -k to separate the plots into the scatter subdir?

Ah yes, that was a recent change by David. I've been running pytest with --mpl-generate-path twice with the different directories, but yes pointing to them both in the same command would be more efficient


only supports python 3.4

The documentation specifies that this plugin works up until python 3.9 but the setup.py is enforcing the usage of only python 3.4 which has reached end of life since March 18th, 2019. I do not know for which versions this plugin is tested and if these tests are meaningful and complete, hence the issue instead of a pull request to update the setup.py

@Fjolnir-Dvorak That's not exactly it.
The setup.py specifies ~=3.4, wich is a Compatible Release modifier, see (https://peps.python.org/pep-0440/#compatible-release). Wich could roughly be translated to >3.4, <4.0 if semver is respected.
And, having a look at the tox configuration in this repo, you can see it's tested up to at least python3.9. I'm using it on python3.10 without any issues so far.
envlist = py{3.6,3.7,3.8,3.9}-pytest{5,6},flake8


fix: output params

fix output 参数不生效

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.yunbei seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Support pulling OCI Image Index manifests

Resolves #2749
Implementation follows https://github.com/GoogleContainerTools/jib/issues/3700#issuecomment-1171283502

Add Accept header application/vnd.oci.image.index.v1+json during base image pull
Re-use the logic from V22ManifestListTemplate to select the target platform diget via a new interface ManifestListTemplate

Before filing a pull request, make sure to do the following:

[x] Create a new issue at https://github.com/GoogleContainerTools/jib/issues/new/choose.
[x] Ensure that your implementation plan is approved by the team.
[x] Verify that integration tests and unit tests are passing after the change.
[x] Address all checkstyle issues. Refer to the style guide.

This helps to reduce the chance of having a pull request rejected.

@rquinio Thank you; we'll review next week.

No worries. Hopefully I've fixed the formatting issue.

Done ! I also took the opportunity to fix missing coverage in PullBaseImageStep for manifest lists pulling and case where the target architecture is not in the list.

Test failure:
> Task :jib-core:test

com.google.cloud.tools.jib.builder.steps.PullBaseImageStepTest > testCall_allMirrorsFail FAILED
    java.lang.NullPointerException
        at com.google.cloud.tools.jib.builder.steps.PullBaseImageStep.pullBaseImages(PullBaseImageStep.java:296)
        at com.google.cloud.tools.jib.builder.steps.PullBaseImageStep.call(PullBaseImageStep.java:159)
        at com.google.cloud.tools.jib.builder.steps.PullBaseImageStepTest.testCall_allMirrorsFail(PullBaseImageStepTest.java:571)

com.google.cloud.tools.jib.builder.steps.PullBaseImageStepTest STANDARD_OUT
    [MockitoHint] PullBaseImageStepTest.testCall_allMirrorsFail (see javadoc for MockitoHint):
    [MockitoHint] 1. Unused... -> at com.google.cloud.tools.jib.builder.steps.PullBaseImageStepTest.setUpWorkingRegistryClientFactoryWithV22ManifestList(PullBaseImageStepTest.java:672)
    [MockitoHint]  ...args ok? -> at com.google.cloud.tools.jib.builder.steps.PullBaseImageStep.pullBaseImages(PullBaseImageStep.java:294)

Should be fixed, testCall_allMirrorsFail was wrongly using the client factory with new V22ManifestList mocks, instead of the old V22ManifestTeplate mock.

@rquinio Thank you! I'm afraid we need a bit more testing to pass the 80% coverage gate. OciIndexTemplate.ManifestDescriptorTemplate is likely an easy candidate. Can you see the Sonar report that's linked in "Details" under the Github Action checks?

@elefeint I've added a test for POJO -> JSON serialization.
I had a look at the code duplication, but I wouldn't risk factorizing the JSON objects between docker and OCI manifests as they have different fields, and I'm not sure of the details of each spec.


Validate all yml files in folder

Would be great if we could run e.g. "yamllint **.yml"

This is supported already. You could pass globs as CLI input. You may have a try. :)

Hi. The CLI supports globs input already. You may have a try. :)

As mentioned by @poppinlp, you should be able to run e.g. yamllint some/dir/*.yaml or yamllint lorem.yaml ipsum.yaml to check multiple files. Thus I’m closing this issue but feel free to let me know if you have any further problems/issues! :)

Thank you for getting back! Does this work when calling from code?

No, but you could implement it within your script/application by combining the yamlLint.lintFile method (which is intended for programmatic use as described by you) and glob. Feel free to check out cli.js where it is implemented exactly like that! :)

Kk, makes sense. I believe that's what I ended up doing after I opened this ticket four month ago. Thanks!


[desktop-guide wpf] Change folder from desktop/wpf to desktop-wpf

Change folder from desktop/wpf to desktop-wpf

These haven't been published yet @rpetrusha. They are in a release branch.

😄


NoAnswer: The DNS response does not contain an answer to the question: f1ash.trust.openalias.org. IN TXT

Crash Report
This crash report was reported through the automatic crash reporting system 🤖
Traceback
  File "/usr/lib/python3.6/site-packages/electroncash/util.py", line 613, in run_with_except_hook
    run_original(*args2, **kwargs2)
  File "/usr/lib64/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.6/site-packages/electroncash_gui/qt/main_window.py", line 334, in f
    self.alias_info = self.contacts.resolve_openalias(alias)
  File "/usr/lib/python3.6/site-packages/electroncash/contacts.py", line 102, in resolve_openalias
    records, validated = dnssec.query(url, dns.rdatatype.TXT)
  File "/usr/lib/python3.6/site-packages/electroncash/dnssec.py", line 269, in query
    out = resolver.query(url, rtype)
  File "/usr/lib/python3.6/site-packages/dns/resolver.py", line 1053, in query
    raise_on_no_answer)
  File "/usr/lib/python3.6/site-packages/dns/resolver.py", line 234, in __init__
    raise NoAnswer(response=response)

NoAnswer: The DNS response does not contain an answer to the question: f1ash.trust.openalias.org. IN TXT

Reporter
This issue was reported by 1 user(s):

Electrum Version
Operating System
Wallet Type
Locale

3.1.6
Linux-4.16.0-0.rc6.git2.2.fc29.x86_64-x86_64-with-fedora-29-Rawhide
standard
tt_RU

Additional Information
The reporting user(s) did not provide additional information.

Electrum reference:
https://github.com/spesmilo/electrum/issues/4081
Relevant reasoning:

NoAnswer is a subtype of dns.exception.DNSException, which we now catch since ...

Electron cash issue #626


Manually adding a player to a league bug

Players tab > Manually add a new player to league.
If the user submits an email that is a duplicate in the database, it should respond with an error. It currently responds with as successful(even though it wasn't)

I want to try this


Unit test and a collection of amendments

compilation error
sync functions in Asciiout,cliinterpreter,emitfunctions,pdf
ncp not working async / await
parseFunctions duplicated in confluence
ordered list not working
adding new unit test with working user cases

Fixing bugs and adding new functionalities:
-Reading from confluence.
-Reading from markdown files.
-Generating markdown files.
-Visualization images in any case.
-Reading html from websites.
-Reading all the links from an index website.

Readme.adoc amendments


Green Screen - Text based code is hard to read

Green Screen - Text based code is hard to read
using green screen , front camera (and high contrast in image below, but doesn't matter) the code is not very legible.  The shadow makes it hard to read and looks like it is blurred as my expression demonstrates.

Windows, Chrome

https://github.com/microsoft/pxt/pull/8999


Black screen on page changing with a projected pdf

Project a pdf file and change the page. A black screen appears while changing.
Problem: The display properties (zoom, page number, visible, ...) is saved into the projector config. When changing the page, the projector config is updated and so the projector reloads the elements. The ng-repeat over all elements rebuild the DOM. In fact, the ng-pdf with the canvas is removed and immediately placed by angular. So the canvas reloads --> this causes the black screen.
Solution: Do not save the display information into the projector config. I would like to have a JSON-field in the mediafile model (name like 'display_information'), so updating e.g. the page number do not reload the projector elements. Also this helps syncing if we want to display one pdf on multiple projectors, so all projectors display the pdf equally.
@normanjaeckel can you change the mediafile model?

Sorry but I do not like this solution. It would be impossible to project different pages of a file on different projectors.
I strongly recommend not to store projecting details into the projected model (like a specific line number into motion model or the number of last speakers to be shown into the agenda item etc.) to keep our modeling and multi projecting stuff clean.
The problem of angular's ng-repeat has to be solved separately. (Example: Imagine a projector that shows a motion, a clock, a countdown and a custom mediafile pdf image in the corner at once (feature provided by a plugin). If I change the motion all other projector elements flutter.) Maybe we have to use Angular2 or React or whatever is more powerful in updating the DOM than AngularJS.

Changing the motion will not result in a reloading of the elements, because the projector entry does not update.
But yes, the ng-repeat problem should be resolved. But the only thing I can imagine is to write a custom ng-repeat, that checks explicit for changes and do not clear and rebuild the whole DOM.

Sorry, with "change the motion" I mean project another motion instead of the current one.

I have found a solution -- but now, we cannot zoom the pdf anymore, because the used player does not support to set the zoom (just the initial zoom). Only a zoomIn(), zoomOut(), pageFit() is provided. Thus the player doesn't initialize on every change anymore, the zoom is fixed to the initial zoom.
Please try out my branch Issue3259 --> page changing works, zooming not.
Some options: First, make a fork of the used viewer and implement this (should be easy) and try to bring this upstream. Or use another viewer. Or write our own viewer (some more work..).

I tested your branch Issue3259 with a pdf presentation:

Page changing works without black screen. Very good.
Zooming of a pdf presentation is not important because the initial zoom starts with fullscreen which is enough.
Every page changing action gets a TypeError: canvasScope.clearCanvas is not a function.
Is there a possibility to preload the whole pdf? If you load a pdf file with e.g. 15 pages with a lot of images and text boxes the first load of each page needs a few (mili) seconds. After some page up/down movements the pdf pages loads directly.


GSSOC EXT NOTICE: Improper Labeling in the Project

Dear Project Admin @pankaj-bind
It has come to our attention that your repository not applying the necessary labels to issues and merged PRs, which is affecting contributor scores on the leaderboard.
Please ensure you use the correct labels:

gssoc-ext
level1, level2, level3
hacktoberfest-accepted (only if your repository have Hacktoberfest topic in description)

NOTE: Level labels should not have any dashes between them. Spaces are allowed, but no dashes should be used.
Kindly review and update the labels on your issues and PRs to ensure fairness for all contributors. Failure to address this may result in your project being flagged.
Thank you,
Core Team
GSSoC '24 Extended

@pankaj-bind


I'd rather the cache (and every other potential implementor of this function) not be responsible for rollback. This should happen in just once place in the IM, key'ed off of a CHIP_OUT_OF_MEMORY error.

I'd rather the cache (and every other potential implementor of this function) not be responsible for rollback. This should happen in just once place in the IM, key'ed off of a CHIP_OUT_OF_MEMORY error.
Originally posted by @mrjerryjohns in https://github.com/project-chip/connectedhomeip/pull/16602#discussion_r840927436

@yunhanw-google this is still relevant right?


GPU memory show max/min only

Instead of logging GPU mem for all GPUs, probably better to just show the min/max usage? Maybe the flag can be modified?
# now
Trainer(log_gpu_memory=False)

# proposed
Trainer(log_gpu_memory='min_max')

# and for all GPUs
Trainer(log_gpu_memory='all')

@adefazio

Should it be by default min_max or empty string or False?

default = None


Reindent some lines, fixing gcc indentation warnings.

LittleCMS now compiles without warnings using:
CFLAGS=-Wall ./configure && make

Looks great, thank you


(Build Tools SKU) Can't find VS from non-dev command window

When installing MSBuild from the Build Tools for Visual Studio 2017 RC product, MSBuild is unable to find Visual Studio from a standard command prompt.
There are a few mechanisms used to determine the location of Visual Studio, and if none of these are able to be resolved the value will be left blank. This manifests itself as certain properties being set incorrectly. MSBuildExtensionsPath, for example, will be \MSBuild. Both issues should be addressed:

This code should be able to find the path to the Build Tools "Visual Studio" root via the setup API. This works on standard installs of Visual Studio, but apparently not the Build Tools install.
When Visual Studio can't be found, properties that are derived from that should have a better default (even empty would be better than \MSBuild).

@AndyGerlicher  does c3f7f72 fix this entirely or is there more to be done? If so, what?

This appears to work just fine with Build Tools 15.5.4. Closing as fixed.


typo in plugin name

BUMP who is in charge for press just the "merge" button?

Thank you for this PR.
I just got in change for pressing the merge-button. =)


New merchant

Just started accepting Monero (and it's first on the list of payments)
http://natureprovides.com/

Hello! I added your service in #655
+merchant
+in progress


Design Doc 008: File upload for API and UI + content scanning

Design document 008: File upload, API, and content scanning
Acceptance criteria

[x] Draft document
[x] Identify design and policy considerations
[x] Review by tech
[ ] Final review by policy, design, and product
[ ] Finalize (tech)

Draft has been completed and is ready for review.

First tech review completed, changes have been applied to design.

Design doc has been updated with Additional Impacts and Open Questions based on memory use and file downloading options.


"Show" control, similar to "Find"

Need the same thing to be able to show just 2 country mountains (edit show field of state)

done in e1cda784054775313fa1e9c27861f4d5ec910587


Give visual feedback or redirect on successful form submission

Some forms only give visual feedback in case of errors/invalid input. For better user experience, it would be nice to display a success notification/icon/toast.
This applies to the following forms (feel free to extend the list):

[x] Password change
[ ] Group description: should redirect to previous page because it gets called from multiple places
[x] Profile edit: should redirect to profile page
[x] Email change
[x] Account deletion

I would also like more redirects if the result of the operation can be shown there (e.g. edited data). Generally, it makes sense to redirect back to the previous page. If there is none (user landed on the page), we should define a default page to redirect to.
It could also happen that the previous page is the login page. Then they shouldn't be redirected back there. Maybe there are other pages as well where redirections don't make sense. A whitelist could be helpful?

In #934 I changed how alerts are displayed: Now they are shown at the bottom of the window, with fixed position, similar to a toast.
The reason for this change is that otherwise an alert is not visible when the user scrolled down the page before an alert is displayed.
This problem arises when a user changes the password on the settings page.
In contrast to a toast, our KAlerts only disappear when they are dismissed manually, though. IMHO this is annoying so I tried to have them disappear automatically after a couple of seconds. I didn't get it to work... QAlert has a property duration but I don't know what it actually does or how to use it.

Should be able to dismiss them after a timeout inside the alerts store module. That is where the logic on what to show is held.

After the quasar update (#974) the alerts don't work properly anymore:

They aren't dismissible even if specified so
They aren't shown if logged out
They aren't shown in the foreground

I think that's a good opportunity to tackle this now and implement a unified mechanism for how alerts are displayed.


Incomplete repl file seems to be generated for esp32_devkitc_wroom board

Description
Hello, I've been trying to generate the repl file for the esp32_devkitc_wroom board and it's being incomplete generated.
In a nutshell, I used the xtensa.resc script as a reference and it's working fine but when I tried to a small change and I got no success:

Replace the .elf file by the one generated when compiling the Zephyr Hello World sample for esp32_devkitc_wroom
Replace the xtensa-sample-controller.repl by the one generated by dts2repl

I'm not sure if I'm missing something, any suggestions are more than welcome. Thank you in advance!
Steps to reproduce

Compile the hello world on Zephyr for esp32_devkitc_wroom

west build -p always -b esp32_devkitc_wroom samples/hello_world

Generate the repl file using dts2repl

dts2repl  $HOME/zephyrproject/zephyr/build/zephyr/zephyr.dts --output esp32_devkitc_wroom.repl

Replace both esp32_devkitc_wroom.repl and the new .elf file generated after compiling the Zephyr's HelloWorld sample

Testing scenario
Here is the what I had for the repl and resc file:
esp32_devkitc_wroom.resc
using sysbus

# create the platform
mach create
# machine LoadPlatformDescription @platforms/cpus/xtensa-sample-controller.repl
machine LoadPlatformDescription $ORIGIN/esp32_devkitc_wroom.repl

# display the UART analyzer window
showAnalyzer cpu.uartSemihosting

# load the ELF file
macro reset
"""
#    sysbus LoadELF @https://dl.antmicro.com/projects/renode/xtensa-sample-controller-zephyr-hello-world.elf-s_293544-4be60f8a3891e70c30e1e8a471df4ad12ab08144
    sysbus LoadELF $ORIGIN/zephyr.elf
"""
runMacro $reset

esp32_devkitc_wroom.repl
The input file used in the STEP 3 has 515 lines and here is the outcome:
flash0: Memory.MappedMemory @ sysbus 0x0
    size: 0x400000

sram0: Memory.MappedMemory @ sysbus 0x3ffb0000
    size: 0x2c200

ipmmem0: Memory.MappedMemory @ sysbus 0x3ffe5230
    size: 0x400

shm0: Memory.MappedMemory @ sysbus 0x3ffe5630
    size: 0x3c00

// autogenerated

Script's output
$ renode /Users/costav10/renode/scripts/test/esp32_devkitc_wroom.resc

renode /Users/costav10/renode/scripts/test/esp32_devkitc_wroom.resc
19:56:25.0005 [INFO] Loaded monitor commands from: /Applications/Renode.app/Contents/MacOS/scripts/monitor.py
Font 'Roboto Mono' not available in the system. Using '.AppleSystemUIFont' instead
19:56:25.1339 [WARNING] The font 'Roboto Mono' defined in the config file cannot be loaded.
19:56:25.4789 [INFO] Including script: /Users/costav10/renode/scripts/test/esp32_devkitc_wroom.resc
19:56:25.4895 [INFO] System bus created.
19:56:26.7616 [WARNING] Could not initialize disassembly engine
19:56:26.7660 [WARNING] The debug mode now has no effect - connect a debugger, and switch to stepping mode.
Font 'Roboto Mono' not available in the system. Using '.AppleSystemUIFont' instead
19:56:26.8099 [WARNING] The font 'Roboto Mono' defined in the config file cannot be loaded.
19:56:26.9394 [INFO] sysbus: Loading segment of 32 bytes length at 0x0.
19:56:26.9416 [WARNING] sysbus: Tried to access bytes at non-existing peripheral in range <0x00000000, 0x0000001F>.
19:56:26.9423 [INFO] sysbus: Loading segment of 28 bytes length at 0x20.
19:56:26.9423 [WARNING] sysbus: Tried to access bytes at non-existing peripheral in range <0x00000020, 0x0000003B>.
19:56:26.9424 [INFO] sysbus: Loading segment of 3780 bytes length at 0x40.
19:56:26.9424 [WARNING] sysbus: Tried to access bytes at non-existing peripheral in range <0x00000040, 0x00000F03>.
19:56:26.9428 [INFO] sysbus: Loading segment of 548 bytes length at 0xF04.
19:56:26.9429 [WARNING] sysbus: Tried to access bytes at non-existing peripheral in range <0x00000F04, 0x00001127>.
19:56:26.9429 [INFO] sysbus: Loading segment of 10120 bytes length at 0x1128.
19:56:26.9429 [WARNING] sysbus: Tried to access bytes at non-existing peripheral in range <0x00001128, 0x000038AF>.
19:56:26.9432 [INFO] sysbus: Loading segment of 14504 bytes length at 0x38B0.
19:56:26.9432 [WARNING] sysbus: Tried to access bytes at non-existing peripheral in range <0x000038B0, 0x00007157>.
19:56:26.9433 [INFO] sysbus: Loading segment of 4736 bytes length at 0x3FFB0228.
19:56:26.9433 [WARNING] sysbus: Tried to access bytes at non-existing peripheral in range <0x3FFB0228, 0x3FFB14A7>.
19:56:26.9434 [INFO] sysbus: Loading segment of 5120 bytes length at 0x3FFE5230.

First of all - there is no ESP32 support in Renode. When you look at your repl its clear that the only thing generated was memories.
Having said that I doubt you've actually even loaded the repl that you've pasted in this issue as it clearly tries to load an ELF to a platform that does not even have memory.

Thanks @pgielda for the quick response and clarification.
I was not aware of this, I have just started learn about Renode and I saw the xtensa.resc and I thought to play with esp32_devkitc_wroom emulation for fun.

I recommend trying cortex-m platforms, most of them are supported. You can see what is currently supported with newest renode + dts2repl here: https://zephyr-dashboard.renode.io/


Remove YouTube embed from default landing

I find the default landing page frustratingly unprofessional. You can call me unfunny if you want, but I always need to ensure I add some features in every environment, lest I get strange looks and comments from my clients.
Am I the only one who thinks we should just keep this page simple and meme-free?

I can see that. Could I talk you into adding a config option for this to Flipper::UI config?  Perhaps config.taylor_swift = true/false and default it to true?

Or config.business_time, or config.professional, etc. :)

I have a history of maintaining whimsicality long into maturity with gems, so I'll be leaving this. Happy to have a config option. Closing this to keep things tidy, but if anyone wants to open a new one with config option or update this one, I'd be happy to merge.

Ah, I didn't realize you maintain HTTParty as well.  That rather unusual (inappropriate?) use of the post-install message "you must party hard" (https://github.com/jnunemaker/httparty/blob/master/httparty.gemspec#L22) makes more sense  to me now.


Handle the video element not including a poster

At the moment a video element without a poster attribute will cause the script to try to retrieve an image from null.

+1

+1
Currently it throws this error if a poster is not set:
GET file:///directory/null net::ERR_FILE_NOT_FOUND


Cannot ls Camera Roll on OneDrive

I want to copy down from OneDrive the contents of the Camera Roll folder. When I list the dirs it is there but I cannot do anything with it
jamie@blackbox:~/Downloads$ rclone lsd "onedrive:Pictures"
          -1 2017-06-07 10:24:17      1029 1900-1999
          -1 2017-06-07 09:43:53       232 2000
          -1 2017-06-07 10:06:13       221 2001
          -1 2017-06-07 09:48:40        89 2002
          -1 2017-06-07 09:43:59       164 2003
          -1 2017-06-07 09:48:48       665 2004
          -1 2017-06-07 10:36:35      1154 2005
          -1 2017-06-09 19:39:31        11 2006
          -1 2017-06-07 12:09:42        11 2007
          -1 2017-06-09 19:46:50        11 2008
          -1 2017-06-09 19:47:38        12 2009
          -1 2017-06-09 19:46:29        12 2010
          -1 2017-06-09 19:47:16        12 2011
          -1 2017-06-07 12:53:41        12 2012
          -1 2017-06-09 19:47:08        12 2013
          -1 2017-06-09 19:44:32        12 2014
          -1 2017-06-18 11:36:35        12 2015
          -1 2017-06-18 11:35:16        12 2016
          -1 2017-06-26 19:00:24         6 2017
          -1 2017-06-15 16:46:04       173 baker
          -1 2017-06-29 14:23:33        33 Camera Roll
          -1 2017-06-09 20:32:35       285 dunbar
          -1 2015-12-23 22:53:11       249 scotland
          -1 2016-09-30 18:20:45         0 Screenshots
          -1 2017-06-09 22:14:31         8 vhs

What is your rclone version (eg output from rclone -V)

rclone v1.36

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubuntu 17.04

Which cloud storage system are you using? (eg Google Drive)

OneDrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone ls "onedrive:Pictures/Camera Roll"

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

jamie@blackbox:~/Downloads$ rclone -vv ls "onedrive:Pictures/Camera Roll"
2017/06/29 15:28:44 DEBUG : rclone: Version "v1.36" starting with parameters ["rclone" "-vv" "ls" "onedrive:Pictures/Camera Roll"]
2017/06/29 15:28:47 INFO  : One drive root 'Pictures/Camera Roll': Modify window is 1s
2017/06/29 15:28:47 Failed to ls: directory not found

I think this bug may have been fixed already - try the latest beta from https://beta.rclone.org

You are correct. I had tried with the beta but I was actually still calling on the stable release. Apologies, this is not an issue in the beta. Thanks again.

No problems - thanks for updating the issue.

v1.37 is out and it seems to contain the fix. It copied my "Camera Roll" folder successfully. (This folder was created by my Microsoft Lumia phone.)


Radio change notification

I think it would be useful to display the radio name when you change it (by next/previous media keys).
Thank you!

good idea! I wanna add a notification when song title change as well.

Maybe the song title should be configurable, it could become distracting :)

Sure. For all notification functions I will add settings options.


Calling a lib function inside a binary expression causses an error

import "math";
import "console";

var x float = 1.0;
var cosX float = 2 + math.cos(x) + 1;

console.println(cosX);

in this code we call the math.Cos inside a binary expression
this result in the error  :
Fatal Error Line: 5, Col: 37
cannot use math here

this is caused by the binary expression not parsing when encountering the selector expression and continuing to parse a selector instead of the correct binary expression

the error also occurs when we access a field inside a binary expression
import "console";

struct Point {
    x: float;
    y: float;
}

function TestPoint(p: Point) {
    var calc float = p.x + p.y;
    console.println(calc);
}

var p Point = Point{1.0, 2.0};

TestPoint(p);

it produces the error :
Fatal Error Line: 9, Col: 31
struct cannot have filed of type Point


TypeError: Cannot read property 'ActiveSignature' of null

Erro reported by error telemetry:
TypeError: Cannot read property 'ActiveSignature' of null
at /Users/a123/.vscode-insiders/extensions/ms-vscode.csharp-0.3.7/out/features/signatureHelpProvider.js:24:38
at process._tickCallback (node.js:369:9)

Duplicate of #64. This is already fixed by #107.


Nodes bootstrapped via aws-hosted-cp get stuck with node.cloudprovider.kubernetes.io/uninitialized taint

While testing aws-hosted-cp for our e2e test work in #280 I encountered a situation where nodes that are deployed using the aws-hosted-cp template  cannot use CCM resources as they get stuck with the following taint:
    taints:
    - effect: NoSchedule
      key: node.cloudprovider.kubernetes.io/uninitialized
      value: "true"

Relates to: https://github.com/kubernetes-sigs/cluster-api/issues/9858. https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/4618
Stripping the taint allows the test to progress.

Loadbalancer won't get an external IP assigned either, stripping the taint has no effect on this.

This seems related to CCM not running correctly on workload clusters due to some form of permissions issue, looking into it further.

For whatever reason this is intermittent, when trying to debug this on another run everything went fine.

I can reproduce this pretty well now, I'm going to repro it outside of CI and see if I can debug and get to the bottom of this.


[Documentation] Configure whether a link should be opened in a new tab

What can be improved
If I click on the TypeScript SDK link here: https://docs.buildwithfern.com/overview/welcome/generators it opens the link as a new tab in my browser. That's not the behavior I'd expect. Is this configurable?

this has since been solved and is live!
@minaelee agree that fixing the documented behavior is needed.

https://github.com/fern-api/fern/pull/2879 documents the default link behavior


chore(dev): release 0.15.6

:robot: I have created a release beep boop
0.15.6 (2024-11-07)
Bug Fixes

improve image caching logic (859f679)
never clear, and always update, program relations on upsert (86c5330)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v0.15.6
:sunflower:


Jest spyOn() calls the actual function instead of the mocked

I'm testing apiMiddleware that calls its helper function callApi. To prevent the call to actual callApi which will issue the api call, I mocked the function. However, it still gets called.
apiMiddleware.js
import axios from 'axios';

export const CALL_API = 'Call API';

export const callApi = (...arg) => {
  return axios(...arg)
  	.then( /*handle success*/ )
  	.catch( /*handle error*/ );
};

export default store => next => action => {
  // determine whether to execute this middleware
  const callAPI = action[CALL_API];
  if (typeof callAPI === 'undefined') {
    return next(action)
  }

  return callAPI(...callAPI)
  	.then( /*handle success*/ )
  	.catch( /*handle error*/ );
}

apiMiddleware.spec.js
import * as apiMiddleware from './apiMiddleware';

const { CALL_API, default: middleware, callApi } = apiMiddleware;

describe('Api Middleware', () => {

  const store = {getState: jest.fn()};
  const next = jest.fn();
  let action;

  beforeEach(() => {
    // clear the result of the previous calls
    next.mockClear();
    // action that trigger apiMiddleware
    action = {
      [CALL_API]: {
        // list of properties that change from test to test
      }
    };
  });

  it('calls mocked version of `callApi', () => {
	const callApi = jest.spyOn(apiMiddleware, 'callApi').mockReturnValue(Promise.resolve());

	// error point: middleware() calls the actual `callApi()`
	middleware(store)(next)(action);

	// assertion
  });
});

Please ignore the action's properties and argument of callApi function. I don't think they are the concern of the point I'm trying to make.
Tell me if you need further elaboration.
stackoverflow

@NERDYLIZARD sorry for the dealy here!
By default jest.spyOn() does not override the implementation (this is the opposite of jasmine.spyOn). If you don't want it to call through you have to mock the implementation:
const callApi = jest.spyOn(apiMiddleware, 'callApi').mockImplementation(() => Promise.resolve());

I seem to be having this problem as well, but the solution that @rickhanlonii proposed isn't working for me. I'm following the documentation for jest.spyOn(), but the mocked function is  still being called when running the tests.
processing.js
const saveVisit = (visit) => {
  return database.put(visit)
}

const processVisit = (visit) => {
  if (visit.status.includes('PROCESSED') {
    saveVisit(visit)
    return promise.resolve()
  }

  saveVisit({ ...visit, status: 'PROCESSED' })
  return visit.status
}

processing.test.js
const subject = require('../processing')

test('processVisit for processed visit returns null', () => {
  const visit = { status: 'PROCESSED' }

  jest.spyOn(subject, 'saveVisit').mockImplementation(() => Promise.resolve())
  return subject.processVisit(visit).then(result => expect(result).toBeNull())
})

Hi all,
I have same question as @JonathanHolvey.
Is there any other solution? Can I mock the method from super class? @rickhanlonii
Thanks.

@JonathanHolvey : did you solve this problem ? I seem to have hit it - but the weird thing is that an "it()" above the failing spy does work
// this test spyon works ..
it('should list users', async () => {
        jest.spyOn(service, 'listUsers').mockImplementation(() =>
            Promise.resolve(["test"])
        );
        const result = await controller.listUsers();
        expect(result).toEqual(['test']);
    });
// this one doesn't ...
it('should create a user', async () =>
        jest.spyOn(service, 'createUser').mockImplementation(() => Promise.resolve(null);
       );
        return controller.createUser({            username: 'test''        });
});

ah, just forget what I said. Brain fart - my controller was calling the wrong service ...

Why is this issue closed, since it's not resolved?
I encountered this problem when trying to prevent Jest from calling the spied method.
I tried jest.fn() and .mockImplementation(() => {}) and the original method is still called from the test.
I opened a question on StackOverflow:
https://stackoverflow.com/questions/55852730/jest-when-using-spyon-function-ensure-the-spied-one-is-not-called
Any solutions?

I am running into the same issue. I even tried the mockImplementation but still it hits the original function.

Same issue here. I have something like
original.js
original = () => {
  console.log('original function');
}

original.test.js
jest.spyOn(...).mockImplementation(() => {
  console.log('test function');
});

The output is
test function
original function

Why is this the case?

I'm having the same issue with something like this:
original.js
export const original = () => {
  console.log('original function');
}

original.test.js
import * as stuff from './original.js';

...

const mySpy = jest.spyOn(stuff, 'original').mockImplementation(() => {
  console.log('mock function');
});

The output is
mock function
original function

I have same issue when try mocking Date.now
jest.mock(Date, 'now').mockImplementation(() => 1); expect(Date.now()).toBe(1) does not pass

i solved same problem by exporting default object with all methods, so @NERDYLIZARD's code would look like that:
apiMiddleware.js
import axios from 'axios';

export const CALL_API = 'Call API';

export default {
    callApi(...arg) {
        return axios(...arg)
            .then( /*handle success*/ )
            .catch( /*handle error*/ );
    },
    middleware: store => next => action => {
        // determine whether to execute this middleware
        const callAPI = action[CALL_API];
        if (typeof callAPI === 'undefined') {
            return next(action)
        }

        return callAPI(...callAPI)
            .then( /*handle success*/ )
            .catch( /*handle error*/ );
    }
}

apiMiddleware.spec.js
import apiMiddleware, { CALL_API } from './apiMiddleware';

describe('Api Middleware', () => {

    const store = {getState: jest.fn()};
    const next = jest.fn();
    let action;

    beforeEach(() => {
        // clear the result of the previous calls
        next.mockClear();
        // action that trigger apiMiddleware
        action = {
            [CALL_API]: {
                // list of properties that change from test to test
            }
        };
    });

    it('calls mocked version of `callApi', () => {
        const callApi = jest.spyOn(apiMiddleware, 'callApi').mockReturnValue(Promise.resolve());

        // error point: middleware() calls the actual `callApi()`
        apiMiddleware.middleware(store)(next)(action);

        // assertion
    });
});

@tranvansang try Date.now = jest.fn(() => 1)

Hello everyone 😊
As I was taking a look into this I first tried to add a very simple test to check whether this specific behaviour was present in the current version of master. The test-case below is based on one of the comments in this issue.
it('does not call the mocked function', () => {
  let originalCallCount = 0;
  let fakeCallCount = 0;
  const obj = {fn: () => originalCallCount++};

  moduleMocker.spyOn(obj, 'fn').mockImplementation(() => fakeCallCount++);

  obj.fn();
  expect(originalCallCount).toBe(0);
  expect(fakeCallCount).toBe(1);

  obj.fn();
  expect(originalCallCount).toBe(0);
  expect(fakeCallCount).toBe(2);
});

I also tried the test-case suggested by @tranvansang and I didn't find problems:
it('works for dates', () => {
  moduleMocker.spyOn(Date, 'now').mockImplementation(() => 1);
  expect(Date.now()).toBe(1);
});

This test passes just fine, demonstrating that the original function is never actually called. This means the behaviour seems correct on jest's side.
Then I went on to check for edge-cases but none caused the tests to call the original function. I even checked whether it could be because now could be a non-writable property, but that's not the case and has never been AFAIK. I imagined that could be the case for when using esmodules, but if it fails loudly in the case of Date.now the behaviour would be the same even if that was true.
> Object.getOwnPropertyDescriptor(Date, "now")
{ value: [Function: now],
  writable: true,
  enumerable: false,
  configurable: true }

However, tests would indeed fail when the function property we're trying to mock is not writable, which means we cannot assign to it using the = operator. However, tests would fail loudly instead of calling the original function as is the behaviour described above.
For this, I used a variation of the first test.
it('works for non-writable properties', () => {
  let originalCallCount = 0;
  let fakeCallCount = 0;
  const obj = {};
  Object.defineProperty(obj, 'fn', {
    value: () => originalCallCount++,
    writable: false,
    configurable: true,
  });

  moduleMocker.spyOn(obj, 'fn').mockImplementation(() => fakeCallCount++);

  obj.fn();
  expect(originalCallCount).toBe(0);
  expect(fakeCallCount).toBe(1);

  obj.fn();
  expect(originalCallCount).toBe(0);
  expect(fakeCallCount).toBe(2);
});

The test above will fail with the following error:
TypeError: Cannot assign to read only property 'fn' of object '#<Object>'

In the case above it doesn't need to fail. It could simply use Object.defineProperty instead of the = operator, which would work since we can change the property descriptor and pass a different value due to this property being configurable but we cannot change the value using = due it not being writable.
I can't think of any other ways of reproducing this.
If any of you could provide a minimum reproducible snipped I wouldn't mind looking into it and checking why it happens and if it's a problem in jest's side or not.

@KateBog that did not work, though.
@lucasfcosta have you tried with some babel configuration?
I remember while debug, some babel plugins transpile all Date.now to a new variable named dateNow.
The only way I can make it work is here
My babel config you can try if want to reproduce
{
    presets: [
      ['@babel/preset-env', {modules: 'commonjs', useBuiltIns: 'entry', corejs}],
      '@babel/preset-react',
      ['@babel/preset-typescript', {isTSX: true, allExtensions: true}]
    ],
    plugins: [
      '@babel/plugin-proposal-object-rest-spread',
  // 'react-hot-loader/babel',
  // Stage 0
  '@babel/plugin-proposal-function-bind',

  // Stage 1
  '@babel/plugin-proposal-export-default-from',
  '@babel/plugin-proposal-logical-assignment-operators',
  ['@babel/plugin-proposal-optional-chaining', {'loose': false}],
  ['@babel/plugin-proposal-pipeline-operator', {'proposal': 'minimal'}],
  ['@babel/plugin-proposal-nullish-coalescing-operator', {'loose': false}],
  '@babel/plugin-proposal-do-expressions',

  // Stage 2
  ['@babel/plugin-proposal-decorators', {'legacy': true}],
  '@babel/plugin-proposal-function-sent',
  '@babel/plugin-proposal-export-namespace-from',
  '@babel/plugin-proposal-numeric-separator',
  '@babel/plugin-proposal-throw-expressions',

  // Stage 3
  '@babel/plugin-syntax-dynamic-import',
  '@babel/plugin-syntax-import-meta',
  ['@babel/plugin-proposal-class-properties', {'loose': false}],
  '@babel/plugin-proposal-json-strings',
  'react-loadable/babel',,
      ['@babel/plugin-transform-runtime', {corejs}]
    ]
  }

Hi, @tranvansang thanks for your clarification 😊
Do you think it would be possible for you to provide a repo with a minimum reproducible?
It's a bit difficult to track down the problem by trying to put multiple separate pieces together especially since I don't have the same context as you when it comes to all the post-processing applied to the code before it gets run or what code does jest actually run against.
As per my post above, I don't think there's anything wrong on Jest's side but instead, I suspect there's something weird happening elsewhere (perhaps on any of the transformations that happen to your code). If that's the case maybe we could suggest adding something specific in jest to manage that edge-case, but first, we need to have a minimum reproducible we can work from.
Thanks for understanding 💖

@lucasfcosta
Here is the minimal repo
https://github.com/tranvansang/flip-promise/tree/now
It is definitely because of the @babel/plugin-transform-runtime as I comment here

Hi @tranvansang,
I just cloned the repo you have mentioned and there are no tests using mocks. I tried to add one myself (the one for Date.now that you had mentioned) but it still passes.
Are you sure you linked the correct repo? If you did, how can I reproduce this issue there?

@lucasfcosta that is the repo for my public repo.
I made a branch named now for the bug reproduction. Please use that branch

Ah, it makes sense now, I had tried master before. I'll give it a go in the weekend and I'll let you know how that goes. But in advance: this is probably something that's not solvable in Jest's side even though it could be enlightening to see why it happens or maybe find-out what we can do to fix it.

For me, this was an error because of how modules were being imported. I was mocking a function inside the same file as the function I was calling.
More details about it here: https://stackoverflow.com/questions/45111198/how-to-mock-functions-in-the-same-module-using-jest
Importing the module into itself and using it as a reference seemed to solve it, although kinda janky:
import * as thisModule from './module';

export function bar () {
    return 'bar';
}

export function foo () {
    return `I am foo. bar is ${thisModule.bar()}`;
}

Example from stackoverflow
Not the greatest, but works. Otherwise, take the function out into a different file.

Did anyone figure out why this is happening?

None of the examples proved in this issue are correct usage of spyOn.
From the OP, middleware is an object that just exists within the test file - replacing a function on that object won't have any effect outside of the lexical scope that object is inside of.
https://github.com/facebook/jest/issues/6972#issuecomment-482478861: same issue
https://github.com/facebook/jest/issues/6972#issuecomment-501386592: same issue
https://github.com/facebook/jest/issues/6972#issuecomment-505286524: uses jest.mock instead of jest.spyOn
A PR improving the docs here would be greatly appreciated as it seems we're not clear enough on how it works. There's no magic here - we literally replace a function of the name on the object you pass, and call through to it.

If anyone can put together a small repo showing the error (or a code sandbox). That'd be great. Small snippets and links to SO are all well and good, but it requires more effort for anyone wanting to investigate this.
https://www.snoyman.com/blog/2017/10/effective-ways-help-from-maintainers

My solution involved making sure to define the mockImplementation as async correctly.  I'm guessing that, since the mocks in these examples return promises they are mocking async functions. So the anonymous mock should also be defined as async is async () not just ().

For it was problem with exporting default methods in a module.

this doesn't work (calls the original method):

// module to be mocked
const exportingDefault = {
  a,
  b
};

export default exportingDefault;

this does work (properly mocks):

export default {
  a,
  b
};

Not for spyOn but the same issue.
Two overloaded functions (with different signatures) of the same name in TypeScript where one calls the other:
   public static async fileToUssFile(session: AbstractSession,
                                      inputFile: string,
                                      ussname: string,
                                      options: IUploadOptions = {}): Promise<IZosFilesResponse> {

The second:
    public static async fileToUSSFile(session: AbstractSession,
                                      inputFile: string,
                                      ussname: string,
                                      binary: boolean = false,
                                      localEncoding?: string,
                                      task?: ITaskWithStatus,
                                      etag?: string,
                                      returnEtag?: boolean): Promise<IZosFilesResponse> {
        return this.fileToUssFile(session, inputFile, ussname, {
            binary,
            localEncoding,
            task,
            etag,
            returnEtag
        });
    }

Both methods are in a class Upload.
This mock matches the first method signature but the original method is still called:
            Upload.fileToUSSFile = jest.fn(async (session, file, name, options = {}) => {
                fakeSession = session;
                return {
                    success: true,
                    commandResponse: "uploaded",
                    apiResponse: [
                        {success: true, from: inputfile, to: USSFileName}
                    ]
                };
            });

If I chance the mock to be this way (double assignment) my mock is called:
            const fn = jest.fn(async (session, file, name, options = {}) => {
                fakeSession = session;
                return {
                    success: true,
                    commandResponse: "uploaded",
                    apiResponse: [
                        {success: true, from: inputfile, to: USSFileName}
                    ]
                };
            });

            Upload.fileToUSSFile = fn;
            Upload.fileToUssFile = fn;

Same issue here, testing an Angular service. Here start method calls manage method. When testing start I try to provide a mock implementation for manage that overwrites its original implementation, but I can't prevent the original from executing (in this case it starts an infinite loop). Any ideas on the source of the problem?
game.service.ts
`import { Injectable } from '@angular/core';
import { OneDeviceModule } from '../one-device.module';
import { PlayersService } from './players.service';
import { Player } from '../../models/player';
@Injectable({
providedIn: OneDeviceModule
})
export class GameService {
public players: Player[];
constructor(private playersService: PlayersService) { }
public start(): void {
const players = this.playersService.getPlayersList();
if (players.length < 2) {
throw new Error('There must be at least two players to start the game');
}
this.players = players;
this.manage();
}
public manage(): void {
while(this.goesOn()) {
}

}
public goesOn(): boolean {
return true;
}
}`
game.service.spec.ts
`
import { TestBed } from '@angular/core/testing';
import { mocked } from 'ts-jest/utils';
import { GameService } from './game.service';
import { PlayersService } from './players.service';
import { Player } from '../../models/player';
jest.mock('./players.service');
const mockedPlayersService = mocked(PlayersService, true);
const players = [
new Player('John'),
new Player('Anna'),
new Player('Julia')
];
describe('GameService', () => {
let gameService: GameService;
let playersService: PlayersService;
beforeEach(() => {
TestBed.configureTestingModule({ providers: [GameService, PlayersService]});
gameService = TestBed.inject(GameService);
playersService = mockedPlayersService.mock.instances[0];
(playersService.getPlayersList as jest.Mock).mockReturnValue(players);
});
afterEach(() => {
mockedPlayersService.mockClear();
(playersService.getPlayersList as jest.Mock).mockClear();
});
describe('constructor', () => {
// irrelevant
});
describe('start', () => {
function onePlayerSetup(playersService: PlayersService): void {
(playersService.getPlayersList as jest.Mock).mockClear();
(playersService.getPlayersList as jest.Mock).mockReturnValue([new Player('John')]);
}
const mockManage: jest.Mock<void, never[]> = jest.fn().mockImplementation(() => {});
// irrelevant tests ommited
  **// in the following two cases I can't overwrite the original manage service with the mock implementation
it('should not call manage method if there are less than 2 players', () => {
  onePlayerSetup(playersService);
  gameService.manage = mockManage;
  try { gameService.start(); }
  catch { }
  finally { expect(mockManage).toHaveBeenCalledTimes(0); }
});

it('should call manage method if everything is ok', () => {
  gameService.manage = mockManage;
  gameService.start();
  expect(mockManage).toHaveBeenCalledTimes(1);
});**

});
});
`
I have also tried overwriting with jest.spyOn(gameService, 'manage').mockImplementation(() => {}), but this doesn't work either.

I managed to get past this with reference to this blog post
like:
import {ExampleService} from '../example.service
...
..

const exampleMockResponse = "....";

jest.spyOn(ExampleService.prototype, 'function').mockImplementation(() => Promise.resolve(exampleMockResponse));

In case anyone is still plagued by this issue, this short article does a great job of explaining the root cause (it is due to babel compilation). Arguably it's not pretty, but adding the additional layer of referencing worked for me.

Still having this issue. Not sure why this is closed.

I found a solution, at least for my use-case. I was trying to mock useEffect on React:
import React from 'react';
import { render } from '@testing-library/react';
import { MyComponentThatUsesUseEffect } from './MyComponentThatUsesUseEffect'

test('My test case', () => {
  const useEffectSpy = jest.spyOn(React, 'useEffect').mockImplementation(() => {});
  render(<MyComponentThatUsesUseEffect />);
  expect(useEffectSpy).toHaveBeenCalled();
});

Didn't work. But then I was changing
- import React from 'react';
+ import * as React from 'react';

So I have this
⬇
import * as React from 'react';
import { render } from '@testing-library/react';
import { MyComponentThatUsesUseEffect } from './MyComponentThatUsesUseEffect'

test('My test case', () => {
  const useEffectSpy = jest.spyOn(React, 'useEffect').mockImplementation(() => {});
  render(<MyComponentThatUsesUseEffect />);
  expect(useEffectSpy).toHaveBeenCalled();
});

Now it does work 👍🏼
Maybe this will work for your thing to and or give you a clue of what's happening


Appcache support for ironrouter

I doesn't know if I must ask it here or on appcache's github.
I want to use appcache, but it convert url to hashes;

From http://localhost:3000/@buom_01
To http://localhost:3000/#!@buom_01

In this way, iron-router thing that the page is the home page http://localhost:3000/#![...]
So, my probleme can be show with;
Router.onBeforeAction(function() {
  if (!Meteor.userId()) {
    this.render('connexion');
  } else {
    this.next();
  }
}, {
  except: ['home', 'connexion']
});

This code is useless because with a "#" we are considered on the home page and the requested page is trying to be loaded

How to say to iron-router the true url with onBeforeAction hook, or solve this probleme?
I think that the actual only and easiest way is fork it to reconvert internally the showed url to the original url (exemple: url = window.location.replace("!#",""); ).
An dreamly (not working and not real) solution;
Router.onBeforeAction(function(url) {
  this.next(url.replace("#!",""));
});

A trashy (real and working) solution;
Router.onAfterAction(function() {
  if (!(window.location.hash == "" || window.location.hash == "#" || window.location.hash == "#!" || window.location.hash == "#!connexion")
   && !Meteor.userId()) {
    Router.go('/connexion');
  }
});

Why can't you have hashtag in your URL? I'm using AppCache and Iron Router with no issues

[Log] Error: Syntax error, unrecognized expression: #!records/Dk6TDAgbqbNfxwt5W/edit/2
Iron router + appcache errors with this one. Everything is fine without appcache, though.

@Anonyfox Thanks, dude!

EDIT: resolved for me, the issue was iron-router-autoscroll package, not iron router itself

Anyone who came here, just run meteor remove okgrow:iron-router-autoscroll
@Buom01 can close the issue


column-break-after  atm only via: -webkit-column-break-after

column-break-after
atm only via: -webkit-column-break-after

This issue was imported from Google Moderator
Moderator votes: +3
Issue added by gar_onn on 2012-07-22
To vote this issue up or down, simply include +1 or -1 in your comment.

Looks like Webkit and Chrome have added a few prefixed items to columns:
-webkit-column-break-before
-webkit-column-break-inside
-webkit-column-break-after

I've found more background on my previous comment. From this MDN article, it seems page-break-before is migrating to break-before, which is supposed to be more generic for use in column and region breaks.
break-before is currently not supported anywhere, but as the footnote marks:

WebKit and Blink browsers don't support this property, but some have the non-standard -webkit-column-break-before and -webkit-region-break-before with similar parameters as page-break-before.

It seems break-before is listed in specifications that are either in Working Draft or Candidate Recommendation statuses.

Looks like this is now covered by MDN data, with a lot more nuance given the more recent specs:
https://caniuse.com/mdn-css_properties_break-after_paged_context
https://caniuse.com/mdn-css_properties_break-after_multicol_context
https://caniuse.com/mdn-css_properties_break-after_multicol_context_always
https://caniuse.com/mdn-css_properties_break-after_multicol_context_column
https://caniuse.com/mdn-css_properties_break-after_multicol_context_avoid-column
etc.
(via mdn/browser-compat-data#700, mdn/browser-compat-data#3330)


Extra padding on illustration section

Bug Report
Problematic behavior
On desktop, the page is vertically divided in two section. An illustration section then the content section.
Currently the illustration section has a padding of 2rem all around so the illustration used does not stick on edges that look visually weird.
Expected behavior/code
The illustration section should not have padding in order to stick illustration on left and bottom edges.
Possible Solution

Remove the padding: 2rem to the illustration box component.
Display the illustration through CSS with background-image and keep only the FUN Logo as image. From my point of view, this solution is more semantically adapted.

Additional context/Screenshots

Hi JB, Link this issues : https://github.com/openfun/jitsi-magnify/issues/182 ?


AngularDateTimePickerModule is not compatible with Angular Ivy

There is a build error when installing angular-mydatepicker on Angular 16.
'AngularMyDatePickerModule' does not appear to be an NgModule class.
Steps to reproduce:
Create an Angular 16 application.
Add angular-mydatepicker controls to the project.
run ng build

Angular CLI version

Hi @gopi-dreamorbit
Did you manage to find a solution for this incompatibility issue?

the only solution would be to migrate this library to at least Angular v9, when Ivy was introduced, and compile everything via Ivy.
seems unlikely right now, as the package uses Angular v7, a 5 year old version.

@gopi-dreamorbit @jahller any other datepicker with similar functionality?, I am upgrading my project to 13 to 17


seperate tooltip element

This is a nice new feature.
But this does not place a red border round the element.
Is it possible to add a class like "xt-error" to the element indicated for the seperate tooltip.
So: xt-validation-tooltip="groupSelector"
would result in a class on the element groupSelector that indicates that it is in error and some css can be added.

Is this related to the other question regarding css Sykes? You can use the built in angular classes to control this.

I don't think so.
I have a DIV that I give a xt-validation-tooltip="field1" field1 also has a xt-validation-tooltip.
When I test I can see that the class xt-error-container is added to the DIV but it is there alway's.
I also see the angular ng-invalid and ng-dirty classes on field1 as I manipulate the data.
But when I manipulate the data there is no change in classes on DIV. So how am I supposed to indicate that that an error has occurred ? By the way the tooltip is also not appearing.
I don't know if it is relevant, but field1 is inside DIV.

I discovered that the trigger for the tooltip is still on the validated field and NOT on the element with the tooltip. As the tooltip appreas on click I have to click the field to get a tool tip on something else.
And as I have been using this on hidden fields to indicate errors within groups of fields I did not see anything.
So it worked different that expected.
As there is only a change in the tooltip element when the tooltip is opened or closed this can not be used for attaching css for error colors


Restore the component release issue template

Description
Restore the component release issue template.
Issues Resolved
https://github.com/opensearch-project/opensearch-build/issues/3355
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #3360 (37b2939) into main (59ab434) will not change coverage.
The diff coverage is n/a.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@           Coverage Diff           @@
##             main    #3360   +/-   ##
=======================================
  Coverage   91.74%   91.74%
=======================================
  Files         172      172
  Lines        4991     4991
=======================================
  Hits         4579     4579
  Misses        412      412

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


File Storage Cannot Be Seen

Storage Explorer Version: 1.18
Build Number: 20210227.4
Platform/OS: Windows 10
Architecture: ia32
Regression From:  Yes cannot remember but it's the previous before this one
Bug Description
Error encountered when adding file share:
Unable to retrieve child resources.
Details:
Cannot read property 'version' of undefined
Steps to Reproduce

Connect to Azure Storare > FIle Share > Paste URL (SAS)  > Next

Expected Experience
For the File Share added to appear under File share folder
Actual Experience
File Share does not appear under File share folder
Additional Context

@deguzman-b Could you try this in 1.17.0 to see if it works? Also, could you share the url with us after redacting your personal information in the url? For example, if your original SAS url is "https://accountname.file.core.windows.net/sharename?sv=....sig=ABC"
The redacted SAS url can be "https://contoso.file.core.windows.net/dummy?sv=....sig=redacted"

Closing due to lack of response. If you still have issue, please open a new one instead.


Missing step in section "Connect and discover interfaces"

After logging in (step 1) it would be helpful to have the step "Click on Connect + test on the product page" then current #2 step makes sense.

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

ID: cc3d1d7a-39b1-400d-d019-3061405c0ad3
Version Independent ID: 5ad5a207-b6b9-168a-ecac-35f8b0a70589
Content: Certify your IoT Plug and Play device
Content Source: articles/iot-pnp/tutorial-certification-test.md
Service: iot-pnp
GitHub Login: @konichi3
Microsoft Alias: koichih

Thanks for the feedback! We are currently investigating and will update you shortly.

Can we close this this please - the issue is being tracked elsewhere.
#please-close


rust-bindgen-kernel: init at 0.56.0

This PR includes an override for the rust-bindgen package.
This is part of an effort to include rust modules with kernel 5.20.
This explicit version is needed for kernel compatibility currently.
More information:

https://discourse.nixos.org/t/help-wanted-packaging-linux-kernel-with-rust-support/19988
https://www.phoronix.com/scan.php?page=news_item&px=Rust-For-Linux-5.20-Possible
https://github.com/blitz/nixpkgs/tree/rust-kernel
https://github.com/Rust-for-Linux/rust-out-of-tree-module

cc @blitz
Description of changes

Things done

Built on platform(s)

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

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

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

should it live inside linuxPackages_xx in case later kernel releases depend on different versions ?

I think that is a good idea! Are the changes what you had in mind?

Thanks for your work on Rust in Linux in Nixpkgs! I think this should be drafted until we know for sure that Rust is actually even going to make it into 5.20 (i.e. until it shows up in an rc), and that it's still required.  Otherwise, it might be obsolete before it ever ends up being requir.d

Rust support has now been merged upstream.  The documentation says:

A particular version of the Rust toolchain is required. Newer versions may or may not work because the kernel depends on some unstable Rust features, for the moment.

So I think we should treat the kernel the same as Firefox and Thunderbird, which are in a similar situation.  i.e., we should try building with the latest version of Rust tools, and only repackage older versions of the tools if that runs into problems.  Once the first 6.1 rc is out, we can bump linux-testing and start trying to get Rust support working.

It seems I closed this pr a bit prematurely,
bingen: v0.56.0 seems to still be a prerequisite.


Text missing on rendering with inline-block or inline css property

Bug reports:
Hi,
I have problems with some elements I try to screenshot. I made a sandbox exemple of my problem
As you can see clicking on the screenshot button, the text parts are not rendered or maybe hidden by the background. I already tried foreignObjectRendering without success.
I used html2canvas by the past and I never had this problem.
Specifications:

html2canvas version tested with: alpha 12
Browser & version: chrome 65.0.3325.181
Operating system: windows 10

After some test,
It seems the property inline-block or inline brake somehow html2canvas. When using one of these two properties, the text is invisible but the text area is kept for the rendering

Hello,
I am having the same issue here using css display:block
Did you solved it?
Thanks!

Hi,
I solved it playing with display properties but I don't remember exactly how. Some combinations make the librarie not working as expected =/

facing the same issue mentioned by @camarrone .
it would be great if anyone could share the solution for this problem.

Found a Fix for the issue I was facing.
Initially i had a span tag with style property set to "display:block".
on rendering, this tag was not getting into display since its parent had a background color.
So I removed this display property for the span tag and then tried again, span content got visible.
But I wanted the span tag to have this display property as per view requirements, so I changed span to div tag and added a span tag with content inside the new div tag. everything rendered perfectly as expected.
Initial code :

     content

changed code :

         content

On following this approach fixed the issue I faced :100: %
Hope this would help others as well.

position:relative

on the element itself fixes it...

Unfortunately, none of the suggestion workarounds make it work for me.
However, what I can contribute is that I had text with version 1.0.0-rc7, but no longer with 1.4.1.

I identified the code change that prevented text rendering:
container.style.whiteSpace = 'nowrap';
or in the minified version:
t.style.whiteSpace="nowrap”,
I saved a local copy of the latest version, removed this code snippet, and now my photos display with text, as in previous versions. The latest version handles larger markup more effectively, avoiding errors in older versions.


On Magic Eden users with enough funds in their wallet are told they do not have enough funds

Is this related to #3661 how does Magic Eden come up with these numbers?
Wallet balance: 0.00215186
Price on market (excluding fee): 0.001224
left to cover fees: 0.00092786
Current network fees on Bitcoin ~50 sats/vB

Does this imply that Magic Eden is reserving a fee of 0.00305702 - 0.001224 = 0.00183302 (that looks excessive to me)

Discussed with dev the expectation is that this is a Magic Eden bug, not a wallet bug. @markmhx can you ping them?

Magic Eden has introduced a separate button to select the fees to send the transaction with. Low, medium and high option. Since these charges are not included in the total (A), this could help prevent cases described here that surprise users with less profits than expected or a higher cost than expected.

Additionally, In the Hiro wallet we are working on improving the display of signing PSBT (partial bitcoin transactions), so users are better aware of the risks and can see what is expected to go in and out of the wallet. https://github.com/hirosystems/wallet/issues/3805

Should this issue be closed if there are other issues linked to address it in the wallet, but it was ultimately a ME bug? Not sure why it has the label of P2 Bug?


support decimal data type for the optimizer rule of PreCastLitInComparisonExpressions

Which issue does this PR close?

part of https://github.com/apache/arrow-datafusion/issues/3031
Rationale for this change

What changes are included in this PR?

In our case, we have many columns with the decimal data type. The decimal column will be applied with filter like
select xxx from c1  = literal

c1 is decimal data type, the literal may be integer or decimal data type.
After this pr, the plan will try to cast the literal to the type of c1.
For example in a table:
❯ \d aggregate_test_100
+---------------+--------------+--------------------+-------------+-------------------+-------------+
| table_catalog | table_schema | table_name         | column_name | data_type         | is_nullable |
+---------------+--------------+--------------------+-------------+-------------------+-------------+
| datafusion    | public       | aggregate_test_100 | c1          | Utf8              | NO          |
| datafusion    | public       | aggregate_test_100 | c2          | Int32             | NO          |
| datafusion    | public       | aggregate_test_100 | c3          | Decimal128(12, 0) | NO          |
| datafusion    | public       | aggregate_test_100 | c4          | Int16             | NO          |
| datafusion    | public       | aggregate_test_100 | c5          | Int32             | NO          |
| datafusion    | public       | aggregate_test_100 | c6          | Int64             | NO          |
| datafusion    | public       | aggregate_test_100 | c7          | Int16             | NO          |
| datafusion    | public       | aggregate_test_100 | c8          | Int32             | NO          |
| datafusion    | public       | aggregate_test_100 | c9          | Int64             | NO          |
| datafusion    | public       | aggregate_test_100 | c10         | Utf8              | NO          |
| datafusion    | public       | aggregate_test_100 | c11         | Float32           | NO          |
| datafusion    | public       | aggregate_test_100 | c12         | Float64           | NO          |
| datafusion    | public       | aggregate_test_100 | c13         | Utf8              | NO          |

The query plan:
❯ explain select c1,c3 from aggregate_test_100 where c3  = 12;
+---------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type     | plan                                                                                |
+---------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| logical_plan  | Projection: #aggregate_test_100.c1, #aggregate_test_100.c3                                                                                |
|               |   **Filter: #aggregate_test_100.c3 = Decimal128(Some(12),12,0)**                                                                                |
|               |     TableScan: aggregate_test_100 projection=[c1, c3], partial_filters=[#aggregate_test_100.c3 = Decimal128(Some(12),12,0)]                                  |
| physical_plan | ProjectionExec: expr=[c1@0 as c1, c3@1 as c3]                                                                                |
|               |   CoalesceBatchesExec: target_batch_size=4096                                                                                |
|               |     FilterExec: c3@1 = Some(12),12,0                                                                                |
|               |       RepartitionExec: partitioning=RoundRobinBatch(16)                                                                                |
|               |         CsvExec: files=[Users/kliu3/Documents/github/arrow-datafusion/target/debug/aggregate_test_100.csv], has_header=true, limit=None, projection=[c1, c3] |
|               |                                                                                |
+---------------+----------------------------------

explain verbose
❯ explain verbose select c1,c3 from aggregate_test_100 where c3  = 12;
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type                                             | plan                                                                                |
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| initial_logical_plan                                  | Projection: #aggregate_test_100.c1, #aggregate_test_100.c3                                                                                |
|                                                       |   Filter: #aggregate_test_100.c3 = Int64(12)                                                                                |
|                                                       |     TableScan: aggregate_test_100                                                                                |
| logical_plan after simplify_expressions               | SAME TEXT AS ABOVE                                                                                |
| logical_plan after pre_cast_lit_in_comparison         | Projection: #aggregate_test_100.c1, #aggregate_test_100.c3                                                                                |
|                                                       |   Filter: #aggregate_test_100.c3 = Decimal128(Some(12),12,0)                                                                                |
|                                                       |     TableScan: aggregate_test_100

Are there any user-facing changes?

Codecov Report

Merging #3245 (8e883be) into master (c574269) will increase coverage by 0.03%.
The diff coverage is 92.21%.

:exclamation: Current head 8e883be differs from pull request most recent head 51029d5. Consider uploading reports for the commit 51029d5 to get more accurate results

@@            Coverage Diff             @@
##           master    #3245      +/-   ##
==========================================
+ Coverage   85.83%   85.86%   +0.03%
==========================================
  Files         293      293
  Lines       53170    53293     +123
==========================================
+ Hits        45637    45760     +123
  Misses       7533     7533

Impacted Files
Coverage Δ

datafusion/core/src/datasource/view.rs
86.57% <85.71%> (-0.05%)
:arrow_down:

...fusion/optimizer/src/pre_cast_lit_in_comparison.rs
90.06% <86.51%> (+6.72%)
:arrow_up:

datafusion/core/src/execution/context.rs
78.26% <100.00%> (+0.05%)
:arrow_up:

datafusion/core/tests/sql/expr.rs
99.85% <100.00%> (+<0.01%)
:arrow_up:

datafusion/physical-expr/src/expressions/column.rs
100.00% <100.00%> (ø)

datafusion/sql/src/planner.rs
80.52% <100.00%> (+0.07%)
:arrow_up:

datafusion/expr/src/logical_plan/plan.rs
78.55% <0.00%> (-0.35%)
:arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

@andygrove PTAL, But I think it will conflict with your https://github.com/apache/arrow-datafusion/pull/3260


Fix dirs ignored

Force-pushing to my master closed the original pull request, so here it goes from separate branch.

Thanks :)


Colorize Pug

Description
The results of beautification are not what I expect: everything is the same color.
Input Before Beautification
Everything is the same color.
Expected Output
Everything is the same color.
Steps to Reproduce

Code in Pug
Run command Atom Beautify: Beautify Editor
This beautified code does not look right!

Checklist
I have:

[X] Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
[X] Reloaded (or restarted) Atom to ensure it is not a caching issue
[X] Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
so I know this is not a duplicate issue
[X] Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
[X] Generated debugging information by executing Atom Beautify: Help Debug Editor command in Atom and added link for debug.md Gist to this issue

Please provide an example, screenshot, and/or anything else which may make this Issue more clear. I do not understand what the problem is or how I can help. Atom-Beautify does not even deal with colour of text in Atom.


client apis are freezing up during test runs of user project

This is a very intermittent problem, but occasionally when the client api is used it will block while trying to read from the http response input stream. Thread dump will show that it's stuck parsing the header. It's not more specific than that...it happens in several different http method calls.
This causes anything using the client api to simply freeze.

This was due to methods not closing the response InputStream, or at least it looks like that's what was causing it. I ran build after build for several hours, each of which ran a few dozen test suite executions (the same couple-dozen tests in various scenarios and execution contexts), and never ran into it again after fixing the InputStream closing. I guess I figured closing the response would take care of this, but no!.
This is with httpclient 4.3.x...if you want to close the response, make sure you close the input stream too (assuming you opened it).


Create IDE plugins for quick-start to working with egeria

Many developers use an IDE such as

IntelliJ : especially for heavy-duty work
Visual Studio code: increasingly broad appeal, and is often an easier entry-point

We should consider providing plugins for these - and perhaps other IDEs that

make it easy to find/understand the docs on egeria
make it easy to build one's first project (templates, samples)
subsequently make it easy to launch a runtime environment to test against

benefits include

findability - egeria/metadata is indexed in the IDE's plugin catalog
ease of getting started

As a precursor to this there are a few other possible options such as providing  maven achaetypes (ie templates) for a sample project. This may be a useful intermediate step but is unlikely to deliver the same 'wow' factor as an IDE plugin.

No requests or further discussion on this.
For now I am going to close this issue as I don't think realistically we will address it


Parse chat detects as correct match when there is not word in chat

Handled this case in latest commit


Randomized lines cannot have replies. It does not add them in the lines dictionary

What I want is a series of randomized lines with randomized replies, like this:

The player will have no input on these conversations, as they are just background dialogue.
However, if a randomized line has a reply, even a non-randomized reply, then it will fail this assertion: assert(resource.lines.has(key), DialogueConstants.translate("errors.key_not_found").format({ key = key })) Assertion failed: Key "9" not found.

I did try this, and it fixed the issue of not adding the replies to the lines dictionary, but then it broke the randomization process of the top-level messages.

Perhaps I can brute-force past this myself? But I figure you should know that it doesn't work.
If I'm simply using it incorrectly, boy would that be lame!

I got it to work, and it is really ugly and inconvenient to write compared to the way I tried the first time. Yes, this is the only way to do it. If it has a reply, it must not be randomized. You cannot mix section jumps and regular lines in the same % randomized pool. They are grouped separately. So, lines without replies go in their own section, and then each line with a reply must also be in its own section.
~ COAL_RANDOM
%6 => c0
% => c1
% => c2

~ c0
% COAL: Dig, dig!
% COAL: Glad to help!
% COAL: Is this lump yours? [wait=1]Just kidding!
% COAL: I hope my posture is good.
% COAL: I sure am grateful for this shovel.
% COAL: Why is this stuff purple?
=> COAL_RANDOM

~ c1
COAL: If you didn't get enough, go ahead and take some more!
% CONCRETE: Gracias, amigo.
% JOULES: Thank you.
% COPPER_ORE: Well, shoot, there, boss, don't mind if I do!
=> COAL_RANDOM

~ c2
COAL: I always liked playing support.
% => c3
% => c4
% => c5
=> COAL_RANDOM

~ c3
TARBALLS: Support as in... buffer or healer?
COAL: Healer.
=> COAL_RANDOM

~ c4
IRON_ORE: ADC for life.
=> COAL_RANDOM

~ c5
IRON: I like to tank!
=> COAL_RANDOM

I'm not really sure what you're trying to do but if you want to have separate groups of random lines then you can add an empty line between each group.

The first screenshot is the most relevant to what I'm trying to do: Get randomized dialogue with no input from the player. The player won't be able to reply to anything. I also was trying to get randomized replies to certain lines, like at line 8--if Coal says the line on line 8, then 1 of those 3 characters below him would have a reply.
But there can be no reply like that to a random line.

If you unindent all of those lines and then add empty lines between the grouped random lines it should do what you want.


Redirect for specific dashboard after login

Purpose

The purpose of this PR is to fix #192
Goals

To redirect for the specific dashboard based on the user type.
Approach

Used react useEffect to listen on the userContext. After succesfull login attempt, navigating to relevant dashboard based on the logged in user's type
Screenshots

Checklist

[x] This PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.
[x] I have read and understood the development best practices guidelines ( http://bit.ly/sef-best-practices )
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation

Related PRs

Test environment

Learning

@anjula-sack Updated the PR. Working with GoogleAuth


To measure Inference time of CC100 Cleaning on ThaiSC.

Why this PR
To measure the Inference time of CC100 Cleaning on ThaiSC.
Request this script by @new5558 .
Changes

New

Related Issues
Checklist

[ ] PR should be in the Naming convention
[ ] Assign yourself in to Assigneees
[ ] Tag related issues
[ ] Constants name should be ALL_CAPITAL, function name should be snake_case, and class name should be CamelCase
[ ] complex function/algorithm should have Docstring
[ ] 1 PR should not have more than 200 lines changes (Exception for test files). If more than that please open multiple PRs
[ ] At least PR reviewer must come from the task's team (model, eval, data)

Can you provide the environment of your system that is running the code ex? Conda, Docker, Python version?

Python 3.10 No Env. krub.


[FEATURE] Enhancement in Polling Feature in 'Most Recent Polls'

Description
The Discover Page ie. https://pollitup.vercel.app/discover is being referred here.
Current Functionality and Issue
In the 'Most Recent Polls' section the the user clicks on 'Open Poll' button. 2 options are visible of 'View Poll Results' and 'Submit'
If the user chooses an option and clicks on 'View Poll Results', the user is taken to a page ie. https://pollitup.vercel.app/poll/e5q0ch4WumJUPHIKZ2uM  where they are again asked to choose an option and submit their response before viewing the results.
If the user chooses an option and then submits, the poll popup closes and they cannot see the result. To see the result they'll have to go to 'View Poll Results' and vote again.
This process is inconvenient and not the best way to conduct a user friendly and fair poll.
Enhancement
 Instead of making the user vote twice ie. once on the https://pollitup.vercel.app/discover page through the poll popup and again on the https://pollitup.vercel.app/poll/e5q0ch4WumJUPHIKZ2uM page, we can make the 'Open Poll' button redirect the user directly to the latter page.
 This way the user votes only once, and can also view the poll result automatically in that page after submitting their response.
Screenshot

I request @Arnabdaz to kindly assign this issue to me under GSSoC'23. Thanks!
Screenshots
No response

i guess this way was taken to increase the engagement in a poll .... @agamjotsingh18 needs to confirm if is a bug or feature

Hello, any update on this? @Arnabdaz @agamjotsingh18


default-path option removed in tmux 1.9

The default-path option has been removed in tmux 1.9:
http://sourceforge.net/mailarchive/forum.php?thread_name=20131019080624.GA13382%40SUNGPAE&forum_name=tmux-users

This is still a problem. The workaround do not work when you use $PWD as value.

Variable PWD didn't work for me either. I was trying to use it from .tmux.conf. It seems inside the configuration file is possible to refer to the current path via the variable pane_current_path. For instance:
# Split pane and open up a shell at the bottom keeping the current path.
bind s splitw -v -p 25 -c '#{pane_current_path}' '/bin/bash'

default-path was working for me. then it stopped working. I didn't change the tmux version. Something more serious is happening.


How to evaluate over multiple csv files

Hi,
Thanks for your work!
I tried to use your code for our dataset model training/validating. I meet several issues:
1. how to train over multiple csv files, I see that the sh command --data-name-list gives file_name, how to write the command if
I want to train over multiple files, such as AQShunyi-1.csv, AQShunyi-2.csv simutenously?
2. How may I train my prediction model as the hyperparameters are predefined in the command line, or I must train the mode lat somewhere else?
3. Can the framework deal with data of multiple features, e.g., if I want to forecast the nationwide air quality, assume I get data from different regions, the data may look like [region, timestamp, quality], it is time series with 'region' feature, so the question is how to train and also validate the prediction model, or it is infeasible in the context of time series forecasting.
Looking forward to your reply, thanks so much!

Thank you for your attention and questions!
Regarding the first question, we currently do not support it, but we had plans to implement this function (global forecasting).
I didn't understand the last two questions! Can we exchange WeChat for easier communication? My WeChat: qxf780310. Look forward to hearing from you.