Does not contain a valid config plugin.

Skipping config plugin check: Package "@vonovak/react-native-theme-control" does not contain a valid config plugin.
Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin
Unexpected token 'export'
OS: Windows
React Native Version: 0.74.5
Expo SDK Version: ~51.0.28
React native theme control Version: ^6.0.1

Is this only with newer versions of Expo?

Is this only with newer versions of Expo? I noticed the install page only mentions up to Expo 49 but I'm guessing that's just the docs in need of updating?
In install.md (sorry Chrome broke pasting links apparently)
@vonovak

Is this only with newer versions of Expo? I noticed the install page only mentions up to Expo 49 but I'm guessing that's just the docs in need of updating?
In install.md (sorry Chrome broke pasting links apparently)
@vonovak

The issue is with the react-native-theme-control config in the latest versions, for now I have down graded react-native-theme-control

updated the docs

@homocodian to what version did you need to downgrade?
Thank you

@homocodian to what version did you need to downgrade?
Thank you

v6.0.0

Hello,
6.0.1 did not have any change in the config plugin though.
Thank you

Oh sorry about that, I don't remember the exact version but I used the above mentioned approach and I thought it was the last second version.

fixed with https://github.com/vonovak/react-native-theme-control/pull/38


PlatformException(ERROR_GEOCODING_COORDINATES, grpc failed, null)

💬 Questions and Help
For questions or help we recommend checking:

I use the geolocater 5.3.0 with my project，I get positon like this:
{longitude: 106.56xxxxxx, latitude: 36.00xxx, timestamp:<PHONE_NUMBER>000, mocked: false, accuracy: 1.0, altitude: 0.0, heading: 0.0, speed: 0.0, speedAccuracy: 0.0}. but try to invoke geolocator.placemarkFromCoordinates() method. But the project show a exception to me.

Exception detials: PlatformException(ERROR_GEOCODING_COORDINATES, grpc failed, null),
who can help me to resolve this question?【I'm in a hurry】

Hi, this normally happens for people that are in a region that are restricted for accessing Google Play Services.
The plugin doesn’t work with GRPC (a.k.a. Protobuf). This error is generated from the Android API itself and is unfortunately not something we can influence as far as I know (please correct me if I am wrong, I would be happy to make changes when possible).
Please also see other issues with this error: https://github.com/Baseflow/flutter-geolocator/issues/378

378 I have seen it before, the authorization and positioning status has been detected to be normal, Google Play is also turned on, and this GRPC call occurs in the plugin itself. Is there any other way to solve this problem?

#378  I have seen it before, the authorization and positioning status has been detected to be normal, Google Play is also turned on, and this GRPC call occurs in the plugin itself. Is there any other way to solve this problem?

@H-Mongo the error is generated from the Android SDK (which is wrapper by the "permission_handler" plugin). You can find the official bug reports here and here.
I noticed that there are some workarounds (described in this SO answer: https://stackoverflow.com/questions/47331480/geocoder-getfromlocation-grpc-failed-on-android-real-device) but they will require time to implement on our side. If you are really in a hurry we would love to accept a pull-request and move it through quickly.

Thanks for your help,i will wait for you close this bug

On that StackOverflow post it says: "Lol.. Just putting that call in a background thread or Coroutine works "
Is that something that can be done within the library?


Are there Middleware achievement plan ?

This is a nice framework, i want to use in our web project, but after my overview, i dont find Middleware function achievement.  I think this is useful in authorization webservice. I dont know if you have this plan?
:)
Thanks.

Hi! Thank your for your suggestion. Rustful is currently not middleware oriented and there are currently no concrete plans for it. There is, however, support for "filters", which works like a subgroup of middleware, but they have been neglected for a while and their design isn't necessarily great.
The reason why it hasn't yet been made middleware oriented is that the same functionality often can be achieved using good old function calls. Something like:
fn my_handler(context: Context, response: Response) {
    let (context, response) = if let Some(res) = auth_or_fail(context, response) {
        res
    } else {
        return;
    }

    //...
}

This can be made less verbose with a try! like macro:
fn my_handler(context: Context, response: Response) {
    let (context, response) = expect!(auth_or_fail(context, response));

    //...
}

This doesn't mean that the door is closed for middleware. Just that there hasn't been any work on it. Thinking about it, making handlers return Option<(Context, Response)> would make them quite easy to stack... hmm...

Hi, Ogeon, Thanks very much. I think function auth_or_fail is also can solve my problem.

Alright. Note that auth_or_fail is purely hypothetical and you may need something more advanced. Feel free to reopen if you want to go any further with this.


Make sure to reset activeTab on service picker selection

Fixes this bug:

Run integration tests

LGTM 👍  💯

@wavesoft please delete branches after merging


Add an option to take minified (or not) javascript file.

Hello,
Most libraries have two versions XXX.js and XXX.min.js.
Ideally standard version should be taked in dev build task and minified version in production build task.
For now, min and standard versions of the differents library are mixed, because of the main directive in bower file rarely present and it's impossible to change this behavior.
So it would be fine to add an option for this.
Moreover this would save time on minification task.
Thanks.

@stephenplusplus : (this is asked out of ignorance, not judgment):
I'd actually heard that it was considered a best practice for package authors TO include a minified version, since minifying software can wreak unintentional havoc occasionally. I'd heard that the package authors including an official minified version means they can insure the minification worked most optimally for their specific package.
Could you explain why it's becoming a best practice for packages to not include a minified version, and whether this applies to large/complex packages like jQuery?

I'd really like this, too.
I'm building a number of applications with libraries like Ionic, AngularJS (and its plugins).  All of these libraries include .min.js and .min.css versions with them.
By not including this functionality, developers are forced to write minification procedures.  This is not necessarily something that everyone should have to do, particularly if the Bower package authors have included minified versions.
I certainly would like to see a tunable here that detects if a (named according to a standard pattern) min.js/min.css equivalent exists for a given JS/CSS file, and injects that instead.

+1 for this feature request

The bower.json spec says:

Do not include minified files

@CWSpear - this request isn't about handling minified files defined in main.  Rather, it's about detecting minified equivalents of files defined in main, but provided by the package authors, and providing a tunable to use those instead.

I've made this Gist which is very hacky in nature but does the job.
Using overrides is too much manual work and minifying ourselves may lead to bugs.

If "minifying ourselves" is leading to bugs, that's likely a bug in the author's code. They shouldn't write such fragile code!

If we are using around 30-40 libraries and all of them have minified versions, it makes sense in using them, instead of taking the un-minified files and again minifying them. And, most of these are big libraries and have huge lines of code and it "may" fail due to the way we are minifying it or due to the tools we use to do it.

@stephenplusplus Given the ongoing conversation, could we reopen this issue, please?

This seems like a logical addition. Self minification of packages is plaguing me and it would be better if I  could use the author approved version.

I agree, such an option would be very useful.

+1

We have to stick with the Bower spec on this issue. Bower advises not to include minified files and it recently restricted main to be an array defining only one file of each type.

+1

+1

+1

+1

+1

+1

+1


Outline slow loading + timeout

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.66.2
OS Version: Windows 10.0.19043 x64

Steps to Reproduce:

open large markdown document (10k lines) -- outline is already loading much slower then a few major versions before
change anything
switch to another file, then back
outline loading hangup + high CPU usage
after quite some time in dev tools console:

event.ts:39 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.
Also try to CPU profile this. Hit F1 > Toggle Developer Tools. In the overflow menu select 'More Tools > JavaScript Profiler'. In there select start, let it profile for 30 to 60 seconds, stop it, save it to a file and attach the file here. Thanks.
https://user-images.githubusercontent.com/1794099/120606621-a97e0180-c44f-11eb-8e32-9fdafdc949ec.mov


