Instructions for Let's encrypt are too vague

It's not clear from documentation what you need to do with Let's encrypt certificates. I was not sure if I need to take care of them myself or the Docker image will do the trick once this option is turned on and if not, which exact files are needed and how to make them accesible to a Mattermost container.
It would be also useful to tell about certification renewal if it can make some problems (for example with Docker on port 80?), because it's one of the crucial features of Let's encrypt system. I don't like to turn Mattermost down every 2 months just to have fresh certificates and HTTPS working.
I've only found this and hope it will work for me too:
http://forum.mattermost.org/t/solved-how-to-use-lets-encrypt-with-the-docker-image-of-mattermost/2013

@kocio-pl I don't think the image handles SSL automatically. You have to generate them yourself. It doesn't mention the Let's encrypt anywhere. And it clearly states that you need to put your SSL certificate and private key as specific names on the step 2.
For now, if you would like to use LE for the SSL, you will need to generate the cert outside the mattermost container. Maybe use a separate container. To update the certs, you don't have to shutdown mattermost container, just web container. If you want HA, you can have multiple web containers behind a load balancer. When you update the cert, you just rotate the web containers.
If you have any suggestion to make the docs better, please feel free to send a PR. You can also send a PR to add LE support.

Closing this for now. Feel free to reopen it for more discussion.


go-edge-ds v0.32.1

Fixes bug in GetGraph on exclusion permissions

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.1%) to 29.277%

Totals

Change from base Build<PHONE_NUMBER>:
0.1%

Covered Lines:
1328

Relevant Lines:
4536

💛  - Coveralls


Toggle description styling/customizer styling

Issue description:
Find some small styling bugs

The toggle field description not fit.
If you style the customizer width and try to collapse the customizer he never fully collapse
$config['width']        = '25%';

Version used:
<IP_ADDRESS>
Using theme_mods or options?
theme_mods
Code to reproduce the issue (config + field(s))

good catch!
Fixed in the develop branch, will be included in the next release. :+1:

Sorry for reopening
The toggle is now similar like switch. In previous versions was the toggle button positioned inline after title on the right side. I was using it as "place saver" ...

ok, this took some creative CSS thinking but I think we're ok now. :+1:


i'm a newcomer , and met the following problem!!

i install tensorflow following the guide explanation in
www.tensorflow.org/install/install_windows
System information

**OS Platform and Distribution:win10
TensorFlow installed from (source or binary):source
**TensorFlow version (use command below): i use the following command: pip3 install --upgrade tensorflow-gpu
**Python version:3.5.2
CUDA/cuDNN version:cuda 8.0 /cudnn 8.0
**GPU model and memory:GTX1070 8g
i download the source successfully and when i enter the following short program inside the python interactive shell:   import tensorflow as tf
it goes wrong:
Traceback (most recent call last):
File "E:\SoftWare\Python\lib\site-packages\tensorflow\python\platform\self_check.py", line 87, in preload_check
ctypes.WinDLL(build_info.cudnn_dll_name)
File "E:\SoftWare\Python\lib\ctypes_init_.py", line 347, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Could not find the specified module

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "E:\SoftWare\Python\lib\site-packages\tensorflow_init_.py", line 24, in
from tensorflow.python import *
File "E:\SoftWare\Python\lib\site-packages\tensorflow\python_init_.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "E:\SoftWare\Python\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in
self_check.preload_check()
File "E:\SoftWare\Python\lib\site-packages\tensorflow\python\platform\self_check.py", line 97, in preload_check
% (build_info.cudnn_dll_name, build_info.cudnn_version_number))
ImportError: Could not find 'cudnn64_6.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Note that installing cuDNN is a separate step from installing CUDA, and this DLL is often found in a different directory from the CUDA DLLs. You may install the necessary DLL by downloading cuDNN 6 from this URL: https://developer.nvidia.com/cudnn
in my file sys ,the dll file's name is cudnn64_5.dll
and following is my path:

(i can find my msvcp140.dll)
please help ,thx

As the document says, you should use cuDNN v6.1.

@qmick ok! uh i'm sorry that i asked question here. but thanks for your help,i‘ve solved the problem!


dynamic import() Syntax makes webpack throw an error

Version
3.3.0
Reproduction link
https://github.com/DragosRocsoreanu/VueCreateExample/tree/master/src
Environment info
Environment Info:

  System:
    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
  Binaries:
    Node: 10.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.17763.1.0
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0-beta.2
    @vue/babel-plugin-transform-vue-jsx:  1.0.0-beta.2
    @vue/babel-preset-app:  3.3.0
    @vue/babel-preset-jsx:  1.0.0-beta.2
    @vue/babel-sugar-functional-vue:  1.0.0-beta.2
    @vue/babel-sugar-inject-h:  1.0.0-beta.2
    @vue/babel-sugar-v-model:  1.0.0-beta.2
    @vue/babel-sugar-v-on:  1.0.0-beta.2
    @vue/cli-overlay:  3.3.0
    @vue/cli-plugin-babel: ^3.3.0 => 3.3.0
    @vue/cli-plugin-eslint: ^3.3.0 => 3.3.0
    @vue/cli-service: ^3.3.0 => 3.3.0
    @vue/cli-shared-utils:  3.3.0
    @vue/component-compiler-utils:  2.5.0
    @vue/eslint-config-prettier: ^4.0.1 => 4.0.1
    @vue/preload-webpack-plugin:  1.1.0
    @vue/web-component-wrapper:  1.2.0
    babel-helper-vue-jsx-merge-props:  2.0.3
    babel-plugin-transform-vue-jsx:  4.0.1
    eslint-plugin-vue: ^5.0.0 => 5.1.0
    vue: ^2.5.21 => 2.5.22
    vue-eslint-parser:  2.0.3
    vue-hot-reload-api:  2.3.1
    vue-loader:  15.5.1
    vue-router: ^3.0.1 => 3.0.2
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.5.21 => 2.5.22
    vue-template-es2015-compiler:  1.8.1
    vuex: ^3.0.1 => 3.1.0
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce
vue create example
Select Lint,Vuex,Babel,Router
Select anything
CD example
npm run serve

What is expected?
To start the server and run normally
What is actually happening?
 INFO  Starting development server...
 98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 errors                                                                                11:18:18 PM
 error  in ./src/router.js

