Wrong paths generated for nested pages on Windows

Description
A nested page that should be accessible at /x/y/z ends up at /x-y/z on Windows.
Steps to reproduce

Setup a Gridsome project on a Windows machine
Create a Vue file at src/pages/foo/bar/Baz.vue
Add <template>

</template> to Baz.vue
Run npm run develop to start the dev server
Access the page at http://localhost:8080/foo/bar/baz

Expected result
Page loads showing contents of Baz.vue.
Actual result
Not Found 404. The generated route ends up at http://localhost:8080/foo-bar/baz.
Happens due to createPagePath splitting on / while filePath param on Windows is delimited by \.
Environment
  System:
    OS: Windows 10 10.0.17763
    CPU: (8) x64 Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
  Binaries:
    Node: 14.17.0 - C:\Program Files\nodejs\node.EXE
    npm: 6.14.13 - C:\Program Files\nodejs\npm.CMD

When I wanted to update from v0.7.21 to v0.7.23 I saw the same issue. It happens on page folders named with one character. Reinstalled v.0.7.21 and it worked again.

@peg-o That sounds a bit different. The line that causes the issue that I describe above is 12 in the file https://github.com/gridsome/gridsome/blame/master/gridsome/lib/plugins/vue-pages/lib/utils.js, and it can be seen in the blame that it's been there for 2 years, so the issue was still present in v0.7.21.
It can be fixed with a monkey-patch PowerShell command that splits on \ rather than a / (so only applicable to Windows):
(Get-Content 'node_modules\gridsome\lib\plugins\vue-pages\lib\utils.js').replace("dir.split('/')", 'dir.split("\\")') | Out-File -encoding ASCII 'node_modules\gridsome\lib\plugins\vue-pages\lib\utils.js'

If you can try it with v0.7.23, we will know if yours is a separate bug.

@a-kriya sorry for the late reply. I finally had the time to test this again and I can confirm that it is that same issue and your fix actually solves it for me.

I forgot to mention that my previous comment is not correct. It happens on deeper nested page structures independent of folder name char size.

@peg-o

However, I wanted again see what happens if I set it back to 21 without the fix applied and turns out the issue was again solved. Could be that this is due to how the site is setup.

If nothing else has changed, I think the issue should still exist. How did you ensure that v0.7.21 was indeed installed? Did you run npm i<EMAIL_ADDRESS>Or did you update the package.json entry to "gridsome": "^0.7.21" and do a npm i after? In the latter case, NPM would actually determine that v0.7.23 satisfies that dependency and not really downgrade/reinstall the package.

A quick cross-platform fix would be to split on path.sep, but I think the issue lies further up in the call-chain, where the path itself is generated. The package slash is being used in some places, so even on Windows, the paths should be separated with a forward slash.
If one of the maintainers can suggest a preferred fix, I can submit a PR.
@hjvedvik ?

@a-kriya

If nothing else has changed, I think the issue should still exist. How did you ensure that v0.7.21 was indeed installed? Did you run npm i<EMAIL_ADDRESS>Or did you update the package.json entry to "gridsome": "^0.7.21" and do a npm i after? In the latter case, NPM would actually determine that v0.7.23 satisfies that dependency and not really downgrade/reinstall the package.

I had a backup of the previous package files, deleted node_modules and cache, copied them over and ran a full install again.

I have opened a PR for this issue here. https://github.com/gridsome/gridsome/pull/1625 .. How can I get the community to solve it ?


Use as rails engine?

Hi,
Is it possible to use this gem as an engine in rails? Or do I always have to run single server - beside my webserver?
Thanks!

Hello! In case this is still an issue, feel free to submit it to https://github.com/mycelium-com/gear-engine/issues


Download for pypy hitting old location

Development for pypy has moved away from bitbucket to heptapod, with the packages found HERE. This has broken pypy downloads for asdf-python. You can find the announcement HERE. There are also the nightly builds, with the most recent bugfixes and performance improvements, which users may or may not being interested in HERE.

Looks like this is being tracked in pyenv: https://github.com/pyenv/pyenv/issues/1681

This is an issue with pyenv, there's not much I can do here so I'll close.


submit buttons for Sign In & Facebook Sign In

Hi,
I have two submit buttons in the same web page one for my application Sign In and one for Facebook Sign In. I only want to perform validation for my application's submit button and not for Facebook Sign In submit button. Is it possible to validate one button and not validate another button?
Thanks beforehand,
Javier

Not sure about this, but I think you might want your facebook button to be type="button", which would prevent it from being disabled by the validator.

Cina,
That helped... workaround for anyone interested... for the Facebook button:
<button type="button" onclick="javascript:__doPostBack( ...
Thank you.


custom_schema arg doesn't use correct resolver or extensions

It seems that the custom_schema arg in both AsdfFile.__init__() and the write_to() method both can't resolve schemas properly because they don't use the resolver that has access to installed extensions.
One needs a package that has custom schemas available via entry_points to show this bug.  We're using jwst.
pip install git+https://github.com/spacetelescope/jwst

The bug:
In [1]: import asdf

In [2]: tree = {'meta': {'model_type': 'ImageModel'}}

In [3]: af = asdf.AsdfFile(tree=tree, custom_schema='http://stsci.edu/schemas/jwst_datamodel/image.schema')
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in resolve_from_url(self, url)
    379         try:
--> 380             document = self.store[url]
    381         except KeyError:

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/_utils.py in __getitem__(self, uri)
     22     def __getitem__(self, uri):
---> 23         return self.store[self.normalize(uri)]
     24

KeyError: 'http://stsci.edu/schemas/asdf/core/core.schema.yaml'

During handling of the above exception, another exception occurred:

FileNotFoundError                         Traceback (most recent call last)
~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in resolve_from_url(self, url)
    382             try:
--> 383                 document = self.resolve_remote(url)
    384             except Exception as exc:

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in resolve_remote(self, uri)
    459         if scheme in self.handlers:
