Boost - Warning - ApolloBoost was initialized with unsupported options: 0 - apollo-client

I'm not sure when this started or what I did, but I can't find the reason for it. The app works, but when you select a todo as completed, the warning comes up.
https://codesandbox.io/s/k3621oko23
Any help would be appreciated!
Scott

This was the solution.
import { gql } from 'apollo-boost'
'gql' needed to be wrapped in brackets. Go figure. Here is where I found the solution.
https://github.com/apollographql/apollo-client/issues/3327
Scott

Related

Type aliases in type hints are not preserved

My code (reduced to just a few lines for this demo) looks like this:
AgentAssignment = List[int]
def assignment2str(assignment: AgentAssignment):
pass
The produced html documentation has List[int] as the type hint. This seems to be a resolved issue (#6518), but I am still running into it in 2022 with Sphinx version 5.1.1 (and Python 3.8.2). What am I missing?
I am not sure if there is Sphinx support for this yet, but you need to use explicit PEP 613 TypeAlias introduced in Python 3.10. Because otherwise the type resolver cannot differentiate between a normal variable assignment and a type alias. This is a generic Python solution for the type alias problem beyond the scope of Sphinx.
AgentAssignment: TypeAlias = List[int]
Ps. I am having the same issue with Sphinx
So, one needs to add at the beginning of the file (yes, before all other imports):
from __future__ import annotations
Then in conf.py:
autodoc_type_aliases = {'AgentAssignment': 'AgentAssignment'}
Not that this identity-transformation dictionary makes any sense to me, but it did the trick...
I also had this issue and was very confused why the accepted answer here stackoverflow.com/a/73273330/1822018, which mentions adding your type aliases to the autodoc_type_aliases dictionary as explained in the documentation here https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_type_aliases was not working for me. I solved my problem and I am posting it here for the benefit of others.
In my case, I also had installed the Python package sphinx-autodocs-typehints which extends/hijacks/overrides certain Sphinx functionality, in particular it appears to supplant the functionality of the autodoc_type_aliases dictionary in the given PR. To anyone trying to debug this issue I would suggest removing 'sphinx_autodoc_typehints' from the extensions list in your Sphinx conf.py file.

How do I remove this UndefVar error in my code?

I'm using this notebook provided by the Computational Thinking course and am running into an error when I execute this code.
import Pkg
Pkg.add(["Images", "ImageIO", "ImageMagick"])
using Images
philip_file = download("https://i.imgur.com/VGPeJ6s.jpg")
philip = let
original = Images.load(philip_file)
decimate(original, 8)
end
This is the error I see:
[ Info: Precompiling ImageMagick [6218d12a-5da1-5696-b52f-db25d2ecc6d1]
ERROR: UndefVarError: decimate not defined
Stacktrace:
[1] top-level scope at REPL[6]:3
The notebook has not defined decimate anywhere, and looking online, I can't seem to find the function using a Google search. There is no instruction in the exercise that I might have to define the function myself. My understanding is that this function is built into one of the modules. My import of the Images module worked just fine. Can anyone help me understand what I might be doing wrong?
Note: There is a Discord community for the course but the link isn't working, so I have exhausted all those avenues.
The decimate function seems to be defined in that same notebook, by:
decimate(image, ratio=5) = image[1:ratio:end, 1:ratio:end]

I am getting the error at this place 'Countries__r.name' assist me

I am getting the error at this place, with this code:
List<States__c> stat = [select name from States__c where Countries__r.name = :contr];
'Countries__r.name'
Assist me.
Sorry but this syntax is totally wrong for VFP. Did you really mean VFP?
Your code sounds to be partially C# code against a mySQL database? Not sure. It would error there too. Probably one of those languages that I don't know.
And shooting in the dark, without having an idea on the language you use, you are saying States_c but referring to Countries_r in an SQL?

Reading in Packages in Mathematica

I've created a package in Mathematica but I can't seem to get Mathematica to read it in. The Package is of the form:
BeginPackage["name`"]
(function[]::usage)
Begin["`Private'"]
(functions)
End[]
EndPackage[]
I saved this file as a .m. The problem is that after I quit the kernel and then try to read in the package using Needs["name`"], I always get a no::cont error. I've tried saving the file in $BaseUserDirectory and $BaseDirectory, but it still give me a no::cont error:
Needs["name"]
Needs::nocont: "Context \!\(\"name\") was not created when Needs was evaluated."
I've also tried using the built-in File->Install function in Mathematica but it still gives me the same error. Is there something that I need to change with regards to the context?
Any help is much appreciated.
Thank you,
jm
Write the definitions in "Initialization Cells" when you create the package notebook. Otherwise they will be ignored. This worked for me with Version 9 on OS X. In previous versions it was probably not necessary, but I don't remember any more... :-)
It's because the directory of your package is not in $Path. Needs only searches the packages in $Path, while Get can search subdirectories.

sigabrt on filteredArrayUsingPredicate

I'm a noob and trying to convert an example from a book into an app I can use.
The sample app is a modified version of the contacts application and it works.
I've done some further modification, and the search no longer works. It sigabrts on the following line
self.filteredAnswercards = [flattenedArray
filteredArrayUsingPredicate:predicate];
I'm stumped.
my head is bloody from beating it against my keyboard.
ANY help is massively appreciated.
Thanks.
My suggestion was to wrap the line that crashes inside a #try/#catch block and, inside the catch, log the exception and the result of the exception's callStackSymbols method.
For the record, part of the problem with the 4.x versions of Xcode is that they are much worse than 3.x versions at telling you where an exception is coming from. For this reason, getting familiar with tricks that make a program or the debugger tell you what you need to know is very important.
I would guess that predicate is nil. Where did you assign it? Or did you never assign it?
Very hard to say without seeing more code. Sigabort generally means an exception has been thrown. You can put a break point in objc_exception_throwto get a back trace which should help highlight the cause.
If you get NO new info with the above, others have said that a full reboot of the computer can help... but I have not had a situation where I could verify this.
---- edit based on comments -----
It sounds like filteredAnswercards is nil, that will definitely cause a Sigabort. Allocate that array properly and you should be good to go.

Resources