Module parse failed: Unexpected token (19:13)
You may need an appropriate loader to handle this file type.
|     // which is lazy-loaded when the route is visited.
|     component: function component() {
>       return import(
|       /* webpackChunkName: "about" */
|       "./views/About.vue");

 @ ./src/main.js 6:0-30 10:10-16
 @ multi (webpack)-dev-server/client?http://<IP_ADDRESS>:8082/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

Apparently if I use YARN I won't have this issue, so it's NPM related issue Problem is with Router!

Encounter the same problem

webpack v4.29.0 not support.
yesterday, run
vue create <project-name>

cd <project-name>
npm run serve

is error.
Module parse failed: Unexpected token (17:13)
You may need an appropriate loader to handle this file type.
|     // which is lazy-loaded when the route is visited.
|     component: function component() {
>       return import(
|       /* webpackChunkName: "about" */
|       './views/About.vue');

today, run
vue create <project-name>

cd <project-name>
npm run serve

is ok.
compare package-lock.json,
error version
...
"webpack": {
      "version": "4.29.0",
      "resolved": "http://registry.npm.taobao.org/webpack/download/webpack-4.29.0.tgz",
     ...
}
...

ok version
...
"webpack": {
      "version": "4.28.4",
      "resolved": "http://registry.npm.taobao.org/webpack/download/webpack-4.28.4.tgz",
     ...
}
...

So, the vue-cli is compatible with the downgraded version of webpack.
You can do this
rm -fr node_modules package-lock.json
npm install
npm run serve

then see package-lock.json
...
"webpack": {
      "version": "4.28.4",
      "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.28.4.tgz",
      ...
}
...

is work.

想问一下我路由是使用 (resolve) => {
require(['./components/stockAdjust/StockAdjustList'], resolve)
}方式引入的，路由懒加载也有问题，首屏直接加载所有路由而不是，只加载用到的那一个。我已经把webpack设置为"4.28.4",了。为什么没有效果，还是首屏加载所有路由。没有懒加载

this works for me
npm install<EMAIL_ADDRESS>-D

I can confirm the workaround in the webpack issue doesn't work. What worked for me was "downgrading" to<EMAIL_ADDRESS>(be warned that this will add webpack as a direct dependency in package.json):
$ npm install<EMAIL_ADDRESS>

it works for me. thanks

I just bumped my project from webpack 3 to webpack 4, and met this problem.
For me, the fix is install
npm install --save-dev @babel/plugin-syntax-dynamic-import

since before I was using babel-plugin-syntax-dynamic-import.
Then, in .babelrc
{
      "plugins": ["@babel/plugin-syntax-dynamic-import"]
}

@yunhan0 facing similar issue. I'm rolling out my own webpack configs, but dynamic imports are not working. What can I do?

@DominusVilicus  Did you change dynamic import plugin from babel-plugin-syntax-dynamic-import to @babel/plugin-syntax-dynamic-import?

I found my issue.
I was using target: 'async-node' in the webpack config instead of target: 'node'

            {
                test: /\.js$/,
                loader: 'babel-loader',
                options: {
                    plugins: ['@babel/plugin-syntax-dynamic-import']
                }
            }

as module rule
and ensure the target for server build is target: 'node'


⚠ ClamAV has degraded performance

In b57cf86, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 77 ms

Resolved: ClamAV performance has improved in 2948905.


unsuccessful devspace deploy return code 0

What happened?
$ devspace deploy
[info]   Using namespace 'production'
[info]   Using kube context 'aws'
[app] 019ce6d75868: Layer already exists
...
[app] 8d3ac3489996: Layer already exists
[fatal]  error building image pablorsk/app:NtOPckc: error during image push: Put https://registry-1.docker.io/v2/pablorsk/app/manifests/NtOPckc: net/http: TLS handshake timeout
$ echo $?
0
$

What did you expect to happen instead?
Any error code different to 0. Exit code 0 means "Success".
How can we reproduce the bug? (as minimally and precisely as possible)
Gessing a remote cluster, just turn off internet connection.
Local Environment:

DevSpace Version: 5.18.3
Operating System: linux
ARCH of the OS: AMD64
Kubernetes Cluster:
Cloud Provider: other
Kubernetes Version: v1.20.2

/kind bug

The problem was using a devspace command. Sorry


resolve image path extension bug

New Pull Request Checklist

I have read and understood the CONTRIBUTING guide

I have read the Documentation

I have searched for a similar pull request in the project and found none

I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)

I have added the required tests to prove the fix/feature I am adding

I have updated the documentation (if necesarry)

I have run the tests and they pass

I have run the lint and it passes (pod lib lint)

This merge request fixes / reffers to the following issues:
The incorrect image path extension cause the image can not show in WKWebView.
Pull Request Description
Hi, I have found a bug when using SDWebImage in WKWebView. When download a image from URL like xxx.com/xxx, I found that although the image downloaded and stored all right, but the image can not show in a WKWebView. The reason is the image path extension is ".com/xxx" in this case and in WKWebView a image named like this can not be read correctly. Also, I found the pull request: #976 which brought this bug.
This pull request is to resolve this problem, simply prescribe the proper image path extension that should be added to file name, and problem resolved.

Current coverage is 77.17% (diff: 85.71%)

Merging #1742 into master will increase coverage by 0.01%

@@             master      #1742   diff @@
==========================================
  Files            27         27
  Lines          2653       2659     +6
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           2047       2052     +5
- Misses          606        607     +1
  Partials          0          0

Powered by Codecov. Last update 5ea33a7...14b6dfa

什么时候更新https啊 现在都在适配https 群主什么时候更改呢

hi, here is a problem. please help.
error: Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection
my project has used https, but my friends told me close ATS  which is not take effect.
 .     [_headerView.avatarImageView sd_setImageWithURL:[AppConfig imageUrlWithStr:CURRENT_USER.avatar] placeholderImage:kAVATAR_IMAGE_P options:0 completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {                 // here back error             }]; .
Looking forward to your reply!

Related to #1759

Closing - please see #1759 for details.


[WIP] experiment with allowing context passed to functions

it works as is, but it's also not great and requiring users to mess around with the internal assigns manually isn't a great idea imo

Yeah, having users messing with private stuff should be avoided at all costs. Besides, we'll be able to provide a nice solution very soon when we introduce the new component macro in LV which will be called under the hood when using something like:
<#my_func />

By calling a function with that syntax will not only enable diff tracking for the returned content but will also allow us to decorate the underlying call to the component macro, just like we currently do for the live_comonent call.


Python Version

Currently, the Python version is locked down at 3.6.4
Once support for further versions is added, we'll make it configurable using the workflow below:

Use the version specified in requirements.txt in the root folder.
Use the value specified in the Python version app setting in the Azure Portal.
Default to 3.6.4 if none of the above are specified.

Just confirming, but you meant runtime.txt, not requirements.txt, right? The latter's commonly used to pin dependencies with pip freeze > requirements.txt.
e.g. https://github.com/heroku/heroku-buildpack-python#specify-a-python-runtime


Firefox can't install extension

Firefox can't install a freshly generated extension out of the box.  Tested both with unpacked & packed, ff & ff-dev-edition.  Add-on installations always spits:
There was an error during installation: getURL may not be called before an `id` or `uuid` has been set

try "out of the box":
yo chrome-extension-kickstart
gulp build --vendor=firefox
gulp pack --vendor=firefox

Adding the following property in your manifest.json should help:
...
"__firefox__applications": {
  "gecko": {
    "id"<EMAIL_ADDRESS>    "strict_min_version": "45.0"
  }
},
...

applications is mandatory for Firefox, and specifies the add-on's ID. It may also be used to specify the minimum and maximum versions of Firefox that this add-on supports.

More Info

Thanks a lot !
This works when using "browser_action",   but for whatever (unrelated?) reason, I can't make "page_action" work in FF.  The addon loads and functions correctly (options page, etc..),   but the extension icon is not seen in FF's address bar  (in chrome it works).
I guess this problem isn't related to the original issue,  so I close it..


[WIP] Use dry-initializer

In the interest in using dry-rb gems where appropriate, I've updated dry-auto_inject to use dry-initializer instead of generating initializers and attr readers itself.
It seems to work pretty well, but it raises one question, since dry-initialiser supports Ruby 2.0+ keyword arguments only, not older-style options hashes, while auto-inject recently had options hash injection support added by @solnic. Do we want to do the same here in dry-auto_inject, and support keyword arguments only?
@nepalez was there anything in particular behind your choice to support keyword arguments only?
Depending on the outcome of this discussion, I'll need to tweak some naming here before this PR will be ready for merge.

We support Ruby 2.0+ exclusively so we could just rely on kwargs, but I'd like to know what the performance impact is when using a hash vs kwargs first.

Here's a basic benchmark for initializing objects with either params, hash args or keyword args: https://gist.github.com/timriley/061e24a1c0a88144d41b1643d68587d9
Is this the kind of thing you're after?
Comparison:
              params:  2259722.4 i/s
           hash args:   869004.2 i/s - 2.60x slower
        keyword args:   542211.1 i/s - 4.17x slower

The results here show that keyword args are significantly slower. Do you think this means that we should continue to support all 3 styles of initializer arguments?

Yes I think we should. Will that be a problem?
On Tue, 26 Apr 2016 at 00:39, Tim Riley<EMAIL_ADDRESS>wrote:

Here's a basic benchmark for initializing objects with either params,
hash args or keyword args:
https://gist.github.com/timriley/061e24a1c0a88144d41b1643d68587d9
Is this the kind of thing you're after?
Comparison:
params:  2259722.4 i/s
hash args:   869004.2 i/s - 2.60x slower
keyword args:   542211.1 i/s - 4.17x slower
The results here show that keyword args are significantly slower. Do you
think this means that we should continue to support all 3 styles of
initializer arguments?
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/dry-rb/dry-auto_inject/pull/4#issuecomment-214552492

Nope, no problem. It's good to clarify our direction, though 😄
Our choices now are:

Add support for hash arguments to dry-initializer
Don't dry-initializer here and instead continue to generate initializers directly in dry-auto_inject.

Given that dry-initialiser's focus seems to be on convenience for end-users, I think I'll just pick option number 2 here. If anyone thinks that it would be better to use dry-initializer here, please let me know!

@timriley No, they are not slower. I thought this too, but at the end this difference was due to incompatibility of two examples.
I've measured param and option directly and found no difference. Just didn't publish that benchmark because there're too much of them in my taste.

@timriley I'll publish v0.1.0 today with backward incompatibility

@nepalez Interesting! Can you share how you tested the performance comparisons directly? I believe you, of course, I'm just interested in seeing your methodology :)

@timriley I got it. My problem was I measured not "pure" initializers, but with default values. And those defaults messed the measure.

Our initializers have become more complex due to the super method's parameter checks. I'll be leaving them as custom-generated.


Address lgtm.com warnings

lgtm.com is a static analysis service that identifies coding patterns likely to be mistakes, or sources of confusion. During PyConUK 2017 I added the Mitogen repository. The current list of alerts is https://lgtm.com/projects/g/dw/mitogen/alerts/?mode=list. This PR should address 7 of the (currently) 10 alerts.
Unfortunately the service only scans non-fork projects, and to my knowledge only the default branch. So we won't see the result until after this is merged.
Refs #61

Anything I need to prod on my end? Do we want a little badge on README.md to help pile on that guilt? :)

Anything I need to prod on my end?

Nope, those 7 alerts have gone. Eventually I'd like lgtm.com (and Travis)  to run against pull requests, but that can wait a while. My aim now is understanding the codebase, lgtm.com was a tool to do that. I promise I'm not trying to guilt you ;)


Use nickel cachix

Right now a user who runs nix run github:tweag/nickel gets a nice cached build. If a user runs nix run github:nickel-lang/json-schema-to-nickel, they have to wait for nickel to build.
This PR uses nickel's cachix instance to short-circuit that, and gets rid of the input following so we can take advantage of it.

I'm confused why nix run github:nickel-lang/json-schema-to-nickel would try to build a Nickel executable at all. It should only build the Nickel library as part of the rust build and the Nickel Cachix instance probably won't help with that.

Oh, you're totally right. It affects the devShell not the package.


Serialize results

Hello,
it will be a good idea to store results into file.
So that we will be able to display again equity / drawdown plots...
and also get a DataFrame showing when trades occur in an interactive way (IPython...) after running a backtest.
Serialization can be done using Pickle.
An other option could be to store results to HDF5 files.
Maybe we should consider to build something on top of PyPET (in order to avoid reinventing a "squared wheel") https://pypet.readthedocs.io/en/latest/manual/introduction.html#getting-started
Kind regards

This would also be useful for instances where you're running QSTrader on either a headless server or a cloud server.

This would also be useful to see results of a same strategy with different parameter settings.
Plotting might be done with an other library (Bokeh or something else) to provide some features like zoom in / zoom out / pan ...

Hickle may also be considered https://github.com/telegraphic/hickle
but we should first have a look at Python 3 support
see https://github.com/telegraphic/hickle/issues/8

Other solution to consider:
Feather https://github.com/wesm/feather

Here is a PR that save statistics in a Pickle file.
Loading example is performed in a IPython notebook and equity curve is plot using Bokeh.


about your image datasets

regarding your datasets ,
coco/train2017/000000000025.jpg
how do i locate the image,where can i find them? thanks

Same for llava images, for example:
llava/llava_pretrain/images/00011/000114116.jpg
However the original llava is for example:
GCC_train_000554386.jpg
I've confirmed that 000114116.jpg is not GCC_train_000114116.jpg

hi, you could download the coco2017 dataset from its official website(https://cocodataset.org/#home)

hi, you could download the coco2017 dataset from its official website(https://cocodataset.org/#home)

@LightDXY  Hi，how do i locate the images which paths start with web-celebrity、share_textvqa、 web-landmark or wikiart？

hi, you could download the coco2017 dataset from its official website(https://cocodataset.org/#home)

@LightDXY Hi，how do i locate the images which paths start with web-celebrity、share_textvqa、 web-landmark or wikiart？

Hi, you can find these data in this link: https://drive.google.com/drive/folders/1tCUQ-sq6vdshZVkF0ZeF3K4eztkXJgax. We have written the details about managing data in the sharegpt4v readme.

it would be nice if you upload the 20K images from SA-1B into google drive too..

hi, you could download the coco2017 dataset from its official website(https://cocodataset.org/#home)

@LightDXY Hi，how do i locate the images which paths start with web-celebrity、share_textvqa、 web-landmark or wikiart？

Hi, you can find these data in this link: https://drive.google.com/drive/folders/1tCUQ-sq6vdshZVkF0ZeF3K4eztkXJgax. We have written the details about managing data in the sharegpt4v readme.

could you provide a Baidu cloud disk link or huggingface link

hi, you could download the coco2017 dataset from its official website(https://cocodataset.org/#home)

yes, but different filename now,yes? unable to find that exact picture anymore


apply completes successfully even though CodeDeploy fails

We're testing the deploy module with wait_deployment_completion = true.  We're also setting before_allow_traffic_hook_arn to do some work before the alias flips to the new version.
If the deployment or beforeAllowTrafficHook fails, the script finishes with a 0 exit code.  Terraform thinks all is well and continues with the deployment.  Terraform normally stops execution and errors out when it fails to apply a change so I would expect the failed CodeDeploy deployment to cause it to fail and error out as well.
A simple fix would be to exit 1 in the script when the deployment fails, but others may be relying on the current behavior. It might make sense to add a new var to enable it.

Hi Will,
I am not sure I understand where exactly do you want to add exit 1 in the script.
Could you please explain with some code snippets?

I opened a pull request to show the location.


[WIP] Add NET6 support

This PR adds .NET6.0 support. I unfortunately had to create a new NuGet package for .NET6.0 as handrolling the package is not easy and would require a lot of steps.
Switching to xcframework broke the old binding, and I don't really have the patience to support this legacy. So users wanting to use Nuke on xamarin.ios targets are stuck on old versions 🤷♂
Fixes #6

We could change the name. That is super easy to do.

Yes I think we should. Do you have a better idea than Nuke.NET6?

Not really, there is already another project called Nuke, which is a build system. Perhaps that would confuse some people.
Also not sure if they've reserved the Nuke.* namespace, so we might not be able to use it.

True... ImageCaching.Nuke.Net ?

ImageCaching.Nuke could work. Descriptive of what it is.

Ok let's try this

@roubachof good to go?


pkgsCross.gnu64.stdenv fails to build on x86_64-linux

error: builder for '/nix/store/h1mi656mpg23rj5d7kv4z3alwzgrf3wj-x86_64-unknown-linux-gnu-stage-static-gcc-12.3.0.drv' failed with exit code 1;
       last 10 log lines:
       > /nix/store/c2bq8xsayc90s33fd5xbm1vh5lrmwcfq-coreutils-9.3/bin/install -c -m 644 unwind.h /nix/store/i4zdpqis141x9i5y6iylpq3ddvy79ng8-x86_64-unknown-linux-gnu-stage-static-gcc-12.3.0/lib/gcc/x86_64-unknown-linux-gnu/12.3.0/include
       > /nix/store/51sszqz1d9kpx480scb1vllc00kxlx79-bash-5.2-p15/bin/bash ../../../gcc-12.3.0/libgcc/../mkinstalldirs /nix/store/i4zdpqis141x9i5y6iylpq3ddvy79ng8-x86_64-unknown-linux-gnu-stage-static-gcc-12.3.0/lib/gcc/x86_64-unknown-linux-gnu/12.3.0/include
       > /nix/store/c2bq8xsayc90s33fd5xbm1vh5lrmwcfq-coreutils-9.3/bin/install -c -m 644 ../../../gcc-12.3.0/libgcc/gcov.h /nix/store/i4zdpqis141x9i5y6iylpq3ddvy79ng8-x86_64-unknown-linux-gnu-stage-static-gcc-12.3.0/lib/gcc/x86_64-unknown-linux-gnu/12.3.0/include
       > make[1]: Leaving directory '/build/build/x86_64-unknown-linux-gnu/libgcc'
       > Moving /nix/store/i4zdpqis141x9i5y6iylpq3ddvy79ng8-x86_64-unknown-linux-gnu-stage-static-gcc-12.3.0/x86_64-unknown-linux-gnu/lib/libgcc_s.so to /nix/store/1sc78iyqi0bx2a2dbba2h6jycj58p2hh-x86_64-unknown-linux-gnu-stage-static-gcc-12.3.0-lib/x86_64-unknown-linux-gnu/lib/libgcc_s.so
       > Moving /nix/store/i4zdpqis141x9i5y6iylpq3ddvy79ng8-x86_64-unknown-linux-gnu-stage-static-gcc-12.3.0/x86_64-unknown-linux-gnu/lib/libgcc_s.so.1 to /nix/store/1sc78iyqi0bx2a2dbba2h6jycj58p2hh-x86_64-unknown-linux-gnu-stage-static-gcc-12.3.0-lib/x86_64-unknown-linux-gnu/lib/libgcc_s.so.1
       > Removing empty /nix/store/i4zdpqis141x9i5y6iylpq3ddvy79ng8-x86_64-unknown-linux-gnu-stage-static-gcc-12.3.0/x86_64-unknown-linux-gnu/lib/ and (possibly) its parents
       > /nix/store/qr60k7sz61hvv2baadlfv5qjr8q7vlg6-builder.sh: line 243: type: install_name_tool: not found
       > preFixupLibGccPhase
       > mv: cannot stat '/nix/store/1sc78iyqi0bx2a2dbba2h6jycj58p2hh-x86_64-unknown-linux-gnu-stage-static-gcc-12.3.0-lib/lib/libgcc_s.so': No such file or directory
       For full logs, run 'nix-store -l /nix/store/h1mi656mpg23rj5d7kv4z3alwzgrf3wj-x86_64-unknown-linux-gnu-stage-static-gcc-12.3.0.drv'.
error: 1 dependencies of derivation '/nix/store/927jr7zwi4ll0y8d4g1dfx6s7syq5a7h-glibc-x86_64-unknown-linux-gnu-2.37-8.drv' failed to build
error: 1 dependencies of derivation '/nix/store/2rfx2h31jbsld7p8v3r2c8q7ha39vmqw-x86_64-unknown-linux-gnu-stage-final-gcc-wrapper-12.3.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7rm333lrks2j5r2hy4dy3g0bxghmn4jz-stdenv-linux.drv' failed to build

Broken by https://github.com/NixOS/nixpkgs/pull/238154.

Note: this wasn't working even before #238154.
Nixpkgs gcc expression has a lot of problems, and has always had a lot of problems, when hostPlatform.config == buildPlatform.config but hostPlatform != buildPlatform.
gcc is designed to make install differently when the two config values are equal, because it's designed for an FHS universe where there is only one /usr.  So it has to be careful not to overwrite the hostPlatform libraries when it installs the buildPlatform libraries.
Nixpkgs doesn't have this problem, and we generally want stuff in $lib, not $lib/${targetConfig}/lib.  But it's a game of whack-a-mole with gcc's Makefiles because "what upstream wants" is and always will be "what most distros do" -- which isn't what we do.
Please be patient.
Right now, touching anything in builder.sh causes a full stdenv rebuild, meaning a weeks-long PR cycle through staging.  This friction is why our gcc expression is in such a sorry state of disrepair.  Nobody wants to work on it when it's so fragile and cumbersome.
#237856 will take us a long way towards making it easier to fix these kinds of bugs, without a stdenv rebuild, and without having to go through staging.  Please be patient and wait a bit, so I can fix this problem the easy way once that's done, instead of having to fix it the really really hard and painful way right this instant.

Exciting! Will that link up with some of the work being done for #87909?

I am very much in favor of that PR.  If we can get consensus around it being a good idea (which I think it is) then I will certainly implement it.
Also: once I fix this I will add pkgsCross.gnu64.stdenv to pkgs.tests.cross.sanity so this doesn't happen again:

https://github.com/NixOS/nixpkgs/issues/243320

Has there been more progress on this? Does this work on -unstable now?

Fixed by

https://github.com/NixOS/nixpkgs/pull/264976


[BUG] PreparedStatement swallows exceptions from SQL batch

Driver version
7.2.1.jre8
SQL Server version
Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64)
Nov 30 2018 12:57:58
Copyright (C) 2017 Microsoft Corporation
Express Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)
Client Operating System
Windows 10
JAVA/JVM version
java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)
Table schema
master
Problem description

Expected behaviour:
If I run a batch of SQL statements through PreparedStatement I expect any exception encountered to be thrown. This is what happens if you use a Statment

Actual behaviour:
No exeption is thrown.

Error message/stack trace:
Nothing!

Any other details that can be helpful:
This might be related to #458

Reproduction code
pom.xml
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>de.thoughtgang.otto</groupId>
    <artifactId>sql-server-test</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.surefire.plugin.version>2.22.1</maven.surefire.plugin.version>
        <junit.jupiter.version>5.3.1</junit.jupiter.version>
        <junit.platform.version>1.4.0</junit.platform.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>7.2.1.jre8</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.version}</version>
            </plugin>
        </plugins>
    </build>
`
</project>

SQLServerExceptionTest:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package de.thoughtgang.microsoft.sqlserver;

import com.microsoft.sqlserver.jdbc.SQLServerException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import org.junit.jupiter.api.AfterAll;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.TestInstance.Lifecycle;

/**
 *
 * @author FEHOSSFE
 */
@TestInstance(Lifecycle.PER_CLASS)
public class SQLServerExceptionTest {

    private static final String URL = "jdbc:sqlserver://localhost;databaseName=master";
    private static final String USERNAME = "sa";
    private static final String PASSWORD = "MSSQLServer2017";
    private static final String SQL = "SELECT 1; INSERT INTO test (test) VALUES (23);";

    private Connection con;

    @BeforeAll
    public void beforeAll() throws ClassNotFoundException, SQLException {

        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
        con = DriverManager.getConnection(URL, USERNAME, PASSWORD);

    }

    @AfterAll
    public void afterAll() throws SQLException {

        if (con != null && !con.isClosed()) {

            con.close();

        }

    }

    /**
     * This unit test will execute the SQL string consisting of multiple
     * statments but using a Prepared Statement. It fails to detect the error
     * that occurs because there is not table 'test'.
     */
    @Test
    public void testPreparedStatement() {

        SQLServerException sqlex = assertThrows(SQLServerException.class, () -> {
            boolean hasMoreResultSets;
            try (PreparedStatement stmt = con.prepareStatement(SQL);) {

                hasMoreResultSets = stmt.execute();
                System.out.println(hasMoreResultSets);

                while (hasMoreResultSets) {

                    System.out.println("Resultset found");
                    ResultSet rs = stmt.getResultSet();
                    rs.next();
                    String test = rs.getString(1);
                    rs.close();

                    hasMoreResultSets = stmt.getMoreResults();

                }

                System.out.println(stmt.getMoreResults());

            }

        });

        assertEquals("Invalid object name 'test'.", sqlex.getMessage());

    }

    /**
     * This unit test will execute the SQL string consisting of multiple
     * statments and successfully detect that an error has occured.
     */
    @Test
    public void testStatement() {

        SQLServerException sqlex = assertThrows(SQLServerException.class, () -> {
            boolean hasMoreResultSets;
            try (Statement stmt = con.createStatement();) {

                hasMoreResultSets = stmt.execute(SQL);

                System.out.println(hasMoreResultSets);

                 while (hasMoreResultSets) {

                    System.out.println("Resultset found");
                    ResultSet rs = stmt.getResultSet();
                    rs.next();
                    rs.close();

                    hasMoreResultSets = stmt.getMoreResults();

                }

                System.out.println(stmt.getMoreResults());
            }
        });

        assertEquals("Invalid object name 'test'.", sqlex.getMessage());

    }

}

I have also reaised this issue on stackoverflow.com but have not received any replies.
https://stackoverflow.com/questions/55226638/getting-exceptions-from-a-preparedstatement

Hi @fhossfel,
The reason why you are seeing this behavior is because the driver does not parse the result sets on execute(), you would need to iterate through result sets to access the exception. Try adding rs.getString(1); after rs.next() in testPreparedStatement. Please take a look at the issues #826, #937 for detailed explanation.

This does not work. Since the INSERT Statement does not return a ResultSet calling getMoreResults() returns false. Hence I do not have a RequltSet from the failing statement to call getString(1) on.

Please try:
@TestInstance(Lifecycle.PER_CLASS)
public class SQLServerExceptionTest {

    private static final String URL = "jdbc:sqlserver://localhost;databaseName=master";
    private static final String USERNAME = "sa";
    private static final String PASSWORD = "MSSQLServer2017";
    private static final String SQL = "SELECT 1; INSERT INTO test (test) VALUES (23);";

    private Connection con;

    @BeforeAll
    public void beforeAll() throws ClassNotFoundException, SQLException {

        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
        con = DriverManager.getConnection(URL, USERNAME, PASSWORD);

    }

    @AfterAll
    public void afterAll() throws SQLException {

        if (con != null && !con.isClosed()) {

            con.close();

        }

    }

    /**
     * This unit test will execute the SQL string consisting of multiple
     * statments but using a Prepared Statement. It fails to detect the error
     * that occurs because there is not table 'test'.
     */
    @Test
    public void testPreparedStatement() {

        SQLServerException sqlex = assertThrows(SQLServerException.class, () -> {
            boolean hasMoreResultSets;
            try (PreparedStatement stmt = con.prepareStatement(SQL);) {

                hasMoreResultSets = stmt.execute();
                System.out.println(hasMoreResultSets);

                while (hasMoreResultSets) {

                    System.out.println("Resultset found");
                    ResultSet rs = stmt.getResultSet();
                    rs.next();
                    while(rs.next()) {rs.getString(1);}
                    rs.close();

                    hasMoreResultSets = stmt.getMoreResults();

                }

                System.out.println(stmt.getMoreResults());

            }

        });

        assertEquals("Invalid object name 'test'.", sqlex.getMessage());

    }

    /**
     * This unit test will execute the SQL string consisting of multiple
     * statments and successfully detect that an error has occured.
     */
    @Test
    public void testStatement() {

        SQLServerException sqlex = assertThrows(SQLServerException.class, () -> {
            boolean hasMoreResultSets;
            try (Statement stmt = con.createStatement();) {

                hasMoreResultSets = stmt.execute(SQL);

                System.out.println(hasMoreResultSets);

                 while (hasMoreResultSets) {

                    System.out.println("Resultset found");
                    ResultSet rs = stmt.getResultSet();
                    while(rs.next()) {rs.getString(1);}
                    rs.close();

                    hasMoreResultSets = stmt.getMoreResults();

                }

                System.out.println(stmt.getMoreResults());
            }
        });

        assertEquals("Invalid object name 'test'.", sqlex.getMessage());

    }

}

This does not work. You will get the error message "Failed: Expected com.microsoft.sqlserver.jdbc.SQLServerException to be thrown, but nothing was thrown." from the unit test.

I ran the test below and it seems to pass. Please make sure to update your project.

Please try:
@TestInstance(Lifecycle.PER_CLASS)
public class SQLServerExceptionTest {

    private static final String URL = "jdbc:sqlserver://localhost;databaseName=master";
    private static final String USERNAME = "sa";
    private static final String PASSWORD = "MSSQLServer2017";
    private static final String SQL = "SELECT 1; INSERT INTO test (test) VALUES (23);";

    private Connection con;

    @BeforeAll
    public void beforeAll() throws ClassNotFoundException, SQLException {

        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
        con = DriverManager.getConnection(URL, USERNAME, PASSWORD);

    }

    @AfterAll
    public void afterAll() throws SQLException {

        if (con != null && !con.isClosed()) {

            con.close();

        }

    }

    /**
     * This unit test will execute the SQL string consisting of multiple
     * statments but using a Prepared Statement. It fails to detect the error
     * that occurs because there is not table 'test'.
     */
    @Test
    public void testPreparedStatement() {

        SQLServerException sqlex = assertThrows(SQLServerException.class, () -> {
            boolean hasMoreResultSets;
            try (PreparedStatement stmt = con.prepareStatement(SQL);) {

                hasMoreResultSets = stmt.execute();
                System.out.println(hasMoreResultSets);

                while (hasMoreResultSets) {

                    System.out.println("Resultset found");
                    ResultSet rs = stmt.getResultSet();
                    rs.next();
                    while(rs.next()) {rs.getString(1);}
                    rs.close();

                    hasMoreResultSets = stmt.getMoreResults();

                }

                System.out.println(stmt.getMoreResults());

            }

        });

        assertEquals("Invalid object name 'test'.", sqlex.getMessage());

    }

    /**
     * This unit test will execute the SQL string consisting of multiple
     * statments and successfully detect that an error has occured.
     */
    @Test
    public void testStatement() {

        SQLServerException sqlex = assertThrows(SQLServerException.class, () -> {
            boolean hasMoreResultSets;
            try (Statement stmt = con.createStatement();) {

                hasMoreResultSets = stmt.execute(SQL);

                System.out.println(hasMoreResultSets);

                 while (hasMoreResultSets) {

                    System.out.println("Resultset found");
                    ResultSet rs = stmt.getResultSet();
                    while(rs.next()) {rs.getString(1);}
                    rs.close();

                    hasMoreResultSets = stmt.getMoreResults();

                }

                System.out.println(stmt.getMoreResults());
            }
        });

        assertEquals("Invalid object name 'test'.", sqlex.getMessage());

    }

}

Thanks for the reply. I can run your unit successfully: The error is thrown. I I have analyzed this correctly you need to retrieve the complete ResultSet of the previous statment to get to the error.
I think this is a bug nevertheless - or at least very surprsing. The JDBC spec says in section 14.1.4:

Error handling in the case of PreparedStatement objects is the same as error
handling in the case of Statement objects. Some drivers may stop processing as
soon as an error occurs, while others may continue processing the rest of the batch.

I admit, that this is in the section Batch Updates but I would argue that the general idea behind PreparedStatement/Statement is that they behave similar.  As a matter of fact: I think that this is the whole idea behind inhertance in OOP.
Currently the PreparedStatement has a lot of nasty surprises. I did not expect:
a.) that the error is not thrown automatically upon exectuion
b.) the error does not occur when asking for the resultset of the error
c.) it does only occur when retrieving all rows of a resultset of a previous statement that is unrelated to the exception that has occured.
I don't think there is any other JDBC driver that behaves that way.

BTW: What do you do if you have a combination of one INSERT/UPDATE that runs and successfully and a second one that fails? Do you get an exception straight away?

@fhossfel ,

I admit, that this is in the section Batch Updates but I would argue that the general idea behind PreparedStatement/Statement is that they behave similar.

They do indeed behave the same in this scenario. Please try to debug both testStatement() and  testPreparedStatement(), both methods throw an exception when calling rs.getString(1) and parsing the result set, not on execute().

a.) that the error is not thrown automatically upon exectuion
b.) the error does not occur when asking for the resultset of the error
c.) it does only occur when retrieving all rows of a resultset of a previous statement that is unrelated to the exception that has occured.

I would again suggest to take a look at the issues #826, #937 for the detailed explanation about the current behavior. In your scenario, the server returns the exception as a result set and there is not much the driver can do but let the application parse the result set.

I don't think there is any other JDBC driver that behaves that way.

I just confirmed that jTDS  - another SQL Server JDBC driver behaves exactly the same.
Please let me know if you have any other questions.

They do indeed behave the same in this scenario. Please try to debug both testStatement() and testPreparedStatement(), both methods throw an exception when calling rs.getString(1) and parsing the result set, not on execute().

No, that's not true. The statement test case throws the exception without having to call getString(1) on the result set. Does the SQL Server handle Statement and PreparedStatement differently or is this a difference in the driver?

In your scenario, the server returns the exception as a result set and there is not much the driver can do but let the application parse the result set.

Sorry, if I did not understand this correctly: Does this mean I get the data from two different statements in one ResultSet? I mean, does the server return one ResultSet which may have completely different meta data per row. I would have expected that I get two different ResultSets for two different SELECTs and that I use stmt.getMoreResults() to access them.
IMHO the issues #826 and #937 are a strong indicator that I am not the only one who is, ummm, "surprised" by this behavior. I can confirm that Pentaho Data Integration is not usable with SQL Server. SO this problem seems to be fairly widespread.

Hi @ulvii,
sorry to bother you again but this is really quite a pressing issue for us. I have just adapter the unit test to use jTDS and it does not behave the same. It will throw and java.sql.SQLException without having to loop through the rows of a ResultSet or even getting the first row of the ResultSet. It is sufficient to call
getMoreResults() to retrieve all ResultSets.
package de.thoughtgang.microsoft.sqlserver;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import org.junit.jupiter.api.AfterAll;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.TestInstance.Lifecycle;

@TestInstance(Lifecycle.PER_CLASS)
public class jTDSExceptionTest {

    private static final String URL = "jdbc:jtds:sqlserver://localhost;databaseName=master";
    private static final String USERNAME = "sa";
    private static final String PASSWORD = "MSSQLServer2017";
    private static final String SQL = "SELECT 1; INSERT INTO test (test) VALUES (23);";

    private Connection con;

    @BeforeAll
    public void beforeAll() throws ClassNotFoundException, SQLException {

        Class.forName("net.sourceforge.jtds.jdbc.Driver");
        con = DriverManager.getConnection(URL, USERNAME, PASSWORD);

    }

    @AfterAll
    public void afterAll() throws SQLException {

        if (con != null && !con.isClosed()) {

            con.close();

        }

    }

    /**
     * This unit test will execute the SQL string consisting of multiple
     * statments but using a Prepared Statement. It fails to detect the error
     * that occurs because there is not table 'test'.
     */
    @Test
    public void testPreparedStatement() throws SQLException {

        SQLException sqlex = assertThrows(SQLException.class, () -> {

            try (PreparedStatement stmt = con.prepareStatement(SQL);) {

                stmt.execute();
                while (stmt.getMoreResults()) {}

            }

        });

        assertEquals("Invalid object name 'test'.", sqlex.getMessage());

    }

}

        assertEquals("Invalid object name 'test'.", sqlex.getMessage());

    }

}

pom.xml:
    <dependency>
        <groupId>net.sourceforge.jtds</groupId>
        <artifactId>jtds</artifactId>
        <version>1.3.1</version>
    </dependency>

Hi @fhossfel ,
You are actually correct that PreparedStatement behaves differently and the difference seems to be introduced with this PR. Would you mind trying 6.4 version of the driver and let me know if it behaves the way you expect? In the meantime I will continue the investigations.

Hi @ulvii,
I can confirm that the unit test runs successfully with 6.4.0.jre8. I think I should be able to downgrade the driver to that version. Still, it would be nice if this could be addressed in a future release.
Thanks
Felix

Hi @fhossfel,
I created a PR that reverts #664, The change will be reviewed by the team for one of the upcoming releases. Thank you for bringing the issue to our attention.


BasicBlock is defined twice, overwriting previous definition

We defined a BasicBlock twice - once in a ResNet and once in a WideResNet - and the second definition overwrites the first.
Then when we try to use a ResNet, it raises the error -
AttributeError: type object 'BasicBlock' has no attribute 'expansion'

I have verified that it can run for the WideResNet model


Update user identity for new client

Needed for updating jwt to use new client-id (WIP)

Merged manually.... closing.


pythagorean-triplet: add hint to @Ignore annotations

Add a hint with the value "Remove to run test" to the @Ignore annotations in PythagoreanTripletTest. See issue #426 for discussion.

I'd be happy to do this one

Fixed in PR #499 :)


Use MediaWiki JSON to create a component for entering diacritics

Describe the feature you'd like
In Mediawiki (the wiki software behind Wikimedia) when the user is entering text in their rich text fields, the user can expand and display a list of special characters for a number of different character sets that allows them to enter a diacritic character by clicking on the the character that is then inserted into the text field.

This widget is being populated from a JSON file in the Mediawiki PHP code base that we could use to base this component on:
https://raw.githubusercontent.com/wikimedia/mediawiki/master/resources/src/mediawiki.language/specialcharacters.json
Describe alternatives you've considered
Catalogers can copy and paste diacritics from other software but this isn't the best option, especially for non-English cataloging.

Design of Diacritic Component


Is lazy node supported?

In the paper "Deprecating the Observer Pattern with Scala.React" there's a section "Strict vs Lazy Nodes", quoting from the paper:

Lazy nodes are notified by their dependencies eagerly,
but validated only when queried

My simple test showed that C++React evaluates the nodes when notified even though no one queries.
Is lazy node implemented? If not, is there any plan? or is it impossible for C++React?

As you observed, lazy evaluation is not implemented. I gave it some thought in the past, but I concluded that the costs would outweigh the benefits. More specifically, I was considering signals, where it's possible to access their current value imperatively. If that access were to trigger cascading re-evaluations, that would introduce the need for additional synchronization.
What would be an interesting optimization for events (though not quite the same as "lazy") is marking subgraphs that currently don't have any consumers (signals, observers) attached, so that they could be skipped.

Thanks for your reply. I learned of FRP recently and am quite interested in applying such paradigm to image processing, so in my case the processing nodes would be image filters which may be expensive to compute, but still I'd like to construct the whole dependencies among the filters beforehand, so the laziness is of more importance here.
FWIW, I stumbled through some FRP libs in C++, including Sodium, RxCpp, sfrp, and your lib looks quite promising and best documented, though I probably can't use your lib for the reason above.
Anyway, you've done a good job and good luck to your lib!


fix: do not render a date if it is not set

Fixes the issue where content without a date set render a date of "January 1, 0001".
As shown here:

Hopefully this is acceptable, I aimed for this to do the same as was done here:
https://github.com/theNewDynamic/gohugo-theme-ananke/blob/f5cdf1f3a6ce58040dba752b684988e7251c2e37/layouts/post/summary.html#L2-L6

Addresse by #397


fastpbkdf2: init at version 1.0.0

Motivation for this change
New package for fastpbkdf2, which is a fast PBKDF2-HMAC-{SHA1,SHA256,SHA512} implementation in C.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
Built on platform(s)

[ ] NixOS
[x] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

@GrahamcOfBorg build fastpbkdf2

@GrahamcOfBorg eval
@GrahamcOfBorg build fastpbkdf2

Thank you!


Write a KB article on email deliverability

This is a super important article and much requested!
This article should include (maybe as a series of articles) or link to other articles on:
How to optimise for email deliverability (SPF, DKIM, DMARC etc)
How to clean lists / check validity etc
Best practices for ensuring deliverability
Resources:
https://www.mautic.org/blog/marketer/why-isnt-my-email-marketing-campaign-being-delivered
https://mautic.com/help/getting-started-with-email-delivery/
https://mautic.com/help/email-best-practices/
https://autoize.com/email-deliverability-tips-using-mautic-marketing-automation/
https://makewebbetter.com/blog/avoid-spam-filters-when-doing-email-marketing/
https://powertic.com/en/better-emails-with-mautic-important-tips-when-building-a-message/
Please create this directly in the KB or you can use the linked GDoc.  Add a PR here for your credit: https://github.com/mautic/mautic-community-knowledgebase

Hi @jeremiah1503 just checking in, did you need any help getting going with this?


Extending a class method with prototype assignment confuses the compiler about membership type

This is an issue I encountered when working on  https://github.com/webpack/webpack/pull/6862
Bug Repository
See the bug repo for complete code
https://github.com/mohsen1/ts-bug-instance-member
Run npm test to run the test
Expected behavior:
No Error
Actual behavior:
index.js:7:19 - error TS2424: Class 'Ex' defines instance member function 'foo', but extended class 'MyClass' defines it as instance member property.

7 MyClass.prototype.foo = function() {
                    ~~~

Fix is up at #22935

I see, it looks like it breaks going the other direction, when the base uses prototype assignment. I’ll take anothe look.

Well, actually it turns out that it's the arrow function being used as a method. This is ... weird, but technically correct as long as the author remembers that this isn't an instance of Ex. I'll have a fix up shortly; I see a couple of ways to do it.

Note that --noImplicitThis works with "checkJs": true, but it marks every usage of this outside a class, which makes it hard to use transitionally. So recognising arrow functions as methods is good for understanding existing code, but bad in that it doesn't prevent js authors from possibly buggy new code.
I think the right thing is to prefer understanding existing code, since we hope people with write new code in Typescript. They will, at least, have years of experience lowering their expectations of the correctness of any new Javascript that they write.

OK, the fix is merged. @mohsen1 can you try typescript@next tomorrow?

Thank you for prompt response @sandersn!


Can't launch server on Mac OSX

Hi, I'm working on Mac OSX.
Successfully built Nvidia fork of Caffe enabled CUDA.
I have configured the server with ./digits-devserver --config.
I got an error when launching it like below:
$ ./digits-devserver
  ___ ___ ___ ___ _____ ___
 |   \_ _/ __|_ _|_   _/ __|
 | |) | | (_ || |  | | \__ \
 |___/___\___|___| |_| |___/

Traceback (most recent call last):
  File "./digits-devserver", line 41, in <module>
    from digits.webapp import app, socketio, scheduler
  File "/.../digits/digits/webapp.py", line 44, in <module>
    import digits.views
  File "/.../digits/digits/views.py", line 15, in <module>
    import model.views
  File "/.../digits/digits/model/views.py", line 24, in <module>
    import images.views
  File "/.../digits/digits/model/images/views.py", line 4, in <module>
    import classification.views
  File "/.../digits/digits/model/images/classification/views.py", line 25, in <module>
    from forms import ImageClassificationModelForm
  File "/.../digits/digits/model/images/classification/forms.py", line 6, in <module>
    from ..forms import ImageModelForm
  File "/.../digits/digits/model/images/forms.py", line 6, in <module>
    from ..forms import ModelForm
  File "/.../digits/digits/model/forms.py", line 20, in <module>
    class ModelForm(Form):
  File "/.../digits/digits/model/forms.py", line 204, in ModelForm
    ) for index in config_value('gpu_list').split(',') if index],
TypeError: argument of type 'NoneType' is not iterable

It seems an error occurs here due to fail to load libnvidia-ml:
https://github.com/NVIDIA/DIGITS/blob/master/digits/device_query.py#L181
This library is a part of NVIDIA Management Library (NVML) and it's included in GPU Deployment Kit but it is NOT provided for Mac OSX.
Is there a way to avoid it, or should I use CPU_ONLY mode?

Quick question: are you working with the latest version of the code?

It seems an error occurs here due to fail to load libnvidia-ml ... NVML is NOT provided for Mac OSX

I know, DIGITS should work if NVML isn't found on the system.
When you configured your application, did you choose any GPUs? It's strange that you built caffe with CUDA support and yet selected nothing for your "gpu_list". There shouldn't be any errors anyway - that's a bug. I'm just trying to figure out what you're doing.

Found the bug. Thanks for reporting it!


STOR-2260: Bump OLM metadata to 4.19

https://issues.redhat.com/browse/STOR-2260

/cc @openshift/storage

It seems there is a known issue on operator-e2e-vault, few cases failed due to timeout.

/lgtm
/approve

/label qe-approved


JSON encoders are not respected when using a response_model

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the FastAPI documentation, with the integrated search.
[X] I already searched in Google "How to X in FastAPI" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to FastAPI but to Pydantic.
[X] I already checked if it is not related to FastAPI but to Swagger UI.
[X] I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
import pydantic
from fastapi import FastAPI
from pydantic import BaseModel

class ORMConfig:
    orm_mode = True

@pydantic.dataclasses.dataclass(config=ORMConfig)
class Money:
    amount: float
    currency: str

    def __str__(self):
        return f"{self.amount}/{self.currency}"

class PriceRange(BaseModel):
    min: Money
    max: Money

    class Config:
        json_encoders = {Money: str}

price_range = PriceRange(min=Money(1000, 'EUR'), max=Money(2000, 'EUR'))

def create_app() -> FastAPI:

    app = FastAPI()

    @app.get("/json")
    def get_json():
        return price_range

    @app.get("/model", response_model=PriceRange)
    def get_model():
        return price_range

    return app

Description
After the last release json encoders should be supported in fastapi responses, but when a response model is specified they are ignored.
You can check that the json endpoint yields
{"min":"1000.0/EUR","max":"2000.0/EUR"} and the second one {"min":{"amount":1000.0,"currency":"EUR"},"max":{"amount":2000.0,"currency":"EUR"}}.
Operating System
Linux
Operating System Details
No response
FastAPI Version
0.73.0
Python Version
3.10.0
Additional Context
I did some research, it appears that when a response model is specified the object is cloned, but the model config is not. Just adding the config to the new model is not enough since the types actually changed, so the configuration gets ignored.
I'm trying to figure out if / how to adapt the configuration to the newly built model (and, for my case in particular, the dataclass doesn't have its own str method anymore).
Probably just giving the option of selecting whether to use the original field or clone it would be enough to get a workaround and leave the user the option to do it :)

Would it be possible to have any update on this?


Make jacoco plugin work on Turkish locale and enforce future toLowerCase and ToUpperCase calls to be locale-independent

Fixes #17600

@bot-gradle test QuickFeedbackLinux

OK, I've already triggered QuickFeedbackLinux build for you.

@bot-gradle test QuickFeedbackLinux

OK, I've already triggered QuickFeedbackLinux build for you.

@bot-gradle test QuickFeedbackLinux

OK, I've already triggered QuickFeedbackLinux build for you.

@bot-gradle test rFM

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test rFM

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test rFM

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test rFM

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test rFM

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test rFM

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test rFM

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test rFM

OK, I've already triggered ReadyForMerge build for you.

The intention was always to preserve the current behavior and forbid future
usage of  String.toLowerCase() wo/arguments.
What you wrote makes sense to me. I'll revert my changes and just ignore
the existing usages of String.toLowerCase() and String.toUpperCase() in the
test.
Donát Csikós
Senior Software Engineer
Gradle
W. gradle.com
On Wed, Jul 14, 2021 at 2:43 PM Sterling Greene @.***>
wrote:

@.**** requested changes on this pull request.
I only looked through the first 15 or so files. I see a general
problem/mixup and I want to make sure I'm not thinking wrong here...
We have two toLowerCase methods in TextUtil. One needs to be used when the
String must be interpreted with an English locale. I think this is mostly
used in places where we use hardcoded strings and turn them into directory
names or compare them to user provided inputs. e.g., if we have an enum
with a value plain, we would want to always compare the String from the
user with an English locale.
The other method needs to be used when it doesn't matter which locale is
used. I think this means we can use this in error messages, but not much
else.
It looks like you replaced all toLowerCase() with toLowerCaseUserLocale,
which is correct for capturing the current behavior, but I think that makes
things a bit worse. The idea of having these specific methods is to force
people to think about which method they need to use. With a blanket
replacement, we'll have many places where we're using
toLowerCaseUserLocale, but it's wrong. I think that defeats the purpose
of having these alternatives.
It's OK to say there are just too many to sort out right now, but if we do
that, I think we should go the other way:

Introduce the new methods
Forbid new instances of toLowerCase()
Grandfather in old instances and let us slowly work them away as we
touch things

I think this just means adding some exceptions to LocaleDependencyTest
and reverting changes to any classes you haven't checked yet. We can even
do a clean-up day with the whole team to replace as many occurrences of
toLowerCase/toUpperCase as we can.
In
subprojects/base-services/src/main/java/org/gradle/internal/jvm/Jvm.java
https://github.com/gradle/gradle/pull/17657#discussion_r669556571:

   if (TextUtil.toLowerCaseUserLocale(vendor).startsWith("apple inc.")) {

         return new AppleJvm(OperatingSystem.current());

     }

   if (vendor.toLowerCase().startsWith("ibm corporation")) {

   if (TextUtil.toLowerCaseUserLocale(vendor).startsWith("ibm corporation")) {

I think both of these need to be English locale since we're looking for a
specific string.
In
subprojects/base-services/src/main/java/org/gradle/internal/os/OperatingSystem.java
https://github.com/gradle/gradle/pull/17657#discussion_r669557106:

@@ -58,7 +59,7 @@ static void resetCurrent() {

 }

 public static OperatingSystem forName(String os) {

   String osName = os.toLowerCase();

   String osName = TextUtil.toLowerCaseUserLocale(os);

I think this needs to be English locale too
In
subprojects/base-services/src/main/java/org/gradle/internal/os/OperatingSystem.java
https://github.com/gradle/gradle/pull/17657#discussion_r669557377:

@@ -362,7 +363,7 @@ protected String getArch() {

     }

     protected String getOsPrefix() {

       String osPrefix = getName().toLowerCase();

       String osPrefix = TextUtil.toLowerCaseUserLocale(getName());

I'm not sure if it matters, but this should be english locale too to be
consistent with the one above.
In subprojects/base-services/src/main/java/org/gradle/util/GUtil.java
https://github.com/gradle/gradle/pull/17657#discussion_r669559525:

@@ -367,7 +368,7 @@ public static String toConstant(CharSequence string) {

     if (string == null) {

         return null;

     }

   return toWords(string, '_').toUpperCase();

   return TextUtil.toUpperCaseUserLocale(toWords(string, '_'));

I think it's OK to capture the current behavior here, but I bet these are
sometimes doing the wrong thing.
In
subprojects/base-services/src/main/java/org/gradle/util/internal/TextUtil.java
https://github.com/gradle/gradle/pull/17657#discussion_r669560266:

@@ -207,4 +207,34 @@ public static String camelToKebabCase(String camelCase) {

 public static String toLowerCaseLocaleSafe(String s) {

     return s.toLowerCase(Locale.ENGLISH);

 }

/**

* Replacement for locale-dependent<EMAIL_ADDRESS>String.toLowerCase()}.

*

*
In most cases, making a string lowercase should be independent from the current locale (i.e<EMAIL_ADDRESS>String.toLowerCase(Locale.XXX)} should be used). If an implementation does need to be

Should this refer to toLowerCaseLocaleSafe instead?
In
subprojects/base-services/src/main/java/org/gradle/util/internal/TextUtil.java
https://github.com/gradle/gradle/pull/17657#discussion_r669564237:

@@ -207,4 +207,34 @@ public static String camelToKebabCase(String camelCase) {

 public static String toLowerCaseLocaleSafe(String s) {

     return s.toLowerCase(Locale.ENGLISH);

 }

/**

* Replacement for locale-dependent<EMAIL_ADDRESS>String.toLowerCase()}.

*

*
In most cases, making a string lowercase should be independent from the current locale (i.e<EMAIL_ADDRESS>String.toLowerCase(Locale.XXX)} should be used). If an implementation does need to be

* locale-dependent then this method has to be used.

I'm not sure which method you're referring to here with "this method". It
sort of sounds like you're saying to use toLowerCaseUserLocale if you want
a version of toLowerCase that does not use the user's locale. I think
it's the opposite:

toLowerCaseUserLocale needs to be used if the way we're using the
String needs to be the user's locale.
toLowerCaseLocaleSafe needs to be used if the way we're using the
String needs to be a specific locale (English) regardless of the user's
locale.

In
subprojects/base-services/src/main/java/org/gradle/util/internal/TextUtil.java
https://github.com/gradle/gradle/pull/17657#discussion_r669564808:

*
In most cases, making a string lowercase should be independent from the current locale (i.e<EMAIL_ADDRESS>String.toLowerCase(Locale.XXX)} should be used). If an implementation does need to be

* locale-dependent then this method has to be used.

*

*
There's an architecture test in place that will fail if an implementation tries to call<EMAIL_ADDRESS>String.toLowerCase()} without an argument.

*

* @param s string to be made lowercase

* @return a lowercase string

*/

public static String toLowerCaseUserLocale(String s) {

   return s.toLowerCase();

}

/**

* Replacement for locale-dependent<EMAIL_ADDRESS>String.toUpperCase()}.

*

*
In most cases, making a string uppercase should be independent from the current locale (i.e<EMAIL_ADDRESS>String.toUpperCase(Locale.XXX)} should be used). If an implementation does need to be

Same comment as above. Do we also need a toUpperCaseLocaleSafe equivalent?
In
subprojects/build-cache/src/main/java/org/gradle/caching/internal/controller/service/BuildCacheServiceRole.java
https://github.com/gradle/gradle/pull/17657#discussion_r669565701:

@@ -26,7 +27,7 @@

 private final String displayName;

 BuildCacheServiceRole() {

   this.displayName = name().toLowerCase();

   this.displayName = TextUtil.toLowerCaseUserLocale(name());

It doesn't make a difference here, but this is probably intended to be
English locale only.
In
subprojects/build-init/src/main/java/org/gradle/buildinit/plugins/internal/LanguageSpecificAdaptor.java
https://github.com/gradle/gradle/pull/17657#discussion_r669567676:

@@ -151,7 +152,7 @@ private BuildScriptBuilder projectBuildScriptBuilder(String projectName, InitSet

 private BuildScriptBuilder conventionPluginScriptBuilder(String conventionPluginName, InitSettings settings) {

     BuildScriptBuilder buildScriptBuilder = scriptBuilderFactory.script(settings.getDsl(),

       "buildSrc/src/main/" + settings.getDsl().name().toLowerCase() + "/" + settings.getPackageName() + "." + getLanguage().getName() + "-" + conventionPluginName + "-conventions");

       "buildSrc/src/main/" + TextUtil.toLowerCaseUserLocale(settings.getDsl().name()) + "/" + settings.getPackageName() + "." + getLanguage().getName() + "-" + conventionPluginName + "-conventions");

I believe this needs to be toLowerCaseLocaleSafe because in Turkish
locales, we would end up creating a buildSrc/src/main/kotlın (dotless i)
directory.
In
subprojects/build-init/src/main/java/org/gradle/buildinit/plugins/internal/modifiers/BuildInitDsl.java
https://github.com/gradle/gradle/pull/17657#discussion_r669568323:

@@ -72,6 +73,6 @@ public String fileNameFor(String fileNameWithoutExtension) {

 @Override

 public String toString() {

   return StringUtils.capitalize(name().toLowerCase());

   return StringUtils.capitalize(TextUtil.toLowerCaseUserLocale(name()));

I think this needs toLowerCaseLocaleSafe.
In
subprojects/build-init/src/main/java/org/gradle/buildinit/plugins/internal/modifiers/Language.java
https://github.com/gradle/gradle/pull/17657#discussion_r669569154:

   return new Language(displayName.toLowerCase(), displayName, displayName.toLowerCase());

   return new Language(TextUtil.toLowerCaseUserLocale(displayName), displayName, TextUtil.toLowerCaseUserLocale(displayName));

}
public static Language withName(String displayName, String name) {
   return new Language(name, displayName, name);

}
public static Language withNameAndExtension(String displayName, String extension) {

   return new Language(displayName.toLowerCase(), displayName, extension);

   return new Language(TextUtil.toLowerCaseUserLocale(displayName), displayName, extension);

}

I think these need to be toLowerCaseLocaleSafe too. The language names are
expected to be exactly as we have them above
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/gradle/gradle/pull/17657#pullrequestreview-706198801,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AADGQKYMQ7O7NDQL2JRMJ5DTXWA6LANCNFSM5AAV7VNA
.

@big-guy I've restructured the PR based on your recommendation and fixed the toLowerCase/toUpperCase calls you mentioned in the review. PTAL.

@bot-gradle test rFM

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test rFM

OK, I've already triggered ReadyForMerge build for you.

I'm not sure using TextUtil makes a lot of sense here. I don't like the dependency on :base-services, and IntelliJ can check non-localized toLowerCase() calls pretty well. I'd much rather add something like a Spotbugs check to make sure the same check is enforced on the build level.

/cc @big-guy

Let's decide what to do in the following ticket: https://github.com/gradle/gradle/issues/17926
I've created a separate PR that only fixes the reported issue: https://github.com/gradle/gradle/pull/17925


KeyError: 'num_refs' in Sample jupyter notebook

Hi Reinvent4 team,
Thanks for releasing the latest version of Reinvent and putting together the sample Jupyter notebook.
I get the following error while running Start Transfer Learning section in Reinvent_TLRL.ipynb.
Traceback (most recent call last):   File "/home/bilal.nizami/anaconda3/envs/reinvent4/bin/reinvent", line 8, in <module>     sys.exit(main())   File "/home/bilal.nizami/anaconda3/envs/reinvent4/lib/python3.10/site-packages/reinvent/Reinvent.py", line 292, in main     runner(input_config, actual_device, tb_logdir, responder_config)   File "/home/bilal.nizami/anaconda3/envs/reinvent4/lib/python3.10/site-packages/reinvent/runmodes/TL/run_transfer_learning.py", line 91, in run_transfer_learning     num_refs=parameters["num_refs"], KeyError: 'num_refs'
Looking back at the documentation I think num_refs is not set in the TL setup section.
Best Regards,
Bilal

Hi,
many thanks for your interest in REINVENT and welcome to the community!
What version are you using? I see that in the latest release this has been fixed.
Many thanks,
Hannes.


Bethesda.Launcher version 1.82.0

[ ] Have you signed the Contributor License Agreement?
[ ] Have you checked that there aren't other open pull requests for the same manifest update/change?
[ ] Have you validated your manifest locally with winget validate --manifest <path>?
[ ] Have you tested your manifest locally with winget install --manifest <path>?
[ ] Does your manifest conform to the 1.0 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

Fixes hash, incorrect in current version according to winget


Add build jobs on the CI

Add jobs that lint and build the whole app for different platforms.
Otherwise we risk inadvertently breaking the builds.

building has been addressed by #41 (whole integration test for our primary platform). If we decide to start targetting iOS, we can add similar test for iOS.
linting has been integrated too: #32  #33


Use loop handler for streaming cowboy_rest response body

This can be useful if at all possible.

This is supposed to replace the stream return value from cowboy_rest.

I've got code for this. Just need to add tests tomorrow.

Done in 836342abb86b3ff15d1c8319a455d776f7027a87.


Move main loop into function.

This moves the main loop that processes all of the --item arguments and creates the stages dictionary out into a separate function.
The point of this is to allow accessing this code from a process outside of generatejson.py that might be more complex.  We have an external process that uploads all of the files (and bootstrap.json) to a host as well as generates signed URLs.  In the past we have called generatejson.py via subprocess, but that seems like a bit of a hack.
Rather than re-implement all of the code you use to generate the important dictionary and file hashes in our script, it seemed like we might suggest this modification that would allow external tools to get access to the dictionary that generatejson.py constructs easily.
Changes are:

Move the main loop that processes itemsToProcess (after parsing
CLI args) and construction of stages dict out to a function.
The function takes only the itemsToProcess list that is
constructed by parsing the args.item inputs as well as the base-url.
Within the function the code is essentially unchanged, and the
function returns the completed stages dictionary.
The only other change is to remove the branch "if args.output" when
constructing the savePath...args.output is required, so it will always
be set.

Thanks for considering this.

sorry for just seeing this. I just merged something that conflicts here. Can you take a look?


Apply mating material check using a Situation, not a Color

Similar refactor to #157 but without the new knight-versus-knight antichess rule.
Will require passing Situation (rather than Board and Color) from https://github.com/ornicar/lila/blob/8dcddaa1048c347cde6d0a6773515764ee71877e/modules/round/src/main/Finisher.scala#L39-L40

Side note: Recently lila added another call that uses the color argument: https://github.com/ornicar/lila/commit/140c65b9f72dc61f198b712294a0a75342ef13d9. It shouldn't be too difficult to work around that on lila's side, or to disallow claiming disconnections on one's own turn.

Refactoring looks good.
Back to the side note. We can either wait for a decision on ornicar/lila#4929 or add an iterim solution like (pseudo code):
def insufficientMaterial(situation, color) =
   if (situation.color != color) insufficientMaterial(situation)
   else for all legal moves insufficientMaterial(situation after move)

It would be called very rarely (only when the "claim" button is clicked), so efficiency would not be a concern.

Since performance is not a concern, for compatibility I should probably introduce that solution.

This is becoming quite messy and so far doesn't pass testing:
  def apply(game: Game, color: Color): Boolean = {
    if (game.situation.color != color) apply(game.situation)
    else apply(game.board) || (game.board.variant.validMoves(game.situation).values forall { _ forall { move => apply(game.apply(move).situation) } })
  }

We could use this: https://github.com/ornicar/scalachess/blob/master/src/main/scala/Situation.scala#L9.
Also I don't think we ever need the apply(game.board) shortcut in practice. The game would have been ended anyway.

Hm, just now I realized that validMoves may be empty in a crazyhouse game.

Eww, good catch. Would it make sense to always return false is validMoves is empty?

I think so, as long as we can safely assume the game has not ended (no race condition between a victory/draw claim and... I don't know, a move being sent from the player making the claim?).

Good eye to see conflicts between this one and mine.


Feature Request: Continuous pomodoro cycle and dark mode for settings page

Really great extension, always use it all the time. But can I make a suggest to add options, I want my pomodoro timer continuous with no interuption like I had to press button every cycle. So like, you just have to press button "start pomodoro" and just leave it like that until you receive the next cycle notification of course, and end after long break. That way I can create custom pomodoro cycle that fit tight schedule. Oh and also, dark mode for settings page would be good too.

I would also love a continuous cycle

I would love the dark mode too.


Nirspec Throughputs for LDC

Adds NIRSpec grism/filter combination throughputs and the code to generate them using pandeia.

Hello @hover2pi, Thank you for submitting the Pull Request !

In the file exoctk/throughputs.py:

Line 129:43: E741 ambiguous variable name 'l'

If you have not done so, please consult PEP8 and PEP257

Fixes #312

@bourque Yeah that twine PR was merged into master by accident but I pulled it into this PR and it fixed my build. So merging this into develop should make things square.


Centering a picture

Dear David,
I don't know CSS that well, so I apologize for the question in advance. In the Portfolio page, I am using only 4 pictures instead of 6 and I've tried different code combinations to center the 4th picture but nothing was successful. However, I am not sure how to center the last picture. Those are the latest modifications I performed in the index.html file:

And here is what I added in the .css file:
.box {
text-align: center; /modified/
}
It's not working, so obviously I did something wrong.

On the .row element, add the .justify-content-center utility class and it should center that picture for you!


Package is not able to install because of refactorings in https://github.com/maruel/panicparse

This package fails to install with this error message:
junterstein$ go get github.com/gizak/termui
# github.com/gizak/termui
Go/src/github.com/gizak/termui/render.go:107:30: not enough arguments in call to stack.ParseDump
	have (*bytes.Reader, *os.File)
	want (io.Reader, io.Writer, bool)
Go/src/github.com/gizak/termui/render.go:112:10: undefined: stack.Palette
Go/src/github.com/gizak/termui/render.go:113:15: undefined: stack.SortBuckets
Go/src/github.com/gizak/termui/render.go:113:33: undefined: stack.Bucketize
Go/src/github.com/gizak/termui/render.go:114:22: undefined: stack.CalcLengths

This is because this project made a refactoring and moved Palette from stack to internal, see this commit: https://github.com/maruel/panicparse/commit/822a960846af9ee106aaff0da10f587cbb317e35

yep, i meet the same problem.
thanks your solution

i think you should fork the project and refix bug by pulling request

I'm not familiar with go, but would it be possible to change the usage of this struct within this project from stack to internal or is internal a magic package that can not be used outside the other go project?

Hi,
this issue is duplicated.
Check #177

Thank you @airking05 for referencing this issue and sorry for not seeing it :(


Improve Reset emulation

Currently, the emulation (for versions of Windows without an ANSI-aware console) fills blank space with 'colour 0' (usually black) and 'resets' to 'colour  7 on colour 0' (usually silver on black). This may upset PowerShell users (or others) who have a different default - for example, Reset does not return them to where they started.
This proposal changes the emulation so that the default colours are those of the console when the emulation starts.
The default colours are captured in module System.Console.ANSI.Windows.Detect and preserved: isANSIEnabled is now a value of type ANSIEnabledState (rather than Bool) which has a constructor NotANSIEnabled ConsoleDefaultState. The emulated version of the affected functions (eg hClearScreen and hSetSGR) are then a function of the 'console default state' (as well as the other arguments).
This sees: (1) some of the original Common-Include.hs split out into Common-Include-Enabled.hs or, as applicable, Common-Include-Emulator.hs; and (2) if then else choices in module  System.Console.ANSI.Windows become case of choices.

I have tested this improved emulation on Windows 7 and Windows 10 (with ANSI disabled).

Thanks a lot, Mike. Your PR descriptions are throrough; could you also:

copy them into the git commit message and
incorporate the relevant parts of it as source code comments?

This way if someone studies the code later, they won't have to dig up the pull request to understand the context.
This applies to both this PR and #28.
Otherwise, this looks good to me.  Of course, feel free to open PRs if you want to solicit feedback.

@feuerbach, I am still a git novice, and uncertain what commiting directly to the repo entails. I don't want to break anything. Does it entail just clicking on the green 'Merge pull request' button when 'All checks have passed' and the 'branch has no conflicts with the base branch'?
I have extended the commit message, added some documentation and added a couple of helper functions to module System.Console.ANSI.Windows (nativeOrEmulated and nativeOrEmulatedWithDefault) to cut back on the repetitive case of code in that module.

The way I prefer to do it is just git push from the command line. I assume you already use git push to push to your repo. Now you can add this repo as another remote and push to it directly when you are ready.
But you can certainly use github interface, too. In that case, please select "Rebase and merge" from that green dropdown, so that github doesn't create unnecessary merge commits.


test(shjs): add tests for shjs

Fixes  #280.

@nfischer: ready for review.

Could we add a test to make sure it correctly infers the file extension? Perhaps shjs path/to/resource/file for a file named path/to/resource/file.js?

Other than that, LGTM

@nfischer: Should have fixed all those, feel free to re-review/merge.

Awesome!


Can i run without root permision?

Hi @reekoong. Unfortunately you can't run without root permissions. This is due to the permissions that Raspbian sets on hardware resources (GPIO, I2C, etc.), which can only be modified by user's with root access.


Is there a way to store a secret key with the Pico-SDK?

Howdy,
I know that the QSPI flash itself is located outside of the RP2040 which introduces security concerns. I am trying to find a way to take the RP2040 into a safe production environment. I would like to store a certificate/public key somewhere on the device that I can use to authenticate the device during boot up with the rest of our PKI. The fact you can dump the QSPI is disheartening, but I have seen that the pico-sdk was used to write the actual pico-bootloader. The bootloader is said to be set in the chip at silicon time, but I was wondering if there was an exposed page table or small section of the ROM that could be used as a safe lockable "EEPROM" protected by a fuse that just hasn't been exposed through the SDK? Its a long shot, but I think it would be a needed ability in order to bring the RP2040 into IoT like environments
Thanks

nope. all RP2040 are identical and have no writable (even one time) storage.

@kilograham its probably out of the scope of RP2040, but is there a more canonical method I am not aware of where there is such a thing as a locked external flash chip? Maybe on that takes in an entropy source and internally can leave certain sectors locked until something like a TPM challenge is met in order to allow for mutation? I am aware that the literal instructions themselves are being piped out of this chip, and then interpreted. I am more interested in a way to "lock" the chip without killing the potential to use it as a File System in run time and prevent my whole product from having the circuit reverse engineered in a Chinese board house/the firmware dumped and flashed onto another 2040

Sounds like a question for https://forums.raspberrypi.com/ ?


Slightly more aggressive heuristic

The default heuristic now attenuates the base heuristic as well as the boost. Essentially this:
<base heuristic> + <boost> / <attenuator>

is changed to this:
(<base heuristic> + <boost>) / <attenuator>

Why? Would anyone in their right mind have CNAME chains seven or eight names deep? Well I can't speak to their state of mind but yes, yes they do. It's not a huge problem but the change should clear out some names which were only seen a handful of times some days ago.

Change is committed at 6e32b5e


Segmentation fault

Hello, while writing tests for a program that uses optparse, I stumbled on this segfault situation. I tried to summarize/reproduce it in this little program that crashes as soon as it is executed.
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

#define OPTPARSE_IMPLEMENTATION
#define OPTPARSE_API static
#include "optparse.h"

int fake_main(int argc, char **argv)
{
    struct optparse_long longopts[] = {
        {"amend", 'a', OPTPARSE_NONE},
        {"brief", 'b', OPTPARSE_NONE},
        {"color", 'c', OPTPARSE_REQUIRED},
        {"delay", 'd', OPTPARSE_OPTIONAL},
        {0}
    };

    bool amend = false;
    bool brief = false;
    const char *color = "white";
    int delay = 0;

    char *arg;
    int option;
    struct optparse options;

    optparse_init(&options, argv);
    while ((option = optparse_long(&options, longopts, NULL)) != -1) {
        switch (option) {
        case 'a':
            amend = true;
            break;
        case 'b':
            brief = true;
            break;
        case 'c':
            color = options.optarg;
            break;
        case 'd':
            delay = options.optarg ? atoi(options.optarg) : 1;
            break;
        case '?':
            fprintf(stderr, "%s: %s\n", argv[0], options.errmsg);
            exit(EXIT_FAILURE);
        }
    }

    printf("chosen color %s and delay %d\n", color, delay);

    /* Print remaining arguments. */
    while ((arg = optparse_arg(&options)))
        printf("%s\n", arg);

    return 0;
}

int main(int argc, char *argv[])
{
    fake_main(4, (char *[]){"fakeprg", "--color", "red", "-d", "4"});
    return 0;
}

When run, this program segfaults. Using gdb, I can track this back to optparse_is_dashdash(const char *arg). I don't actually understand 100% of optparse's code, but I thought that the line:
return arg != 0 && arg[0] == '-' && arg[1] == '-' && arg[2] == '\0';

may indeed segfault if arg is not that long, or am I just missing or forgetting something with the code above ?

fake_main(4, (char *[]){"fakeprg", "--color", "red", "-d", "4"});

argv[argc] needs to be equal to null. Add NULL at the end and increase the argc count by one.

It's critical that argv[argc] is a null pointer. That's required by the C
standard for main(), and Optparse assumes the same. In particular, note
how it never accepts your argc, so it relies entirely on that null pointer
to find the end of argv. That's the purpose of the arg != 0 check.
So in your example, "4" must instead be a null pointer. Alternatively add
a null pointer to the end of argv, in which case argc would be 5.


Keep a running tally of required imports in conversion contexts

I really don't want this in GLS but it looks necessary. Enums in Python require a from enum import Enum on top, and .NET/JVM languages import dictionaries from system.
Conversion contexts will have to keep a tally of required imports and expose an API to commands to add them. To add them, non-exclusive options are:

Expose a getImports(): string[] method
Take in whether they should be added on top
Include this in the file start command

Hmm that is unfortunate. Will we need to delay processing of file start until the full import list is built?

Maybe if things get extreme... For now it's safe to plop these before any/all lines, so it should be fine to just do 1 and 2.


Stylelint: Extend order config with new blocks and properties

Based on https://github.com/visionappscz/stylelint-config/pull/60 and
The order config enforces a consistent order of content in your declaration blocks.:

Sass variables,
CSS custom properties,
Sass @extend,
single-line Sass @include,
declarations,
nested rules,
any other at-rules.

Based on https://github.com/visionappscz/stylelint-config/pull/61
Add more properties to check their order
Properties added (sorted alphabetically):

accent-color
backdrop-filter
backface-visibility
background-blend-mode
border-spacing
box-decoration-break
caret-color
color-scheme, color-interpolation
column-fill, column-span
contain (including all long-hand variants)
container (including all long-hand variants)
counter-set
direction
empty-cells
font-size-adjust, font-variant-*, font-feature-settings, font-stretch, font-synthesis (including all long-hand variants), font-kerning, font-optical-sizing, font-palette
image-orientation, image-rendering
inset (including all long-hand variants),
justify-items
list-style-image
mask (including all long-hand variants), mask-border (including all long-hand variants), mask-type
mix-blend-mode
outline-*
overflow-anchor
overscroll-behavior (including all long-hand variants).
paint-order,
perspective, perspective-origin
place-content, place-items, place-self
quotes
scrollbar-*
table-layout
text-align-last, text-indent, text-decoration-skip-ink, text-underline-*, text-rendering, text-wrap (including all long-hand variants)
touch-action,
transform-box, transform-style, individual transforms: translate, rotate, scale,
transition-behavior
white-space-collapse
word-spacing

The key is roughly like this: all properties from MDN that are standard, widely supported, non-experimental, not specific for non-western languages, and not designed for paged media.
https://developer.mozilla.org/en-US/docs/Web/CSS

[ ] Update package readme accordingly


Adding a trash-type which contains a comma to the exclude-list

Request
My trash provider has a trash type named: plastic, metaal en drankenkartons
How can this type be added to the exclude list? Can the comma in the trash type be escaped, so it does not interfere with the comma-seperated list type of the exclude_list?
Additional information
No response

Hi, just add it with quotes should work. Did you try that, or only without quotes.
Otherwise please share your postal code so I can perform some tests.
Like this:
exclude_list: "plastic, metaal en drankenkarton"

I've previously tried to add it using 'single quotes'. I've added it using double quotes now, in two weeks I will know if it fixed the issue :)


Dockerfile refactor removes extra node_modules

Removes extra copy of node_modules directory which reduces the size of the docker image.

+1

test this please

test this please

test this please

test this please

test this please

+1


Support serviceAccount.labels directly

Please consider supporting serviceAccount.labels directly.
Use-Case
The replacement to Azure pod-identity, Azure workload-identity, requires a set of annotations and labels on the ServiceAccount rather than a single label on the pods. Specifically, it requires a label, azure.workload.identity/use.
The Keda chart already supports annotations for the ServiceAccount via Values.serviceAccount.annotations, but does not have a direct label equivalent. It does support adding labels indirectly via the helper keda.labels which copies labels specified in Values.additionalLabels, however these are added to all chart-generated resources. I would like to avoid specifying this ServiceAccount-specific label in additionalLabels and having it leak through to every other resource created by the chart.
Since there's already a way to get the labels onto the ServiceAccount this is more a nice-to-have than it is a blocker.

Are you willing to contribute this?

This can technically be closed as the chart now supports AZWI directly. I'm unsure if there are still other cases that warrant labels. The driving issue being the OP has been resolved.

Let's close it and see if it comes back up later on. Thanks for the note.


Cross-tenant connection imposible to delete

I have created a cross-tenant connection between two tenants using virtual network manager and then i delete it.
I recreated the cross-tenant connection and now i can't because it says that the destination tenant is already taken by another virtual network manager.
Error:
"The status of the connection is showing conflict because the subscription/management group is already being directly managed by a different network manager."

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

ID: dc05fc9d-032e-4fa9-790d-b5ed2e743844
Version Independent ID: 10acd85d-17b1-f5af-54a7-8292da451152
Content: Cross-tenant support in Azure Virtual Network Manager
Content Source: articles/virtual-network-manager/concept-cross-tenant.md
Service: virtual-network-manager
GitHub Login: @mbender-ms
Microsoft Alias: mbender

@ayelencasamassa
Thanks for your feedback! We will investigate and update as appropriate.

@ayelencasamassa,
it does not look like you are referring to a document but to a specific scenario.
In this case, we request you to please post your question on Microsoft Q&A and other forums, we have our engineers and others who are monitoring them and will be happy to help.
We are closing this issue for now. If there are further questions regarding this matter, please reply and we will gladly continue the discussion.