Can NavigatorIOS notify that a "back" happened?

Not sure if I'm missing something, but does NavigatorIOS have a way of notifying its owner that there is a new top route because the "<" back button was pressed? Otherwise, to get that functionality, the removed component would have to itself notify during componentWillUnmount, and that just feels weird.

@paramaggarwal is it possible to be notified when any rote changes?
something like
<NavigatorIOS onChange={...}
              initialRoute={...} />

@liubko please look into Navigator instead, which is much more customisable. Docs are here: Navigator Comparison

i think you can wrap the route component with a wrapper and listen to the wrapper's componentWillUnmount

I was able to get a hacked onBack for these types of things using an array as singleton that each component wanting to get there onBack method called would use. The idea is like below.
// singleton onBackStack
export default [];

// example component
class ExampleComponent extends Component {
  onBack() {
    // do something
  }
  componentWillMount() {
    onBackStack.push(this);
  }
  componentWillUnmount() {
   onBackStack.pop();
   if (onBackStack.length) onBackStack[onBackStack.length - 1].onBack();
  }
  render() {
    return <View>example</View>
  }
}

@sebringj  thanks for sharing this can you please explain onBackStack

@phpfalcon basically, there is a singleton that is imported to all components that are views needing to have "onBack" event. The singleton is named "onBackStack" which is just a simple array.
Each component needing an "onBack" would then push themselves into the onBackStack on their own componentWillMount. On componentWillUnmount, they remove themselves off the stack but then call the method of the last item in the list's onBack() so to fire the event.
This can be put into a component class then inherited from which is probably a better idea. I just made it very quickly as I don't care to make it more robust or friendly for what I am doing.