Prevent loosing money by parsing small values

This PR is for fixing the issue https://github.com/zkSNACKs/WalletWasabi/issues/489 when someone parses values that involves fractions of satoshis. For example:
Money.Parse("0.00000000000001");  will be 0
Money.Parse("12.66548765432");  will be 12.6654876 loosing the 0.00000005432

This is a breaking change so, please review this and let us know if it okay for you @NicolasDorier

@knocte Money.Parse doesn't throw a new exception. However, the constructors and the factory methods such as Money.Satoshis, Money.Cents, Money.Coins and others now can throw a new ArgumentOutOfRangeException. This means that:

this is the breaking change that can break existing projects and,
you cannot loose money if you don't explicitly say so.

About the latest point, this example shows the point:
decimal value = 10 / 3m;
var m1 = Money.Satoshis(value);  // Fails with OOR exception
var m2 = Money.Satoshis((long)value);  // With the cast YOU are explicitly removing the fractional part

Anyway, you are probably right on this but before writing more tests lets see what our benevolent dictatorship has to say about it.

Doesn't Parse should throw FormatException? It feels to me, like that's the convention. I may be wrong on this, though.

@nopara73 you are right, that's the exception is is throwing. It is the same exception it was throwing before.

Sorry I needed to revert that, it breaks in lots of my project. :(
Making a any decimal operation is very likely to fire this problem, it broke BTCPay :(

Ack. It was clear to me that this was going to break existing projects.

I knew it would, but did not anticipated that almost any divide operation would break.


Helper that returns delta tables created by pipeline as DeltaTable objects

Feature description
Delta tables need management. The DeltaTable class in delta-rs has useful methods such as optimize.compact(), optimize.z_order(), and vacuum().
This functionality should be easily accessible to dlt users.
My suggestion is to expose a helper method that returns Delta tables created by a pipeline as DeltaTable object:
get_delta_tables(
    pipeline: Pipeline, *tables: str
) -> Dict[str, DeltaTable]

This would enable the user to do things like:
import dlt
from dlt.common.libs.deltalake import get_delta_tables

@dlt.resource(table_format = "delta")
def foo():
    yield {"foo": 1., "bar": 2, "baz": 3}

@dlt.resource(table_format = "delta")
def bar():
    yield {"foo": 1., "bar": 2, "baz": 3}

@dlt.source
def delta_source():
    return [foo(), bar()]

pipeline = dlt.pipeline(destination="filesystem")

pipeline.run(delta_source())

delta_tables = get_delta_tables(pipeline)

# operations on all tables
for dt in delta_tables.values():
    dt.optimize.compact(...)
    # dt.vacuum(...)
    # dt.repair(...)
    # dt.cleanup_metadata()

# operations on individual tables
delta_tables["foo"].optimize.z_order(columns=["foo", "bar"])
delta_tables["bar"].optimize.z_order(columns=["bar", "baz"])

Are you a dlt user?
Yes, I'm already a dlt user.
Use case
No response
Proposed solution
No response
Related issues
No response

it looks good. the only thing I'd add to the interface is an optional list of tables to be used instead of those taken from default schema.
yes there are parallels. we should somehow expose delta tables with the similar interface @sh-rp does. maybe we should add another property: native_client which would expose ie. authorized pyscopg2 / duckdb connection, fsspec filesystem or delta-rs client.

it looks good. the only thing I'd add to the interface is an optional list of tables to be used instead of those taken from default schema.

@rudolfix You might have missed *tables in get_delta_tables:

I'm doing some testing with the effectiveness of running .compact() and .vaccum() this week on our existing synced data. I'll report back on the findings, but if that works, then the approach above is ideal - we'd likely run these commands every n syncs of data from the pipeline.

@jorritsandbrink I've done some testing. We'll certainly need to use both compact() and vacuum() to achieve the type of performance we want. So this approach is good. Do you have an ETA for an alpha release for this? Our query times are very much like 📈 at the moment


prune expired proposals

Note: Since the number of votes required to delete a proposal was increased to 2/3 of the active masternodes, I am unable to fully test this on testnet. The delete votes seem to be valid and propagating to other nodes.

I think it would be better to add some additional delay after end_epoch before deleting.
I'm afraid that deleting immediately after end_epoch could lead to (rare) edge cases where there is competition between whether a proposal should be included in a superblock trigger or deleted.

@tgflynn is there any validation for end_epoch? If not, it doesn't matter if we have delay or not, there always will be some probability of an edge case.

@UdjinM6 I don't follow you. Can you explain why there would be an edge case if deletion can only occur a certain time after end_epoch ?
Also what do you mean by "validation for end_epoch" ?

I mean the delay should be sufficient to avoid any problems with clock skew.  I would say at least 24 hours.

My concerns were addressed in slack discussion, I agree that some delay is need (and should be enough in current design).

To recap Slack discussion, we need to ensure that fudge window for proposal inclusion is honored, as well as waiting a longer time such as 1/2 the superblock window AFTER the end_epoch, to ensure that proposals aren't deleted prematurely.

Waiting to add the delay before merging, should be another commit within the next few hours/couple days.


Python Error

Hey Shea,
I'm getting this python error.  @homebysix thinks its a JSSimporter error and asked me to post this log here.
The following errors occurred:
A Python exception occurred during the execution of autopkg, see the system log for more details.
[ERROR] jss.exceptions.JSSPutError: Response Code: 500 Response: Internal Server Error. The server encountered an unexpected condition which prevented it from fulfilling the request
This report was generated by AutoPkgr
autopackager:jss administrator$ autopkg run -v GoogleChrome.jss
Processing GoogleChrome.jss...
URLDownloader
URLDownloader: Item at URL is unchanged.
URLDownloader: Using existing /Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/downloads/GoogleChrome.dmg
EndOfCheckPhase
AppDmgVersioner
AppDmgVersioner: Mounted disk image /Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/downloads/GoogleChrome.dmg
AppDmgVersioner: BundleID: com.google.Chrome
AppDmgVersioner: Version: 44.0.2403.155
PkgRootCreator
PkgRootCreator: Created /Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/GoogleChrome
PkgRootCreator: Created /Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/GoogleChrome/Applications
Copier
Copier: Mounted disk image /Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/downloads/GoogleChrome.dmg
Copier: Copied /private/tmp/dmg.a4FDah/Google Chrome.app to /Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/GoogleChrome/Applications/Google Chrome.app
PkgCreator
PkgCreator: Package already exists at path /Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/GoogleChrome-44.0.2403.155.pkg.
PkgCreator: Existing package matches version and identifier, not building.
JSSImporter
JSSImporter: Category type: category-'Browsers' already exists according to JSS, moving on...
JSSImporter: Category type: policy_category-'Auto Update' already exists according to JSS, moving on...
JSSImporter: Pkg-object already exists according to JSS, moving on...
JSSImporter: Package upload not needed.
JSSImporter: Found file: /Users/administrator/Library/AutoPkg/RecipeOverrides/AutoUpdateSmartGroupTemplate.xml
Traceback (most recent call last):
File "/usr/local/bin/autopkg", line 1651, in
sys.exit(main(sys.argv))
File "/usr/local/bin/autopkg", line 1645, in main
exit(subcommands[verb]'function')
File "/usr/local/bin/autopkg", line 1458, in run_recipes
autopackager.process(recipe)
File "/Library/AutoPkg/autopkglib/init.py", line 470, in process
self.env = processor.process()
File "/Library/AutoPkg/autopkglib/init.py", line 299, in process
self.main()
File "/Library/AutoPkg/autopkglib/JSSImporter.py", line 919, in main
self.groups = self.handle_groups()
File "/Library/AutoPkg/autopkglib/JSSImporter.py", line 431, in handle_groups
computer_group = self._add_or_update_smart_group(group)
File "/Library/AutoPkg/autopkglib/JSSImporter.py", line 472, in _add_or_update_smart_group
update_env="jss_group_updated", added_env="jss_group_added")
File "/Library/AutoPkg/autopkglib/JSSImporter.py", line 526, in _update_or_create_new
self.j.put(url, recipe_object)
File "/Library/Python/2.7/site-packages/python_jss-1.2.0-py2.7.egg/jss/jss.py", line 270, in put
self._error_handler(JSSPutError, response)
File "/Library/Python/2.7/site-packages/python_jss-1.2.0-py2.7.egg/jss/jss.py", line 185, in _error_handler
raise exception
jss.exceptions.JSSPutError: Response Code: 500 Response: Internal Server Error. The server encountered an unexpected condition which prevented it from fulfilling the request

Hello!
So taking a quick look at that, I see that you're using AutoUpdateSmartGroupTemplate.xml in your recipe override, and that the JSSImporter is failing with HTTP response 500 while it is trying to update a smart group.
Without the -vvvv output from AutoPkg, I can say for certain, but the first thing I would do is make sure that the XML file above correctly references the smart group's name; i.e. does the smart group's name as specified in the recipe override match what is specified as the name in the xml file (or is it substituted in).
Normally that would throw a 409 error; but otherwise I don't know what it would be. A 500 indicates a server error, which normally is "not your fault", but sometimes I see these when it gets confused about the XML that is getting sent to it.

Hey Shea,  Here is the -vvvv output.  could you take a look at it for me and see if you see anything.  I see that it's not liking the AutoUpdateSmartGroupTemplate.xml but i'm not sure what to do to fix it.
autopackager:~ administrator$ autopkg run -vvvv GoogleChrome.jss
Processing GoogleChrome.jss...
{u'API_PASSWORD': u'XXX',
u'API_USERNAME': u'XXX',
'AUTOPKG_VERSION': u'0.5.0',
u'CATEGORY': u'Browsers',
u'DOWNLOAD_URL': u'https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg',
u'GIT_PATH': u'/Applications/Xcode.app/Contents/Developer/usr/bin/git',
u'GROUP_NAME': u'^Google Chrome-update-smart',
u'GROUP_TEMPLATE': u'/Users/administrator/Library/AutoPkg/RecipeOverrides/AutoUpdateSmartGroupTemplate.xml',
u'JSS_REPOS': [{
URL = "smb://jss.new-london.k12.ia.us";
name = JSS;
password = XXX;
"share_name" = CasperShare;
type = SMB;
username = XXX;
}],
u'JSS_URL': u'https://jss.new-london.k12.ia.us:8443',
u'JSS_VERIFY_SSL': True,
u'NAME': u'Google Chrome',
'PARENT_RECIPES': [u'/Users/administrator/Library/AutoPkg/RecipeRepos/com.github.autopkg.jss-recipes/Google Chrome/Google Chrome.jss.recipe',
u'/Users/administrator/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes/GoogleChrome/GoogleChrome.pkg.recipe',
u'/Users/administrator/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes/GoogleChrome/GoogleChrome.download.recipe'],
u'POLICY_CATEGORY': u'Auto Update',
u'POLICY_TEMPLATE': u'/Users/administrator/Library/AutoPkg/RecipeOverrides/AutoUpdatePolicyTemplate.xml',
'RECIPE_CACHE_DIR': u'/Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome',
'RECIPE_DIR': '/Users/administrator/Library/AutoPkg/RecipeOverrides',
'RECIPE_OVERRIDE_DIRS': ['~/Library/AutoPkg/RecipeOverrides'],
'RECIPE_PATH': '/Users/administrator/Library/AutoPkg/RecipeOverrides/GoogleChrome.jss.recipe',
u'RECIPE_REPOS': {u'/Users/administrator/Library/AutoPkg/RecipeRepos/com.github.autopkg.jss-recipes': {
URL = "https://github.com/autopkg/jss-recipes.git";
},
u'/Users/administrator/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes': {
URL = "https://github.com/autopkg/recipes.git";
}},
u'RECIPE_SEARCH_DIRS': [u'.',
u'~/Library/AutoPkg/Recipes',
u'/Library/AutoPkg/Recipes',
u'/Users/administrator/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes',
u'/Users/administrator/Library/AutoPkg/RecipeRepos/com.github.autopkg.jss-recipes',
'/Users/administrator/Library/AutoPkg/RecipeOverrides',
u'/Users/administrator/Library/AutoPkg/RecipeRepos/com.github.autopkg.jss-recipes/Google Chrome',
u'/Users/administrator/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes/GoogleChrome'],
u'SELF_SERVICE_DESCRIPTION': u'Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.',
u'SELF_SERVICE_ICON': u'Google Chrome.png',
'verbose': 4}
URLDownloader
{'Input': {'filename': u'Google Chrome.dmg',
'url': u'https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg'}}
URLDownloader: Item at URL is unchanged.
URLDownloader: Using existing /Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/downloads/Google Chrome.dmg
{'Output': {'pathname': u'/Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/downloads/Google Chrome.dmg'}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
AppDmgVersioner
{'Input': {'dmg_path': u'/Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/downloads/Google Chrome.dmg'}}
AppDmgVersioner: Mounted disk image /Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/downloads/Google Chrome.dmg
AppDmgVersioner: BundleID: com.google.Chrome
AppDmgVersioner: Version: 44.0.2403.155
{'Output': {'app_name': u'Google Chrome.app',
'bundleid': u'com.google.Chrome',
'version': u'44.0.2403.155'}}
PkgRootCreator
{'Input': {'pkgdirs': {
Applications = 0775;
},
'pkgroot': u'/Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/Google Chrome'}}
PkgRootCreator: Created /Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/Google Chrome
PkgRootCreator: Creating Applications
PkgRootCreator: Created /Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/Google Chrome/Applications
{'Output': {}}
Copier
{'Input': {'destination_path': u'/Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/Google Chrome/Applications/Google Chrome.app',
'source_path': u'/Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/downloads/Google Chrome.dmg/Google Chrome.app'}}
Copier: Mounted disk image /Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/downloads/Google Chrome.dmg
Copier: Copied /private/tmp/dmg.mkHcrL/Google Chrome.app to /Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/Google Chrome/Applications/Google Chrome.app
{'Output': {}}
PkgCreator
{'Input': {'pkg_request': {
chown =     (
{
group = admin;
path = Applications;
user = root;
}
);
id = "com.google.Chrome";
options = "purge_ds_store";
pkgname = "Google Chrome-44.0.2403.155";
version = "44.0.2403.155";
}}}
PkgCreator: Package already exists at path /Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/Google Chrome-44.0.2403.155.pkg.
PkgCreator: Existing package matches version and identifier, not building.
{'Output': {'pkg_path': u'/Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/Google Chrome-44.0.2403.155.pkg'}}
JSSImporter
{'Input': {'API_PASSWORD': u'XXX',
'API_USERNAME': u'XXX',
'JSS_REPOS': [{
URL = "smb://jss.new-london.k12.ia.us";
name = JSS;
password = XXX;
"share_name" = CasperShare;
type = SMB;
username = XXX;
}],
'JSS_URL': u'https://jss.new-london.k12.ia.us:8443',
'JSS_VERIFY_SSL': True,
'category': u'Browsers',
'groups': (
{
name = "^Google Chrome-update-smart";
smart = 1;
"template_path" = "/Users/administrator/Library/AutoPkg/RecipeOverrides/AutoUpdateSmartGroupTemplate.xml";
}
),
'pkg_path': u'/Users/administrator/Library/AutoPkg/Cache/local.jss.GoogleChrome/Google Chrome-44.0.2403.155.pkg',
'policy_category': u'Auto Update',
'policy_template': u'/Users/administrator/Library/AutoPkg/RecipeOverrides/AutoUpdatePolicyTemplate.xml',
'prod_name': u'Google Chrome',
'self_service_description': u'Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.',
'self_service_icon': u'Google Chrome.png',
'version': u'44.0.2403.155'}}
JSSImporter: No value supplied for package_info, setting default value of:
JSSImporter: No value supplied for package_notes, setting default value of:
JSSImporter: No value supplied for JSS_MIGRATED, setting default value of: False
JSSImporter: No value supplied for os_requirements, setting default value of:
JSSImporter: No value supplied for JSS_SUPPRESS_WARNINGS, setting default value of: True
JSSImporter: Category type: category-'Browsers' already exists according to JSS, moving on...
JSSImporter: Category type: policy_category-'Auto Update' already exists according to JSS, moving on...
JSSImporter: Pkg-object already exists according to JSS, moving on...
JSSImporter: Package upload not needed.
JSSImporter: Found file: /Users/administrator/Library/AutoPkg/RecipeOverrides/AutoUpdateSmartGroupTemplate.xml
Traceback (most recent call last):
File "/usr/local/bin/autopkg", line 1651, in
sys.exit(main(sys.argv))
File "/usr/local/bin/autopkg", line 1645, in main
exit(subcommands[verb]'function')
File "/usr/local/bin/autopkg", line 1458, in run_recipes
autopackager.process(recipe)
File "/Library/AutoPkg/autopkglib/init.py", line 470, in process
self.env = processor.process()
File "/Library/AutoPkg/autopkglib/init.py", line 299, in process
self.main()
File "/Library/AutoPkg/autopkglib/JSSImporter.py", line 919, in main
self.groups = self.handle_groups()
File "/Library/AutoPkg/autopkglib/JSSImporter.py", line 431, in handle_groups
computer_group = self._add_or_update_smart_group(group)
File "/Library/AutoPkg/autopkglib/JSSImporter.py", line 472, in _add_or_update_smart_group
update_env="jss_group_updated", added_env="jss_group_added")
File "/Library/AutoPkg/autopkglib/JSSImporter.py", line 526, in _update_or_create_new
self.j.put(url, recipe_object)
File "/Library/Python/2.7/site-packages/python_jss-1.2.1-py2.7.egg/jss/jss.py", line 270, in put
self._error_handler(JSSPutError, response)
File "/Library/Python/2.7/site-packages/python_jss-1.2.1-py2.7.egg/jss/jss.py", line 185, in _error_handler
raise exception
jss.exceptions.JSSPutError: Response Code: 500	Response: Internal Server Error. The server encountered an unexpected condition which prevented it from fulfilling the request

@JonMunford Could you post your AutoUpdateSmartGroupTemplate.xml file, too?

<computer_group>
%group_name%
<is_smart>true</is_smart>

Application Title
0
<and_or>and</and_or>
<search_type>does not have</search_type>
%JSS_INVENTORY_NAME%

Application Title
1
<and_or>or</and_or>
<search_type>is</search_type>
%JSS_INVENTORY_NAME%

Application Version
2
<and_or>and</and_or>
<search_type>is not</search_type>
%VERSION%

</computer_group>

@JonMunford Could you put triple-backticks above and below? It's not parsing properly.
```
XML goes here
```

Thanks.. I couldn't remember how to mark it as code.

And here is a recipe override

@JonMunford - I think line 16 of your AutoUpdateSmartGroupTemplate.xml should be <search_type>has</search_type> instead of <search_type>is</search_type>.

I agree but am getting the error both ways. I had it "has" originally but in @sheagcraig  new JSS recipe set it is now "is" by default.  I'm seeing the issues either way.

Another symptom.  If i delete all records of the policy and smart group and then run it, the policy will work just fine. How ever when I run it a second time it fails.

Hey @homebysix , don't work on this any more right now.  I tracked it down to issues with modifying the smart groups in the jss.  Even when I try to do it by hand in the JSS i get a JSS server error. I'm going to work with them for a bit.
Sorry for the goose chase this morning.

Interesting. Sounds like you've got a JAMF support ticket in your future. Good luck!

Thanks @homebysix for looking at this with me.  I ended up having a ghost record in my JSS that was causing conflicting smart group entries from different tables causing the error when that record was added to or removed from a smart group.

Thanks @JonMunford <search_type>has</search_type> instead of <search_type>is</search_type>.
Has changed my life. This problem was driving me to the looney bin ;)