--> 460             result = self.handlers[scheme](uri)
    461         elif (

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schema.py in get_schema(url)
    298     def get_schema(url):
--> 299         return schema_loader(url)[0]
    300

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schema.py in load_schema(url)
    289         url = resolver(str(url))
--> 290         return _load_schema(url)
    291     return load_schema

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schema.py in _load_schema(url)
    277 def _load_schema(url):
--> 278     with generic_io.get_file(url) as fd:
    279         if isinstance(url, str) and url.endswith('json'):

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/generic_io.py in get_file(init, mode, uri, close)
   1197             else:
-> 1198                 fd = open(realpath, realmode)
   1199             fd = fd.__enter__()

FileNotFoundError: [Errno 2] No such file or directory: '/Users/jdavies/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schemas/stsci.edu/asdf/core/core.schema.yaml.yaml'

During handling of the above exception, another exception occurred:

RefResolutionError                        Traceback (most recent call last)
<ipython-input-12-5913c116f647> in <module>
----> 1 af = asdf.AsdfFile(tree=tree, custom_schema='http://stsci.edu/schemas/jwst_datamodel/image.schema')

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/asdf.py in __init__(self, tree, uri, extensions, version, ignore_version_mismatch, ignore_unrecognized_tag, ignore_implicit_conversion, copy_arrays, lazy_load, custom_schema, _readonly)
    147             self.find_references()
    148         else:
--> 149             self.tree = tree
    150             self.find_references()
    151         if uri is not None:

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/asdf.py in tree(self, tree)
    393         asdf_object = AsdfObject(tree)
    394         # Only perform custom validation if the tree is not empty
--> 395         self._validate(asdf_object, custom=bool(tree))
    396         self._tree = asdf_object
    397

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/asdf.py in _validate(self, tree, custom, reading)
    419         if custom and self._custom_schema:
    420             schema.validate(tagged_tree, self, self._custom_schema,
--> 421                             reading=reading)
    422
    423     def validate(self):

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schema.py in validate(instance, ctx, schema, validators, reading, *args, **kwargs)
    529     validator = get_validator(schema, ctx, validators, ctx.resolver,
    530                               *args, **kwargs)
--> 531     validator.validate(instance, _schema=(schema or None))
    532
    533     validate_large_literals(instance, reading=reading)

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in validate(self, *args, **kwargs)
    127
    128         def validate(self, *args, **kwargs):
--> 129             for error in self.iter_errors(*args, **kwargs):
    130                 raise error
    131

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schema.py in iter_errors(self, instance, _schema, _seen)
    253                             yield x
    254             else:
--> 255                 for x in super(ASDFValidator, self).iter_errors(instance, _schema=schema):
    256                     yield x
    257

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in iter_errors(self, instance, _schema)
    103
    104                     errors = validator(self, v, instance, _schema) or ()
--> 105                     for error in errors:
    106                         # set details if not already set by the called fn
    107                         error._set(

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/_validators.py in allOf_draft4(validator, allOf, instance, schema)
    331 def allOf_draft4(validator, allOf, instance, schema):
    332     for index, subschema in enumerate(allOf):
--> 333         for error in validator.descend(instance, subschema, schema_path=index):
    334             yield error
    335

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in descend(self, instance, schema, path, schema_path)
    119
    120         def descend(self, instance, schema, path=None, schema_path=None):
--> 121             for error in self.iter_errors(instance, schema):
    122                 if path is not None:
    123                     error.path.appendleft(path)

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schema.py in iter_errors(self, instance, _schema, _seen)
    253                             yield x
    254             else:
--> 255                 for x in super(ASDFValidator, self).iter_errors(instance, _schema=schema):
    256                     yield x
    257

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in iter_errors(self, instance, _schema)
    103
    104                     errors = validator(self, v, instance, _schema) or ()
--> 105                     for error in errors:
    106                         # set details if not already set by the called fn
    107                         error._set(

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/_validators.py in ref(validator, ref, instance, schema)
    210                 yield error
    211     else:
--> 212         scope, resolved = validator.resolver.resolve(ref)
    213         validator.resolver.push_scope(scope)
    214

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in resolve(self, ref)
    373     def resolve(self, ref):
    374         url = self._urljoin_cache(self.resolution_scope, ref)
--> 375         return url, self._remote_cache(url)
    376
    377     def resolve_from_url(self, url):

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in resolve_from_url(self, url)
    383                 document = self.resolve_remote(url)
    384             except Exception as exc:
--> 385                 raise RefResolutionError(exc)
    386
    387         return self.resolve_fragment(document, fragment)

RefResolutionError: [Errno 2] No such file or directory: '/Users/jdavies/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schemas/stsci.edu/asdf/core/core.schema.yaml.yaml'

I can even specify the extension to use, but it still doesn't work:
In [13]: from jwst.datamodels.extension import DataModelExtension

In [14]: af = asdf.AsdfFile(tree=tree, custom_schema='http://stsci.edu/schemas/jwst_datamodel/image.schema', extensions=[DataModelExtension()])
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in resolve_from_url(self, url)
    379         try:
--> 380             document = self.store[url]
    381         except KeyError:

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/_utils.py in __getitem__(self, uri)
     22     def __getitem__(self, uri):
---> 23         return self.store[self.normalize(uri)]
     24

KeyError: 'http://stsci.edu/schemas/asdf/core/core.schema.yaml'

During handling of the above exception, another exception occurred:

FileNotFoundError                         Traceback (most recent call last)
~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in resolve_from_url(self, url)
    382             try:
--> 383                 document = self.resolve_remote(url)
    384             except Exception as exc:

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in resolve_remote(self, uri)
    459         if scheme in self.handlers:
--> 460             result = self.handlers[scheme](uri)
    461         elif (

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schema.py in get_schema(url)
    298     def get_schema(url):
--> 299         return schema_loader(url)[0]
    300

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schema.py in load_schema(url)
    289         url = resolver(str(url))
--> 290         return _load_schema(url)
    291     return load_schema

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schema.py in _load_schema(url)
    277 def _load_schema(url):
--> 278     with generic_io.get_file(url) as fd:
    279         if isinstance(url, str) and url.endswith('json'):

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/generic_io.py in get_file(init, mode, uri, close)
   1197             else:
-> 1198                 fd = open(realpath, realmode)
   1199             fd = fd.__enter__()

FileNotFoundError: [Errno 2] No such file or directory: '/Users/jdavies/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schemas/stsci.edu/asdf/core/core.schema.yaml.yaml'

During handling of the above exception, another exception occurred:

RefResolutionError                        Traceback (most recent call last)
<ipython-input-14-11414e85ffc1> in <module>
----> 1 af = asdf.AsdfFile(tree=tree, custom_schema='http://stsci.edu/schemas/jwst_datamodel/image.schema', extensions=[DataModelExtension()])

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/asdf.py in __init__(self, tree, uri, extensions, version, ignore_version_mismatch, ignore_unrecognized_tag, ignore_implicit_conversion, copy_arrays, lazy_load, custom_schema, _readonly)
    147             self.find_references()
    148         else:
--> 149             self.tree = tree
    150             self.find_references()
    151         if uri is not None:

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/asdf.py in tree(self, tree)
    393         asdf_object = AsdfObject(tree)
    394         # Only perform custom validation if the tree is not empty
--> 395         self._validate(asdf_object, custom=bool(tree))
    396         self._tree = asdf_object
    397

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/asdf.py in _validate(self, tree, custom, reading)
    419         if custom and self._custom_schema:
    420             schema.validate(tagged_tree, self, self._custom_schema,
--> 421                             reading=reading)
    422
    423     def validate(self):

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schema.py in validate(instance, ctx, schema, validators, reading, *args, **kwargs)
    529     validator = get_validator(schema, ctx, validators, ctx.resolver,
    530                               *args, **kwargs)
--> 531     validator.validate(instance, _schema=(schema or None))
    532
    533     validate_large_literals(instance, reading=reading)

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in validate(self, *args, **kwargs)
    127
    128         def validate(self, *args, **kwargs):
--> 129             for error in self.iter_errors(*args, **kwargs):
    130                 raise error
    131

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schema.py in iter_errors(self, instance, _schema, _seen)
    253                             yield x
    254             else:
--> 255                 for x in super(ASDFValidator, self).iter_errors(instance, _schema=schema):
    256                     yield x
    257

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in iter_errors(self, instance, _schema)
    103
    104                     errors = validator(self, v, instance, _schema) or ()
--> 105                     for error in errors:
    106                         # set details if not already set by the called fn
    107                         error._set(

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/_validators.py in allOf_draft4(validator, allOf, instance, schema)
    331 def allOf_draft4(validator, allOf, instance, schema):
    332     for index, subschema in enumerate(allOf):
--> 333         for error in validator.descend(instance, subschema, schema_path=index):
    334             yield error
    335

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in descend(self, instance, schema, path, schema_path)
    119
    120         def descend(self, instance, schema, path=None, schema_path=None):
--> 121             for error in self.iter_errors(instance, schema):
    122                 if path is not None:
    123                     error.path.appendleft(path)

~/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schema.py in iter_errors(self, instance, _schema, _seen)
    253                             yield x
    254             else:
--> 255                 for x in super(ASDFValidator, self).iter_errors(instance, _schema=schema):
    256                     yield x
    257

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in iter_errors(self, instance, _schema)
    103
    104                     errors = validator(self, v, instance, _schema) or ()
--> 105                     for error in errors:
    106                         # set details if not already set by the called fn
    107                         error._set(

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/_validators.py in ref(validator, ref, instance, schema)
    210                 yield error
    211     else:
--> 212         scope, resolved = validator.resolver.resolve(ref)
    213         validator.resolver.push_scope(scope)
    214

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in resolve(self, ref)
    373     def resolve(self, ref):
    374         url = self._urljoin_cache(self.resolution_scope, ref)
--> 375         return url, self._remote_cache(url)
    376
    377     def resolve_from_url(self, url):

~/miniconda3/envs/test/lib/python3.7/site-packages/jsonschema/validators.py in resolve_from_url(self, url)
    383                 document = self.resolve_remote(url)
    384             except Exception as exc:
--> 385                 raise RefResolutionError(exc)
    386
    387         return self.resolve_fragment(document, fragment)

RefResolutionError: [Errno 2] No such file or directory: '/Users/jdavies/miniconda3/envs/test/lib/python3.7/site-packages/asdf/schemas/stsci.edu/asdf/core/core.schema.yaml.yaml'

On further inspection, this really seems to be a bug in how schemas are referenced within schemas in jwst.  In the schema referenced above, it contains the following:
 allOf:
- $ref: core.schema.yaml
- $ref: bunit.schema.yaml
- $ref: photometry.schema.yaml
- $ref: wcsinfo.schema.yaml

In order to work outside of datamodels, it would need
 allOf:
- $ref: http://stsci.edu/schemas/jwst_datamodel/core.schema
- $ref: http://stsci.edu/schemas/jwst_datamodel/bunit.schema
- $ref: http://stsci.edu/schemas/jwst_datamodel/photometry.schema
- $ref: http://stsci.edu/schemas/jwst_datamodel/wcsinfo.schema

instead.  Or define a tag for each schema if deemed necessary.
Currently having $ref: core.schema.yaml works well internally for datamodels, but breaks when one tries to subclass and use it externally.  This seems to be because the flow is from jsonschema exception to asdf exception as shown in the traceback above.  At no point is the internal datamodels code involved in resolving the location of schemas.  Possibly related to issue https://github.com/spacetelescope/jwst/issues/4246


NLog.Config and NLog.Schema packages don't work as expected with Nuget 3 (Visual Studio 2015)

Hi,
When I install NLog.Config 4.2.2 and/or NLog.Schema 4.2.1 into a DNX project, the content (NLog.config or NLog.xsd) isn't copied into the project.
I think this is fixable with a nuspec that targets nuget 3.3 using the nuget content v2 (contentFiles) nuspec element.
http://docs.nuget.org/create/nuspec-reference#contentfiles-with-visual-studio-2015-update-1-and-later
I'm sure the issue is a known thing.
Am I right that this is causing my issue?
Any plans to fix?

Thanks for reporting.
So you know if the package is still nuget 2.8 compatible? Or do we have create a new (separate) package?

Having read some more about nuget 3.3, I'm not even sure it's a good answer.
http://blog.nuget.org/20151118/nuget-3.3.html
It sounds like there's no model yet for not-immutable content.

I think it should work with buildaction =none and copyToOutput=true.
Can you tests that for us? (you can configure a local folder in visual studio) . Otherwise I will look at this,  probably this weekend or next week

I think the nuspec for NLog.Config should be:
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
  <metadata>
    <id>NLog.Config</id>
    <version>4.2.2</version>
    <title>NLog Configuration</title>
    <authors>Kim Christensen,Julian Verdurmen</authors>
    <owners>Kim Christensen</owners>
    <licenseUrl>http://raw.github.com/NLog/NLog/master/LICENSE.txt</licenseUrl>
    <projectUrl>http://nlog-project.org/</projectUrl>
    <iconUrl>http://nlog-project.org/NConfig.png</iconUrl>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Empty NLog.config file.</description>
    <summary>Empty NLog.config file for use with NLog.</summary>
    <releaseNotes>NLog 4.2.2</releaseNotes>
    <language>en-US</language>
    <tags>nlog xml config</tags>
    <dependencies>
      <dependency id="NLog" version="4.2.2" />
      <dependency id="NLog.Schema" version="4.0" />
    </dependencies>
    <contentFiles>
      <files include="content\NLog.config" buildAction="None" copyToOutput="true" flatten="true" />
    </contentFiles>
  </metadata>
  <files>
    <file src="content\NLog.config" target="content\NLog.config" />
    <file src="tools\Install.ps1" target="tools\Install.ps1" />
  </files>

</package>

See attachment nuspec and nupkg.

This seems to be fixed at nuget. The same package won't give any errors now.
See https://www.nuget.org/packages/NLog.Config/<IP_ADDRESS>
@dls314159 can you confirm this package is working with DNX? Then I will also publsh the NLog.schema. Thanks in advance

I don't think it's working--at least not in a useful way--in DNX style projects.
I'm not sure I can explain, but I'll try!
I have two goals when I include the NLog.Config package in my project as a dependency:

Get a template NLog.Config file that I can modify.
Have that NLog.Config file put somewhere useful so that I can modify it and have it work with my current project.

The first goal is satisfied now in the same way it was when I noted the issue. DNU restore puts the NLog.Config file at a path like this one:
C:\Users\dave\.dnx\packages\NLog.Config\<IP_ADDRESS>\content\NLog.Config

But not so much for the second goal since that path is just my local package cache.

I think the lacking feature in Nuget is best being tracked by this issue:
https://github.com/NuGet/Home/issues/1792

Thanks for testing @dls314159 !
I unlisted the package. Saving it too the package cache isn't useful.
Will try to fix it when I know the solution.

I've abandoned using the NLog.Config file in DNX style projects because of this issue:
https://github.com/NLog/NLog/issues/1091
So the NLog.Config package hasn't been a problem :-)

Yeah we hoping to release DNX support within 1-2 months. See #1160

I see Nuget has updated the docs.
https://docs.nuget.org/create/nuspec-reference#contentfiles-with-visual-studio-2015-update-1-and-later
I think I need 2 times any added

Will close this as this is a known issue as it's polluting the issue list - there is no action for us here.


Fix lm1b sampler

What does this PR do?
Fixes #1322. Changes:

Stops 1 step earlier as suggested by @marcvanzee  (current code was slicing out of bounds but this is harmless)
Start at index -1, this fixes issue with prompts of length 1.
Adds unit test.

Codecov Report

Merging #2842 (2e1232e) into main (06529c9) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2842   +/-   ##
=======================================
  Coverage   81.20%   81.20%
=======================================
  Files          54       54
  Lines        5742     5742
=======================================
  Hits         4663     4663
  Misses       1079     1079

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


Add archived notice

Issue #, if available:
Description of changes:
Add an archived notice to both the repository readme.md and the workshop content.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

LGTM 👍🏻


[Codebundle] Run AWS Lambda

Scope
A taskset which authenticates with AWS and runs a lambda function, returning the stdout for the report
Requested By (Optional)

RunWhen

Related Integrations

AWS Lambda

Definition of Done

[ ] Codebundle Implementation accomplishes scope (or provide a justification for why it may differ)
[ ] Attach a screenshot of the codebundle pushing a metric locally (if an SLI) or showing a report (if a taskset)
[ ] Attach a screenshot of the SLI or Taskset running in a workspace.

Optional Comments

This codebundle request and detail history is being migrated to an internal tracking tool for authors. Please reach out to the RunWhen team if you have any questions.


Undefined is not an object (PropTypes.oneOfType)

I have prop-types in my project but I get this error!
react-native: 0.51.0,
react-native-linear-gradient: ^2.3.0

fixed on master


Parse natural language date (as link) not respecting custom date format settings

My date format is: YYYY-MM-DD (ddd Do MMM)
This is provided correctly in the Natural Language Dates configuration, and matches all other date formats.
When I highlight some text i.e "last wednesday" - it does insert the correct date.
The markdown generated results in: [last wednesday](2021-05-19 (Wed 19th May))
I do have a file that is created with content, with the filename 2021-05-19 (Wed 19th May)
The page it attempts to link to is 2021-05-19, which does not exist.

I believe that the additional brackets used in my date format are breaking the markdown conversion.
I have tried escaping with \ and encoding with %28 and %29 - but these also do not work.

To add on this:

For using markdown link generated, need some mechanism to automatically handle special character.

As I use
After the markdown link is generated (when choose parse as link, somehow it does not choose to parse as Wikilinks), I need to change the output into:

While my original date format is 2021-06-01 W22 Tue


Nested Dialogs?

Is it possible? Does your library support this?
I try implement it by using state managed Dialogs. But when I try open dialog inside other dialog - nested dialog not showed and all UI freeze.

Yeah @fedyunin, I'm thinking that how nested dialogs will exist


Our release numbers are incompatible with the swift package manager

Quick heads up: the alpha & beta releases we're publishing aren't compatible with spm v3.

I'm going to figure out the correct format, post it here, and potentially re-release our 9.0 alpha with that format

Looks like the .1 at the end breaks the format.
This section in their documentation talks about how to format version numbers: https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescriptionV3.md#version
It's of the sort "major.minor.patch[-prereleaseIdentifiers][+buildMetadata]".
So we should publish
1⃣: 9.0.0-alpha1 or
2⃣: 9.0.0-alpha+1
What do @Moya/contributors think?

Thanks for the finding, @AndrewSB. This is strange, though. From what I've known, 9.0.0-alpha.1 seems like a valid semver release number. Also, from the docs:

NOTE: prereleaseIdentifiers are separated by dot (.).

Doesn't it mean that alpha.1 should be valid? 🤔

As @sunshinejr mentioned 9.0.0-alpha.1 is indeed a valid semver number. A bit weird that SPM can't handle it 🤔

Let's create an issue over at SPM and go with 🎉 for now?

Agree that 9.0.0-alpha1 makes sense in general, and if it solves this - even better. Wondering on why alpha.1 doesn't budge, seems like it should... based on SEMVER. Seems like a pretty definite SPM bug.

@AndrewSB what environment did you run this in? Making a Swift bug atm.

https://bugs.swift.org/browse/SR-5693

Yeah, this was really strange. I thought our 9.0.0-alpha.1 release was compatible with semver
here's my swift info @BasThomas:
👋  swift -v                                                                   ~
Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42)
Target: x86_64-apple-macosx10.9
/Library/Developer/CommandLineTools/usr/bin/lldb "--repl=-enable-objc-interop -sdk /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -color-diagnostics"
Welcome to Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42). Type :help for assistance.

lldb stuff might be unrelated, I'm currently working on a project related to lldb

Oh, I think I found it (see this SO answer). Seems like a git issue? Quickfix should be to deleting 9.0.0-alpha.1 branch. What do you guys think?

You can make a tag and nuke the branch to test this I think ? If you're wrapping up this release anyways it's worth a shot IMO @sunshinejr

really nice catch @sunshinejr 😄 let's do it

Branch deleted @AndrewSB, can you check if it works? 😄

It doesn't work, but it looks like a different error

no complaints about the refname
this should be easily repro-able. My Package.swift is just
import PackageDescription

let package = Package(
	name: "<NAME>",
	dependencies: [
		.Package(url: "https://github.com/Moya/Moya.git", majorVersion: 9),
	],
	exclude: [
		"thrift",
	]
)

@AndrewSB I think that prerelease won't get in the major/minor range (at least that was a thing when I used SPM last). You probably need to specify a version to get it working.

Yeah you're right @sunshinejr : https://github.com/apple/swift-package-manager/blob/master/Sources/PackageDescription/Version.swift#L23
I'll confirm on my end as well a bit later if @AndrewSB isn't back by then

@sunshinejr @AndrewSB  This seems to work just fine for installation but getting a different error, not sure if it's related to my dummy project or Moya:
import PackageDescription

let package = Package(
	name: "Moya",
	dependencies: [
		.Package(url: "https://github.com/Moya/Moya.git", Version(9, 0, 0, prereleaseIdentifiers: ["alpha", "1"])),
	]
)

@freak4pc The output from @AndrewSB is showing the same warning. I'm not sure if we had this warning in previous versions but it looks like it's from the Supporting Files group not having any .swift files. @sunshinejr Did we recently refactor this folder?

@SD10 It was an Edit so didn't see it ;)
I think the problem is it treats every folder as a Module even though in this case this is shared code. Perhaps that folder could be excluded ? I guess it would break the build as well though 🤔

@freak4pc @SD10 I think this is just a warning and we have this for quite some time now. The module should build, though. However, we can take care of it so I've created #1224 😉

So regarding this specific ticket there is no issue with versioning so we can just close here IMO? @sunshinejr

I believe so! If there is a way of improving/fixing the error on SPM, that's on their side now I think. We can always reopen in case something happens. Thanks everyone for helping out! 👏

Should I update the SPM bug?

It would be awesome. TL;DR we found the issue (having tag and branch with the same name, removing branch helped). If there is something SPM could do to fix the issue or improve error handling, it would be great 😉


Stars and Watchers always have same value

As far as I'm aware, that's a bug in the GitHub API itself. All we can do is wait.
I've created this thread on the GitHub Support Forum: https://github.community/t/bug-watchers-count-is-the-duplicate-of-stargazers-count/140865

A member of the staff said it's an "intentional error" left in there for backward compatibility. Apparently, the actual number for watchers can be obtained from an additional API call.
Considering the low value of the number, and how restricted this project is already due to API calls, I'm thinking about simply removing that column.

The column has been removed. If a solution which doesn't require an extra API call ends up showing up, I'll reopen and adjust.

Reopening because I think using GraphQL would actually solve this problem. I had misunderstood a staff's answer thinking it would result in the same amount of API calls being made in the backend, but I just found this documentation page which says otherwise.

Closed again because I don't intend on migrating to GraphQL any time soon. (Among other things because it requires authenticated requests.)


Enhance etcd deploy flow to consider existing peer secrets when setting peer secrets

How to categorize this PR?

/area control-plane high-availability
/kind bug
What this PR does / why we need it:
This PR updates the etcd deploy flow to considers existing peer secrets while computing the peer secrets to be used in the etcd spec
Essentially it now checks for etcd.Spec.Etcd.PeerUrlTls in the etcd spec and does not unset this field if already set
Which issue(s) this PR fixes:
Fixes #7497
Special notes for your reviewer:
Release note:

Fix a bug in the etcd deploy flow that erroneously unsets `etcd.Spec.Etcd.PeerUrlTls` in the ETCD CRs of high available shoots when marked for hibernation.
Before this change, high availability clusters failed to be deleted while being hibernated.

/assign

/cherry-pick release-v1.64

/cherry-pick release-v1.63

FYI: Thus bug was introduced by https://github.com/gardener/gardener/commit/a89ca663f0ba4c6f576db6f06258e627bd5c56f4, i.e. no cherry-pick is required for v1.62

Thanks for your review @timuthy
I made the requested changes, PTAL

/test pull-gardener-e2e-kind-migration

/test pull-gardener-e2e-kind-migration

/test pull-gardener-unit

/rebase
You need to rebase and adapt the changes from #7515 .

/needs-rebase

/retest

/test pull-gardener-e2e-kind


[BugFix] fix the partition column value cast issue when inserting static key partition

What type of PR is this:

[x] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Which issues of this PR fixes:

Fixes #
Problem Summary(Required):

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[ ] I have checked the version labels which the pr will be auto backported to target branch

[ ] 3.0
[ ] 2.5
[ ] 2.4
[ ] 2.3

[FE PR Coverage Check]
:heart_eyes: pass : 2 / 2 (100.00%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/sql/analyzer/InsertAnalyzer.java
2
2
100.00%
[]


bug: IonInfiniteScroll problem when datasource is reloaded

Bug Report
Ionic version:
[x] 5.x
Current behavior:
Hi, the IonInfiniteScroll fail when the datasource is reloaded.
It saves his position and making the component unusable.
We have two Pages:
Page A (a list of items loaded with infinitescrolling)
Page B (a detail page of list item)
I was in page A and next, click to item and go to page B for details. When i return back to page A i need to “refresh” the datasource of the ngFor. When the datasource is refreshed, the infinite scroller doesn’t work anymore.
The offsetHeight variable appears to retain the value obtained before the refresh.
Expected behavior:
IonInfiniteScroll reset it's position or height.
Steps to reproduce:
Load a list of items (100 items for example) with ngFor, next, empty the list and reaload data (only 10 items).
Related code:
Ionic info:
Ionic:
Ionic CLI                     : 6.2.1 (C:\Users\X\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework               : @ionic/angular 5.0.7
@angular-devkit/build-angular : 0.803.25
@angular-devkit/schematics    : 7.3.9
@angular/cli                  : 8.3.25
@ionic/angular-toolkit        : 2.2.0
Capacitor:
Capacitor CLI   : 1.5.1
@capacitor/core : 1.5.1
Utility:
cordova-res : not installed
native-run  : not installed
System:
NodeJS : v10.16.3 (C:\Program Files\nodejs\node.exe)
npm    : 6.10.1
OS     : Windows 10

Thanks for the issue. Can you provide a repo with the code required to reproduce this issue?

Hi, the "bug" is related to the number of the items on screen. If numbers of items don't cover the height of the viewport, infinite scroller don't fire event.
You can close the issue.


Update third party proto files

Summary
As part of updating to 0.43 of the Cosmos SDK the third party proto definitions also should be reviewed and updated as needed
Problem Definition
The third party proto files are stored in the provenance repository as canonical versions for build dependencies.  These files are managed using a make proto-update-deps target.  The referenced sources must be updated when the SDK is updated.
Proposal

[ ] Review the target sources for the third party proto files and update as required to versions that match the 0.43 Cosmos SDK.
[ ] Execute the target and commit resulting proto files.

closes: #391

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

[ ] Targeted PR against correct branch (see CONTRIBUTING.md)
[ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
[ ] Wrote unit and integration tests
[ ] Updated relevant documentation (docs/) or specification (x/<module>/spec/)
[ ] Added relevant godoc comments.
[ ] Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
[ ] Re-reviewed Files changed in the Github PR explorer
[ ] Review Codecov Report in the comment section below once CI passes

@iramiller It looks like none of the versions for the third party protos changed in cosmos 0.43.  So I just updated the makefile to get cosmos protos from 0.43 and ran the make script.
https://github.com/provenance-io/provenance/blob/main/Makefile#L409
https://github.com/cosmos/cosmos-sdk/blob/master/Makefile#L416
Is there anywhere else that I should check on that?

@iramiller are you able to merge this pr?  I can only set for it to auto merge, but as you said the checks won't all finish as there are no go code changes.

Yes I will take care of it.


T3 event materials unavailable in Accursed Archives and Dream Big Under the Big Top

Describe the bug
Tier 3 event materials (Colorful Bouquet / Divulgent Lenses) don't drop from challenge battles in the compendium versions of 'Accursed Archives' and 'Dream Big Under the Big Top'
Expected behavior
These materials should be available from challenge battles
Additional context
This is because in EventDropService we subtract the quest's VariationType from VariationTypes.Hard as a means of limiting T3 drops to challenge battles:
// T2 and T3 currency are only used for redeeming shop items, and can appear commonly from Challenge Battle quests.
if (type == DungeonTypes.Wave)
{
    // T3 only drops from Challenge Battle quests
    int t3Quantity = GenerateDropAmount(
        10 * record.wave * ((variation - VariationTypes.Hard) / 2d) * buildDropMultiplier
    );
    yield return new Entity(evt.ViewEntityType3, evt.ViewEntityId3, t3Quantity);
}

If a drop with <0 quantity is yielded it will not be awarded.
This works for newer events, but these two events (and possibly others) have all of their challenge battles set to VariationTypes.Normal so no quests are eligible for T3 drops.
A proposed fix would be to change the (variation - VariationTypes.Hard) / 2d logic to a GetIsEligibleForT3() call or similar which can implement a special case of logic for these two events and any others that may be affected. We should ideally remove any dependency on VariationType even for quantity due to this discrepancy so that some events aren't harder to grind than others.

@SapiensAnatis Hi Jay, can I please be assigned to this issue?
I need a PR merged into an open-source code as part of my assignment for a class, so I'll work on this quickly.

Looking at the VariationType of wave quests (DungeonType 6) we see there's quite a range between events:
SELECT t._Text as EventName, q._Id as QuestId, q._VariationType as QuestVariationType FROM EventData e
JOIN QuestData q on e._Id = q._Gid
JOIN TextLabel t on t._Id = e._Name
WHERE e._IsMemoryEvent = 1
AND q._DungeonType = 6

EventName
QuestId
QuestVariationType

Flames of Reflection
208160501
3

Flames of Reflection
208160502
4

The Miracle of Dragonyule
208170501
1

The Miracle of Dragonyule
208170502
4

A Wish to the Winds
208180501
1

A Wish to the Winds
208180502
4

Dream Big Under the Big Top
208200501
1

Dream Big Under the Big Top
208200502
1

The Hunt for Harmony
208220501
3

The Hunt for Harmony
208220502
4

Trick or Treasure!
208260501
1

Trick or Treasure!
208260502
4

A Crescendo of Courage
208290501
3

A Crescendo of Courage
208290502
4

The Accursed Archives
208310501
1

The Accursed Archives
208310502
1

Agents of the Goddess
208390501
3

Agents of the Goddess
208390502
4

A Dash of Disaster
208410501
3

A Dash of Disaster
208410502
4

Rhythmic Resolutions
208420501
3

Rhythmic Resolutions
208420502
4

The Phantom's Ransom
208430501
3

The Phantom's Ransom
208430502
4

Divine Deception
208440501
3

Divine Deception
208440502
4

Toll of the Deep
208450501
3

Toll of the Deep
208450502
4

The Clockwork Heart
208460501
3

The Clockwork Heart
208460502
4

We could either use the quest ID mod 10 to work out which is harder or use the difficulty which is consistently 7000 or 12000.


Cannot build opencv dnn example

| Camera Model                       |  D400  |
| Firmware Version                   | (Open RealSense Viewer --> Click info) |
| Operating System & Version |   Ubuntu18  |
| Kernel Version (Linux Only)    |>=5 |
| Platform                                 | PC |
| SDK Version                            | 2.28 |
| Language                            |  C#/opencv                     |
| Segment			|  {Robot/Smartphone/VR/AR/others }                          |
Issue Description
Cannot build opencv dnn example; I have installed opencv and checked there is dnn-related objects inside the opencv source folders, yet when building rs-dnn the opencv library cannot be detected

/home/ytf/librealsense/wrappers/opencv/dnn/rs-dnn.cpp:5:10: fatal error: opencv2/dnn.hpp: No such file or directory
 #include <opencv2/dnn.hpp>
          ^~~~~~~~~~~~~~~~~
compilation terminated.
wrappers/opencv/dnn/CMakeFiles/rs-dnn.dir/build.make:62: recipe for target 'wrappers/opencv/dnn/CMakeFiles/rs-dnn.dir/rs-dnn.cpp.o' failed
make[2]: *** [wrappers/opencv/dnn/CMakeFiles/rs-dnn.dir/rs-dnn.cpp.o] Error 1
CMakeFiles/Makefile2:424: recipe for target 'wrappers/opencv/dnn/CMakeFiles/rs-dnn.dir/all' failed
make[1]: *** [wrappers/opencv/dnn/CMakeFiles/rs-dnn.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

@catmasteryip , all the SDK examples were built with openCv 3.4.
What version are you running and can you verify that the highlighted header file <opencv/dnn.hpp> is present on hard-disk ?
When building from sources openCV was reported having issues with dnn when statically compiled.

Hi @catmasteryip,
Did you have a chance to verify that the above-mentioned header file <.../dnn.hpp> is located correctly?

Hi, I'm tring to compile this project in a jetson nano with a intel realsense d345i camera and I'm getting the same error. Shuould I compile the wrappers examples with the complete SDK (as I did with the examples)?


Memory management

Context and Problem Statement
The implementation of the session support uses dynamically allocated memory for multiple use cases:

Declarations of message and sequence variables (global and local)
Copies of sequences (workaround for limitations of our sequence implementation; cf. O1 in #577)

A session specification does (and should) not include the maximum buffer sizes for the allocated message. Currently we assume a buffer of 4KiB for every message. As users obviously need more control, the buffer sizes should be configurable at integration time.
Considered Options
O1 Memory allocator in runtime
+ Simple, generic solution
− Not suitable for certain use cases (e.g., embedded systems)
O2 Application-specific allocator
An application-specific allocator is used on static memory. The allocator could be quite simple and only allow the deallocation of the last allocated memory (stack allocator).
The size of each buffer should be configurable through a generic parameter of the session package. To lower the burden of an instantiation a default value for this parameter should be set depending on a RecordFlux command line parameter.
+ Proving maximum memory consumption by contracts
− Complexity moved into application
O3 Stack memory
+ Simple
− Pointers to stack not supported by SPARK
− Needs additional analysis to prevent stack overflows
Decision Outcome
O2 Implement package with hidden body to allocate memory (idea: ghost stack for pointers, stack-like allocation).

Original Issue
Ada.Unchecked_Deallocation is not supported in the Ada runtime, but required for session support (#292).
$ gprbuild -Ptest --RTS=ada-runtime/build/posix/obj -Xaunit=no -Xoptimization=yes
Setup
   [mkdir]        object directory for project Test
Compile
   [Ada]          rflx-udp.ads
   [Ada]          rflx-arrays-inner_message.ads
rflx-arrays-inner_message.ads:4:06: "ADA.UNCHECKED_DEALLOCATION" is not a predefined library unit

I would assume that we need new then, too?

Yes, new is also required.

Where do we allocate/deallocate in the sessions?

For the record: the solution proposed by Yannick for getting general access to package level variables is described in SB28-034.

Here is a short summary of my current thought process.
I believe an actual allocator (a subprogram that returns a part of a pre-allocated big chunk in memory) would not be possible to implement in SPARK, due to aliasing rules (one cannot split ownership of an object in several pieces). Also, it would be needlessly complicated.
My current target design simply creates as many global variables as are needed (possible simplification for a first implementation: as many global variables as there are variables in the session). A pointer is then created to one of those variables and used as before.
The idea that I presented in the last meeting was to use general access types (which are allowed to point to global variables and stack variables) instead of regular access types (which are only allowed to point to the heap). However, general access types are pretty restrictive in SPARK (I missed that initially). As soon as you create a pointer to a stack or global variable, that variable is considered moved and there is no way to move it back.
So there seems to be no way to have code fully in SPARK. So the refined idea is to create the pointer outside of the SPARK boundary. Something like that:
memory.adb:
package Memory with SPARK_Mode is

   Slot_1 : Bytes := (0 .. 4095 => 0);
   Slot_2 : Bytes := (0 .. 4095 => 0);
   ...

   function Get_Slot_1 return Bytes_Ptr with SPARK_Mode => Off
   is
   begin
       return Slot_1'Access;
   end Get_Slot_1;

  ... same for Get_Slot_2 ...
end Memory;

The spec of that package just contains the specification for Get_Slot_1. Instead of an allocation, the code would just call one of the Get_Slot_NN functions to get the corresponding pointer.
The current Bytes_Ptr type could be changed to a general access type (with access all) to forbid deallocation. This seems to have no other drawback.
One issue with the design is that there is no protection against taking the same memory twice. If code is generated that incorrectly reuses a Slot while it should take a new one, there is no protection for that.
Any comments on that design? I will attempt to implement something like that in the following days.

The overall approach looks good to me. I suppose the proposed approach is also compatible to Community 2021, as access all is not strictly needed?

One issue with the design is that there is no protection against taking the same memory twice. If code is generated that incorrectly reuses a Slot while it should take a new one, there is no protection for that.

That sounds quite risky. If there is no way to ensure that property with SPARK when using the proposed approach, we should at least make it possible to extensively test the correctness of the affected code. Would it be possible to encapsulate the affected code, e.g. by making the allocator a separate generic package which is just used by the generated code? Or do you see any other alternatives?

Could we make a single Get_Slot function which receives and array of slots (for which we prove they are disjoint) and which returns and array of pointers?

Indeed this newer design should work with SPARK Community.
@senier I think that could work. The idea is that the client code would know that it uses the same memory for different purposes, because it accesses the array of slots directly, right? Though it might add some extra overhead for proof, which has to go through the array all the time. Not sure.
Another idea is to have a single Get_Slot function, and it is up to the Memory package to make sure it returns a new slot. It would fail at runtime if it doesn't have any slots left (could imagine proving absence of RTE I guess) . This scheme would require some release mechanism so that slots can be reused.

The memory slots would be used from user code (at least not in our definition of if ;)) but rather in the code generated for the sessions. Take the DHCP example:
   procedure Send_Discover (State : out Session_State) with
     Pre =>
       Initialized,
     Post =>
       Initialized
   is
      Options_Ctx : DHCP.Options.Context;
      Parameter_Request_List_Ctx : DHCP.Option_Codes.Context;
      Options_Buffer : RFLX_Types.Bytes_Ptr;
      Parameter_Request_List_Buffer : RFLX_Types.Bytes_Ptr;
   begin
      Options_Buffer := new RFLX_Types.Bytes'(RFLX_Types.Index'First .. RFLX_Types.Index'First + 4095 => RFLX_Types.Byte'First);
      DHCP.Options.Initialize (Options_Ctx, Options_Buffer);
      Parameter_Request_List_Buffer := new RFLX_Types.Bytes'(RFLX_Types.Index'First .. RFLX_Types.Index'First + 4095 => RFLX_Types.Byte'First);
      DHCP.Option_Codes.Initialize (Parameter_Request_List_Ctx, Parameter_Request_List_Buffer);
      ... -- do stuff
   end Send_Discover;

This would translate into:
   procedure Send_Discover (State : out Session_State) with
     Pre =>
       Initialized,
     Post =>
       Initialized
   is
      Options_Ctx : DHCP.Options.Context;
      Parameter_Request_List_Ctx : DHCP.Option_Codes.Context;
      Buffers : RFLX_Types.Bytes_Ptr_Array := Get_Slots ((1, 7));  --  Bytes_Ptr_Array would be an unconstrained array of Bytes_Ptr. The precondition on Get_Slots states that all array elements are distinct
   begin
      DHCP.Options.Initialize (Options_Ctx, Buffers (1));
      DHCP.Option_Codes.Initialize (Parameter_Request_List_Ctx, Buffers (2));
      ... -- do stuff
   end Send_Discover;

Would that work? The precondition on Get_Slots would avoid requesting the same region twice, borrow checking on the Buffers array should avoid aliasing locally (but that's that part I'm unsure about!).

After thinking about it (and trying it out), putting all the pointers in a common array wouldn't work. SPARK borrow checker can't distinguish between the pointers and treats them basically as the same pointer, so you can't use two of them at the same time. I will explore my other idea of the Get_Slot function that always returns a new slot.

Here is my new attempt. The allocator (it would actually look like one now) interface is like this (memory.ads):
with Types; use Types;
package Memory with SPARK_Mode, Abstract_State => State is

   Num_Slots : constant := 4;
   type Slot_Range is range 0 .. Num_Slots;

   function Free_Slots return Slot_Range with Ghost;

   procedure Alloc (Ptr : out Byte_Array_Access)
   with Global => (In_Out => State),
        Pre    => Free_Slots /= 0,
        Post   => Free_Slots = Free_Slots'Old - 1 and then Ptr /= null and then Ptr'Length = 1024;

   procedure Pop
   with Global => (In_Out => State),
        Pre    => Free_Slots /= Num_Slots,
        Post   => Free_Slots = Free_Slots'Old + 1;

   procedure Init
   with Global => (In_Out => State),
        Post   => Free_Slots = Num_Slots;

end Memory;

and the implementation like this:
package body Memory
with SPARK_Mode,
     Refined_State => (State => (Top_Ptr, Slot_0, Slot_1, Slot_2, Slot_3))
is

   Slot_0 : aliased Byte_Array := (1 .. 1024 => 1);
   Slot_1 : aliased Byte_Array := (1 .. 1024 => 2);
   Slot_2 : aliased Byte_Array := (1 .. 1024 => 2);
   Slot_3 : aliased Byte_Array := (1 .. 1024 => 2);

   Top_Ptr : Slot_Range := 0;

   procedure Alloc (Ptr : out Byte_Array_Access) with SPARK_Mode => Off
   is
   begin
      case Top_Ptr is
         when 0 => Ptr := Slot_0'Unrestricted_Access;
         when 1 => Ptr := Slot_1'Unrestricted_Access;
         when 2 => Ptr := Slot_2'Unrestricted_Access;
         when 3 => Ptr := Slot_3'Unrestricted_Access;
         when 4 =>
            raise Program_Error;
      end case;
      -- possibly zero out the buffer here
      Top_Ptr := Top_Ptr + 1;
   end Alloc;

   procedure Pop is
   begin
      Top_Ptr := Top_Ptr - 1;
   end Pop;

   procedure Init is
   begin
      Top_Ptr := 0;
   end Init;

   function Free_Slots return Slot_Range is (Slot_Range'Last - Top_Ptr);

end Memory;

and the session code could look like this:
   procedure Send_Discover (State : out Session_State) with
     Pre =>
       Initialized and then Memory.Free_Slots >= 2,
     Post =>
       Initialized and then Memory.Free_Slots = Memory.Free_Slots'Old
   is
      Options_Ctx : DHCP.Options.Context;
      Parameter_Request_List_Ctx : DHCP.Option_Codes.Context;
      Options_Buffer : RFLX_Types.Bytes_Ptr;
      Parameter_Request_List_Buffer : RFLX_Types.Bytes_Ptr;
   begin
      Options_Buffer := Get_Slot;
      DHCP.Options.Initialize (Options_Ctx, Options_Buffer);
      Parameter_Request_List_Buffer := Get_Slot;
      DHCP.Option_Codes.Initialize (Parameter_Request_List_Parameter_Request_List_Buffer);
      ... -- do stuff
      Memory.Pop;
      Memory.Pop;
   end Send_Discover;

Some comments:

In any case, the body of Get_Slot needs to be out of SPARK.
in SPARK Community, the Bytes_Ptr needs to be a regular access type (not general), and we need to use 'Unrestricted_Access inside Get_Slot. I'm unsure of the implications of this.
This also means in theory code could attempt to call Free on such pointers. We can mitigate this somewhat by not providing a Free function.
In SPARK Pro, Bytes_Ptr could be a general access type, which would allow us to use 'Access instead of 'Unrestricted_Access. Also, one could not call Free` on such objects.
There is no protection against using a buffer after Popping it. I will try to refine my design to protect against that.
contracts in memory package and session code (see the pre/post of Send_Discover above) could check proper use of the allocator (no memory leaks, only using the allowed amount of buffers).
Zeroing memory before returning a buffer could avoid any hidden information leak.

I somewhat expected that the pointer idea would not work for some reason ;) Do you think treating elements of pointer arrays independently in the borrow checks would be a feature worth discussing within the SPARK team?
I like the interface and the fact that we don't strictly have to drop CE. If we add an in out parameter to Pop (I'd prefer Free if also have Alloc TBH) we should be also be able to do the memory cleanup there, right? This is the natural place as secrets could remain in memory indefinitely otherwise.
One aspect that we should think about sooner than later is how buffer sizes are determined. Our idea was to let the user chose suitable generic parameters at integration time, but given that we reuse slots for different states this doesn't seem to be straightforward.

The borrow checker doesn't know anything about values of variables (e.g. array indices) so it can't distinguish between the array cells. It's similar to flow analysis.
Yes, cleaning up in Free instead of Alloc makes sense.
As for buffer sizes, this approach doesn't care about them as long as they are all the same :-) Different buffer sizes could be accommodated by having a different allocator for each size. The size could be a generic parameter, but we would still need to know statically which buffer will require which size (whether it's a generic parameter or a known quantity).

Memory Sizes
Configuration
Regarding the configuration of memory sizes, we decided to separate those integration aspects into an independent file. For every specification there can be an .rfi (RecordFlux Integration) file which (for now) defines the minimum sizes of all memory regions. For easy human and machine readability we settled on YAML as the format. As there may be multiple such sets of files (e.g. for different system architectures), we'll add a switch to rflx to specify a search path.
The file format looks like this:
Buffer_Sizes:
    default: <default_minimum_size>
    global:
        Global_Variable_1_Name: <minimum_size>
        ...
        Glocal_Variable_n_Name: <minimum_size>
    State_1:
        Local_Variable_1_Name: <minimum_size>
        ...
        Local_Variable_n_Name: <minimum_size>
    ...
    State_m:
        Local_Variable_1_Name: <minimum_size>
        ...
        Local_Variable_n_Name: <minimum_size>

The default size is used for all memory regions for which no explicit size is specified.
Calculation
Calculation of the required buffer sizes should be simple. The number of required buffers obviously is the maximum number of local variables used in any state. For every state we sort the required variable sizes in descending order and extend the resulting list to have the maximum length (by adding 0 size values). To calculate the required slot sizes, we simply take the maximum value for every position in every list across all states. The allocation for a local variable in a state simply is the position in the (state-specific) list referring to that local variable.

The proposed file format could lead to name conflicts between state names and global and default. This could be prevented by using a separate mapping for the states. IMHO, keywords should have a consistent casing (Buffer_Size, Default, Global).
Buffer_Size:
    Default: <default_minimum_size>
    Global:
        Global_Variable_1_Name: <minimum_size>
        ...
        Glocal_Variable_n_Name: <minimum_size>
    State:
        State_1:
            Local_Variable_1_Name: <minimum_size>
            ...
            Local_Variable_n_Name: <minimum_size>
        ...
        State_m:
            Local_Variable_1_Name: <minimum_size>
            ...
            Local_Variable_n_Name: <minimum_size>

I agree. IMHO it should be States (plural).

IMHO it should be States (plural).

I would favor consistency. Either everything plural (Buffer_Sizes, Globals, States) or singular (Buffer_Size, Global, State). (An alternative for State could be Local.)

An alternative for State could be Local.

I like that idea. Default/Global/Local makes sense to me.

In our live meeting, I mentioned the need to identify allocation points as a means of communication between the session generator code and the allocator code. We discussed that allocation points can be identified by the name of the corresponding variable, plus the place where it appears (global or state). However, this doesn't work for the allocations which are not related to variables directly. This applies to comprehensions at least (sample code taken from dhcp_client example):
         Offer_Message_Types := [for O in Offer.Options if O'Valid and O.Code = DHCP::DHCP_Message_Type_Option => O.DHCP_Message_Type];

Any idea how we could identify those?

FWIW I am currently using source locations to identify such allocation points. It seems to work.

FWIW I am currently using source locations to identify such allocation points. It seems to work.

We discussed some alternative approaches, e.g. using a combination of the target variable and other properties of the expression to identify the allocation. While these approaches would allow a user to specify the size of those implicit allocations, they are far more complex than just using the location. We should stick with your location-based approach until the need for sth. more advanced arises.

I just discussed the allocation issue with Claire, and she proposed a small variation, which has much nicer properties. I'm recording the scheme here.
The idea is that instead of Get_Slot_* functions, we have global Slot_*_Ptr variables. These variables are initialized at some point, possibly at elaboration (this needs to be in SPARK_Mode => Off, similar to the body of the Get_Slot_* functions). The main advantage is that SPARK can track ownership for those pointers. This automatically avoids taking the same slot twice, or not giving back a slot, etc.
In this scheme, instead of calling Free, one has to move the pointer back to the Slot_Ptr variable. So the generated session code would look something like this:
      Options_Buffer := Slot_1_Ptr;
      DHCP.Options.Initialize (Options_Ctx, Options_Buffer);
      Parameter_Request_List_Buffer := Slot_2_Ptr;
      DHCP.Option_Codes.Initialize (Parameter_Request_List_Parameter_Request_List_Buffer);
      ... -- do stuff
      Slot_1_Ptr := Options_Buffer;
      Slot_2_Ptr := Parameter_Request_List_Buffer;

SPARK would detect aliasing in the code if Slot_1_Ptrwas incorrectly replaced bySlot_2_Ptr, while the same kind of detection would require heavy contracts on the Get_Slot_*` functions. Also it protects against using a buffer after having "freed" it.
I will change my local implementation to this scheme.

Neat! Have you validated this idea works?
We still have the issue that Slot_1_Ptr and Slot_2_Ptr could be swapped at the end invalidating all size assumptions in subsequent uses, right?

Not yet validated.
Your remark about the size assumptions are interesting, we haven't really discussed this yet. I guess that if we find a way to express that Slot_1_Ptr points to a buffer of (at least) a certain size, then we will solve the issue.

Your remark about the size assumptions are interesting, we haven't really discussed this yet. I guess that if we find a way to express that Slot_1_Ptr points to a buffer of (at least) a certain size, then we will solve the issue.

Having the size formally stated would be nice. However, showing that Slot_1_Ptr is pointing to the same memory after a state is done may be a simpler first step. Could we just use a postcondition of the form Post => Slot_1_Ptr = Slot_1_Ptr'Old for every slot used in a state?


Migrate Microsoft.Bcl.HashCode

Includes history from the old release/3.1 branch.
The latest available package in nuget.org is https://www.nuget.org/packages/Microsoft.Bcl.HashCode/1.1.1 and I was able to confirm that my local build successfully generated package 1.1.2.

By the way, NuGet.config is still using the dotnet6 transport. Should I update it to dotnet9?

Need this merged first: https://github.com/dotnet/maintenance-packages/pull/19 . Once merged, I will rebase this PR.

This PR should now be unblocked.

No squash merge!

No squash merge!

I don't have permission to merge-commit, unfortunately. Even with elevation.


:bug: fix(accordion): initial active value is not working

Current Behavior

initial active value is not working
accordion trigger provide color and sizes

Expected Behavior
A bug happened!
Steps to Reproduce

Version
13
Browsers
No response
Device
No response
Code Reproduction URL
No response
Additional Information
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

/cib


Set up environment variable

How do I even set up the OPENAI_API_TOKEN environment variable.
It will be great if you guys include the steps to setup the environment variable into your README.md file

Setup env is depend on you os.

@nguyenvanduocit Even after setting the env it is showing me this

I will try to improve thr prompt

There an mistake on the readme. The correct env key is OPENAI_API_KEY, not OPENAI_API_TOKEN. Sorry about that.

@nguyenvanduocit I've used the correct env but somehow still getting the same msg

Same Error

Same error, zsh: command not found: ai-commit

Sorry, I was distract from this project, I am back, I think it's because ChatGPT can not under stand the diff
@InternetJohnny "Command not found: ai-commit" maybe because your PATH is not contains the binary


Authorization basic null safety

Hey,
First of all, thanks for a fantastic, easy-to-use library.
In basicAuthentication both username and password can be passed as null and it fails with NullPointerException. I suggest it should be failing/ignored silently or throwing an IllegalArgumentException. Note that I mean null values only - user should be allowed to pass empty strings.
I may issue a PR if you agree with me, what do you think?

Hey @Opalo totally! Thank you for catching this one!

So which option do you choose:

failing with exception
ingoring silently

?

Sorry, i just started to edit my answer :)))
I believe it would be good just to ignore - sometimes these values come from some settings, so passing null can happens; and its more in the spirit of the library.
wdyt?

I think it makes sense, however it would be great to notify user that the value passed was just ignored. Do you have any logging configured to output info there?

Yeah, there is jodd-log module that is used in Jodd: http://jodd.org/doc/logging-jodd.html...  So far it is not used in jodd-http; so I would not add it just for this line. But... let me added it all over the module! I will create new issue for this one, ok?

Sure, I'll fix the "bug" with ignoring null values silently and issue a PR.


Bug 1985997: scaffolding for e2e tests for the static pod monitor

I am going to define a dedicated CI job for the new tests.

/lgtm
/approve

/retest

/retest

/retest

/retest


Fix visual artifact on pagination when it was empty

It had some padding so was visible even when empty, aka showing an empty half-box

Coverage remained the same at 39.982% when pulling 0d19dd56b6e0d83f90f148c678ee591737c8f18a on Kiloutre-patch-1 into 20456373e0c8687ce00e5ca0c9824036c7c221a5 on dev.

Coverage remained the same at 39.982% when pulling c025edd93c44df3683a01d01bdeb9dad8351583f on Kiloutre-patch-1 into 20456373e0c8687ce00e5ca0c9824036c7c221a5 on dev.

Coverage remained the same at 39.982% when pulling 16e53db3c2d42aab0163acdf626616f709d633c7 on Kiloutre-patch-1 into 20456373e0c8687ce00e5ca0c9824036c7c221a5 on dev.

Coverage remained the same at 39.982% when pulling 16e53db3c2d42aab0163acdf626616f709d633c7 on Kiloutre-patch-1 into 20456373e0c8687ce00e5ca0c9824036c7c221a5 on dev.

Coverage remained the same at 39.982% when pulling 16e53db3c2d42aab0163acdf626616f709d633c7 on Kiloutre-patch-1 into 20456373e0c8687ce00e5ca0c9824036c7c221a5 on dev.

Coverage remained the same at 39.982% when pulling ef156fc7d686098ef47b540bcdf0ed50b6388e8c on Kiloutre-patch-1 into 20456373e0c8687ce00e5ca0c9824036c7c221a5 on dev.


Type '"batch"' is not assignable to type '"fine-tune" | "assistants"

Confirm this is a Node library issue and not an underlying OpenAI API issue

[X] This is an issue with the Node library

Describe the bug
According to the document Uploading Your Batch Input File.  I tried the following code:
import fs from "fs";
import OpenAI from "openai";

const openai = new OpenAI();

async function main() {
  const file = await openai.files.create({
    file: fs.createReadStream("batchinput.jsonl"),
    purpose: "batch",
  });

  console.log(file);
}

main();

However, it outputs the error:
TSError: ⨯ Unable to compile TypeScript:
worker/generate.ts:18:4 - error TS2322: Type '"batch"' is not assignable to type '"fine-tune" | "assistants"'.

18    purpose: "batch",
      ~~~~~~~

  node_modules/openai/resources/files.d.ts:119:5
    119     purpose: 'fine-tune' | 'assistants';
            ~~~~~~~
    The expected type comes from property 'purpose' which is declared here on type 'FileCreateParams'

Maybe the type batch is missing in this line of the openai package source code:
https://github.com/openai/openai-node/blob/7196ac9310d58d057fb2a575e60c1718bf6341a2/src/resources/files.ts#L185
We can fix it by adding batch
purpose: 'fine-tune' | 'assistants' | 'batch';

To Reproduce
Easy to reproduce: look at official documentation page - https://platform.openai.com/docs/guides/batch/2-uploading-your-batch-input-file
Run above code in nodejs / typescript.
Code snippets
No response
OS
macOS
Node version
v20.11.0
Library version
v4.42.0

Thanks for flagging. We will take a look!

This is resolved in 4.43 which should be merged shortly! Thank you for reporting.
https://github.com/openai/openai-node/pull/832


Update README.md

It was written in Code Example 5undefined but it should be ReferenceError: x is not defined.

merged, thanks!


Allow to resolve type names from title attribute in schema.

Each word in a title is capitalized and whitespaces stripped.
Fixes gh-908

I removed some unrelated changes by amending my initial commit. Future changes will be in separate commits obviously.

Hmmm. Yes, please implement this as a simple Boolean. I think these are a lot easier for people to use.
Also, could you use the existing replaceIllegalCharacters method to sanitise the string. It replaces more than just the space char.
Cheers.

The method replaceIllegalCharacters is called from ObjectRule|EnumRule#getClassName.
I refined the logic and added an IT.


Allow Unix epoch (1970) as default starttimestamp

It appears as though the opentelemetry-collector might be adding 1970-01-01 as the default value for StartTimestamp on TimeSeries DataPoints.
https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/blob/b068af9a94200ed9c49d58f16817ea6d3066e6e6/exporter/collector/metrics.go#L740
Here the code expects it to be 0001-01-01, resulting in data not being sent to Google Cloud.
Also opentelemetry-collector stores timestamps as unsigned integers from 1970, so can't set the StartTimestamp to 0001-01-01 without counting on integer overflows.
https://github.com/open-telemetry/opentelemetry-collector/issues/5102

This was fixed in https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/pull/336


Add flag to output image references

Instead of going to 30+ repos to add this flag, I can add it here. ko will write the image references to a file for cosign to sign.
/kind enhancement
/cc @kvmware

smart
/lgtm


Ruby: support for PSM security

only support SSL fallback for now.
add XdsChannelCredentials class.

@nicolasnoble
@stanley-cheung
@apolcyn

Are there no new unit tests or no changes to existing unit tests? How are the changes being tested to prevent regressions?

all 4 xxx_spec.rb files are unit tests

tools/distrib/clang_format_code.sh

done.


Request dataset

Could you send me a copy of the dataset, please? I want to learn it. My email  is<EMAIL_ADDRESS>

I think they are available for downloading in Kaggle.

Thank you for the response
------------------ 原始邮件 ------------------
发件人: "Liming<EMAIL_ADDRESS>发送时间: 2019年8月17日(星期六) 凌晨0:03
收件人<EMAIL_ADDRESS>抄送: "734841570"734841570<EMAIL_ADDRESS>主题: Re: [limingwu8/UNet-pytorch] Request dataset (#3)
Closed #3.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Thank you for the response
------------------ 原始邮件 ------------------
发件人: "Liming<EMAIL_ADDRESS>发送时间: 2019年8月17日(星期六) 凌晨0:03
收件人<EMAIL_ADDRESS>抄送: "734841570"734841570<EMAIL_ADDRESS>主题: Re: [limingwu8/UNet-pytorch] Request dataset (#3)
I think they are available for downloading in Kaggle.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

what is the dataset directory??


Resolve Entrypoint and Cmd if there is no command and no args

Changes
Prior to this change, if a Step specify neither command nor args,
the entrypoint resolver would only resolve the image Entrypoint and
thus, only executing that entrypoint. This is confusing to user as it
is not how a docker run without args produces.
This make the behavior very close to docker run. If there is no
command and no args specified, the entrypoint reslover will join the
image Entrypoint and Cmd.
Signed-off-by: Vincent Demeester<EMAIL_ADDRESS>/kind bug
Fixes #4794
Submitter Checklist
As the author of this PR, please check off the items in this checklist:

[ ] Docs included if any changes are user facing
[x] Tests included if any functionality added or changed
[x] Follows the commit message standard
[x] Meets the Tekton contributor standards (including
functionality, content, code)
[x] Release notes block below has been filled in
(if there are no user facing changes, use release note "NONE")

Release Notes
The entrypoint resolve will now reslove `Entrypoint` and `Cmd` in case
the steps has no command and no args specified.

/cc @abayer @imjasonh

/lgtm

/retest

/test pull-tekton-pipeline-go-coverage

/approve

/retest


Intermediate memory values

Hi albertobsd.
There are questions from memory.
If the PC is 64GB - Windows 3-4GB, you can use only 32GB (-k 2048) 28GB remains
If the pc is 128GB - Windows 3-4GB, you can use only 64GB (-k 4096) 60GB remains
If add value -k 2048 + (512, 1024) error
If add value -k 4096 + (512, 1024, 2048) error
If you run a copy of the program with a lower value, it gives an error. It turns out that for many, half of the memory is not used.
This works between -k 512 and -k 1024 can be set to -k 768
It turns out 2 TB RAM can only be used -k 16384 (1 TB cannot be used)
Or how to specify intermediate values -k?
Thanks
Correct in README.md
64 GB -n 0x100000000000 -k 4096
128 GB -n 0x400000000000 -k 4096

Я заметил что при увеличении памяти, скорость особо не растет.
Пробовал 756 ОЗУ 48 Ядер.

Hi, first thanks for test the program.
About your errors please Add one screenshot or full text output of each error just to review all of them in details, i want to solve if it is possible.
Actually you can use any K value Even numbers like -k 1337 or any other i already test some values like that  and they works well since I solve the issue: very strange issue (possible bug)  All the K errors are solved, but yes you need to test for hit and test for no missing keys.
For the tests add you currents N and K values
16 Publickeys in a 64 bits range this is the JeanLucPons test file tests/in.txt in this test all the 16 Publickeys must be found.
time ./keyhunt -m bsgs -f tests/in.txt -r 49dccfd96dc5df56487436f5a1b18c4f5d34f65ddb48cb5e0000000000000000:49dccfd96dc5df56487436f5a1b18c4f5d34f65ddb48cb5effffffffffffffff  -M -s 0 -S

64 Publickeys from the already solved puzzles from 1 to 65 in file tests/1to63_65.txt in this test all the 64 Publickeys must be found.
./keyhunt -m bsgs -f tests/1to63_65.txt -r 1:20000000000000000  -M -s 0 -S

Any missing key please let me know

Notebook i7 (6 cores 12 threads) 64GB Windows x64
I did my tests, I find everything.
I wanted to take the Keynunt and modify it. I looked at the code, everything is well done, I did tests.
New correct random start and finish works correctly, does not go out of range.
Here are the screenshots Intermediate memory values

-k 2048 work

time in Windows does not work for me.
Invalid time value. Enter the time, after entering the time on the pc, the time changes.

Notebook i7 (6 cores 12 threads) 64GB Windows x64
Screenshots test Intermediate memory values
-k 2048 work
time in Windows does not work for me. Invalid time value. Enter the time, after entering the time on the pc, the time changes

В WSL Ubuntu все работает с последней версии. Из 16 Гб занято 14. Ида, в Windows time это совсем другая команда и нет ничего похожего на нее.

Intermediate memory values between -k 128 and -k 1024 work, I wrote about it.
Test -k 768, -k 800 works in Windows.
Problem with intermediate values after -k 2048
-k 2176 Error! -k 3072 Error!

Промежуточные значения памяти между -k 128 и -k 1024 работают, я об этом писал. Test -k 768, -k 800 работает в Windows. Проблема с промежуточными значениями после -k 2048 -k 2176 Ошибка! -k 3072 Ошибка!

Забыл добавить, последние версии не компилировались для windows, эта проблема уже была уже решена ранее.

https://github.com/albertobsd/keyhunt/issues/126

In the evening I will try to compile the latest version of keyhunt for Windows. I will test, unsubscribe

The lastest version will solve your errors... but it can't be compiled in windows directly.
Please use the WSL with the Ubuntu shell it is available in the windows 10 Store for FREE
Regards!

Thanks, I will try to compile


Emoji support

Does anyone knows how to enable emoji support on this template?

I just used an emoji in a markdown file and it rendered fine.


Get the post_date attribute to avoid "Attribute post_date is required…

…" exception
In the edit page form, the post_date is required too.
So I think this fix can done the job.
But it still the question about, updated_at, created_at may be.
What do you think about this ?

I think it will be great solution in this case.


reCAPTCHA timout after 2min

When a form using reCAPTCHA V3 is loaded a time-out timer starts running. After 2 minutes the code expires and every form submission after this 2 minutes is not accepted and an error is given.
Users can then, simply resubmit the form and it will work, this is not clear to them.
There could be a parameter that resets the reCAPTCHA after the code is expired, but this is not implemented into the system.
Link with instructions how this could work:
https://stackoverflow.com/questions/28738949/fire-event-when-recaptcha-session-expires
I'm currently using V8.5.4

I tried to modify the recaptchav3.js file, so that it's like this:
;(function(global, $) {
'use strict';

function expired() {
    debugger;
    var a = arguments;
    console.log(this);
    console.log(a);
}

function render(element) {
    var $element = $(element),
        elementId = $element.attr('id'),
        clientId,
        captchaData = {
            sitekey: $element.data('sitekey'),
            badge: $element.data('badge'),
            theme: $element.data('theme'),
            size: 'invisible',
            'expired-callback': expired,
        };
    clientId = grecaptcha.render(elementId, captchaData);
    grecaptcha.ready(function () {
        grecaptcha.execute(
            clientId,
            {
                action: 'submit'
            }
        );
    });
}

global.RecaptchaV3 = function() {
    $('.recaptcha-v3').each(function () {
        render(this);
    });
};

})(window, jQuery);

That way, the reCAPTCHA v3 should call the expired function.
The problem is that it's not called (I waited up to 15 minutes).
So, I think that the expired-callback parameter is only supported in reCAPTCHA v2 (also because it's documented for reCAPTCHA v2 but not for reCAPTCHA v3).
@Iswelgoed are you sure that reCAPTCHA v3 implements an expiration timer?

Although it would be nice we don't actually need a reCAPTCHA timeout event; we know it happens every 2 minutes. All we have to do is call grecaptcha.ready again a few seconds before it times out.
This code appears to work:
/* jshint unused:vars, undef:true, browser:true, jquery:true */
/* global grecaptcha */

;(function(global, $) {
'use strict';

function ready(clientId) {
    grecaptcha.ready(function () {
        grecaptcha.execute(
            clientId,
            {
                action: 'submit'
            }
        );
    });
}

function render(element) {
    var $element = $(element),
        clientId = grecaptcha.render(
            $element.attr('id'),
            {
                sitekey: $element.data('sitekey'),
                badge: $element.data('badge'),
                theme: $element.data('theme'),
                size: 'invisible'
            }
        );
    ready(clientId);
    setInterval(function(){ready(clientId)}, 110000);
}

global.RecaptchaV3 = function() {
    $('.recaptcha-v3').each(function () {
        render(this);
    });
};

})(window, jQuery);

Another approach is to refactor so that it only contacts reCAPTCHA for the key once the user clicks submit. However that has 2 issues. First it would be more work to implement. Second, it introduces a small delay after the user clicks submit.

What I can't figure out is why this suddenly broke in 8.5.5. There does not appear to be any reCAPTCHA related commits between 8.5.4 and 8.5.5.

The error was there since the Recaptcha was introduced in ver. 8.5.2
I have one site running that version and that also has problems. I didn't notice it earlier because the timeout happened after 2 mins. When end users told me there was a problem I tried the form myself and it worked because I was within the 2-minute mark.
Code mentioned above works, thanks a lot!

https://github.com/concrete5/concrete5/pull/9802


Add Dash 2 layout syntax wrappers and html tags

This PR ports over the Dash2 changes and wrappers from https://github.com/daattali/dash2 into Dash for R, in a backwards compatible form. It also exports and enables the use of the pipe function from magrittr, along with the list of html tags and tag functions available for simplified layouts.
TODO:

[ ] Add basic unittests for layout and tags
[ ] Add Percy snapshot test
[ ] Update changelog

In a future PR, once this is more intertwined with the base Dash R code, we may want to add validation for the updated syntax and some add to the checks for the layout functions.

@alexcjohnson  Any idea on why the CI checks aren't being reported to the Github status? The build passes on CircleCI: https://app.circleci.com/pipelines/github/plotly/dashR/848/workflows/453fedcf-5069-4c27-9118-8f0c69b4ec8a/jobs/905
And if I go to the Checks tab above, it's infinitely loading.

Looks like the checks are passing now - I changed the ci:circleci/test  job check to the build workflow check for this branch to match the master one.
Not sure if this was a recent change with CircleCI, but statuses are passed at a workflow level rather than a job level. For other repo's however, we are using job-level status checks (eg. plotly/dash) and those are being reported so it seems kind of contradictory.

I just saw this PR now. There was one local change I had that is very relevant to this PR so I just pushed it https://github.com/daattali/dash2/commit/63967402085dc6dd34d1bb4d989a8fb4bdfc9769
It allows conditional layout like this:
num <- 5
dash_app() %>%
    set_layout(num, " is ", if (num %% 2 == 1) "not ", "even") %>%
    run_app()

(weird example, I know)


fix ColorPickerButton.get_popup()

closes https://github.com/godotengine/godot/issues/20002
extends Node

func _ready():
	add_child(ColorPickerButton.new())
	print(get_children()[0].get_popup())

Now that Godot 3.1 has been released, we only plan to cherry-pick critical bug fixes to the 3.0 branch, unless there is very strong support in favor of a specific non-critical issue. Removing cherrypick label for 3.0.


Cherry pick (#3243) | update kujaku dependency

update kujaku dependency

:arrow_up: Upgrade the Kijaku dependency and add mapbox auth credentials

mapview initializing fix

:wrench: Update the kujaku versions

:wrench: Update the versions

IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes [link to issue]
Engineer Checklist

[ ] I have written Unit tests for any new feature(s) and edge cases for bug fixes
[ ] I have added any strings visible on UI components to the strings.xml file
[ ] I have updated the  CHANGELOG.md file for any notable changes to the codebase
[ ] I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the project's style guide
[ ] I have built and run the FHIRCore app to verify my change fixes the issue and/or does not break the app
[ ] I have checked that this PR does NOT introduce breaking changes that require an update to Content and/or Configs? If it does add a sample here or a link to exactly what changes need to be made to the content.

Code Reviewer Checklist

[ ] I have verified Unit tests have been written for any new feature(s) and edge cases
[ ] I have verified any strings visible on UI components are in the strings.xml file
[ ] I have verifed the CHANGELOG.md file has any notable changes to the codebase
[ ] I have verified the solution has been implemented in a configurable and generic way for reuseable components
[ ] I have built and run the FHIRCore app to verify the change fixes the issue and/or does not break the app

@ellykits not sure how it will validate map box sdk token on CI/CD
this is the token -> MAPBOX_SDK_TOKEN=sk.eyJ1IjoiYXVyYW5nemFpYnVtZXIiLCJhIjoiY2x2a3dpazA1MXRhbTJqbnZtNjM0NnB1cCJ9.E1CnQczKA6U7yGtf-mO3Bw

@ellykits not sure how it will validate map box sdk token on CI/CD

We can refactor the build.gradle file to include a ternary operator that first checks for the value as a System environment variable and if not found the current property. Then we update the CI workflow to inject the environment variable with a value MAPBOX_SDK_TOKEN from Github Secrets.

Tried with single quotation and three quotation, didn't succeed. @ndegwamartin


Error when using IterativeStratification with random_state

Hello,
thank you very much for scikit-multilearn. It is quite nice software to use.
I have been having a issue while using Iterative Stratification when I set the random_state to define the partitions/folds for a k-fold cv. Do you mind helping me?
This is the error message I receive when I use both in combination:
    kf = IterativeStratification(n_splits=10, order=1, random_state=random_state)
  File "/home/alexgcsa/anaconda3/lib/python3.7/site-packages/skmultilearn/model_selection/iterative_stratification.py", line 185, in __init__
    random_state=random_state)
  File "/home/alexgcsa/anaconda3/lib/python3.7/site-packages/sklearn/utils/validation.py", line 63, in inner_f
    return f(*args, **kwargs)
  File "/home/alexgcsa/anaconda3/lib/python3.7/site-packages/sklearn/model_selection/_split.py", line 291, in __init__
    'Setting a random_state has no effect since shuffle is '
ValueError: Setting a random_state has no effect since shuffle is False. You should leave random_state to its default (None), or set shuffle=True.

Thanks in advance.
Alex de Sá

The issue is that the option shuffle is not available.

I'm also facing this problem. Will this solution be available in the next releases of the package?


resolving log default value issue in migration

will resolve https://github.com/Block8/PHPCI/issues/1007 https://github.com/Block8/PHPCI/issues/977

not big on editing migrations once their completed but these simply will not run as they stand

Migration will be always additive, we can't remove already runned migration code.

that's impossible then without removing those migrations completely then @mavimo the two migrations that where modified completely fail. unless you have another way you handle it. if so please advise.

@th3fallen create a new migration using:
vendor/bin/phinx create MigrationName

the fill the methods with appropriate changes.
NB: I'm not sure remove DB constrains is the right solution, are you sure should not be fixed by set the appropriate value on the build/project entity before save it on DB?

@th3fallen create a new migration using:

I tried that the issue is the fix_database_columns migration fails and blocks all further migrations from running.

any thoughts @mavimo ?

I agree with @th3fallen that at one point there were broken migrations out there that just did not work, and you could not upgrade.
I just did a fresh install and did not encounter those issues anymore. @th3fallen are you still experiencing the issue?

I moved to something else... but i'll do another install monday and report back.

Worked for me.

does not work for me, I installed mysql 5.6.27


[WIP] Implement Cw4626QueryMsg

Closed in favor of https://github.com/apollodao/cosmos-vault-standard/pull/17


Consider accepting string.Empty as a valid continuationToken equivalent to null

This is related to https://github.com/Azure/azure-sdk-for-net/issues/29056 which talks about documenting whether to expect the ContinuationToken property will contain string.Empty or null when there are no additional results. I am arguing there that the issue should be extended to document what value to pass to methods that accept the continuation token as an argument in the initial query. An addition to the description of the parameter in XML documentation would go a long way.
Our team just hit an issue for incorrectly assuming that string.Empty was a reasonable default value to pass as a continuation token in the initial query.
It turns out that methods like Container.GetItemLinQueryable<T> won't throw at runtime if string.Empty is used for continuationToken argument, but a subsequent call to a method that creates the iterator, like ToFeedIterator will result in a MalformedContinuationTokenException.
Given that in .NET type system string does not provide enough expressiveness to make a malformed continuation token error out at compile time and that even the exception is delayed until an iterator is created, I want to suggest that you consider relaxing such methods to accept string.Empty as a valid continuation token equivalent to null.
I believe this would result in a slight improvement in usability.

Hello @divega the continuation token is an opaque blob. A null continuation token on the response signifies that all results have been returned. This is also reflected in the FeedIterator.HasMoreResults returning false. Any continuation token passed into the API must either be null or exactly the same string that was returned by the API earlier. Specifically, you cannot modify said token. The API contract is silent on the contents on the continuation token. As a result you cannot make any assumptions about the semantics of empty string passed as a continuation token.


Start building PDF of HW

@martindholmes: Please start building the PDF of HW. lemdo/data/texts/HW/main/emdHW_Print

Still getting pointer errors trying to build this. The problem is pointers to characters, which we've never had before. We'll need a formal strategy for handling those.

@martindholmes: Our ability to point to characters is dependent on a satisfactory resolution to #154, which in turn depends on the remediators doing something.
@LEMDO-PM: Can we look at #154 on Tuesday?

I don't think there's any connection with #154 here; the print build combines all relevant files into a single document before doing any building, so the existence or otherwise of a separate file with a character list in it (which IIRC was supposed to be created at build time anyway) shouldn't have any effect on it. The issue of what should happen in the PDF when a pointer points to a character in the list should be solvable anyway. The options are something like:

Retrieve a canonical form of the character's name and substitute it for the pointer.
Do the above, but follow it with a page-reference to where the character appears in the character listing.
Something else?

Let's leave this one until after @martindholmes's vacation.

@JanelleJenstad @JackWilton1594 We still do not have a working PDF build for HW, but I see that it's supposed to be published relatively soon. That means we have to decide whether it's to be published without an auto-generated character list (maybe with a manually-encoded one like the other PDFs), or whether issue #154 must be dealt with now (which would be a significant job, and that ticket has been stalled for months), or whether we do something else.


[EN DateTimeV2] "this week" is recognized as 8 days

Describe the bug
The this week is recognized as 1/21-1/28, it should be 1/21-1/27
To Reproduce
use DateTimeRecognizer to recognize "this week"
Expected behavior
return start as "1/21" and end as "1/27"
Sample input/output
input: "next week"
output:
start: "2019-01-21"
end: "2019-01-28"
Platform (please complete the following information):

Platform: .NET
Environment: nuget package
Version of package 1.1.4

Additional context
Add any other context about the problem here.

Closing as there seems to be correct according to @guom08.

@tellarin @guom08 Tell me if this should be another issue or not, but it seems very odd from my perspective to interpret "1/21 to 1/27" as excluding "1/27". Is there any more documentation on this decision?


lack of return code

The below is exact code:
func binarySearch<T: Comparable>(_ a: [T], key: T) -> Int? {
    var lowerBound = 0
    var upperBound = a.count
    while lowerBound < upperBound {
        if a[lowerBound] == key {
            return lowerBound
        }
        if a[upperBound - 1] == key {
            return upperBound - 1
        }
        let midIndex = lowerBound + (upperBound - lowerBound) / 2
        if a[midIndex] == key {
            return midIndex
        } else if a[midIndex] < key {
            lowerBound = midIndex + 1
        } else {
            upperBound = midIndex
        }
    }
    return nil
}

Could you elaborate on what you're trying to improve here?

Closing due to inactivity.


[SVCS-404] Added support for rendering mat files

https://openscience.atlassian.net/browse/SVCS-404
Purpose
add the .mat format to tabular file renderer
Summary of Changes
Added a new file under tabular/libs which contains functions to render the .mat format.
The .mat format contains variables from matlab scripts. Each variable is saved as a sheet (wether it be 1 number, or a 100x100 matrix) and then can be viewed.  Two libraries were added for this. h5py and scipy.
Testing Notes
There are 8 files on the jira ticket that can be used for testing. Files ending in V73 test the V7.3 h5py renderer. Files ending in V70 test the V7 and below scipy renderer. The files come in pairs, one for the V73 and one for the V70. Files across both versions should have the same contents. However the sheets may not be listed in the same order across both versions.

Changes Unknown when pulling 3820cdb9ae3d205015e8cbffa42ebb9068107724 on AddisonSchiller:feature/mat-file-rendering into ** on CenterForOpenScience:develop**.

Ace!  Moving to RTM!


Many small updates.

Also removed several obsolete files.  The following redirects need to be configured before this change can be merged:

pgp-data.html to use_cases/discover_public_data/pgp_public_data.html
use_cases/browse_genomic_data/index.html to sections/access_data.html
use_cases/run_familiar_tools/index.html to sections/access_data.html
workshops/index.html to sections/learn_more.html

LGTM

Not a blocking comment, but I'm curious whether /includes/dataflow_on_gce_setup.rst could also be updated to suggest Java 8 rather than Java 7. The forthcoming LD pipeline uses Java 8 for writing to BigTable. Can the other pipelines be run on 8?

Filed https://github.com/googlegenomics/readthedocs/issues/115 for Java 8.
Saving https://github.com/googlegenomics/readthedocs/issues/112 for another PR.
I set up the redirects but they do not appear to be working at the moment.  (see also https://github.com/rtfd/readthedocs.org/issues/1826)

Nicole, Maybe an additional PR might be needed for the other points as well, so they don't get lost in the mists of time :)
~p

@pgrosu  Thanks for pointing out the lack of scaling!  I filed https://github.com/googlegenomics/spark-examples/issues/82

Nicole, sure thing and sorry to be picky, but the above text says:
The matrix is centered, scaled, and then the first two principal components are computed for each invididual.
This suggests that you are scaling before you find that PC1 and PC2, which is confusing.  Usually you determine the eigenvectors with the 2 highest eigenvalues in this particular case, and then you scale the data by multiplying with them, not beforehand. Maybe my eyes are getting tired, but I'm not sure I see where you're actually performing that in the Dataflow code.  I notice that you find maxEigenvalue and secondEigenvalue, but I'm not sure where you rescale the original data with them.
Thanks,
~p