@sebringj your method is great but I couldn't understand until your last comment I implanted a similar method works for navigatorios :
  constructor(){      super();      this.state = {backapper:false}};    } componentDidMount() {     var currentRoute = this.props.navigator.navigationContext.currentRoute;     this.props.navigator.navigationContext.addListener('willfocus', (event) => {         //didfocus emit in componentDidMount         if (currentRoute === event.data.route && this.state.backapper) {             console.log("me didAppear");             this.setState({backapper: false});         }         else if (currentRoute !== event.data.route)         {             this.setState({backapper: true});             console.log("me didDisappear, other didAppear");         }         //console.log(event.data.route);      }); }

@phpfalcon Hmm I dont have a navigationContext? Are you using React Navigation? This Google returns no results... navigationContext site:reactnavigation.org


Improve perf for layered sparse loading from MatrixMarket files.

Codecov Report

Merging #15 (f8ef95f) into master (6f30dd9) will decrease coverage by 1.57%.
The diff coverage is 69.67%.

@@            Coverage Diff             @@
##           master      #15      +/-   ##
==========================================
- Coverage   95.88%   94.30%   -1.58%
==========================================
  Files          55       56       +1
  Lines        3620     3759     +139
  Branches       45       44       -1
==========================================
+ Hits         3471     3545      +74
- Misses        134      200      +66
+ Partials       15       14       -1

Impacted Files
Coverage Δ

include/tatami/ext/MatrixMarket_layered.hpp
71.54% <64.58%> (-24.30%)
:arrow_down:

include/tatami/ext/layered_utils.hpp
84.21% <84.21%> (ø)

include/tatami/ext/convert_to_layered_sparse.hpp
91.35% <100.00%> (+2.26%)
:arrow_up:

tests/src/ext/MatrixMarketBuffer.cpp
98.46% <100.00%> (+0.07%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6f30dd9...f8ef95f. Read the comment docs.


Add correct PyPI classifier for supported license

[x] I have searched the issues of this repo and believe that this is not a duplicate.
[x] I have searched the documentation and believe that my question is not covered.

Question

Hi, and first, thank's for poetry :-)
I looked at your code and noticed that the list of licenses managed by poetry is retrieved from the spdx license-list-data repository.
Apparently, PyPI classifiers are generated from the poetry/spdx/license.py file with the variables CLASSIFIERS_SUPPORTED and CLASSIFIERS_NAMES? Is that correct?
If so, is there a way to update this list automatically or should it be done manually? Can you explain me how to add some licenses by hand so that the classifier is correct at the end? Do the values in the CLASSIFIERS_SUPPORTED list match the data keys recovered in the poetry/spdx/data/licenses.json file? And for values in the CLASSIFIERS_NAMES list, should I enter the license name in PyPI classifiers with the previous key?
I can probably create a PR to complete the license list to get the correct PyPI classifier.

The naming of PyPI classifiers differs from the official ones that's what the CLASSIFIER_NAMES attribute is for.
So, yeah, we will need to update it, along with CLASSIFIERS_SUPPORTED, to support more classifiers.
Feel free to submit a PR and I'll gladly review it.


[FEATURE] Document '_name' field in 'function_score' query function definition and in explanation response

Is your feature request related to a problem?
As part of https://github.com/opensearch-project/OpenSearch/issues/1711, we have introduced _name support of 'function_score'  functions (complementing queries and filters in these regards). The  _name, if specified, is returned back as part of explanation whenever it dims possible (it applies to functions, filters and queries).
What solution would you like?
Document the usage of _name field and its impact on explanation descriptions. Couple of examples below:

request / response with script function score

"functions": [
    {
      "script_score": {
        "script": {
          "lang": "painless",
          "source": "return doc['user_name'].contains('cash') ? 1 : 0;"            }
      },
      "weight": 65,
      // NEW: Function name
      "_name": "func1"
    }, ...
]

{
    "value": 0.0,
      // NEW: Function name is returned back
    "description": "script score function(_name: func1), computed with script:\"Script{type=inline, lang='painless', idOrCode='return doc['user_name'].contains('cash') ? 1 : 0;', options={}, params={}}\"",
    "details": [
        {
            "value": 1.0,
            "description": "_score: ",
            "details": [
                {
                    "value": 1.0,
                    "description": "*:*",
                    "details": []
                }
            ]
        }
    ]
}

request / response with random function score

"functions": [
    {
        "random_score": {
           // NEW: Function name
           "_name": "func2"
        }
    }, ...
]

{
    "value": 0.38554674,
    // NEW: Function name is returned back
    "description": "random score function (seed: 738562412, field: null, _name: func2)",
    "details": []
} ...

request / response with filter score function

"functions": [
    {
        "filter": {
            "terms": {
               // Query names are supported
                "_name": "terms_filter",
                "abc": [
                  "1"
                ]
              }
            },
        "weight": 35
    }, ...
]

{
    "value": 1.0,
    // NEW: Query name is returned back
    "description": "match filter(_name: terms_filter): abc:{1}",
    "details": []
}

request / response with  function  score query

 "function_score": {
      "query": {
        "match_all": {
            // Query names are supported
            "_name": "q1"
        }
      },
      ...
}

{
    "value": 1.0,
    "description": "_score: ",
    "details": [
        {
            "value": 1.0,
            // NEW: Query name is returned back
            "description": "*:* (_name: q1)",
            "details": []
        }
    ]
}

What alternatives have you considered?
N/A
Do you have any additional context?
N/A

@reta: Looks like the function_score query isn't documented. Do you have a design document or would be to explain to me where the function_score fits into our current DSL documentation?

Hey @Naarcha-AWS , precisely, the function_score largely corresponds to the original feature in Elasticsearch [1], we certainly won't be copying it as-is but I am wondering what was/is our approach to replicating Elasticsearch documentation in the Opensearch for same features? Thank you!
[1] https://www.elastic.co/guide/en/elasticsearch/reference/7.10/query-dsl-function-score-query.html

@Naarcha-AWS @dblock @reta Are we going to document this feature // any help I can provide on this one? 🤔

@lrynek thanks, it would be great to know where exactly we should add that, afaik there is (was) no documentation for function_score at all

Reassigning to Fanit, as she is handling query DSL. We had another request to document function_score: https://github.com/opensearch-project/documentation-website/issues/3218

The function_score query is now documented here: https://opensearch.org/docs/latest/query-dsl/compound/function-score/. We have not specifically called out _name, though.
@kolchfa-aws - can you please take a look at this when you switch back to query DSL? Thanks!

@hdhalter If you want I can edit the function_score query page accordingly to what @reta proposed - only refer to me any guidance material on how to contribute to the documentation, thx! 🙂

That would be wonderful, @lrynek, thanks! We have contributing info in the https://github.com/opensearch-project/documentation-website/blob/main/CONTRIBUTING.md file. Let me know if you have any questions, I'll be happy to help.

Hi @lrynek , just checking in to see if you still want to update the content? Let us know if you need additional guidance. Thanks, in advance!

@hdhalter It taken me some considerable time to read through all the docs about contributing 😅 I've stuck a bit in the setup of the project locally but I will love to proceed on the next 2 days max with it // maybe I wanted to be too perfect for the first iteration, sorry 😉

Thanks, @lrynek! Let me know if I can help in any way.

I have to pass as stopped on bundler installation of the documentation app in Ruby... 🤷🏻 Sorry, at least tried here...

Thanks for trying again @lrynek , we will take a look at the instructions to see what the problem is. In the meantime, there is an easier way to contribute. You can open the page you want to edit (for example, https://opensearch.org/docs/latest/query-dsl/compound/function-score/) and click the 'Edit this page' link. It allows you to edit the markdown and push up a pull request pretty quickly. You just won't be able to test the page locally.

Ok, I thought for a larger contribution it would be advisable to not push a PR failing on many quality checks but if it's acceptable, I'll give it a try directly 👍 (but surely the docs drove me a bit that "perfect way", as I initially had taken the initiative with less effort in mind 😉)

Yeah, for structural changes it makes sense to test locally, but changes to a single topic can typically be made directly to the page and pushed up. We do a pretty thorough review before merging, so we'll catch anything that may be out of whack. Of course, perfect PRs are preferred :), but we gladly accept any contribution that corrects technical inaccuracies. Thanks again.

Hi @lrynek , just circling back to see if you wanted to attempt another pass at updating the content? We've made some updates and added a troubleshooting section to the contribution file, so maybe this time it will work? Thanks!

Hi @hdhalter, thanks for that. I will give it a try over the week, as recently it was very busier period than at the moment of the first attempt. In touch - if I won't manage I will let you know within the upcoming week. Thanks for reminding 🙏🏻

@hdhalter @kolchfa-aws I've prepared a draft PR - please correct whatever makes sense there // I'm still on the explanation side (I'll try to setup the week that follows an analogical index as to the blog documents that are described in the docs to fetch actual OpenSearch generated response explanation in the example there).


version 1.6.9 fails with null module file attribute

On my arch linux system, after the pants upgrade to version 1.6.9, a number of pieces of pants functionality that make use of pex started failing with the following error message:
                     Traceback (most recent call last):
                       File "/home/gregs/code/pants/.pants.d/test/pytest-prep/CPython-3.7.3/7c81bb6ec656c4064b548c392d519f0695716e81/.bootstrap/pex/pex.py", line 356, in execute
                         self.patch_sys(pex_inherit_path)
                       File "/home/gregs/code/pants/.pants.d/test/pytest-prep/CPython-3.7.3/7c81bb6ec656c4064b548c392d519f0695716e81/.bootstrap/pex/pex.py", line 285, in patch_sys
                         new_sys_path, new_sys_path_importer_cache, new_sys_modules = self.minimum_sys(inherit_path)
                       File "/home/gregs/code/pants/.pants.d/test/pytest-prep/CPython-3.7.3/7c81bb6ec656c4064b548c392d519f0695716e81/.bootstrap/pex/pex.py", line 259, in minimum_sys
                         sys_modules = cls.minimum_sys_modules(site_libs)
                       File "/home/gregs/code/pants/.pants.d/test/pytest-prep/CPython-3.7.3/7c81bb6ec656c4064b548c392d519f0695716e81/.bootstrap/pex/pex.py", line 179, in minimum_sys_modules
                         if cls._tainted_path(module_file, site_libs):
                       File "/home/gregs/code/pants/.pants.d/test/pytest-prep/CPython-3.7.3/7c81bb6ec656c4064b548c392d519f0695716e81/.bootstrap/pex/pex.py", line 157, in _tainted_path
                         paths = frozenset([path, os.path.realpath(path)])
                       File "/home/gregs/code/pants/build-support/pants_dev_deps.py37.venv/lib/python3.7/posixpath.py", line 394, in realpath
                         filename = os.fspath(filename)
                     TypeError: expected str, bytes or os.PathLike object, not NoneType

It looks like what's going on here is that https://github.com/pantsbuild/pex/blob/master/pex/pex.py#L178 is iterating over every module and extracting the __file__ attribute of that mdoule. However, some module on my system seems to have a None value for that attribute, which is causing code downstream of that line to fail. It looks like the commit https://github.com/pantsbuild/pex/pull/752/commits/b5f7e41780c8f05a07640dc09fdeed67e1b7a6a6 might be relevant.

For posterity, this was a specific issue with namespace packages in pytho 3.7+:
$ python3.6 -mvenv /tmp/twitter-3.6
$ python3.7 -mvenv /tmp/twitter-3.7
$ /tmp/twitter-3.6/bin/pip install -U pip twitter.common.collections twitter.common.dirutil
Collecting pip
  Using cached https://files.pythonhosted.org/packages/8d/07/f7d7ced2f97ca3098c16565efbe6b15fafcba53e8d9bdb431e09140514b0/pip-19.2.2-py2.py3-none-any.whl
Collecting twitter.common.collections
Collecting twitter.common.dirutil
Collecting twitter.common.lang==0.3.11 (from twitter.common.collections)
Installing collected packages: pip, twitter.common.lang, twitter.common.collections, twitter.common.dirutil
  Found existing installation: pip 18.1
    Uninstalling pip-18.1:
      Successfully uninstalled pip-18.1
Successfully installed pip-19.2.2 twitter.common.collections-0.3.11 twitter.common.dirutil-0.3.11 twitter.common.lang-0.3.11
$ /tmp/twitter-3.7/bin/pip install -U pip twitter.common.collections twitter.common.dirutil
Collecting pip
  Using cached https://files.pythonhosted.org/packages/8d/07/f7d7ced2f97ca3098c16565efbe6b15fafcba53e8d9bdb431e09140514b0/pip-19.2.2-py2.py3-none-any.whl
Collecting twitter.common.collections
Collecting twitter.common.dirutil
Collecting twitter.common.lang==0.3.11 (from twitter.common.collections)
Installing collected packages: pip, twitter.common.lang, twitter.common.collections, twitter.common.dirutil
  Found existing installation: pip 19.0.3
    Uninstalling pip-19.0.3:
      Successfully uninstalled pip-19.0.3
Successfully installed pip-19.2.2 twitter.common.collections-0.3.11 twitter.common.dirutil-0.3.11 twitter.common.lang-0.3.11
$ /tmp/twitter-3.6/bin/python
Python 3.6.9 (default, Jul  8 2019, 20:56:32)
[GCC 9.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import twitter
>>> print(twitter.__file__)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'twitter' has no attribute '__file__'
>>>
$ /tmp/twitter-3.7/bin/python
Python 3.7.4 (default, Jul 16 2019, 07:12:58)
[GCC 9.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import twitter
>>> print(twitter.__file__)
None
>>>

In particular, this was a cpython cleanup noted here: https://docs.python.org/3/whatsnew/3.7.html#other-cpython-implementation-changes


maps for unshaped data don't match - basemap vs cartopy

The plotting without interpolation result (last section) of these two notebooks does not match. basemap marks invalid data as white space but cartopy does not. cartopy marks it as a very small number. could this be a precision error?!
perhaps we need to use precision in both cases? Thoughts?

These match now.


configure the serper api key? help help help 🐤

Does anyone know how to configure the serper api key? I saw that it has the option to search the internet using Google, with the serper api key that allows you to use 2500 requests for free.
I saw that I got the error message that it was not configured,
I registered on the page to get an API
https://serper.dev
I generated an api, registering,
I tested the api in python and it worked fine.
look in the files where the serpapi_api_key was
and I found it in the file called gpt_langchain.py
if LangChainAgent.SEARCH.value in langchain_agents:
output_parser = H2OMRKLOutputParser()
###############################################original say ('SERPAPI_API_KEY'))
tools = load_tools(["serpapi"], llm=llm, serpapi_api_key=os.environ.get('jsdjsdjdsjdsjsdjapi keyy herejhashsaishas'))
    if inference_server.startswith('openai'):
        agent_type = AgentType.OPENAI_FUNCTIONS
        agent_executor_kwargs = {"handle_parsing_errors": True, 'output_parser': output_parser}
    else:
        agent_type = AgentType.ZERO_SHOT_REACT_DESCRIPTION
        agent_executor_kwargs = {'output_parser': output_parser}
    chain = initialize_agent(tools, llm, agent=agent_type,
                             agent_executor_kwargs=agent_executor_kwargs,
                             agent_kwargs=dict(output_parser=output_parser,
                                               format_instructions=output_parser.get_format_instructions()),
                             output_parser=output_parser,
                             max_iterations=10,
                             verbose=True)

                  I saved it and everything but nothing, it still gives an error with everything, it doesn't even launch the chat, because it tries to search first.

                  In the console I can see that it is still not seen

 File "pydantic\main.py", line 341, in pydantic.main.BaseModel.__init__

pydantic.error_wrappers.ValidationError: 1 validation error for H2OSerpAPIWrapper
root
Did not find serpapi_api_key, please add an environment variable SERPAPI_API_KEY which contains it, or pass  serpapi_api_key as a named parameter. (type=value_error)

I tried the example in python and it works, but I don't see it even close to the python source code, enough to understand the error, and I don't understand much about python to adapt it, (the api key not is my api key :p)
import http.client
import json
conn = http.client.HTTPSConnection("google.serper.dev")
payload = json.dumps({
"q": "here the search"
})
headers = {
'X-API-KEY': '4323234apiapiapi424',
'Content-Type': 'application/json'
}
conn.request("POST", "/search", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

I'm going to try the Windows version, although I was running it in PowerShell, the one on GitHub

omg not have the web search option! 😵💫 can add it, and the ask from the api key?¿?

My documentation is behind on the new experimental features.
But you just need to have an ENV that defines: SERPAPI_API_KEY and get the key from https://serpapi.com/ .  They have free number of searches as well.
The windows one-click installer is behind.  I'll update its release in next few days.

I encountered an issue while attempting to perform web searches using the SerpApi package. Despite setting the SERPAPI_API_KEY environment variable with the appropriate API key value as instructed, I'm still unable to execute web searches successfully.

Steps to Reproduce:
Set the SERPAPI_API_KEY environment variable with the correct API key value.
Attempt to perform a web search using the SerpApi package.
Observe the validation error message: "Did not find serpapi_api_key, please add an environment variable SERPAPI_API_KEY which contains it, or pass serpapi_api_key as a named parameter."

Expected Behavior:
After setting the SERPAPI_API_KEY environment variable, I expect to be able to perform web searches using the SerpApi package without encountering validation errors.
Actual Behavior:
Despite setting the SERPAPI_API_KEY environment variable, the validation error persists, preventing me from executing web searches.

Hi, I'm not sure what's wrong.  I have to believe that the envs you are setting are not being seen by h2oGPT.
It works fine for me to export the env:

I tried exporting the key from the environment and running search queries using the key in a different Python file, and it worked without any issues. But it's not working in H2oGPT.

Not sure what is wrong.  It can't be just h2oGPT since it works for me.  Also, one can't even choose the web search option if gradio_runner.py doesn't see the key.
I tried just all on single command line, both with and without the key, and I always get the expected behavior.
Are you running via docker or directly in python?

I'm directly running it in python. still no luck.


Add support custom routes

Checklist

[X] There are no similar issues or pull requests for this yet.

Is your feature related to a problem? Please describe.
In my application, I have started using FastAPI Custom Routes to log requests and responses and add transactional headers. However, I can't use the new route class for the SQLAdmin routes because I cannot set the route class.
Describe the solution you would like.
The ability to pass route_class as an argument to the Admin.__init__() method would be a nice way to fix this issue.
I have experimented with this and I have found that while it "works" for the most part, it causes an issue with the login_required decorator.
def login_required(func: Callable[..., Any]) -> Callable[..., Any]:
    """Decorator to check authentication of Admin routes.
    If no authentication backend is setup, this will do nothing.
    """

    @functools.wraps(func)
    async def wrapper_decorator(*args: Any, **kwargs: Any) -> Any:
        admin, request = args[0], args[1]
        auth_backend = admin.authentication_backend
        if auth_backend is not None:
            response = await auth_backend.authenticate(request)
            if response and isinstance(response, Response):
                return response

        return await func(*args, **kwargs)

    return wrapper_decorator

The decorator expects two args but when using subclasses of fastapi.APIRoute, the request argument is passed as a kwarg instead.
Describe alternatives you considered
I previously used custom middleware to achieve this. I am trying to move away from it because it caused a few issues with asynchronous execution of Background Tasks. For now, I have kept the middleware just on the SQLAdmin router. This allows me to still use background tasks elsewhere and keep logs of SQLAdmin calls. I do have to support two logging mechanisms, which isn't ideal.
Additional context
No response

So if I understand correctly the line causing the issue is admin, request = args[0], args[1] right?

So if I understand correctly the line causing the issue is admin, request = args[0], args[1] right?

Yes, the function is expecting the request to be passed as a regular arg, but when subclassing APIRoute it is instead passed as a kwarg.

I think adding a check to get it from args or kwargs, and see if it solves the integration with the rest of the code.
Feel free to create a PR and contribute to this.


Move the junit publisher step to the end of the post stage

Avoid the junit publisher failures affecting other functions.
Fix #4540
Signed-off-by: Sophia Guo<EMAIL_ADDRESS>

@sophia-guo - would you be willing to update your branch based on the review comments for a try/catch?


Add builder to use femu_test recipe

femu_test recipe runs flutter on fuchsia tests using fuchsia emulator.

Not used


Fixed broken links to coding challange 90.

I was so exited to submit my contribution, I forgot to check the links work. I just fixed them.

Maybe we should add a test to check for this! 😜


CLI Restore Command

There should be a CLI command to restore a set of data sources based on the archive file, retrieved from storage and decrypted/decompressed.
The restore command should perfectly reverse the backup operation.
The restore command should take an option, which is a datetime-formatted string, specifying that the restore operation should restore from the most recent backup which is also from before that time.
If there are multiple storages, the restore command should take an option specifying which storage to pull from.
For example, the restore command should pull the most recent archive from remote storage, decrypt it, decompress it, and restore each database from the archive.

Feel free to help write it.  This has been a long-talked about deficiency that no one has had time to remedy.

Related feature request: backup/backup-features#28


Add label/ID vectors for TCGA data

At the moment it's not possible to add gene symbols or sample IDs as a column.

matrices have the .rows() and .cols() method
tables/vector the .names() method
the return the column/row identifier

OK, so we already have them but the dataset dropdown does not offer the labels as an option. @bikramkawan, can you please add a label vector for TCGA data? In the TCGA dataset we can use the Identifiers for the label column. It should look similar to the artists use case where the dataset dropdown offers a 'artist' entry that adds a label column.

Ok I will have a look into this @mstreit

By using the data.names();
For artist:

But in TCGA I get errors like this.

Any hints here @sgratzl ?

fixed as part of https://github.com/phovea/phovea_data_hdf/pull/9

Thanks it worked. How do I create TableVector based on these ids?

@sgratzl mentioned the asVector() function yesterday.

The vectors are fine when IDs are added for TCGA. The rows are not same for all matrix and do not correspondence to the ids of TCGA. As in artist dataset, if the idtype is artist the row is 12. For TCGA, the idtype is TCGA_SAMPLE  and the length of vectors data are 582 and but the matrix is different. Some of the matrices have rows 153, and some are 538. If the rows of the matrix are not the same size as of vectors data for the same idtype how to establish the relation of matrix with other vector data.

yes, this is what issue #117 is about. the solution will be to make the vectors the same length by building the union of all IDs in all possible columns - but this is unrelated of this issue.

What you show in the video looks fine. You can make a PR for it. The missing ID issue must be  handled in a separate change.

PR is merged -> Closed


Rewrite of Openstack provider documentation.

Ended up rewriting much of the documentation while adding new functionality.
Please give it a read.

@zreigz @ohtake I wasn't able to test some things due to issues with our OpenStack install. If you could run through the guide on your local install and provide feedback it will be of great help.

Yes sure I will test it

@zreigz @cheld @ohtake I've ran through the documentation a few more times and smoothed things out.
If nothing seems amiss, this should be merged (especially to match the PR)

@ohtake Can you merge this one too?

@elsonrodriguez thanks a lot


SignInOptions=3 documented in this article is not available in the ADMX Office 2016

The Office 2016 admin template enables us to configure signinoptions to value 0,1,2,4. The value 3 (AD DS only) is not listed in the possible values. So we don't have the same values documented in this article and in the admin template.
We need to fix, either, the ADMX or this article.

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

ID: eca2f9f0-5e82-1e55-4a38-829b16b919e6
Version Independent ID: 40f0a2a1-3c10-cdd6-40ec-56b48a0f37d2
Content: Identity, authentication, and authorization in Office 2016
Content Source: DeployOffice/security/identity-authentication-and-authorization-in-office.md
Service: o365-proplus-itpro
GitHub Login: @DHB-MSFT
Microsoft Alias: danbrown

Fairly certain the registry key values are correct. So it would be the admin templates that would need to be updated to include the "AD DS only" option. I'm trying to track down someone who can verify and then update the admin templates.  Thanks for your comment/feedback.

I've confirmed that the registry key values in the article are correct. The admin templates did not get updated. Will try to make that happen. Thanks again for your comment/feedback.


Problem with initialization

Expected behavior
I tried adding the code below:
jQuery.fn.spectragram.accessData = {     accessToken: '[your-instagram-access-token]',     clientID: '[your-instagram-application-clientID]' };
Actual behavior
The console returns the following error.
Uncaught Error: Method [object Object] does not exist on jQuery.spectragram
Steps to reproduce this behavior
I am using jQuery version 1.13
Do you know what may be wrong?
Thanks in advance.

Hi @ArchimidisM
In order to use the plugin you need to register an application at Instagram Developers, get a client_id and recieve an access_token. Then you can replace it on the code you are using, like this:
jQuery.fn.spectragram.accessData = {
    accessToken: '123456.78909.87654321234567890',
    clientID: '12345f67890e098765432546789'
};

//This code is an example doesn't work

See ya!

Dear adrianengine,
I have already registered the app however it does not seem to work.

I have same error message, and yes i have both token and clientid...

Seems weird… guys please add a JSFiddle or Codepen, so i can reproduce the error.
also check this one, where is working:
https://jsfiddle.net/u5waey15/2/

Hello! @Zuiron and @ArchimidisM
Any news on this issue?
I've tested the plugin with jquery 2.2.2 and it works:
http://codepen.io/adrianengine/pen/ONwbmQ
Let me know how can I help you guys

Hi @nosugarsociety
You need to pass the query with your username and the method getUserFeed:
$('.feed').spectragram('getUserFeed',{
      max: 4,
      query: 'nosugarsociety',
      wrapEachWith: '<div class="photo">'
    });

Thank you so much. @adrianengine


Map Plot Error

Hello,
I'm having trouble while trying to plot a map. I'm using a switch function and I get an error that the calculated unit is "unitless", but I'm checking all terms separately and the units are correct. MY assumption is that there is a bug when plotting a map with a switch function. See image:

Thanks.

This certainly is not related to $Map. It occurs somewhere in the function. I can see that you have two switch cases "<" and "≡". It is not clear what happens when it is ">". My advice is always to have a "default" case - a final expression without check before it.

Thanks. That was the problem. Although my "y" is varying from 0...L, the function needs a general rule. When I fixed this, it worked fine.


Dockerfile implementation and config sample

Created Dockerfile that uses the Docker Ubuntu:20.04 image and installs the locast2tuner Debian packages
Updated README to flow better for build/install
Add Docker instructions to bottom of README
Include docker-compose file as a sample

Awesome! Would you mind squashing this commit into a single one?

I flubbed the rebase because I had merged your CI/CD stuff in before I submitted the PR.  Going to delete this branch and recreate with a single commit.  Amateur move, but I'd only ever done a rebase once before.


use a proxy to get status code for selenum drivers

I believe that we should use proxy to get status code  in selenium driver. Something like browsermob: https://github.com/AutomatedTester/browsermob-proxy-py

I like the idea, the only downside that I can think of from using browsermob is that it would require more dependencies on the system.
Is there a pure python proxy that could be used?

You could always enable performance logs and parse the log to get the status code
in the capabilities dict
capabilities['loggingPrefs'] = {'performance': 'ALL'}
chrome options
chrome_options.add_experimental_option('perfLoggingPrefs', {"enablePage": True})
`def parse_chromedriver_status_code():
"""
Parses status code from ChromeDriver performance logs.
"""
from json import loads
status_code = None
for log in browser.driver.get_log('performance'):
    try:
        method = loads(log['message'])['message']['method']

        if method == 'Network.responseReceived':
            status_code = int(loads(log['message'])['message']['params']['response']['status'])
            break

    except KeyError:
        pass

return status_code`


Revert "[AIRFLOW-179] DbApiHook string serialization fails when strin…

Dear Airflow Maintainers,
Please accept this PR that addresses the following issues:

https://issues.apache.org/jira/browse/AIRFLOW-186

This reverts commit 87b4b8fa19cb660317198d74f6d51fdde0a7e067.
Reverting as the method used in the dbapi hook is actually package
specific to MySQLdb and would break the sqlite and mssql hooks.
More work still needs to be done to refactor this correctly, but this should prevent breakage.
CC: @johnbodley @criccomini

LGMT


=BG= more robust way of handling optional parameters, including graceful...

=BG= more robust way of handling optional parameters, including gracefully degradation for backward compatibility, for the directions API

Please see #70


Ephys tests are failing in github actions

Describe the bug
The ephy tests are working locally, but are failing when being run in github actions. There's a deprecration warning though with local tests.
======================================================================
ERROR: test_scale_recording (tests.test_compressors.TestEphysCompressors)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/aind-data-transfer/aind-data-transfer/tests/test_compressors.py", line 71, in test_scale_recording
    read_block = next(read_blocks)
  File "/home/runner/work/aind-data-transfer/aind-data-transfer/src/aind_data_transfer/readers.py", line 68, in get_read_blocks
    rec = se.read_openephys(
  File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/spikeinterface/extractors/neoextractors/openephys.py", line 223, in read_openephys
    recording = OpenEphysBinaryRecordingExtractor(folder_path, **kwargs)
  File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/spikeinterface/extractors/neoextractors/openephys.py", line 136, in __init__
    probe = pi.read_openephys(settings_file=settings_file,
  File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/probeinterface/io.py", line 1036, in read_openephys
    oe_version = parse(str(info_chain.find("VERSION")))
  File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/packaging/version.py", line 52, in parse
    return Version(version)
  File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/packaging/version.py", line 197, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '<Element 'VERSION' at 0x7fd1023f0900>'

======================================================================
ERROR: test_read (tests.test_readers.TestEphysReaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/aind-data-transfer/aind-data-transfer/tests/test_readers.py", line 50, in test_read
    read_blocks_info = [str(r) for r in read_blocks]
  File "/home/runner/work/aind-data-transfer/aind-data-transfer/tests/test_readers.py", line 50, in <listcomp>
    read_blocks_info = [str(r) for r in read_blocks]
  File "/home/runner/work/aind-data-transfer/aind-data-transfer/src/aind_data_transfer/readers.py", line 68, in get_read_blocks
    rec = se.read_openephys(
  File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/spikeinterface/extractors/neoextractors/openephys.py", line 223, in read_openephys
    recording = OpenEphysBinaryRecordingExtractor(folder_path, **kwargs)
  File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/spikeinterface/extractors/neoextractors/openephys.py", line 136, in __init__
    probe = pi.read_openephys(settings_file=settings_file,
  File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/probeinterface/io.py", line 1036, in read_openephys
    oe_version = parse(str(info_chain.find("VERSION")))
  File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/packaging/version.py", line 52, in parse
    return Version(version)
  File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/packaging/version.py", line 197, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '<Element 'VERSION' at 0x7fd1009a4360>'

----------------------------------------------------------------------
Ran 48 tests in 35.015s

FAILED (errors=2)
Error: Process completed with exit code 1.

@jtyoung84 I'll make a PR on Monday! Should be an easy fix.


refactor(jest-config): use requireOrImportModule util function for ESM/CJS import

Summary

Reuse the work from #11199
Test plan

Green CI

Codecov Report

Merging #11206 (24ed2a9) into master (990d9b9) will increase coverage by 0.04%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master   #11206      +/-   ##
==========================================
+ Coverage   64.26%   64.30%   +0.04%
==========================================
  Files         309      309
  Lines       13495    13485      -10
  Branches     3289     3286       -3
==========================================
  Hits         8672     8672
+ Misses       4114     4104      -10
  Partials      709      709

Impacted Files
Coverage Δ

packages/jest-config/src/normalize.ts
77.95% <50.00%> (+1.99%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 990d9b9...24ed2a9. Read the comment docs.


Add required step param to OpenthermNumber to prevent error on HA restart

Fixes #14. According to this, it looks like ESPHome number components are required to define a step field. I'm not familiar with ESPHome custom components development, so I'm not sure if it was needed to add step in so many places.

Tested this and it fixes an important bug for me, now I no longer need to remove and add back the integration when HA or the ESP device restarts for whatever reasons.
The issue is fixed, thanks!


Add support for Angular Package Format fields by default

Reference: https://angular.io/guide/angular-package-format#legacy-resolution-keys
Related fields: fesm2020 / fesm2015 / esm2020 / es2020
I'm glad to raise a PR for it.

Im open to supporting 3rd party properties (eg. unpkg, ember, etc) via preset flag:
clean-pkg-json --preset angular -p unpkg

What do you think?

In https://github.com/ai/size-limit, it will read all presets automatically. So I think a plugin system would be much easier to use and keep the core slim.

Not sure if I understand. What's the relevance of ai/size-limit?

Not sure if I understand. What's the relevance of ai/size-limit?

Sorry for the confusion.
I mean, it can read package wheter clean-pkg-json-preset-angular exist, then preset angular could be used automatically.

Not sure if it makes sense to publish & install a package just for 4 strings: ["fesm2020", "fesm2015", "esm2020", "es2020"]
In the case of unpkg, it would be a single string: ["unpkg"]

So if it's in built-in presets, I have no idea why they should be presets rather than defaults?

Good point. I'm open to adding it without presets.
I can't think of real examples but I was thinking if multiple tools use the same package.json property, where one uses it in development and the other in application, the first usage might want that property removed but the second wont.
Aside from that, a benefit would be semantics. It's much easier to understand what's happening:
clean-pkg-json --preset angular

Aside from that, a benefit would be semantics. It's much easier to understand what's happening:
clean-pkg-json --preset angular

I still don't understand what's the benefits. If the presets presented, it means the user want it. For example, why would a user add es2020 but don't want it on production?

My point with the sentence you quoted is that it helps with writing more readable code. For a beginner joining a codebase, reading --preset angular improves understanding.
My earlier point is that we shouldn't assume. We can also ask "why would the user want the es2020 property preserved for production?" and the answer is we don't know. A lot of people copy-paste code without understand it. There could be many bad reasons for it.
Anyway, like I said, I'm open to adding it without presets.

:tada: This issue has been resolved in version 1.2.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


merge package template from Kronos-Tools/npm-package-template

Updated standard to latest version

Codecov Report

Merging #80 into master will not change coverage.
The diff coverage is n/a.

@@         Coverage Diff          @@
##           master   #80   +/-   ##
====================================
  Coverage      80%   80%
====================================
  Files           1     1
  Lines          10    10
====================================
  Hits            8     8
  Misses          2     2

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa0eb2c...8100482. Read the comment docs.


Cryptic "Pending kernel update" message on Linode-based images

We use this packer template to build an image for all instances we provision on Linode.
But, once the instance is created (provisioned from the machine image created by the config above), an annoying interactive prompt seems to break further 'apt install' of any package.
I am getting an unrelated "Pending kernel update" message like so:

You can obviously accept the prompt and the packages install just fine.
This breaks much of the ad-hoc scripting, like installing a tool from apt and starting up services. I need to research and fix this.
Additional Details :

Restarting the machine like the prompt suggests doesn't solve the issue.
Can't uninstall the needsrestart package, which shows the prompt, because we depend on it elsewhere.

this may help
sed -i "s/#\$nrconf{kernelhints} = -1;/\$nrconf{kernelhints} = -1;/g" /etc/needrestart/needrestart.conf

https://askubuntu.com/a/1424249

Thanks, but I am not looking to suppress the symptom here :)

fwiw
my 2 cents :)

Pending kernel update

looks normal to me after upgrade: dist, which can upgrade the kernel because dist-upgrade intelligently handles changing dependencies with new versions of packages
hence
https://github.com/freeCodeCamp/infra/commit/7324c9c60230b73b38e44790a424b470743e9d79

upgrade: yes

lgtm as a workaround

Hi there!
When provisioning instances with the Linode API, official distribution images will typically default to using the image's kernel (through GRUB 2) while custom images (snapshot/upload) will default to using the latest Linode kernel.
Generally, I think the best approach to this issue is to provision Linodes with the boot config explicitly set to use GRUB 2:
When deploying a machine image created with Packer to a Linode instance, you can create a new config profile with the kernel attribute set to linode/grub2. If you're using IaC tooling, you can automate this process fairly easily (for example, see the Linode Terraform provider documentation).
Alternatively you can create the instance with booted set to false, update the implicitly created config, and boot the instance.

@lgarber-akamai
just curious:
it seems:

best approach

would shift accountability for maintaining the image from Linode to users
Don't most users prefer Linode official distro images because they already passed Linode's Security, QA, etc. testing?

Thanks, @lgarber-akamai - It finally makes sense to me now. Yes – We have been using IaC, and here is a sample config:
https://github.com/freeCodeCamp/infra/blob/f647ab0442c14731095b67aa57914e21072d8483/terraform/ops-test/main.tf#L54
The idea is to bake a golden image, spin the instance and add any workload-specific tooling with Ansible or ad-hoc commands. That's where I saw the difference in the "kernel" between other clouds and Linode.
We bake our image from a base image off of Linode's linode/ubuntu22.04 image for example, but I am guessing that makes it "custom", which defaults to the linode's version kernel.
I'll add the https://registry.terraform.io/providers/linode/linode/latest/docs/resources/instance_config#kernel prop to linode/grub2 and test it out.
I've been struggling with this for a while - thanks for pointing me in the right direction.
P.S.: For my future self, the list of kernels is available via the CLI with linode kernels ls - but we probably never need to change it.


Using yalc without modifying package.json?

Can one use yalc without modifying package.json?
We're working on a codebase where most users should not need local checkouts of the dependencies, so in package.json we specify git repos for these dependencies.  When we do need to locally iterate on the dependencies, we use yarn link, but we're interested in adopting yalc to address the issues with yarn link.  But since most users should continue to pull dependencies from the git repos rather than a yalc store, we don't want to actually modify package.json.

Sorry, RTFM: "Use yalc link, that won't touch packages.json"


Script folder name change causing issue with updating game script

So I was attempting to update my game script as I usually do, but I noticed with the latest update on here, the script folder is now differently named/organized than it was before. As a result, when I usually just drag the "1_0_2current_en_script" into the deepLuna update folder and press open translation, the game script would not update and instead opens the main translation box. I checked the log within VScode (I use that to run the script because cmd and powershell don't like to cooperate with me) and it tells me the same thing being "Bad number of pages in "game script file"". So I'm not entirely sure on what I should do to be able to update everything like I would before.
I'll also post SC's to help explain my point further in case my wording was confusing

Rename update folder to import if you are using newest files and download newest deepluna. Recently there were changes in deepluna and exported files have new format.

Hey there, yes, this is an expected issue. We recently updated the script format used by deepLuna to be a bit more expressive in order make it easier for our translators / TL checkers to do their work. In order to load the new-format scripts, you will also need to make sure you update to the latest version of deepLuna (currently v4.6).
As part of updating to the new deepLuna, you will need to re-extract the database. You can do this by makign sure that allscr.mrg and script_text.mrg (the raw 1.0.2 versions of the files) are in the directory, then launching the updated version of deepLuna and hitting 'Extract Text'. Once you've done that, copy the new-style script files into import/ (not update/, since that's where it will search for 'old' format files), and then either close and reopen deepLuna or hit the new "Re-import updates" button on the translation window.

so where can I go to get the latest deeeLuna, cause on their github it just goes up to 3.11?

Do not use versioned releases at the right, always download latest code.

As Atalanta says, the best way to be up to date is download the current master version of the repo.
I have also just published the current tag as a release as well though.
https://github.com/Hakanaou/deepLuna/releases/tag/v4.6

yeah, so I downloaded the latest deepLuna Repo, but now when I run open translation I get this

Yes, as I mentioned above, you need to re-extract the DB

As part of updating to the new deepLuna, you will need to re-extract the database. You can do this by making sure that allscr.mrg and script_text.mrg (the raw 1.0.2 versions of the files) are in the directory, then launching the updated version of deepLuna and hitting 'Extract Text'.

Yes, as I mentioned above, you need to re-extract the DB

As part of updating to the new deepLuna, you will need to re-extract the database. You can do this by making sure that allscr.mrg and script_text.mrg (the raw 1.0.2 versions of the files) are in the directory, then launching the updated version of deepLuna and hitting 'Extract Text'.

yeah you were right it worked, but just to make sure I don't f it up, what should I press to make sure I get an updated script file, cause it seems it has accepted the latest script but it still says "translated text 0%"

Oh, yeah I think there's a bug where that global translation % doesn't update when you import. If you click around into the scenes they should still be translated, and if you close/open it should update

Oh, yeah I think there's a bug where that global translation % doesn't update when you import. If you click around into the scenes they should still be translated, and if you close/open it should update

yep it all seems to be working now, thanks for the help


Allow to override repository organization

Given the repository is build and about-to-be tested under openshift organization
we need to change the kubernetes-incubator into openshift. Yet, keeping both repos still in sync.

Can one of the admins verify this patch?

@ingvagabund lgtm, once tests pass, we can merge it.

@aveshagarwal thanks


Provide better error-messages

fixes #92

Codecov Report

Merging #112 into master will increase coverage by 0.1%.
The diff coverage is 77.77%.

@@             Coverage Diff             @@
##             master     #112     +/-   ##
===========================================
+ Coverage     72.44%   72.55%   +0.1%
- Complexity      242      245      +3
===========================================
  Files            48       48
  Lines           842      849      +7
  Branches         39       40      +1
===========================================
+ Hits            610      616      +6
  Misses          209      209
- Partials         23       24      +1

Impacted Files
Coverage Δ
Complexity Δ

...ndo/stups/tokens/AbstractAccessTokenRefresher.java
85.71% <77.77%> (ø)
15 <3> (+3)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 17cd73a...bac951a. Read the comment docs.

👍

:+1:


✨ Snippets

Describe the solution you'd like
Do we want to add something like the Snippets action from Xcode where users can save snippets of their code and use it later or in the future.
Additional context

Absolutely! Here are a few considerations...

We need to figure out how we will create and store user defined snippets.
Extensions will also be able to add snippets.
Users should also be able to type a string of characters in the editor and auto suggest should suggest the associated snippet.
When pressing tab it is inserted with the first wildcard highlighted if applicable.
Snippets should also be aware of the file it is in so it can be auto-populated.

We can use a local database maybe or something similar.
When highlighting the code we can right click to add to snippets

I might suggest storing them in a JSON file like VS Code, https://code.visualstudio.com/docs/editor/userdefinedsnippets. The same code can then also be used by snippet extensions written by developers and shared on the "marketplace".
It's important that these files can be easily backed up automatically by CodeEdit or that they are in a straightforward location so that they can easily be added to other computers and shared.

@jasonplatts that is a good resource! We might be able to find code that will help us to parse the json and process the variables specified in that documentation link.

Lots of good stuff there to help with the extensions API too @austincondiff. If we can keep the process of extension development similar, we should be able to port a lot over and encourage devs to contribute.

@jasonplatts We should at some point react out to extension developers of other platforms and see if they can A) help us with the extension API, and B) help us write extensions.

I'm currently working on the design of it.

For sure! I've reached out to some already and I have a few others in mind too. If anyone is able to themselves contribute or knows of anyone else who might be interested, please spread the word! This issue, https://github.com/CodeEditApp/CodeEdit/issues/76, provides a general overview.

We can have a basis of it already by select code in the editor and then saving it. Will most like push it once we have a custom editor

I'm currently working on the design of it.

Thanks for your contributions and hard work! I am also trying to get into the details of the API. It's work in progress, but please feel free to add to the list that is started here, https://github.com/CodeEditApp/CodeEdit/issues/76.

@jasonplatts Why don't we save the basic information of the snippets in the json like name, description, method, platform and completion then the code we add it to it's respective file so if the code is java it would be snippet_name.java and then add the path of the file in the json?

I was thinking more along the lines of using the same setup as VS Code, where we store all of the snippet code in JSON format. We could have a global JSON file that stores snippets that should appear for all languages and then separate language-specific JSON files, such as javascript.json, php.json, etc. This way there would be no need to link to other files from a JSON. CodeEdit would only need to read all JSON files from a directory and load those that are necessary.
There would be a couple of benefits. First, we only have to worry about reading in JSON files rather than different language specific files. Second, we could then offer consistent snippet syntax, VS Code Snippet Syntax, regardless of the language. This includes tabstops, placeholders, for example. Third, this makes it easier for developers to import their existing VS Code snippets. It would even be possible to offer an import VS Code Snippets option.
Thoughts?

We could do that yes, but we also have to be aware of the size of json because it could end up causing performance issues for users that save a lot of snippets.

I agree. That is definitely a valid concern.

Closed in favor of #1623


Followup on closed issue #499: unable to change the log size with in the pod

The closed issue https://github.com/ibm-messaging/mq-container/issues/499 introduced the new environment variable MQ_QMGR_LOG_FILE_PAGES.
However it looks like that this was only done on the master branch.
Currently we use the 9.3.0 branch to build MQ custom image for the MQ LTS release (9.3.0.x).
Thus it would be great if you could merge the code also to this branch.
Thanks

@JEFFLUFC , @Alec-Painter : as I have seen that you have done recent changes on the 9.3.0 branch:
Can you please take over my issue?
Changes would be easy as only the changes from #499 needs to be merged to the 9.3.0 branch.
And as pointed out above: I think this would help many IBMers and customers as 9.3.0 is still the official LTS branch.

Hi @christoph-weiss-ibm, thanks for the message. We are aware that this request has been made to replicate these changes on the LTS branch and that it would benefit a number of IBMers and customers. Thank you

@JEFFLUFC  thanks for the feedback. Do you have any idea / intern plan when this will happen?
I could also provide a pull request with the changes if that helps


Fix TemplateSyntaxError pickling

Implement __reduce__ to fix pickling of TemplateSyntaxError
New test output without the fix (Python 3.8):
________________________________________ TestDebug.test_pickleable_syntax_error _________________________________________

self = <test_debug.TestDebug object at 0x109740490>, fs_env = <jinja2.environment.Environment object at 0x1097400a0>

    def test_pickleable_syntax_error(self, fs_env):
        exc = TemplateSyntaxError('wtf', 42)
        pickled_exc = pickle.dumps(exc)
>       unpickled_exc = pickle.loads(pickled_exc)
E       TypeError: __init__() missing 1 required positional argument: 'lineno'

test_debug.py:78: TypeError

Interesting.Seems like it would be better to address why lineno isn't getting pickled/unpickled.

Some findings:

https://bugs.python.org/issue32696
https://bugs.python.org/issue1692335#msg310951

@davidism Changed the fix to only override __reduce__. No other changes to the exception.


'MetroLog.ILogger', which is not a valid Windows Runtime type

Try to use in background task WP 8.1
Method 'LiveTileAgent.LiveTileBackgroundTask.Log.get()' returns 'MetroLog.ILogger', which is not a valid Windows Runtime type.  Methods exposed to Windows Runtime must return only Windows Runtime types.

Looks like you try to expose ILogger as a public property of the BackgroundTask, why don't keep it internal? That's what I'm doing.

Closing for now, please re-open if this is still an issue.


tKey MPC iOS Sample

Don't merge or close this, will be using this to share the CustomAuth implementation with tKey-MPC-iOS


Gem fails when trying to run on aarch64-linux-musl platform

I'm trying to run rails 7 on ruby-alphine docker image and face an issue when i try executing any rails commands
Error:
sass-embedded-1.77.0-aarch64-linux-musl/ext/sass/embedded_sass_pb.rb:11: [BUG] Segmentation fault at 0x0000000000003b60
Is this gem not supported for alphine?

The crash is from google-protobuf gem, which is a dependency of this gem. It looks like the google-protobuf is having issue on musl.
What's the protobuf version you have? Can you provide output of gem info google-protobuf?

This is a bug in google-protobuf, see https://github.com/protocolbuffers/protobuf/issues/16853 for details, as well as workaround.

For bundle, the issue can be workaround by setting force_ruby_platform=true as following:
apk add build-base
bundle config --local force_ruby_platform true
bundle install

Thanks! I have the workaround, just wondering if theres a way if I can get gems natively compiled based on the platform type. Will proceed with the workaround, thanks!

if theres a way if I can get gems natively compiled based on the platform type

The bug has been reported protobuf team, now we have to wait for them to fix it in future releases.

Meanwhile, you can add this to Gemfile and force build from source only for aarch64-linux-musl:
gem 'google-protobuf', force_ruby_platform: true if Gem::Platform.local.to_s == 'aarch64-linux-musl'


Inline images in HTML body not displaying

Firstly, thanks for the excellent library :)
Please can you explain how to get the base64-encoded inline images within the src attribute of img tags when using getHTMLBody()?
I see they are returned through getAttachments(), so do I need to write some code to inject them into the HTML body?

It is the standard behavior, that inline images are transferred in the MIME message nearly the same, as attached images. The only difference is the Content-Disposition header value. Inline images also have a Content-Id header, which is then used as reference in the HTML body.
For example:

Content-Id: xyz
<img src="cid:xyz">

You have two choices:

replace src value to a script url (attachment.php?muid=1&aidx=2) containing message id / uid and attachment index / Content-Id value, therefore you can fetch that attachment in the php script with proper headers (obviously this will result inline images count + 1 request for your server)
fetch attachment body for inline images as well with the HTML body, and replace img src value to data url https://tools.ietf.org/html/rfc2397 (this solution will result single HTTP request, but sum response size will be greater with nearly 33% of binary data and you won't have file names for images)

As standard problem with IMAP is, that uses index depend on current situation on server and this index number is not unique. So first sollution to use message index and attachment index can be problematic, because it can be changed between load message body and loading attachments. This is very small chance, but still exists.


New Version (0.39) of websocket client is not compatible with library

Error:
An incompatible websocket library is conflicting with the one we need.
You can remove the incompatible library and install the correct one
by running the following commands:

yes | pip uninstall websocket websocket-client
pip install -U websocket-client

Regressing back to the 0.37 version works fine
The message comes from https://github.com/feus4177/socketIO-client-2/blob/master/socketIO_client/transports.py#L17
However running this line with the import from CLI works just fine. Unfortunately didn't have time to debug further :(

Looks like you need to pull in https://github.com/invisibleroads/socketIO-client/pull/139

I looked at websocket-client 0.39 and 0.40 and they both have the create_connection attr so I don't see why you would be getting that error.

I made a fix for the SSLError import issue though: eb2de1cca15c7c71282cfe0729c15225ff797184

Seems good 👍


Two Sum - Leetcode

Question Link :
https://leetcode.com/problems/two-sum/

@piyushsharma220699  Please assign me this issue in C++

@rachana-singh27 Assigned in C++

can i do this sum in java

@ritwik3856 Assigned in Java :)

@piyushsharma220699 all right then assign me in python.

@swapnil604 Assigned in Python

Please assign me this issue in C++

@hd2342-dubey Sorry, it was already assigned to @rachana-singh27 :)

Please do assign this to me. I would like to work on it in C++.

@purohitmansi Sorry, @rachana-singh27 has already worked on it in C++ :) Please try some other problem


BoolQ model

Wondering if you will share the RoBERTa models for BoolQ (or you have already shared it.)

There's no plan to release models for BoolQ.
The input format we used for BoolQ was same as other tasks ie. <s> passage </s> </s> question </s> and we feed first <s> representation to the classifier. While truncation for seq_len>512, we always truncate passage.
You can follow example for custom classification task here and it should be the same.
Feel free to let me know if you have more questions on this.


Add basic regression test for 0.9.0

Description
This PR adds a basic regression test for loading and attaching a native sock_addr eBPF program with version 0.9.0.
Testing
This PR adds test.
Documentation
NA

Why does this PR include binaries? Checking in binaries causes code scanning alerts like this one: Binary-Artifacts

Binaries are added in the PR to run the test against 0.9 release artifacts.

@saxena-anurag Added released binary artifacts to the Release: https://github.com/microsoft/ebpf-for-windows/releases/download/v0.9.0/Build-x64-native-only-Release.0.9.0.zip

Why does this PR include binaries? Checking in binaries causes code scanning alerts like this one: Binary-Artifacts

Binaries are added in the PR to run the test against 0.9 release artifacts.

You don't need to check in binaries to do that.  E.g., you can download them as part of the CICD step.

Why does this PR include binaries? Checking in binaries causes code scanning alerts like this one: Binary-Artifacts

Binaries are added in the PR to run the test against 0.9 release artifacts.

You don't need to check in binaries to do that. E.g., you can download them as part of the CICD step.

Yes I am planning to do that only. Will push the update soon.


Allow user to download course information pdf

Allow user to request for the course information, the bot should download from the following URL and send it to the group.
The Course code can obtain from the group name itself (which also mean the group name have to be strictly in certain format)
Example Link to download
https://sims1.suss.edu.sg/ESERVICE/Public/ViewCourse/ViewCourse.aspx?crsecd=ICT246&viewtype=pdf&isft=0
https://sims1.suss.edu.sg/ESERVICE/Public/ViewCourse/ViewCourse.aspx?crsecd=ICT335&viewtype=pdf&isft=0

I will split this issue into 2 smaller issues and then assign them to you.

https://github.com/suss-swe-ig/suss-telegram-groups/issues/14
https://github.com/suss-swe-ig/suss-telegram-groups/issues/15

This issue is too big, so it is split into 2 issues:

https://github.com/suss-swe-ig/suss-telegram-groups/issues/14

https://github.com/suss-swe-ig/suss-telegram-groups/issues/15


[BUG] Dr

Acknowledgement of preliminary instructions

[X] I have read the preliminary instructions, and I am certain that my problem has not already been addressed.
[X] I have thoroughly looked through the available Wiki articles and could not find a solution to my problem.
[X] I am using the latest version of Bloxstrap.
[ ] I did not answer truthfully to all the above checkboxes.

Bloxstrap Version
v.2.8.1
what problem did you encounter
the lightning doesnt work when using d3D10 (give me a solution because no one knows what my problem is i asked all roblox creator with bloxstrap, they didnt even know what is direct3D😭😭😭)

Bloxstrap Log
No response

direct3d 10 doesn't support future lighting, also not a bloxstrap issue

direct3d 10 doesn't support future lighting, also not a bloxstrap issue

but when i use d3D11 and a filter it look like this

and a filter
bro

direct3d 10 doesn't support future lighting, also not a bloxstrap issue

but when i use d3D11 and a filter it look like this

that looks like mine. idk why they can put filter on

and the SSAO filter too right?


Add CI

This PR adds continuous integration to the package. This should make it easier to maintain the package. I imagine you will want to set everything up just so, so I would recommend going through the commits and making it what you want.
Description:

Adds a requirements-dev.txt. These have the same dependencies as requirements.txt, but adds some extra ones for developers such as matplotlib and pytest. These are needed for testing, but not importing.

Description of CIs
Since this is an open source project, you don't have to pay for GitHub action minutes. I chose GitHub Actions over, say, CircleCI because it is so easy to integrate. Each workflow is described below. For all the CIs:

Runs on ubuntu-latest, windows-latest, macOS-latest
Runs only Python 3.8 right now. It's obvious how to modify this behaviour in ci.yml so you can add 3.9, 3.10, etc.

.github/workflows/ci.yml

Runs pytest -v

Thanks @Besler
In the past, I've used TravisCI. I haven't used GitHub Actions too much but it looks good!
I added a simple linter as well.


Laravel 8 ,  Saas App, Custom App Provider returns "Target class does not exist"

Hello,
I need to setup a custom app provider to use Websockets into SAAS environment.
I'm running Laraval 8.  I've updated file config/websocket.php to reflect usage of the new provider.

But when I run websockets server  it always returns me  Target class [App\Providers\WebsocketConfigAppProvider] does not exist.

Any clue what occurs here?
Thank you for the help.
Regards

Sorry for noise... it works now


.jsonl file format for training

Hi,
Thanks for this great project!!
I have been trying to create .jsonl files for training and validation and run into some issues here. I have checked with a json validator that the lines as such are in a valid json format, and they are. My file looks like this:
{"file_name": "./abc.png", "ground_truth": "{\"gt_parse\": [{\"order_date\": \"11th May, 2010\", {\"Transfers\":[{\"product\":\"one\",\"transfer_date\":null}]}}]}"}
which looks like this if reformatted for making it easier readable here:
{
	"file_name": "./abc.png",
	"ground_truth": "{\"gt_parse\": [{\"order_date\": \"11th May, 2010\", {\"Transfers\":[{\"product\":\"one\",\"transfer_date\":null}]}}]}"
}

Do I understand correctly that ground_truth contains a simple string which hence requires to escape all following "s within the string?
Running this results in a json related error:
Traceback (most recent call last):
  File "train.py", line 149, in <module>
    train(config)
  File "train.py", line 78, in train
    DonutDataset(
  File "util.py", line 69, in __init__
    ground_truth = json.loads(sample["ground_truth"])
  File<EMAIL_ADDRESS>line 346, in loads
    return _default_decoder.decode(s)
  File<EMAIL_ADDRESS>line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File<EMAIL_ADDRESS>line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 47 (char 46)

Character 46 refers to to the first " of "ground_truth".
I might be missing something obvious here, so any hints would be very helpful.
Thanks!
Best,
Martin

(Solved by generating the .jsonl file with the help of json.dumps())


please add support for sqlite archives

Hey there, I'm requesting the addition of the sqlar_compress() and sqlar_uncompress() interfaces. They are already part of the SQLite standard and looks to be just one include file.
sqlar overview: https://www.sqlite.org/sqlar.html
inclusion code: https://sqlite.org/src/file/ext/misc/sqlar.c
Thanks in advance!

Hey there, I'm requesting the addition of the sqlar_compress() and sqlar_uncompress() interfaces. They are already part of the SQLite standard and looks to be just one include file.

Actually, support for SQLite Archive Files is part of the SQLite shell. Activating this feature is possible by defining the symbol SQLITE_HAVE_ZLIB when compiling the shell (shell.c). However, obviously this adds an external dependency on the ZLIB library.
Admittedly, the shell binaries of the official SQLite distribution have this feature enabled, while the binaries coming with SQLite3 Multiple Ciphers releases currently haven't. I will consider to build binaries with SQLite Archive support.
However, I'm a bit reluctant to add the sqlar extension to the core library, as this extension only adds the sqlar_compress() and sqlar_uncompress() SQL functions without any support for the sqlar management table. And as said above it would add the dependency on the ZLIB library.

Thanks for the quick reply!
I'd like to clarify that my request title was poorly phrased, and I have no need of the shell interface whatsoever - I'm not using the shell for any part of my dev process. I am only interested in the sqlar functions.
With that in mind...

Actually, support for SQLite Archive Files is part of the SQLite shell.
The shell understands the specifically formatted sqlar table but the functions are added to the DLL itself. Accordingly, the sqlar_x() interfaces should be available to use for any transaction which desires it, on any table with any data.

I believe that any "mandatory/expected" (for lack of a better term) sqlar support ends at ensuring the functions work as intended, and does not extend to any advanced parsing of the sqlar table.
However, I do understand your reticence on adding what could be percieved as adding a half-baked feature and appreciate your consideration all the same. :)
For what it's worth, my use case is very near to the one described on the sqlar overview page: I'm making an api cache system and it'd be a huge boon to store the response text compressed inside the database, as opposed to the current uncompressed method.

I'd like to clarify that my request title was poorly phrased, and I have no need of the shell interface whatsoever - I'm not using the shell for any part of my dev process. I am only interested in the sqlar functions.

Ok, I understand.
In principle, the sqlar extension could be built as a loadable extension, and the application could then load it at runtime. However, personally I usually try to avoid runtime-loadable extensions, because they impose a security risk. So, it is certainly preferrable to have the option to link extensions into the core library, as is done for quite a few other extensions already.
The question is how the dependency on ZLIB should be handled. Personally, I would prefer a solution that doesn't depend on any external library. One way to accomplish that would be to add the single-file ZLIB replacement miniz to the project.

With that in mind...

Actually, support for SQLite Archive Files is part of the SQLite shell.

The shell understands the specifically formatted sqlar table but the functions are added to the DLL itself. Accordingly, the sqlar_x() interfaces should be available to use for any transaction which desires it, on any table with any data.

That's right. The sqlar_x SQL functions just compress or decompress data, but don't depend on any specific database table.

However, I do understand your reticence on adding what could be percieved as adding a half-baked feature and appreciate your consideration all the same. :)

Well, since the extension is included in the official SQLite shell the feature can't be called half-baked, I'd say. In principle, I have no problem to include the sqlar extension, at least as an optional extension not enabled by default.

For what it's worth, my use case is very near to the one described on the sqlar overview page: I'm making an api cache system and it'd be a huge boon to store the response text compressed inside the database, as opposed to the current uncompressed method.

Being able to compress/decompress data within the database is certainly a useful feature. I will make some tests with miniz in the near future. If that works without major problems, the feature could be added in one of the next releases.

In the meantime I made a few tests. The ZLIB replacement miniz works without any problems for the extensions compress, sqlar, and zipfile.
I will update the project, so that the components compress, sqlar, and zipfile can be enabled by specifying a precompiler symbol. Additionally, it will be possible to decide whether the original ZLIB library or miniz should be used. The source code for the latter will be added to the repository.

Cool! Thank you very much for entertaining this request. ^_^

I expect to commit the necessary changes within the next couple of days. Stay tuned.

Commit 5068c896fc52e646a6653290445ac07b6663d431 is a first implementation of your request.
To enable the SQLite extensions COMPRESS, SQLAR, and/or ZIPFILE you have to specify the respective precompiler symbol:

SQLITE_ENABLE_COMPRESS
SQLITE_ENABLE_SQLAR
SQLITE_ENABLE_ZIPFILE

All these extensions depend on the ZLIB library. There are 2 options:

Use the ZLIB library of the system. Define the preprocessor symbol SQLITE_HAVE_ZLIB and add the library reference for the compiler and linker.
Use the MINIZ replacement for ZLIB. The source files are included. Define the preprocessor symbol SQLITE3MC_USE_MINIZ=1.

Please give it a try and report any issues.

Please give it a try and report any issues.
Thanks! I've done what I can but I'm not very strong in either C or Visual Studio. While I've managed to compile the new sqlite3mc_dll, it doesn't appear to have enabled functions. I'll walk you through which steps I've taken.

To enable the SQLite extensions COMPRESS, SQLAR, and/or ZIPFILE you have to specify the respective precompiler symbol:

SQLITE_ENABLE_COMPRESS
SQLITE_ENABLE_SQLAR
SQLITE_ENABLE_ZIPFILE
It looks like those 3 functions are just booleans so I defined them as follows. I'm almost certain I've done this part wrong. >.>

Use the MINIZ replacement for ZLIB. The source files are included. Define the preprocessor symbol SQLITE3MC_USE_MINIZ=1.
I added the preprocessor definition to this field in the project properties. I'm reasonably sure I've done this part right.

For sake of completeness, here is the build output:
Build started... 1>------ Build started: Project: sqlite3mc_dll, Configuration: Release Win64 x64 ------ 1>sqlite3mc.c 1>C:\Users\Qriist\source\repos\SQLite3MultipleCiphers\src\compress.c(97,13): warning C4018: '<': signed/unsigned mismatch 1>   Creating library ..\bin\vc17\dll\release\sqlite3mc_x64.lib and object ..\bin\vc17\dll\release\sqlite3mc_x64.exp 1>sqlite3mc_vc17_dll.vcxproj -> C:\Users\Qriist\source\repos\SQLite3MultipleCiphers\bin\vc17\dll\release\sqlite3mc_x64.dll 1>Done building project "sqlite3mc_vc17_dll.vcxproj". ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Thanks in advance for your help, and sorry for my deficiencies in this realm.

I've done what I can but I'm not very strong in either C or Visual Studio. While I've managed to compile the new sqlite3mc_dll, it doesn't appear to have enabled functions.

How did you detect that the SQL functions were not enabled? What error messages did you get?

I'll walk you through which steps I've taken.

To enable the SQLite extensions COMPRESS, SQLAR, and/or ZIPFILE you have to specify the respective precompiler symbol:

SQLITE_ENABLE_COMPRESS
SQLITE_ENABLE_SQLAR
SQLITE_ENABLE_ZIPFILE

It looks like those 3 functions are just booleans so I defined them as follows. I'm almost certain I've done this part wrong. >.>

This is ok, although you could define the symbols in the project settings (C/C++-Preprocessor-Preprocessor definitions) - as you did for the symbol SQLITE3MC_USE_MINIZ - instead of hardcoding them in the source.
At runtime the SQL functions

compress, uncompress (COMPRESS extension),
sqlar_compress, sqlar_uncompress (SQLAR extension),
zipfile (ZIPFILE extension)

will be automatically registered for any new database connection.

Use the MINIZ replacement for ZLIB. The source files are included. Define the preprocessor symbol SQLITE3MC_USE_MINIZ=1.

I added the preprocessor definition to this field in the project properties. I'm reasonably sure I've done this part right.

Yes, looks all correct. However, I would define the other symbols also here.

For sake of completeness, here is the build output:
Build started...
1>------ Build started: Project: sqlite3mc_dll, Configuration: Release Win64 x64 ------
1>sqlite3mc.c
1>C:\Users\Qriist\source\repos\SQLite3MultipleCiphers\src\compress.c(97,13): warning C4018: '<': signed/unsigned mismatch
1>   Creating library ..\bin\vc17\dll\release\sqlite3mc_x64.lib and object ..\bin\vc17\dll\release\sqlite3mc_x64.exp
1>sqlite3mc_vc17_dll.vcxproj -> C:\Users\Qriist\source\repos\SQLite3MultipleCiphers\bin\vc17\dll\release\sqlite3mc_x64.dll
1>Done building project "sqlite3mc_vc17_dll.vcxproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Apart from the warning about a sign mismatch the build succeeded. The warning can be ignored, unless you expect extremely large blobs (> (2^63-1) bytes). The warning can be eliminated easily by changing int i, j; to unsigned int i, j; in line 57 of compress.c.
In the build process I can't see anything being wrong. So please describe, what you tried thereafter, what failed, and which error messages you got.

This is ok, although you could define the symbols in the project settings (C/C++-Preprocessor-Preprocessor definitions) - as you did for the symbol SQLITE3MC_USE_MINIZ - instead of hardcoding them in the source.

Oh, I'll fix that then. You used a different phrase ("precompiler symbol") so I was unsure what you were refering to. Thanks for clarifying! :)

Apart from the warning about a sign mismatch the build succeeded. The warning can be ignored, unless you expect extremely large blobs (> (2^63-1) bytes). The warning can be eliminated easily by changing int i, j; to unsigned int i, j; in line 57 of compress.c.

I'll make that adjustment ^_^
Now for the actual SQL portion:

How did you detect that the SQL functions were not enabled? What error messages did you get?
The first thing I did was just replace the DLL in my project where I'm writing the aforementioned cache db. The way the library I'm using functions is it will return a 0 if there's a failure. Therefore, I have simple error popups while I'm in the nuts and bolts phase to know which part is specifically failing.

This is in AHK btw. I know you probably aren't fluent in AHK but you'll hopefully be able to understand the main points. 🤞

/*	prepares the SQL insertion, working as intended*/
this.acDB.exec("BEGIN TRANSACTION;")
if !this.acDB.exec(SingleRecordSQL("cacheTable",insObj,"fingerprint"))
	msgbox % "insObj failure`n" acDB.ErrorCode

/*	working code that doesn't compress
;last_insert_rowid() will select the just-created diskId from cacheTable
this.acDB.exec("INSERT INTO sqlar(name,mode,mtime,sz,data) VALUES ((SELECT last_insert_rowid()),777,"timestamp",length('"post"'),'"post"');")
	msgbox % "non-compressed data failure`n" acDB.ErrorCode
*/

/*	statment intended to replace the above one with - identical except for the sqlar_compress() in the final parameter  */
if !this.acDB.exec("INSERT INTO sqlar(name,mode,mtime,sz,data) VALUES ((SELECT last_insert_rowid()),777," timestamp ",length('" post "'),sqlar_compress('" post "'));")	;last_insert_rowid() will select the just-created diskId from cacheTable
	msgbox % "sqlar_compress failure`n" acDB.ErrorCode
			;;;;	^---This is where the insertion fails.
			;;;;     I'm not sure what the exact error is because my library isn't returning it. :-/

this.acDB.exec("COMMIT;")

/* side note: I tried using compress() in place of sqlar_compress() but it also didn't work. */

On a lark just now, I replaced my SQLiteStudio's ( https://sqlitestudio.pl ) dll with the sqlar one, and it immediately worked with sqlar_compress/sqlar_uncompress and compress/uncompress. It did not give me its typical "no such function" error.
There is a curiosity though: the sqlar_compress() function does not appear to be, well, compressing. I made a set of insertions using a large amount of easy-to-compress data (pastebin with relevant SQL) and SQLite Studio does not display binary data in the second row.
(quick key: NC = No Compression, SC=sqlar_compress(), CC=compress())

using length() also reveals the discrepency:

So I think we are looking at two distinct problems:

I can't load the compression functions in my project - maybe there's a flag or something I need to set at runtime?
sqlar_compress() appears to just be passing through the data without compressing.

Sorry for the info dump. ^^;

Apart from the warning about a sign mismatch the build succeeded. The warning can be ignored, unless you expect extremely large blobs (> (2^63-1) bytes). The warning can be eliminated easily by changing int i, j; to unsigned int i, j; in line 57 of compress.c.
made the changes per your recommendation, that particular warning persists. (Very low priority compared to the other issues - just documenting.)

Apart from the warning about a sign mismatch the build succeeded. The warning can be ignored, unless you expect extremely large blobs (> (2^63-1) bytes). The warning can be eliminated easily by changing int i, j; to unsigned int i, j; in line 57 of compress.c.

made the changes per your recommendation, that particular warning persists. (Very low priority compared to the other issues - I'm just documenting.)

Arrgh, I was misled by my own Visual C++ compiler and was simply too quick and didn't check carefully enough, which changes are required.

You must revert the change in line 57 of compress.c, that is, unsigned int i, j; back to int i, j;, otherwise you would experience an endless loop in line 63, if you call the SQL function compress.
Instead change int i; to unsigned int i; in line 92 of compress.c.

Sorry for the inconveniences.

You must revert the change in line 57 of compress.c, that is, unsigned int i, j; back to int i, j;, otherwise you would experience an endless loop in line 63, if you call the SQL function compress.
Instead change int i; to unsigned int i; in line 92 of compress.c.

Good news! That change got things to compile with zero warning... AND it fixed my own project's issue with accessing the compression functions! I'm freaking stoked! :D
So now we are just down to whatever issue remains with sqlar_compress(). I confirmed that this new DLL, in both my project and in SQLite Studio, still does not store compressed content.

Sorry for the inconveniences.
Think nothing of it - you're the one helping me, not the other way around. :)

This is ok, although you could define the symbols in the project settings (C/C++-Preprocessor-Preprocessor definitions) - as you did for the symbol SQLITE3MC_USE_MINIZ - instead of hardcoding them in the source.

Oh, I'll fix that then.

It's not a bug to define the symbols in the source code, but usually it is more convenient to set them in the project settings.

You used a different phrase ("precompiler symbol") so I was unsure what you were refering to. Thanks for clarifying! :)

Sorry, I meant to write "preprocessor", and unfortunately I don't have a DWIM-computer (DWIM = Do What I Mean). 😁

Apart from the warning about a sign mismatch the build succeeded. The warning can be ignored, unless you expect extremely large blobs (> (2^63-1) bytes). The warning can be eliminated easily by changing int i, j; to unsigned int i, j; in line 57 of compress.c.

I'll make that adjustment ^_^

Sorry, a different change is required - please see my previous post.

Now for the actual SQL portion:

How did you detect that the SQL functions were not enabled? What error messages did you get?

The first thing I did was just replace the DLL in my project where I'm writing the aforementioned cache db. The way the library I'm using functions is it will return a 0 if there's a failure. Therefore, I have simple error popups while I'm in the nuts and bolts phase to know which part is specifically failing.

Usually, SQLite's error codes and messages help to identify SQL errors.

This is in AHK btw. I know you probably aren't fluent in AHK but you'll hopefully be able to understand the main points. 🤞

You are right that I don't know much about AHK, but it's certainly not rocket science.

/*
	[...]
*/

/*	statment intended to replace the above one with - identical except for the sqlar_compress() in the final parameter  */
if !this.acDB.exec("INSERT INTO sqlar(name,mode,mtime,sz,data) VALUES ((SELECT last_insert_rowid()),777," timestamp ",length(" sqlQuote(post) "),sqlar_compress(" sqlQuote(post) "));")	;last_insert_rowid() will select the just-created diskId from cacheTable
	msgbox % "sqlar_compress failure`n" acDB.ErrorCode
			;;;;	^---This is where the insertion fails.
			;;;;     I'm not sure what the exact error is because my library isn't returning it. :-/

this.acDB.exec("COMMIT;")

/* side note: I tried using compress() in place of sqlar_compress() but it also didn't work. */

At first glance I have no clue why the insert fails. And without knowing the SQLite error code and message it is hard to tell what is going on. You could try to issue the command in a SQLite shell or in a tool like SQLiteStudio, and see what messages you get.

On a lark just now, I replaced my SQLiteStudio's ( https://sqlitestudio.pl ) dll with the sqlar one, and it immediately worked with sqlar_compress/sqlar_uncompress and compress/uncompress. It did not give me its typical "no such function" error.

At least that is good news.

There is a curiosity though: the sqlar_compress() function does not appear to be, well, compressing.

Strange. Admittedly, up to now I tested only with the archive command of the SQLite shell and that worked as expected.

I made a set of insertions using a large amount of easy-to-compress data (pastebin with relevant SQL)

I will use your test data for further experiments.

So I think we are looking at two distinct problems:

I can't load the compression functions in my project - maybe there's a flag or something I need to set at runtime?

Not that I know of. Since the extensions are statically linked with the SQLite library itself, the functions implemented by the extensions are automatically registered for each new database connection.

sqlar_compress() appears to just be passing through the data without compressing.

This is really weird. I will make some more experiments to check whether I can somehow reproduce this behaviour.

your big long post responding to my big long post

I know you were probably typing when I posted my last, but most things (save sqlar_compress()'s weird behavior) seem to be fixed now. Just pushing a notification so you hopefully don't waste your time on something already fixed. :)

Good news!  That change got things to compile with zero warning...

That was to be expected.

AND it fixed my own project's issue with accessing the compression functions! I'm freaking stoked! :D

Main thing is that the functions can now be accessed.

So now we are just down to whatever issue remains with sqlar_compress(). I confirmed that this new DLL, in both my project and in SQLite Studio, still does not store compressed content.

At the moment, I have no clue why compressing doesn't work as expected.

Thinking out loud for a moment... We know:

compress() works

The function compress compresses the data unconditionally.

sqlar_compress() recieves the data
sqlar_compress() passes the data, uncompressed BUT intact

The function sqlar_compress makes a check whether compressing really results in a smaller blob. This is described in the comment in sqlar.c:

** If the type of X is SQLITE_BLOB, and compressing that blob using
** zlib utility function compress() yields a smaller blob, return the
** compressed blob. Otherwise, return a copy of X.

However, your test data look highly compressible. Therefore I don't understand why it is stored uncompressed.

so it's probably something as simple as sqlar_compress() returning the wrong value after executing compress()

I'll try to look into this.

your big long post responding to my big long post

I know you were probably typing when I posted my last,

Yes, indeed. 😄

but most things (save sqlar_compress()'s weird behavior) seem to be fixed now. Just pushing a notification so you hopefully don't waste your time on something already fixed. :)

If I understand it correctly, sqlar_compress still doesn't compress your data. That is really surprising, because the archive feature of the SQLite shell uses that function and it worked in my prior tests. I will do a few more tests using your test data. I'll let you know if I can come up with any new insights.

Usually, SQLite's error codes and messages help to identify SQL errors.

The wrapper class has a few properties directly accessible after each method call. acDB.ErrorCode up above is my attempt to get the actual error code that was, in theory, set after the failed call, along with the "plain-text location" that spawned the error in the first place. The now-fixed problem apparently wasn't being handled properly by the class. ¯_(ツ)_/¯

the archive feature of the SQLite shell uses that function and it worked in my prior tests.

I've never actually used the shell. I'll give it a shot myself and report what happens.

Usually, SQLite's error codes and messages help to identify SQL errors.

The wrapper class has a few properties directly accessible after each method call. acDB.ErrorCode up above is my attempt to get the actual error code

SQLite's error codes are often quite generic, but most of the times the error message strings contain useful hints, what went wrong.

that was, in theory, set after the failed call, along with my custom "plain-text location" that spawned the error in the first place. The now-fixed problem apparently wasn't being handled properly by the class. ¯_(ツ)_/¯

Proper error handling can be a pain ...

SQLite shell uses that function
So I just went and grabbed the latest shell, spent a little time figuring out how to get useful results. Settled on a way to get consistent data...

I used this exact test script
As before, the first insertion is plaintext, while the second insertion uses the sqlar_compress() function.

Here's where things get weird: they are the same raw size in the database. Whatever the flaw in this function is, I don't think it has anything to do with what you've very generously written...

I think we have uncovered an implementation bug with SQLite itself.

So I just went and grabbed the latest shell, spent a little time figuring out how to get useful results. Settled on a way to get consistent data...
I used this exact test script

Thanks for providing the test script. I will use it to track down what exactly is going on. This may take some time...

As before, the first insertion is plaintext, while the second insertion uses the sqlar_compress() function.
Here's where things get weird: both insertions are the same raw size in the database. Whatever the flaw in this function is, I don't think it has anything to do with what you've very generously written...

It is indeed very unlikely that the problem has anything to do with the encryption feature. Nevertheless, I'm curious why there is a problem with this function and what's causing it.

I think we have uncovered an implementation bug with SQLite itself.

Maybe, but we have to prove it, if possible.

I think the problem arises from the somewhat misleading description of the SQLite Archive Feature

The sqlar_compress(X) function attempts to compress a copy of the string or blob X using the Default algorithm and returns the result as a blob.

One can get the impression that the argument X of sqlar_compress can be a text string or a blob and will be compressed in both cases, if possible. However, this is not true. If X is not a blob, sqlar_compress will always simply return a copy of X.

Yeah, that overview documentation is jank! So much time wasted due to a poor description. -.-

sqlar_compress(CAST('very long textstring' AS BLOB))

That worked!

We're finally past the compression stage, lol.
...Which brings me to the next issue: sqlar_uncompress() fails on stored blobs. It does, however, return stored strings as expected. (BC = Blob Cast, current test script

UPDATE: ignore all that. There was an errant tab character in my test data.

Removing that fixes the uncompress() issue:

I think we've solved everything!

I think we've solved everything!

Good news. I will soon prepare a release and then will close this issue.

Thank you for all of your hard work on this obscure function! I really appreciate it. ^_^

Quick status report: the sqlar features are working flawlessly! 26k+ individual row inserts comprising data pulled from api endpoints and every one was as fast (or maybe even faster!) than just dumping to disk, with individual record reads being virtually instantaneous.
Thanks again for taking the time to enable this - was a huge help.
PS: I figured you might find my database schema interesting, given that I'm your first use case. ;)
Everything is tracked by the fingerprint, which is a concatonated hash of the remote url and any outgoing headers the user sets. Getting useful data is as simple as SELECTing from vRecords based on any of the criteria you'd normally look for.
I'm not using the strict sqlar spec in my project because it didn't make sense to split up the two blobs I'm maintaining per row (plus there was a massive performance hit when I experimented with doing so.)
-- Table: simpleCacheTable
CREATE TABLE simpleCacheTable (
    fingerprint       TEXT    PRIMARY KEY
                              UNIQUE,
    url               TEXT,
    headers           TEXT,
    responseHeaders   BLOB,
    responseHeadersSz INTEGER,
    timestamp         INTEGER,
    expiry            INTEGER,
    mode              INTEGER,
    data              BLOB,
    dataSz            INTEGER
);

-- View: vRecords
CREATE VIEW vRecords AS
    SELECT fingerprint,
           url,
           headers,
           sqlar_uncompress(responseHeaders, responseHeadersSz) AS responseHeaders,
           timestamp,
           expiry,
           sqlar_uncompress(data, dataSz) AS data
      FROM simpleCacheTable;


Set Matrix Zeroes in Java

Is your feature request related to a problem? Please describe.
Problem Statement: Given a matrix if an element in the matrix is 0 then you will have to set its entire column and row to 0 and then return the matrix.
Describe the solution you'd like
I would use the matrix's first row and col to know if there is any zero in the ith row and jth col if yes then just make the cell at (i,j) zero.
Describe alternatives you've considered
Use two arrays to know if there is any zero at ith row or jth col

@Kumar-laxmi, please assign me this issue. I would like to add this algorithm in Java.

Please don't raise issues to solve LeetCode, GFG or HackerRank, etc problems.

Please don't raise issues to solve LeetCode, GFG or HackerRank, etc problems.

then what kind of problems are acceptable because these platforms covers all kind of problems?

#857 this is also a leet code problem, why it is acceptable?

#857 this is also a leet code problem, why it is acceptable?

It has been closed

#857 this is also a leet code problem, why it is acceptable?

Standard Algorithms or solutions related to them