settings: make sure one can override CACHES in local_settings.py

Backport of "settings: make sure one can override CACHES in local_settings.py #1959" to 1.0.x

Codecov Report

Merging #1995 into 1.0.x will decrease coverage by 0.01%.
The diff coverage is 50%.

@@            Coverage Diff             @@
##            1.0.x    #1995      +/-   ##
==========================================
- Coverage   66.29%   66.28%   -0.02%
==========================================
  Files          56       56
  Lines        6608     6609       +1
  Branches     1319     1320       +1
==========================================
  Hits         4381     4381
  Misses       2004     2004
- Partials      223      224       +1

Impacted Files
Coverage Δ

webapp/graphite/app_settings.py
100% <ø> (ø)
:arrow_up:

webapp/graphite/settings.py
75% <50%> (-0.31%)
:arrow_down:

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 47f529c...9160cde. Read the comment docs.


Implement mass property please

I would like to use the mass property so I could make the ogar bot work with the apos launcher and I would love to be able to use that without having to make a function for it.
Also were is the respawn code?
One more thing how would you recommend me to make the bot press a key.
And another how would you obtain a center position for recombining purposes?

If you can port the calculations from python, look here:

cell mass
center of controlled cells

I would have to apply that to every cell though and I would assume it would be more useful to have mass implemented in the launcher.

Seems like the launcher only implements birthMass (code).
It would have to be updated when a new size is assigned in the world update packet. Or you can recalculate it every time you need it, like the original client does when drawing the mass of the cells when spectating.
The center of the controlled cells would also have to be recalculated after receiving a world update packet.

That is correct and on the center code that used a vec function might you know of any better way of going about this than getting a javascript vec library

centerX = (left + right) / 2;
centerY = (top + bottom) / 2;

thank you!

Hmm the last thing (I think) I need is a functional getType function for that I would need to tell player dangers from player food from food cells from viruses and optionally ejected mass but not really necessary. The main problem would be determining food cells (maybe small and don't move)  and if they are a certain size and they don't move they would be considered ejected mass. please tell me  how well this would work.

What I do is this. Works quite well.

Thank you very much for that

so far i have
/*
Copyright 2015 Devin Ryan

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this project except in compliance with the License. You may obtain a copy of
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing
permissions and limitations under the License.
*/

/*The MIT License (MIT)
Copyright (c) 2015 Apostolique
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.*/

window.botList = window.botList || [];

function OgarBot() {
    this.name = "OgarBot V1";
    //his.keyAction = function(key) {};
    this.displayText = function() {return [];}; //TODO do some awesome display text
    //compat stuff (all was replaced because of easyness and stuff)
    //this.cells = getPlayer();
    //this.visibleNodes = getMemoryCells();
    //this.gameServer.nodes = getMemoryCells();

    this.gameState = 0;
    this.path = [];

    this.predators = []; // List of cells that can eat this bot
    this.threats = []; // List of cells that can eat this bot but are too far away
    this.prey = []; // List of cells that can be eaten by this bot
    this.food = [];
    this.foodImportant = []; // Not used - Bots will attempt to eat this regardless of nearby prey/predators
    this.virus = []; // List of viruses
    this.juke = false;
    this.target;
    this.targetVirus; // Virus used to shoot into the target
    //this.centerPos = {x: 0, x:0}; probs useless
    this.ejectMass = 0; // Amount of times to eject mass
    this.oldPos = {x: 0, y:0};
    // Function
    this.getType = function() { //use this.stuffs
        //TODO get the type m9
        var cell = this.getLowestCell();
        if (!this.isNotMoving() && !this.isVirus()){
            return 0;
        } else if (this.size < 20 && !this.name && this.isNotMoving()){ //hmm this may not work with unnamed cells but if a tiny unnamed cell that isnt moving exists I think it is safe to eat. or you know use hasOwnProperty
            return 1;
        } else if (this.isVirus()){
            return 2;
        } else if ((cell.size == 37 || cell.size == 38) && !this.name){ //hmm maybe === instead of ==
            return 3;
        } else {
            return null; //error
        }
    };

    this.getMass = function() {
        return Math.Pow(this.size,2)/100; //or maybe parseInt(Math.pow(this.size/10, 2));
    };

    this.getLowestCell = function() {
        // Gets the cell with the lowest mass
        var myCells = getPlayer();
        if (myCells.length <= 0) {
            return null; // Error!
        }

        // Starting cell
        var lowest = myCells[0];
        for (i = 1; i < myCells.length; i++) {
            if (lowest.getMass() > myCells[i].getMass()) {
                lowest = myCells[i];
            }
        }
        return lowest;
    };

    this.mainLoop = function() { // Overrides the update function from player tracker
        //TODO make respawn code
        // Calc predators/prey
        var myCells = getPlayer();
        var allCells = getMemoryCells();
        var cell = this.getLowestCell();
        var r = cell.size;
        var allMyCellsPosX = [];
        var allMyCellsPosY = [];
        this.clearLists();

        for (var i in myCells) {
            allMyCellsPosX.push(cell[i].x);
            allMyCellsPosY.push(cell[i].y);
        }

        var left = Math.min(allMyCellsPosX);
        var right = Math.max(allMyCellsPosX);
        var top = Math.min(allMyCellsPosY);
        var bottom = Math.max(allMyCellsPosY);
        this.centerPos.x = (left + right) / 2;
        this.centerPos.y = (top + bottom) / 2;

        // Ignores targeting cells below this mass
        var ignoreMass = Math.min((cell.getMass() / 10), 150);

        //sort by dist from circle edges
        allCells.sort(function(a, b){
            return (getDist(a, cell) - cell.size - a.size) - (getDist(b, cell) - cell.size - b.size);
        });
        // Loop
        for (var i in allCells) {
            var check = allCells[i];

            // Cannot target itself
            for (var i = 0; i < myCells.length; i++) {
                if (check.id == myCells[i].id) {
                    continue;
                }
            }

            var t = check.getType();
            switch (t) {
                case 0:
                    // Cannot target teammates
                    if (getMode() == ":teams") {
                        if (check.color == cell.color) {
                            continue;
                        }
                    }

                    // Check for danger
                    if (cell.getMass() > (check.getMass() * 1.25)) {
                        // Add to prey list
                        this.prey.push(check);
                    } else if (check.getMass() > (cell.getMass() * 1.25)) {
                        // Predator
                        var dist = this.getDist(cell, check) - (r + check.size);
                        if (dist < 300) {
                            this.predators.push(check);
                            if ((myCells.length == 1) && (dist < 0)) {
                                this.juke = true;
                            }
                        }
                        this.threats.push(check);
                    } else {
                        this.threats.push(check);
                    }
                    break;
                case 1:
                    this.food.push(check);
                    break;
                case 2: // Virus
                    this.virus.push(check);
                    break;
                case 3: // Ejected mass
                    if (cell.getMass() > 20) {
                        this.food.push(check);
                    }
                    break;
                default:
                    break;
            }
        }

        // Get gamestate
        var newState = this.getState(cell);
        if ((newState != this.gameState) && (newState != 4)) {
            // Clear target
            this.target = null;
        }
        this.gameState = newState;

        // Action
        this.decide(cell);
        var mousePos = [this.mouse.x, this.mouse.y];
        return mousePos;

    };

    // Custom

    this.clearLists = function() {
        this.predators = [];
        this.threats = [];
        this.prey = [];
        this.food = [];
        this.virus = [];
        this.juke = false;
    };

    this.getState = function(cell) {
        var myCells = getPlayer();
        // Continue to shoot viruses
        if (this.gameState == 4) {
            return 4;
        }

        // Check for predators
        if (this.predators.length <= 0) {
            if (this.prey.length > 0) {
                return 3;
            } else if (this.food.length > 0) {
                return 1;
            }
        } else if (this.threats.length > 0) {
            if ((myCells.length == 1) && (cell.getMass() > 180)) {
                var t = this.getBiggest(this.threats);
                var tl = this.findNearbyVirus(t,500,this.virus);
                if (tl !== false) {
                    this.target = t;
                    this.targetVirus = tl;
                    return 4;
                }
            } else {
                // Run
                return 2;
            }
        }

        // Bot wanders by default
        return 0;
    };

    this.decide = function(cell) {
        var myCells = getPlayer();
        var allCells = getMemoryCells();
        // The bot decides what to do based on gamestate
        switch (this.gameState) {
            case 0: // Wander
                //console.log("[Bot] "+cell.getName()+": Wandering");
                if ((this.centerPos.x == this.mouse.x) && (this.centerPos.y == this.mouse.y)) {
                    // Get a new position
                    var index = Math.floor(Math.random() * this.gameServer.nodes.length);
                    var randomNode = this.gameServer.nodes[index];
                    var pos = {x: 0, y: 0};

                    if ((randomNode.getType() == 3) || (randomNode.getType() == 1)) {
                        pos.x = randomNode.x;
                        pos.y = randomNode.y;
                    } else {
                        // Not a food/ejected cell
                        pos = this.gameServer.getRandomPosition();
                    }

                    // Set bot's mouse coords to this location
                    this.mouse = {x: pos.x, y: pos.y};
                }
                break;
            case 1: // Looking for food
                //console.log("[Bot] "+cell.getName()+": Getting Food");
                if ((!this.target) || (allCells.indexOf(this.target) == -1)) {
                    // Food is eaten/out of sight... so find a new food cell to target
                    this.target = this.findNearest(cell,this.food);

                    this.mouse = {x: this.target.x, y: this.target.y};
                }
                break;
            case 2: // Run from (potential) predators
                var avoid = this.combineVectors(this.predators);
                //console.log("[Bot] "+cell.getName()+": Fleeing from "+avoid.getName());

                // Find angle of vector between cell and predator
                var deltaY = avoid.y - cell.y;
                var deltaX = avoid.x - cell.x;
                var angle = Math.atan2(deltaX,deltaY);

                // Now reverse the angle
                if (angle > Math.PI) {
                    angle -= Math.PI;
                } else {
                    angle += Math.PI;
                }

                // Direction to move
                var x1 = cell.x + (500 * Math.sin(angle));
                var y1 = cell.y + (500 * Math.cos(angle));

                this.mouse = {x: x1, y: y1};

                // Cheating
                // No cheating on official agar servers :P
                /*
                if (cell.getMass() < 250) {
                    cell.getMass() += 1;
                }
                */
                if (this.juke) {
                    // Juking
                    this.gameServer.splitCells(this);
                }

                break;
            case 3: // Target prey
                if ((!this.target) || (cell.getMass() < (this.target.getMass() * 1.25)) || (allCells.indexOf(this.target) == -1)) {
                    this.target = this.getRandom(this.prey);
                }
                //console.log("[Bot] "+cell.getName()+": Targeting "+this.target.getName());

                this.mouse = {x: this.target.x, y: this.target.y};

                var massReq = 1.25 * (this.target.getMass() * 2); // Mass required to splitkill the target

                var speed = 30 * Math.pow(cell.getMass(), -1.0 / 4.5) * 50 / 40;

                if ((cell.getMass() > massReq) && (myCells.length == 1)) { // Will not split into more than 2 cells
                    var splitDist = (4 * (speed * 5)) + (cell.size * 1.75); // Distance needed to splitkill
                    var distToTarget = this.getAccDist(cell,this.target); // Distance between the target and this cell

                    if (splitDist >= distToTarget) {
                        if ((this.threats.length > 0) && (this.getBiggest(this.threats).getMass() > (1.25 * (cell.getMass()/2)))) {
                            // Dont splitkill when they are cells that can possibly eat you after the split
                            break;
                        }
                        // Splitkill
                        this.gameServer.splitCells(this);
                    }
                }
                break;
            case 4: // Shoot virus
                if ((!this.target) || (!this.targetVirus) ||(myCells.length !== 1) || (allCells.indexOf(this.target) == -1) || (allCells.indexOf(this.targetVirus) == -1)) {
                    this.gameState = 0; // Reset
                    this.target = null;
                    break;
                }

                // Make sure target is within range
                var dist = this.getDist(this.targetVirus,this.target) - (this.target.size + 100);
                if (dist > 500) {
                    this.gameState = 0; // Reset
                    this.target = null;
                    break;
                }

                // Find angle of vector between target and virus
                var angle = this.getAngle(this.target,this.targetVirus);

                // Now reverse the angle
                var reversed = this.reverseAngle(angle);

                // Get this bot cell's angle
                var ourAngle = this.getAngle(cell,this.targetVirus);

                // Check if bot cell is in position
                if ((ourAngle <= (reversed + 0.25) ) && (ourAngle >= (reversed - 0.25) )) {
                    // In position!
                    this.mouse = {x: this.targetVirus.x, y: this.targetVirus.y};

                    // Shoot
                    for (var v = 0; v < 7 ;v++) {
                        this.gameServer.ejectMass(this);
                    }

                    // Back to starting pos
                    this.mouse = {x: cell.x, y: cell.y};

                    // Cleanup
                    this.gameState = 0; // Reset
                    this.target = null;
                } else {
                    // Move to position
                    var r = cell.size;
                    var x1 = this.targetVirus.x + ((350 + r) * Math.sin(reversed));
                    var y1 = this.targetVirus.y + ((350 + r) * Math.cos(reversed));
                    this.mouse = {x: x1, y: y1};
                }

                // console.log("[Bot] "+cell.getName()+": Targeting (virus) "+this.target.getName());
                break;
            default:
                //console.log("[Bot] "+cell.getName()+": Idle "+this.gameState);
                this.gameState = 0;
                break;
        }

        // Recombining
        if (myCells.length > 1) {
            var r = 0;
            // Get amount of cells that can merge
            for (var i in myCells) {
                if (myCells[i].recombineTicks === 0) {
                    r++;
                }
            }
            // Merge
            if (r >= 2) {
                this.mouse.x = this.centerPos.x;
                this.mouse.y = this.centerPos.y;
            }
        }
    };

    // Finds the nearest cell in list
    this.findNearest = function(cell,list) {
        if (this.currentTarget) {
            // Do not check for food if target already exists
            return null;
        }

        // Check for nearest cell in list
        var shortest = list[0];
        var shortestDist = this.getDist(cell,shortest);
        for (var i = 1; i < list.length; i++) {
            var check = list[i];
            var dist = this.getDist(cell,check);
            if (shortestDist > dist) {
                shortest = check;
                shortestDist = dist;
            }
        }

        return shortest;
    };

    this.getRandom = function(list) {
        // Gets a random cell from the array
        var n = Math.floor(Math.random() * list.length);
        return list[n];
    };

    this.combineVectors = function(list) {
        // Gets the angles of all enemies approaching the cell
        var pos = {x: 0, y: 0};
        var check;
        for (var i = 0; i < list.length; i++) {
            check = list[i];
            pos.x += check.x;
            pos.y += check.y;
        }

        // Get avg
        pos.x = pos.x/list.length;
        pos.y = pos.y/list.length;

        return pos;
    };

    this.checkPath = function(cell,check) {
        // Checks if the cell is in the way

        // Get angle of vector (cell -> path)
        var v1 = Math.atan2(cell.x - this.mouse.x, cell.y - this.mouse.y);

        // Get angle of vector (virus -> cell)
        var v2 = this.getAngle(check,cell);
        v2 = this.reverseAngle(v2);

        if ((v1 <= (v2 + 0.25) ) && (v1 >= (v2 - 0.25) )) {
            return true;
        } else {
            return false;
        }
    };

    this.getBiggest = function(list) {
        // Gets the biggest cell from the array
        var biggest = list[0];
        for (var i = 1; i < list.length; i++) {
            var check = list[i];
            if (check.getMass() > biggest.getMass()) {
                biggest = check;
            }
        }

        return biggest;
    };

    this.findNearbyVirus = function(cell,checkDist,list) {
        var r = cell.size + 100; // Gets radius + virus radius
        for (var i = 0; i < list.length; i++) {
            var check = list[i];
            var dist = this.getDist(cell,check) - r;
            if (checkDist > dist) {
                return check;
            }
        }
        return false; // Returns a bool if no nearby viruses are found
    };

    this.checkPath = function(cell,check) {
        // Get angle of path
        var v1 = Math.atan2(cell.x - this.mouse.x,cell.y - this.mouse.y);

        // Get angle of vector (cell -> virus)
        var v2 = this.getAngle(cell,check);
        var dist = this.getDist(cell,check);

        var inRange = Math.atan((2 * cell.size)/dist); // Opposite/adjacent
        console.log(inRange);
        if ((v1 <= (v2 + inRange)) && (v1 >= (v2 - inRange))) {
            // Path collides
            return true;
        }

        // No collide
        return false;
    };

    this.getDist = function(cell,check) {
        // Fastest distance - I have a crappy computer to test with :(
        var xd = (check.x - cell.x);
        xd = xd < 0 ? xd * -1 : xd; // Math.abs is slow

        var yd = (check.y - cell.y);
        yd = yd < 0 ? yd * -1 : yd; // Math.abs is slow

        return (xd + yd);
    };

    this.getAccDist = function(cell,check) {
        // Accurate Distance
        var xs = check.x - cell.x;
        xs = xs * xs;

        var ys = check.y - cell.y;
        ys = ys * ys;

        return Math.sqrt( xs + ys );
    };

    this.getAngle = function(c1,c2) {
        var deltaY = c1.y - c2.y;
        var deltaX = c1.x - c2.x;
        return Math.atan2(deltaX,deltaY);
    };

    this.reverseAngle = function(angle) {
        if (angle > Math.PI) {
            angle -= Math.PI;
        } else {
            angle += Math.PI;
        }
        return angle;
    };

}
window.botList.push(new OgarBot());

window.updateBotList(); //This function might not exist yet.

Note you will need to add proper tamper monkey parameters but when you do it says uncaught type error x is not defined but I don't know why this is happening it says this is at 144 but it isn't as far as I can see so if you could pinpoint the issue that would be awesome!

I didn't feel the need to implement a mass property because the mass is just:
var mass = size * size / 100;

Oof, could you put that on gist.github.com and just post a link please?

sorry here it is applezBot

I did more work on applezBot and now it says cell.getMass is not a function when it is am I supposed to define getmass differently?

I did a first pass of your code and solved a bunch of errors:
applezBot
The next error to solve is: "Uncaught TypeError: getDist is not a function"

Perfect, now the bot runs.

That's because I didn't replace the game server split thing to hit the space bar what is your favorite way of doing that?

opCode(17)

I am on mobile atm so could you do that?

It's done already. applezBot

I mean the w virus shoot part

Wow some of those mistakes are bad that I made but I am still somewhat noob at js but I am learning. But one problem is the switch in main loop you must use the check cell not the player or else it only judges itself.  The main things that confused me was why I couldn't do  object.function and this vs that. Thanks very much for the help :)

np, I learned that yesterday.

I see the problem the bot is always targeting prey instead of food cells because the isnotmoving code thinks that new cells that just spawned in are moving because they were not in that location (or any location) before then so it does not ever target nearby food but we may also have to sort food by dist just in case but im not sure about that

As I look around more that seems to be the case along with the fact that in the decide code it doesn't know what cell is so you must add var cell = this.getLowestCell();  or however you would spell that. but after further poking around the code it seems that it has trouble finding food but idk what thats about

New cells that just spawned and didn't move yet are seen as not moving.

hmm then why is it always looking for prey that is added on the food list?

The main issue at this point seems to be the gettype function has the virus code commented off because it crashes the client might you know how to fix that issue @Apostolique?

Here is my fix: applezBot
I changed the loop so that it doesn't use the last element in allCells. I have no idea why, but the last element of that list is not a cell.

weird.

Actually that makes it not identify threats sometimes...


Update the 'introducing' article with detailed rationale information.

Docs Build status updates of commit 3d33866:
:clock10: Full build: the average full build time is 33 min(s) 50 sec(s), this is based on the last 77 build(s) for this repository.
:warning: This is a FULL build due to the incremental build being disabled in configuration file (.openpublishing.publish.config.json in 'live' branch). For more detailed info, please click here.

Docs Build status updates of commit 3d33866:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs-conceptual/azps-2.0.0/new-azureps-module-az.md
:white_check_mark:Succeeded
View (azps-2.0.0)

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Docs Build status updates of commit 035ec6a:
:clock10: Full build: the average full build time is 33 min(s) 49 sec(s), this is based on the last 78 build(s) for this repository.
:warning: This is a FULL build due to the incremental build being disabled in configuration file (.openpublishing.publish.config.json in 'live' branch). For more detailed info, please click here.

Docs Build status updates of commit 035ec6a:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs-conceptual/azps-2.0.0/new-azureps-module-az.md
:white_check_mark:Succeeded
View (azps-2.0.0)

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Page-subclasses to take children instead of builder

Description
Prior to this change, the MaterialPage and CupertinoPage would take a builder, which was a footgun:
class _KeepsStateTestWidgetState extends State<KeepsStateTestWidget> {
  String _subpage = 'subpage';

  @override
  Widget build(BuildContext context) {
    return CupertinoApp(
      home: Navigator(
        key: widget.navigatorKey,
        pages: <Page<void>>[
          const CupertinoPage<void>(builder: (BuildContext context) => Text('home')),
          if (_subpage != null) CupertinoPage<void>((BuildContext context) => Text(_subpage)),
        ],
        onPopPage: (Route<dynamic> route, dynamic result) {
          if (!route.didPop(result)) {
            return false;
          }
          setState(() {
            _subpage = null;
          });
          return true;
        },
      ),
    );
  }
}

When the second page is transitioning out, _subpage is set to null. Because the Navigator is rebuild, it would rebuild all its routes as well with that the builder of the second executes again, rebuilding itself with _subpage == null, which is not what people want.
This PR changes the API of CupertinoPage and MaterialPage. Instead of taking a builder, it takes a prebuild child widget to avoid this problem.
This PR also removes the CustomBuilderPage and TransitionBuilderPage. We can come up with a version of them that doesn't rely on builders in the future.
Related Issues
Fixes https://github.com/flutter/flutter/issues/66695.
Tests
I added the following tests:

Updated existing tests
Added tests to verify that pages don't loose their state when popped.

Checklist
Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I signed the CLA.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I updated/added relevant documentation (doc comments with ///).
[x] All existing and new tests are passing.
[x] The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.

[x] No, no existing tests failed, so this is not a breaking change.
[ ] Yes, this is a breaking change. If not, delete the remainder of this section.

[ ] I wrote a design doc: https://flutter.dev/go/template Replace this with a link to your design doc's short link
[ ] I got input from the developer relations team, specifically from: Replace with the names of who gave advice
[ ] I wrote a migration guide: https://flutter.dev/go/breaking-changes-template Replace this with a link to a pull request that adds the migration guide to https://flutter.dev/docs/release/breaking-changes

internal test failure, looks like some projects have started using the materialPage class.

cl/334055440 fixes google testing for this PR.

What should we use in place of TransitionBuilderPage?

You can define your on Page subclass that in createRoute returns a PageRouteBuilder.


RPi pico and MCP3424

I have an issue when using RPi pico (microPython and MCP3424)
when it's trying to convert_and_read, it gave an error as below:
object with buffer protocol required
below is my code:
from machine import Pin, I2C
from MCP342x import MCP342x
import time

sensor_type = "None"

try:
    i2c = I2C(0 , sda=Pin(4), scl=Pin(5), freq=100000)
    #
    #addr68_ch0 = MCP342x(i2c, 0x68, channel=0, resolution=18, gain=8,
    #                     scale_factor=1000.0)
    addr68_ch0 = MCP342x(i2c, address=0x68,
           device='MCP3424',
           channel=0,
           gain=1,
           resolution=18,
           continuous_mode=False,
           scale_factor=1.0,
           offset=0.0)

    time.sleep(1)
    print('Ready to read ADC')
except Exception as error:
    print("Err in init",error)
    pass

while True:
    adc_values = [-1.0, -1.0, -1.0, -1.0]
    try:
        adc_values[0] = addr68_ch0.convert_and_read()

    except Exception as error:
        print("err in reading",error)

    print("ADC:{ch0},{ch1},{ch2},{ch3}".format(
        sensor_type=sensor_type, ch0=adc_values[0], ch1=adc_values[1],
        ch2=adc_values[2], ch3=adc_values[3]))

    time.sleep(1.0)

Solved
convert function should change as below:
    def convert(self):         """Initiate one-shot conversion.         The current settings are used, with the exception of continuous mode."""         c = self.config         c &= (~MCP342x._continuous_mode_mask & 0x7f)  # Force one-shot         c |= MCP342x._not_ready_mask                  # Convert         #print('Convert ' + hex(self.address) + ' config: ' + bin(c))         data_ = bytearray(1)         data_[0] = c         self.i2c.writeto(self.address, data_)

Does this library work with https://www.digikey.pl/en/products/detail/microchip-technology/MCP3424-E-SL/1680890 ADC? Because i cant find anything related to thie PyCom board mentioned in the description.


samsung cups drivers fail to build due tu cups/gcc package changes (multiple outputs)

Issue description
In commit 5787ac63649e4e3f11b70f44fa66c7b304956c86 multiple outputs were introduced to cups.
Because output "out" is not "default" one, driver cannot be build anymore. I'm not sure why but switching the order of outputs in cups breaks cups build. I tried to fix driver package and I used {cups.out} instead of {cups}, this helped partially.
Looks like the same happened to some system libraries and samsung driver cannot find "libstdc++" anymore.
++ echo 'Patching ELF file: x86_64/smfpnetdiscovery'
Patching ELF file: x86_64/smfpnetdiscovery
++ patchelf --set-interpreter /nix/store/68gvzfvm4886b4ni6wfl1j5n9di69zid-glibc-2.23/lib/ld-linux-x86-64.so.2 --set-rpath /nix/store/zpg6x8x2a840nzrl3cq5mly1l7cvvkjy-cups-2.1.3/lib:/nix/store/bxn5llxrp47cxws5zj20nrwig28g6qw6-gcc-5.3.0/lib:/nix/store/6mmslibwczk3y4sdnxv5549pz9l1jcqq-gcc-wrapper-5.3.0/lib:/nix/store/65sxr06rmq3i96lmd8pclvc1jzyh1gc8-glibc-2.23-dev/lib x86_64/smfpnetdiscovery
++ ldd x86_64/smfpnetdiscovery
++ grep 'not found'
    libstdc++.so.6 => not found
++ exit 1

Original build command:
  32     my_patchelf \
  33       --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
  34       --set-rpath ${cups}/lib:$(cat $NIX_CC/nix-support/orig-cc)/lib:${stdenv.glibc}/lib \
  35       - ${arch}/{pstosecps,rastertospl,smfpnetdiscovery}

I tried to fix it like (but without any luck):
    31     my_patchelf \
    32       --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
!   33       --set-rpath ${cups.out}/lib:$(cat $NIX_CC/nix-support/orig-cc)/lib:${stdenv.cc}/lib:${stdenv.glibc}/lib \
    34       - ${arch}/{pstosecps,rastertospl,smfpnetdiscovery}

Should "out" be used as first output for backward compatibility?
How to include libstdc++ properly?

Steps to reproduce
nix-env -iA nixos.samsung-unified-linux-driver_1_00_37
Technical details

System:16.09pre84674.fbde3a7
Nix version: 1.11.2
Nixpkgs version: 16.09pre85363.886c03a

I also had this issue and almost completely rewrote the nix expression. Anyway, the scanner part is still pending by my side, so I will not do a PR in the near future. Perhaps @nckx could update the package.
Try the following:
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/

For me scanner currently is not working as well.
Thanks for sharing the solution, I'll try

@spinus: feel free to @notify the maintainers when you've got a package-specific issue like this. It might go unnoticed otherwise. Unfortunately I don't currently have access to any Nix/NixOS machines or my Samsung printer, let alone a scanner. I'll see what I can do.
@jokogr: any WIP you could point me to? I'm curious :-)

@nckx: Sure thing, have a look at https://github.com/jokogr/nixpkgs/commit/c41e771a388dca6cb5f15edab2fd36fd6f96c8a8

Mostly I try to clean up my_patchelf
I add a symlink for libstdc++.so.6
I add a symlink for gs (ghostscript) (@spinus: you might want to add this, as well)

With this setup my Samsung M2875FD network printer works properly and smfpnetdiscovery detects it as a scanner, too. I still have to check sane, though, it's in my backlog.

I'm also experiencing this issue. Are we able to merge what we've got so far, even though scanner support is broken? Currently he package is uninstallable in its

I lost track of this a bit, sorry. I don't have access to any working Samsung printers nowadays (I even asked some friends who used to have one — no luck).
@kierdavis: I'll promptly merge anything that builds and improves the situation for those who do. Thanks!

@kierdavis: just FYI, people @-mentioned in subsequent edits to post won't receive mail (unless, like me, they were already subscribed).

Cool, I'll see if I can get my M2675FN working using this driver in the next few days.

Printing worked first time on my M2675FN. Haven't tested anything relating to the scanner yet. Will do a PR shortly.

@kierdavis and the rest, feel free to test my PR at https://github.com/NixOS/nixpkgs/pull/20060, I have tested it with a networked M2875FD.

Thanks, @jokogr!
I'll go ahead and close this; if certain printers fail to print (not uncommon after Samsung driver updates), that's a separate issue.

@jokogr your PR worked for me, brilliant.
@nckx I wouldn't advise closing this just yet, as the original issue (the samsung-unified-linux-driver_1_00_37 package failing to build) hasn't been addressed. I've sent a PR with the contents of https://github.com/jokogr/nixpkgs/commit/c41e771a388dca6cb5f15edab2fd36fd6f96c8a8, which does build correctly and printing appears to work on M2875FD and M2675FN devices.

@kierdavis: yup, I'll merge that when Travis finishes.

(@jokogr: if that's all right with you, of course.)

Just tested and works on M2070 (pretty basic model).
Thank you very much for help @kierdavis, @jokogr, @nckx !


isempty, isnotempty filters

In Notion, we have the ability to filter databases via "field is empty" or "field isnotempty". Would be really good to have this in addition to the other filter options already in place.

sure, and its really easy to implement. I thought it was already possible with = or != empty


Fixing Date Formatter

Fixing date format on hover tool. Removing TOOLTIPS and making hover definition explicit. Here is a screen shot when running the webapp locally with the changes.

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

In the file exoctk/contam_visibility/visibilityPA.py:

Line 142:26: E712 comparison to False should be 'if cond is False:' or 'if not cond:'

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


Performance profiling and benchmarking for algorithms

What is the expected behavior?
We need performance profiling of our codes to identify performance issues for algorithms such as VQE, QAOA, and QPE...
TODO:

[ ] Pickup problems and algorithms for benchmarks
[ ] Implement benchmarks (test/benchmarks?)

References:

Terra's asv https://qiskit.github.io/qiskit/
https://github.com/Qiskit/qiskit/tree/master/test/benchmarks

I transferring this feature request to the new qiskit-algorithms package.


Building out SF documentation

This PR extends the existing Structure Function tutorial notebook.
In the process of extending the tutorial, I identified a few rough edges that are also fixed in this PR. Most notably is moving the SF_METHODS global variable out of the original init.py file, and into it's own module, calculator_registrar.py. Along with the global variable, I moved one of the supporting methods out of base_calculator.py into calculator_registrar.py.
While doing that I also moved a couple of tests to maintain symmetry, and added a test for a little more coverage.

Codecov Report

Merging #123 (d59b50c) into main (3de261a) will increase coverage by 0.07%.
The diff coverage is 100.00%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
+ Coverage   87.50%   87.57%   +0.07%
==========================================
  Files          18       19       +1
  Lines        1016     1022       +6
==========================================
+ Hits          889      895       +6
  Misses        127      127

Impacted Files
Coverage Δ

...ies/analysis/structure_function/base_calculator.py
94.31% <ø> (-0.42%)
:arrow_down:

...lsstseries/analysis/structure_function/__init__.py
100.00% <100.00%> (ø)

...ysis/structure_function/base_argument_container.py
100.00% <100.00%> (ø)

...nalysis/structure_function/calculator_registrar.py
100.00% <100.00%> (ø)

I think what you've added docs wise is fantastic, thanks a ton for this! At some point, we should probably add even a bit more to the structure function docs providing description of what the function is doing scientifically. We have a lot of docs right now on how to interact with the API, but at the end of the day we will really want the achievable science to be front and center in our docs (@nevencaplar feel free to chime in on this). But again, that's very much future work and this looks great. Let me know when you take this out of draft mode and I'll take another look/approve!


⚠ Bofrost.de has degraded performance

In 9d47e5c, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1420 ms

Resolved: Bofrost.de performance has improved in c8812d3 after 7 minutes.