Magic numbers rule?

I can't find a rule which checks if one uses hardcodes such as magic number comparisons.
For example:
IF moo > 2.
  WRITE 'boo'.
ENDIF.

Here value 2 is magic. Noone knows what it is. Is there a rule for that?
another example:
IF moo = 'SOME_TEXT'

currently no rule for that

@DGRHicron the examples are when the values are used in compare conditions? how about passing a value to a method, are these also considered magic?

Ok. I see that I am mixing two rules.
One is the rule for magic numbers. And I think you are right that sometimes when you call a method number passed as parameter is not considered magic.
This example for me is ok.
write_n_lines( lines = 5 ).
I tried to come up with a counter-example as the wrong one, but couldn't find one that was convincing enough.
The second rule is for checking hardcodes of text.
SELECT ... WHERE some_field = 'BLABLA'

I'm not convinced a rule is necessary, or would be very difficult to get right as it can be subjective and context-dependent.
SELECT ... WHERE status = 'ERROR' doesn't need a constant.
SELECT ... WHERE status = '74' does.
I also don't believe hardcoding is bad. We used to go by the principle of wrapping everything in constants, but with refactoring tools this is not necessary. A clear single-use value doesn't need a constant.
My approach is to start as local as possible (literal) and expand scope as needed:

If used once and clear meaning -> literal
...  if not clear -> constant
When it is used a second time in module -> quickfix - extract to local constant
When it is used in another method -> quickfix convert to class attribute
When it is used in multiple classes -> convert to static or possibly DDIC if used in UI

@pokrakam, I assumed that abaplint's origin is somehow connected with Clean Abap guide. That's why I opened this issue. Here is the link to the constants section. https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#constants

abaplint pre-dates SAP's Clean ABAP guide, abapOpenChecks pre-dates abaplint

@DGRHicron I am not contradicting Clean ABAP. A Magic Number is a literal token (not necessarily a number) where it is not obvious why that value is used or where it comes from, it appears derived by magic.
In my example 'ERROR' is not a magic number, '74' is.
The Clean Code book also explains that constants are not needed if it's clear:
Some constants are so easy to recognize that they don’t always need a named constant to hide behind so long as they are used in conjunction with very self-explanatory code. For example:
int dailyPay = hourlyRate * 8;
double circumference = radius * Math.PI * 2;
Martin, Robert C.. The Robert C. Martin Clean Code Collection (Collection) (Robert C. Martin Series) (p. 435). Pearson Education. Kindle Edition.
A method name can also be a valid way of describing a literal.
METHOD get_root_node.
  result = nodes[ id = '0000' ].
ENDMETHOD.

All of which brings me to the opinion that it would be very difficult for abaplint to handle magic numbers properly and I'd probably just disable such a rule.

It is implemented in code_pal for only few cases:
https://github.com/SAP/code-pal-for-abap/blob/master/docs/checks/magic-number.md


refinements to make installing vcs from CLI work smoother

I ran into this earlier where installing a vcs from CLI yields the wrong  Pipfile entry such that it cannot lock; I iterated on this bug here -- I believe there are reports of this in the backlog as well.
The checklist

[ ] Associated issue
[ ] A news fragment in the news/ directory to describe this fix with the extension .bugfix.rst, .feature.rst, .behavior.rst, .doc.rst. .vendor.rst. or .trivial.rst (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

Unfortunately these code paths are a bit complex and will require more effort to not cause a regression.


u-boot: Disable flasher check, add usb

By default flasher check comes enabled from
meta-balena, but none of the raspberrypi
machines generate a flasher image.
Disabling this allows for adding 'usb' to
resin_uboot_device_types without actually
starting usb, unless and until it is confirmed that
there's no balena image on the sd-card.
With this change:

uboot first attempts to load the kernel from the sd-card, if it is present and contains a balenaOS image. it looks no further for the usb, nor does it call "usb start" in this case.

if no image is detected on the sd-card, usb will be started and checked for a balenaOS image, from where kernel will be loaded

Note: Added for rpi3-64, but we could very well extend for other machines too.
Addresses: https://github.com/balena-os/balena-raspberrypi/issues/341

@ZubairLK I checked the u-boot flow, at least for the rpi3, and it seems like it's only the flasher image check that does trigger a "usb start" if "usb" is in the "resin_uboot_device_types" array.
With this PR usb is started and the kernel is loaded from usb-key only if there's no balena image present on the emmc. There's no other invoked because it was already removed from preboot.
So unless I'm missing something - please let me know if I do - it looks like the requested behavior is pretty much addressed by the u-boot environment implementation you already did in meta-balena. (btw, bootmode pins cannot be queried using vcmailbox as the firmware does not support that, confirmed by upstream. They didn't help much anyway as the sd-card image presence check is very fast in uboot)


fastest way to drop bad ips

with regards to this issue
https://github.com/cloudwego/hertz/issues/426
how do i drop ips way before intercepted by hertz etc? at the network ip layer. because in the example shown, i still need to use the get certificate function to get the ip. i would like to drop the ip as fast as detected as bad ip in within my array

same to https://github.com/valyala/fasthttp/issues/1424

what i mean is the fastest way to drop bad ip before routing through hertz? at netpoll ip detection layer?

what i mean is the fastest way to drop bad ip before routing through hertz? at netpoll ip detection layer?

Hertz also support Hijack.

I'm in the process of putting together this section of the document and I expect to finish it today. refer to https://github.com/cloudwego/cloudwego.github.io/pull/450


python311Packages.pysensibo: 1.0.25 -> 1.0.27

Changelog: https://github.com/andrey-git/pysensibo/releases/tag/1.0.27
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 230352 run on x86_64-linux 1

1 package failed to build:

home-assistant-component-tests.sensibo

2 packages built:

python310Packages.pysensibo
python311Packages.pysensibo


Added Cocktail App

Description 📜
Cocktail App gives you data / list of all cocktails available in the world. you can't drink obviously,  just look and see data i imagine you are drinking it.
Fixes #606

Type of change 📝

[x] Add a new project

Domain of Contribution 📊
Please delete options that are not relevant.And in order to tick the check box just but x inside them for example [x] like this

[x] Project using ReactJs

Checklist ✅
Please delete options that are not relevant.And in order to tick the check box just but x inside them for example [x] like this

[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I'm GSSoC'22 contributor

@meinhoonharsh DONE BROTHER PLEASE REVIEW IT NOW


Tests are failing on firefox 31.3.0

To reproduce: open RunLayoutTests.html in firefox.

Yeah, I tried to get it working on Firefox but couldn't get it to work 100% of the time so I gave up. Pull requests to fix it are more than welcome

What is the problem with firefox?  I would like to try and fix the bug.

If I remember correctly, it had to do with the creation of the iframe and setting css. I couldn't get the timings right.
https://github.com/facebook/css-layout/blob/master/src/Layout-test-utils.js#L52-L83

Hi Christopher,
I’m writing because I need your help.  I was looking at the java code for iframe.  I would like very much to help you and other java developers on the Github site but my java is at the basic level.  I got an A+ in the basic course.  How do I get to your level?  Your program in iframe uses function but I know that methods in java start with public static void or public static int.  I would really appreciate your advice.
Thank you,
Ben

On Feb 4, 2015, at 11:21 AM, Christopher Chedeau<EMAIL_ADDRESS>wrote:
If I remember correctly, it had to do with the creation of the iframe and setting css. I couldn't get the timings right.
https://github.com/facebook/css-layout/blob/master/src/Layout-test-utils.js#L52-L83 https://github.com/facebook/css-layout/blob/master/src/Layout-test-utils.js#L52-L83
—
Reply to this email directly or view it on GitHub https://github.com/facebook/css-layout/issues/25#issuecomment-72885114.


Push model to Huggingface - credentials??

Reminder

[X] I have read the README and searched the existing issues.

System Info
All latest and working.
Reproduction
Where do I put the credentials to login to my Huggingface account to push the model?
Expected behavior
No response
Others
Where do I put the credentials to login to my Huggingface account to push the model?

hf_hub_token or use huggingface-cli

Where does the hub token go?
On Thu, Jul 25, 2024, 9:42 AM hoshi-hiyouga @.***>
wrote:

hf_hub_token or use huggingface-cli
—
Reply to this email directly, view it on GitHub
https://github.com/hiyouga/LLaMA-Factory/issues/4968#issuecomment-2250949862,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A6NKU7BL4XGOECX6KXNAIELZOETI5AVCNFSM6AAAAABLO4CDQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJQHE2DSOBWGI
.
You are receiving this because you authored the thread.Message ID:
@.***>


catch Exception in oauth2.py

currently we'd get a 500 Internal Error if we pass an invalid redirect_uri to the /authorized view. Here's the backtrace, we can find that there's a ValueError from oauthlib escaped without any catch.
217   File "/data/apps/clouda_oauth2/parts/flask-oauthlib/flask_oauthlib/provider/oauth2.py", line 387, in decorated
218     uri, http_method, body, headers
219   File "/data/apps/clouda_oauth2/eggs/oauthlib-0.7.2-py2.7.egg/oauthlib/oauth2/rfc6749/endpoints/base.py", line 64, in wrapper
220     return f(endpoint, uri, *args, **kwargs)
221   File "/data/apps/clouda_oauth2/eggs/oauthlib-0.7.2-py2.7.egg/oauthlib/oauth2/rfc6749/endpoints/authorization.py", line 110, in validate_authorization_request
222     uri, http_method=http_method, body=body, headers=headers)
223   File "/data/apps/clouda_oauth2/eggs/oauthlib-0.7.2-py2.7.egg/oauthlib/common.py", line 395, in __init__
224     self._params.update(dict(urldecode(self.uri_query)))
225   File "/data/apps/clouda_oauth2/eggs/oauthlib-0.7.2-py2.7.egg/oauthlib/common.py", line 129, in urldecode
226     raise ValueError(error % (set(query) - urlencoded, query))
227 ValueError: Error trying to decode a non urlencoded string. Found invalid characters: set([u':', u'/']) in the string: 'response_type=code&client_id=oauthtestapp&redirect_uri=http://localhost:9000/callback&scope=all'. Please ensure the request/response body is x-www-f    orm-urlencoded.

this PR adds except Exception in oauth2.py to catch the uncaught exceptions from oauthlib.

hi lepture,
today i found another relevant 500 internal error which should be a 400 invalid request:
ValueError: Scopes must be set on post auth.
(5 additional frame(s) were not displayed)
...
  File "flask_oauthlib/provider/oauth2.py", line 421, in decorated
    return self.confirm_authorization_request()
  File "flask_oauthlib/provider/oauth2.py", line 442, in confirm_authorization_request
    uri, http_method, body, headers, scopes, credentials)
  File "oauthlib/oauth2/rfc6749/endpoints/base.py", line 64, in wrapper
    return f(endpoint, uri, *args, **kwargs)
  File "oauthlib/oauth2/rfc6749/endpoints/authorization.py", line 103, in create_authorization_response
    request, self.default_token_type)
  File "oauthlib/oauth2/rfc6749/grant_types/authorization_code.py", line 186, in create_authorization_response
    raise ValueError('Scopes must be set on post auth.')

i believe this 500 could be fixed by this pr too.
thank you

@Fleurer I am refactoring tests now. Could you move the tests to test_oauth2 directory?

@lepture sure

hi @lepture, any update on this?


Comment on implementation of unzip2 & unzip3

Hopefully will prevent the perrennial PRs fixing these 😀

Ah, #10274 want to make safe_map and safe_zip work with empty lists?

I'm not sure whether we want that; see my comments on #10274
In any case, I chose not to touch safe_zip and safe_map here since there are two other PRs in-flight with different ideas about them.


update logs for TLS

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area config

/area outputs

/area tests

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

LGTM label has been added.  Git tree hash: 5ed9cf771149e4283f0c8413e8fd8eb6b8dd6aa5

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: fjogeleit, Issif
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [Issif,fjogeleit]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


ReferenceError: XPathEvaluator is not defined

Describe the bug
If I use the XPathEvaluator method in the ts file, it will not work,  the error msg is:

ReferenceError: XPathEvaluator is not defined

Reproduction
---demo

XpathTransformParser.ts

const evaluator = new XPathEvaluator()
export const parser = (element, path: string) => {
   return evaluator.evaluate(path, element, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE)
}

spec.ts

import { parser } from './XpathTransformParser';
import { describe, it, expect } from "vitest";
describe('XpathTransformParser', () => {
  it('parser', () => {
      expect(parser(document, '//div'))
  })
})

System Info
System:
    OS: macOS 13.4
    CPU: (8) arm64 Apple M1
    Memory: 224.80 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.0 - ~/.volta/tools/image/node/18.16.0/bin/node
    Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
    npm: 9.5.1 - ~/.volta/tools/image/node/18.16.0/bin/npm
    pnpm: 8.6.12 - ~/.volta/bin/pnpm
  Browsers:
    Chrome: 115.0.5790.170
    Safari: 16.5
  npmPackages:
    vite: ^4.4.9 => 4.4.9
    vitest: ^0.34.1 => 0.34.1

Used Package Manager
pnpm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[x] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[x] The provided reproduction is a minimal reproducible example of the bug.

Use jsdom environment. Vitest doesn't provide browser compatible globals: https://github.com/jsdom/jsdom/issues?q=is%3Aissue+is%3Aopen+xpath+sort%3Aupdated-desc


Implement alternative algorithm for circular paths

The algorithm which computes circular flight paths could be replaced. An alternative version would not rely on incremental rotation and distance checking. It would instead compute the angle between the vectors starting at the rotational center and ending in a) the startpoint b) the endpoint.
The path points would then be generated by rotating the startpoint (using that point for each rotation) and increasing the angle of rotation until it reaches the computed angle between the vectors. The steps would be dependent on the radius, as it is now.

Ok, that algorithm wouldn't work. An alternative version using Atan2 might.

Done


Use RZGate in RZXGate definition

Summary
Fixes definition of RZXGate to use RZGate in its definition rather than U1Gate.
Details and comments
This is to be consistent with the other Pauli rotation gates which use RZGate. It also means that the phase-difference in the canonical matrix definition and the unrolled gate matrix from Operator(gate) is localized to the RZGate.

Looks good, we also tried to do this for other gates that use the RZ instead of U1, like the RXX or RYY. Additionally to your points above we should do this change for consistency. 🙂


Evaluate how to use keywords YAML info for SEO

Both for external search engines AND internal search bar.
YAML style: https://www.mkdocs.org/user-guide/writing-your-docs/#yaml-style-meta-data

The original intention was to make our own search bring pages that were relevant to the top on search for specific keywords. Is this the case still?
Such that if I search for this keyword (or something very close to it, like it's plural) the pages with the keywords mentioned in YAML appear first before others that may be relevant but do not include the YAML keyword.


Add unit test for list set undo issue

Adds a unit test reproducing the issue in https://github.com/liveblocks/liveblocks/issues/628

Closing this issue. The investigation continues in #819. Thanks for the initial research, @BitPhinix 🙏


Unable to use security_group_ids in vmseries module

Describe the bug
Type declaration for interfaces in vmseries modules appears to make security_group_ids unusable.
Expected behavior
Should be able to use security_group_ids in the interfaces section of the vmseries module.
Current behavior
The HCL code showing the module usage (below) works fine, until I uncomment the security_group_ids line, then I receive the following error:
The given value is not suitable for module.the_vmseries.var.interfaces declared at .terraform/modules/the_vmseries/modules/vmseries/variables.tf:72,1-22: attribute types must all match for conversion to map.
module "the_vmseries" {
  source  = "PaloAltoNetworks/vmseries-modules/aws//modules/vmseries"
  version = "0.4.1"

  name                  = var.name_prefix
  vmseries_product_code = var.vm_series_product_code
  vmseries_version      = var.vm_series_version
  ssh_key_name          = aws_key_pair.ssh_key_pair.key_name

  interfaces = {
    mgmt = {
      device_index     = 0
      subnet_id        = aws_subnet.mgmt_subnet.id
      name             = "mgmt"
      create_public_ip = true
      #security_group_ids = ["sg-05996161e0be5332a"]
    },
    public = {
      device_index     = 1
      subnet_id        = aws_subnet.outside_subnet.id
      name             = "outside"
      create_public_ip = true
    },
    private = {
      device_index     = 2
      subnet_id        = aws_subnet.inside_subnet.id
      name             = "inside"
      create_public_ip = false
    },
  }
}

Possible solution
I think that this error occurs because it introduces a list of strings parameter value. Before uncommenting that line, all parameter values are strings, uncommenting introduces a list of strings. I believe that the type declaration of map means that all parameter values must be of the same type (ref). I think the type declaration would either need to be very permissive (just type = any) or much more specific where every parameter variable is listed in the type declaration, like this generic example:
variable "test" {
  type = object({
    param1 = string
    param2 = string
    param3 = object({
      mylist = list(string)
    })
  })
}

Steps to reproduce
HCL code snippet above
Screenshots

Context
Unable to set a Security Group for a VM-Series created with the vmseries module.
Your Environment
Terraform v1.3.8
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v4.57.1

hi @jamesholland-uk . While checking the issue, I noticed, that you defined security_group_ids only for first network interface. Could you please define security_group_ids for all interfaces ? As we have in error message: attribute types must all match for conversion to map, then we need to use security_group_ids for all interfaces or for no one.
Yes, it would be better to have defined variable not like map(any), but map of objects with defined attributes. The problem is that in our case some attributes are optional as in the variable interfaces description (in module vmseries):
  - `name`               = (Optional|string) Name tag for the ENI. Defaults to instance name suffixed by map's key.
  - `description`        = (Optional|string) A descriptive name for the ENI.
  - `create_public_ip`   = (Optional|bool) Whether to create a public IP for the ENI. Defaults to false.
  - `eip_allocation_id`  = (Optional|string) Associate an existing EIP to the ENI.
  - `private_ips`        = (Optional|list) List of private IPs to assign to the ENI. If not set, dynamic allocation is used.
  - `public_ipv4_pool`   = (Optional|string) EC2 IPv4 address pool identifier.
  - `source_dest_check`  = (Optional|bool) Whether to enable source destination checking for the ENI. Defaults to false.
  - `security_group_ids` = (Optional|list) A list of Security Group IDs to assign to this interface. Defaults to null.

Unfortunately only Terraform 1.3 or above supports optional object type attributes with defaults and as our modules are supported for Terraform starting from 1.0.0:
https://github.com/PaloAltoNetworks/terraform-aws-vmseries-modules/blob/fdb85b3f07fa161aa7f2523fcaeedba9c345ae77/modules/vmseries/versions.tf#L1-L2
we cannot use optional object type attributes in vmseries module.
Please check you Terraform code with security_group_ids for all interfaces and please let us know if it's ok for you and we can close that issue.

Hi @sebastianczech, empty list worked great for the other two interfaces so I was able to get past the error. Thanks for your assistance :-)


Customize Range Selection

Hello,
I used newest JTAppleCalendar version, I now, i need to custom calendar like this link
https://cloud.githubusercontent.com/assets/4571502/16706761/ff11073e-45ea-11e6-8d1a-79fc0c15df90.gif
. Anybody give me some suggestions to do this.

Hi, can you look at the documentation for version 6 and let me know if it helps you?
--> https://patchthecode.github.io/RangeSelection/
Some variable names have changed from version 6 to version 7, but understanding it should be the same. Let me know if this helps

Hi @patchthecode
Thank for your support. It is done.
Special thank to topic https://github.com/patchthecode/JTAppleCalendar/issues/538


Is there any way to get back my deleted files?

 I looked at OneDrive, but my text files on the desktop are completely missing. Is there really a way I can bring it back? I tried a software called Recuva but it didn't work.

My question might seem strange, but have you checked if your files might be in the OneDrive trash bin?

Yes, checked. All gone.

The only option left for you is to contact OneDrive support. They might be able to do something, but it’s not guaranteed. In this article , you will find a link that says ‘OneDrive Support Team Email’. You must be logged into your OneDrive account for the email link to work and display the contact window.  https://support.microsoft.com/en-us/office/find-lost-or-missing-files-in-onedrive-0d929e0d-8682-4295-982b-4bd75a3daa01#bkmk_stillcantfind

hi
I had the same problem, before uninstalling onedrive, the address of the desktop was tampered with by onedrive to users/onedrive/desktop/, unfortunately I didn't notice the change (did anyone think of it in advance?). Unfortunately, I didn't notice this change (who thought of it in advance?), and since I hadn't used onedrive for a long time before I uninstalled it, unfortunately some of the desktop files were in the users/onedrive/desktop/ path, which led to the deletion of the desktop contents when I uninstalled the software with [OneDrive Uninstaller v1.4.bat]. And I can't recover from onedrive recycle bin, is there any remedy for this, currently known data recovery software, disk dill and Windows File Recovery can't recover my lost files from desktop! @n0f4c3


[Optimization Idea] Render in Chunks

Just looked at how the lib works and figured that a render is triggered as soon as one element leaves the visible area. This works for fine so far, but is considerable more performance-intensive as when you would render everything within chunks.
So a chunk is defined by the container height + some buffer, and would consist of x elements that fit within the chunk. There must be at least two chunks as well for this to work reliably.
Let's say you're at the top of your list, and your list height is 600px, and you have around 100 items within it, each one having a height of 100px, which leads to 6 items being visible at all times (7 if you scroll a bit up or down).
Currently, you'd see the first Chunk, with a Chunk-height of let's say 900px (ratio of 1.5 times the container height). Additionally, the next Chunk is also already attached to the DOM, given a total Chunk-height of 1800px (Chunk 1 + Chunk 2)
Now, if you scroll down the list and reach the midpoint of Chunk 2, an update would fire, which would attach the next chunk to the DOM (chunk 3). So that gives us 3 chunks being attached to the DOM at this moment and a total chunk height of 2700px (Chunk 1 + Chunk 2 + Chunk 3).
This is the point where the whole loop basically starts. If you scroll further down and reach the midpoint of Chunk 3, Chunk 1 would be swapped with Chunk 2, Chunk 2 with Chunk 3, and Chunk 3 with Chunk 4 (the new one) until you reach the very bottom where only the last two remaining Chunks would be attached to the DOM.
This would lead to exactly one render operation every ~900px. At the point where we hit the midpoint of Chunk X.
I hope you can follow me this far. Here is an illustration of what I mean to make it easier to understand maybe:

This is related to the discussion on issue #350. Rather than "chunks" that discussion is framed around overscanned rows.
I think Grid makes both a little more complicated (because of the fact that we're virtualizing in 2 directions) but I'm overall a fan of the idea. I think the only somewhat-tricky part is efficiently detecting when to invalidate the overscanned rows (or "chunks").

Going to leave this issue (and that one) open for reference and reminder when I have more time to do some perf testing and playing with either idea. I'm very busy this week but hope to have more time for experimentation next week!

It may seem counter intuitive, but this idea doesn't seem to improve performance (at least not base on my local testing). I've tried a couple of ways of implementing it (using min/max x/y of most recently rendered rows, using min/max row/col indices, etc). It actually causes jumps at the boundaries between "chunks" of rows.

@bvaughn wow really? That doesn't sound much like an optimisation 😅
mind uploading your branch so I can take a look?
I'm actually running a self-made version of something like this and it runs pretty smooth. In my case though, my items are of different kinds that look completely different. So it performs a bit slower when react has to 'move' the different looking nodes up and down within in the DOM, instead of just replacing the content, because thats not possible.
Maybe my use-case is pretty edge-case, but it works better when I do it in batches vs each item.

Makes sense that it wouldn't optimize too much since I'm caching already-rendered-cells and taking care not to force unnecessary flow/paint with the browser when new cells are added.
So you're not testing this with react-virtualized but some other windowing component? 😅

I'm actually running my own infinity list component, correct 😅
If I had known react-virtualized before @jgoux told me about it, I'd use that.
I'm just sharing my knowledge that this actually works pretty good in my case. I did not test it with react-virtualized, yet.

Haha, gotcha. No worries! I appreciate the suggestion. 😁
react-virtualized has a lot of optimizations backed in to reduce the cost of rendering while scrolling (such as temporary row/column caching). So- having tested this batching approach- it doesn't actually make a noticeable improvement.
Worth a shot though! 😄


Add Carthage install info to main documentation

Copied the Carthage install from the readme for people who end up here directly.  Not terribly DRY, but short of trimming the front page or linking back to it, it's arguably an improvement.

Already wasn't DRY! Thanks for fixing this omission! :+1:


[RFC] Add routines for degrees/radians conversions

Although the Num class has good support for trig methods, one thing it lacks is methods to convert between degrees and radians.
Whilst these are easy to code, they're also easy to get the wrong way around. I therefore propose adding the following to the Num class:
toRadians { this * Num.pi / 180 }

toDegrees { this * 180 / Num.pi }

Possibly we could drop to and just use radians and degrees instead?
Alternatively, we could code these methods in C and hard-code pi as 3.14159265358979323846.
Thoughts anyone?

Having them in C would be better, it adds speed to convenience.

Yeah, I agree C would be better. Which do you prefer with to or without?

I think the to prefix is better, otherwise the names would be ambiguous: "does it convert from radians to degrees or vice-versa ?"

Good point, having the prefix is certainly clearer.
I'll wait and see if there are any further comments before doing a PR.

I don't think it is a good idea in the main library, but anyways, if we
include that, I think it is better to provide the original unit in the
naming convention. radiansToDegrees tausToDegrees...

I don't think it is a good idea in the main library

Why's that? The trig methods are in the main library so you hardly want to be importing am external library just to do these conversions. Even in C it's only adding a few lines to core.

I think it is better to provide the original unit in the naming convention. radiansToDegrees tausToDegrees

The trouble with those names is that they're very long winded. I think people would be tempted to take their chances with the formulae rather than writing those out.
Python has math.radians(_) and math.degrees(_) & Lua has math.rad(_) and math.deg(_) . So I suppose we could use static rather than instance methods. However, Wren is an OO language and I think we should stick to instance methods where feasible.

Just checked Gravity and they have radians and degrees as instance methods of the Float class.

I'm not really happy with the extra symbol pollution (even the one inside Num). Num as a bunch of unique symbols that are not very good for cache locality accessing symbols (though it has to be proven).
It is a complex topic, but I tend to prefer to have extra computation external to a class unless necessary these days (what ever the language).
So I think, unless there is a huge need for it, I would implement it in a separated module (and also migrate trigonometry and some utility stuff there in the process). It does not follow OO design, but we can't cargo all math classic formulas and constants in existence in the name of it...

Well if you move the trig methods out of Num and into a separate module (Math say) then it will break every program that uses those methods:

Unless Math is itself part of core, then it will need to be explicitly imported.

As there will no longer be an object (i.e. a number), the methods will need to be static and so the invocations themselves will all need to be changed.

I'd have thought the chances of that happening are next to nil as the trig methods are used a lot in games programming which is an important use case for an embedded scripting language such as Wren.
Degrees/radians conversion methods  are not essential - it's just a  matter of convenience so you don't have to remember the formula each time a conversion is needed and risk getting it wrong. If they aren't in the Num class (or at least somewhere else in core), then that convenience goes out of the window as you have to import their containing module. I have these methods in my own Math module but, unless I'm importing it for some other reason (it's 700+ lines), I don't use them - I just use the formulae directly.

If API stability is a question while we are in 0.4.0 then, we somehow
failed. I mean, it will not be a pleasant change, but not all usage of wren
would require to perform trigonometric math, even in video games. The
important thing is to have them available, in some form.
The biggest problem with these methods, is that they have mostly unique
signatures, which would grow the methods arrays unreasonably, which would
cause cache misses for something of relatively limited use. By moving
them to a module, and thus delaying their declarations, we limit that
behaviour, and give priori to more hot methods signatures.

I haven't found this to be an issue, and it's unlikely we'll remove the convenient API we've had all along.

The followinf example is a little bit made up, but it expose the problem at long term:
class Benchmark {
  static call(benchmark) { call("", benchmark) }

  static call(name, benchmark) {
    var start = System.clock
    benchmark.call()
    var end = System.clock
    System.print("[%(name)] elapsed: %(end - start)")
  }
}

var numTests = 100000000

var func = Fn.new {|self| self }

class Obj {
  static delinquant_method_name_00 {}
  static delinquant_method_name_01 {}
  static delinquant_method_name_02 {}
  static delinquant_method_name_03 {}
  static delinquant_method_name_04 {}
  static delinquant_method_name_05 {}
  static delinquant_method_name_06 {}
  static delinquant_method_name_07 {}
  static delinquant_method_name_08 {}
  static delinquant_method_name_09 {}
  static delinquant_method_name_10 {}
  static delinquant_method_name_11 {}
  static delinquant_method_name_12 {}
  static delinquant_method_name_13 {}
  static delinquant_method_name_14 {}
  static delinquant_method_name_15 {}
  static delinquant_method_name_16 {}
  static delinquant_method_name_17 {}
  static delinquant_method_name_18 {}
  static delinquant_method_name_19 {}
  static delinquant_method_name_20 {}
  static delinquant_method_name_21 {}
  static delinquant_method_name_22 {}
  static delinquant_method_name_23 {}
  static delinquant_method_name_24 {}
  static delinquant_method_name_25 {}
  static delinquant_method_name_26 {}
  static delinquant_method_name_27 {}
  static delinquant_method_name_28 {}
  static delinquant_method_name_29 {}
  static delinquant_method_name_30 {}
  static delinquant_method_name_31 {}
  static delinquant_method_name_32 {}
  static delinquant_method_name_33 {}
  static delinquant_method_name_34 {}
  static delinquant_method_name_35 {}
  static delinquant_method_name_36 {}
  static delinquant_method_name_37 {}
  static delinquant_method_name_38 {}
  static delinquant_method_name_39 {}
  static delinquant_method_name_40 {}
  static delinquant_method_name_41 {}
  static delinquant_method_name_42 {}
  static delinquant_method_name_43 {}
  static delinquant_method_name_44 {}
  static delinquant_method_name_45 {}
  static delinquant_method_name_46 {}
  static delinquant_method_name_47 {}
  static delinquant_method_name_48 {}
  static delinquant_method_name_49 {}
  static delinquant_method_name_50 {}
  static delinquant_method_name_51 {}
  static delinquant_method_name_52 {}
  static delinquant_method_name_53 {}
  static delinquant_method_name_54 {}
  static delinquant_method_name_55 {}
  static delinquant_method_name_56 {}
  static delinquant_method_name_57 {}
  static delinquant_method_name_58 {}
  static delinquant_method_name_59 {}

  static my_uniquely_named_static_method(self) { self }
  static call(self) { self }

  delinquant_method_name_00 {}
  delinquant_method_name_01 {}
  delinquant_method_name_02 {}
  delinquant_method_name_03 {}
  delinquant_method_name_04 {}
  delinquant_method_name_05 {}
  delinquant_method_name_06 {}
  delinquant_method_name_07 {}
  delinquant_method_name_08 {}
  delinquant_method_name_09 {}
  delinquant_method_name_10 {}
  delinquant_method_name_11 {}
  delinquant_method_name_12 {}
  delinquant_method_name_13 {}
  delinquant_method_name_14 {}
  delinquant_method_name_15 {}
  delinquant_method_name_16 {}
  delinquant_method_name_17 {}
  delinquant_method_name_18 {}
  delinquant_method_name_19 {}
  delinquant_method_name_20 {}
  delinquant_method_name_21 {}
  delinquant_method_name_22 {}
  delinquant_method_name_23 {}
  delinquant_method_name_24 {}
  delinquant_method_name_25 {}
  delinquant_method_name_26 {}
  delinquant_method_name_27 {}
  delinquant_method_name_28 {}
  delinquant_method_name_29 {}
  delinquant_method_name_30 {}
  delinquant_method_name_31 {}
  delinquant_method_name_32 {}
  delinquant_method_name_33 {}
  delinquant_method_name_34 {}
  delinquant_method_name_35 {}
  delinquant_method_name_36 {}
  delinquant_method_name_37 {}
  delinquant_method_name_38 {}
  delinquant_method_name_39 {}
  delinquant_method_name_40 {}
  delinquant_method_name_41 {}
  delinquant_method_name_42 {}
  delinquant_method_name_43 {}
  delinquant_method_name_44 {}
  delinquant_method_name_45 {}
  delinquant_method_name_46 {}
  delinquant_method_name_47 {}
  delinquant_method_name_48 {}
  delinquant_method_name_49 {}
  delinquant_method_name_50 {}
  delinquant_method_name_51 {}
  delinquant_method_name_52 {}
  delinquant_method_name_53 {}
  delinquant_method_name_54 {}
  delinquant_method_name_55 {}
  delinquant_method_name_56 {}
  delinquant_method_name_57 {}
  delinquant_method_name_58 {}
  delinquant_method_name_59 {}

  construct new() { }
  my_uniquely_named_method() { this }
  call() { this }
}

var obj = Obj.new()

Benchmark.call("function") {
  for (i in 0..numTests) func.call(obj)
}

Benchmark.call("static unique") {
  for (i in 0..numTests) Obj.my_uniquely_named_static_method(obj)
}

Benchmark.call("static") {
  for (i in 0..numTests) Obj.call(obj)
}

Benchmark.call("method unique") {
  for (i in 0..numTests) obj.my_uniquely_named_method()
}

Benchmark.call("method") {
  for (i in 0..numTests) obj.call()
}

For me the effect start to be visible after > 50 unique symbols. And functional style become more viable.
[function] elapsed: 8.992618
[static unique] elapsed: 9.0859
[static] elapsed: 8.560656
[method unique] elapsed: 8.463672
[method] elapsed: 8.659075

Can I start by making it clear that I'm not against breaking changes pre v1.0 if there's a good reason for them - and for a huge change such as the one you're proposing there would have to be a very good reason.
Wren has, after all, been in development for about 9 nine years and during that time we appear to have broken very little in the language/core library - so it's not unreasonable for people to have some expectation of stability here.
But the benefits of the change are vague at best. When I run the benchmarks you've just posted several times, the figures are all over the place and, as we're talking about caching, are no doubt machine dependent.
Sure, one can argue that the trig methods should be static rather than instance and I presume you made that argument when they were introduced. It's also true that the Num class has quite a lot of symbols and so you'll be relieved to hear that, after this one, I don't intend to suggest adding any more :)

I've decided to close this issue as I see no prospect of agreement on a way forward.
Also, if there's a valid concern that Num is acquiring too many methods, then I don't want to add to that.
Conversion methods are in any case a 'nice to have' rather than an 'essential' feature.
Thanks for the discussion everyone.

Even though you closed this, I'd like to suggest another option.
In HaxeFlixel, we have two static constants FlxAngle.TO_DEG and FlxAngle.TO_RAD which you multiply against the angle (assumed to be the opposite of either radian or degrees to get the other value). This way, we won't have to worry about the methods like Num.degree or Num.radian hiding complexity since these methods would be as complex as Num.piorNum.tau`. Instead, the user would have to intensionally multiply their values to convert, which isn't overly verbose.
Also if we would like to be verbose like: "to degrees" or "radians to degrees" we could also shorten the unit like so: Num.toDeg, Num.DegToRad, Num.Rad2Deg, etc.

I don't like how Num is becoming a god object. In some aspect by sticking too much to OOP, it deafeat the point of OOP...

Well, @CrazyInfin8's idea gets away from OO to some extent by using a static property rather than an instance method.
But the reason why I decided to suggest built-in conversion methods in the first place is because I'm in the middle of designing a module for doing vector arithmetic (in the geometric rather than C++ sense) and have been finding it a pain having to convert degrees to radians and back again when testing stuff such as polar, cylindrical and spherical  coordinates. Although I have these conversion methods in my math module I don't like my modules to have dependencies on other large modules just to import a bit of code and so I thought it would be nice if these were available as a built-in.
The alternative would be to build them into my Vector class somehow even it means not sticking to the DRY principle.
Incidentally,  if you look through the existing PRs, there are quite a few which involve adding more stuff to Num including one from yourself to add a unary plus operator which I agree with!  So, I'd prefer this proposal to be judged on its merits rather than rejected just because there are already a lot of methods in Num.

The subject is complex and sometimes politic enter into play. But for me, these MUST be implemented as method:

methods that access internal data for legitimate reasons, or that could not be implemented otherwise
methods that needs overload mechanism
operators that make sense

The rest is in the gray area, but I tend to want them as external functions by default. So it is not a judgement on whether you or me are right or wrong, and being supportive. Yes, the idea to have conversion operation from different angular unit is valid. No I don't think it should not belong there, like many of the other Num methods (like the trigonometry ones), and others like in Sequence.
Strict OOP has proven to not scale over the years, and it is clearly visible these days. We are making the same mistake with all theses utility methods in Num. To make things worse, our implementation of the language has a performance problem with an increasing number of unique method signatures.
Ultimately, it doesn't matter whether or not we add them to Num, since we can always move them to a module quite easily. But, adding everything in core is a trade-off that scale less and less, even considering our primary usage.

I don't disagree with a lot of what you've just said.
It's certainly arguable that the trig methods are naturally static and should have been placed in a separate class to Num from the outset. But, we are where we are, and in view of what @Ruby0x1 said above (and with which I certainly agree on practical grounds) they're unlikely to be removed from Num.
Even if they were moved to say an optional Math module, I'm not sure many people would bother to exclude it from their applications anyway even if they couldn't see a use for it. I wonder how many exclude the optional Random and Meta modules we already have?
So the question we come back to is whether angle conversion methods are worth having or not because if they are there's no other convenient place to put them apart from the Num class. Making them static eases the pressure a bit on the large number of instance methods we already have and which may be added to by the existing PRs.
Unless, there are any violent objections to this, I think I'll do a PR on the basis of @CrazyInfin8's suggestion (it's a very simple change) so there's something concrete on the table.


support authentication for zookeeper/etcd

this PR add support for authentication of zookeeper/etcd.
when coordinator=filesystem, authentication is skipped.
when coordinator=zookeeper, the client will addauth after connected, and replace the worldACL with the corresponding digestACL.
when coordinator=etcd, the client will authenticate with the specified username/password, permissions should be granted manually with etcdctl.
but i'm not familiar with etcd, thus the etcd part is not well-tested.
please review it.
thanks very much.

@fancy-rabbit Thank you very much for your contribution. I'll review and test this PR later !!

I would like to ask for a long time to issue a version that supports zookeeper auth


[REQUEST] make Yana portable

Is your feature request related to a problem? Please describe.
Yana actually saves the config file in APPDATA D:\Users\myuser\AppData\Roaming\yana\workspaces.json , when I format I will lose all my config.
Describe the solution you'd like
I hope you can make Yana portable so we can have the config file  in a defined place by  the user.
Additional context
generally all electron apps I used before recognize the --user-data-dir command line flag. but Yana did not recognize it, this can solve the problem of portability too.
Thank you for this wonderful application, I love the Monaco editor + markdown

I've looked into this, apparently Electron doesn't support that flag out of the box, so it'd had to be manually implemented, which is not that easy with the current app structure. I'll keep this open, but that's not my highest prio atm.
The workspaces.json file just contains settings and the locations of workspaces, the most important information like the actual notes are stored at the customizable workspace locations, so I hope that the case of formatting does not cause too much effort.

I'll keep this open, but that's not my highest prio atm.

thank you

I hope that the case of formatting does not cause too much effort.

yes that is true


[FEATURE] Option to only list tags of a particular category in an index page

From my testing are index pages for tags always listing all used tags across all posts. This includes index pages that have been defined for specific categories.
While this may be useful and/or desireable by people is it also a bit frustrating when a tags page set in /reviews/tags lists tags used from the /posts/ directory.
When possible should there be an option to tell the plugin to only list tags from posts within a certain category.
The best way is probably to have an aproach similar to the {{ blog_content }} placeholder where you can define a category. This means you could set {{ tag_content reviews }} and it would only list tags used in posts for the category reviews.
The question I have right now is: What to do with global pages?
My current setup has the main posts page as the default/global setting and reviews as a category. It would be optimal for me to have the tags page for posts only include those of that category, but since it's global would it probs be displaying all, including those of other categories...
Perhaps a system could be worked out where you can define multiple categories to be included or excluded?
Like {{ tag_content !reviews }} to include tags not used in the reviews category or like {{ tag_content reviews | other }} to include tags from the categories reviews and other.
For now a way to define a category would be ideal for my case here.

I think it's worth implementing this.
But since I don't have much time at the moment, I might not be able to do it right now : (


added code to print hello world without semicolon

Hello it's creating a file name conflict

Hi
Can you please tell me how to resolve it as I am still new to open source
contribution.
Thanks
On Tue, 6 Oct, 2020, 10:01 pm Bhavesh Lohana<EMAIL_ADDRESS>wrote:

Hello it's creating a file name conflict
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/bhaveshlohana/HacktoberFest2020-Contributions/pull/762#issuecomment-704399141,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQTQ4I5PDIUNPI24FVRW75TSJNA5VANCNFSM4SDP2N3A
.


Please add a license

Without a license, this project isn't open source and no one can use the code.
Please use something like http://choosealicense.com/ to decide what license to use. I recommend MIT or GPL.

thanks, @karan. i didn't add the license intentionally so that people wouldn't use it just yet, but i guess it does not make much sense if you think about it.


Random delay while selecting text in TextBox

Describe the bug
Random delay while selecting text in TextBox control. This is very noticeable in machine with small resources, and it does happen even with very short text.
To Reproduce
Steps to reproduce the behavior:

Put caret into the end of text, press (Ctrl/Cmd) + A, or..
Put caret into the end of text, left-click 3 times, or..
Put caret anywhere, left-click 2 times

Expected behavior
Shouldn't have delay.
Desktop (please complete the following information):

Windows 10, Windows 7, Ubuntu 18.04 (mac is not tested yet)
Version  0.10.0

I'm not sure about this. I update CaretIndex value in both SelectionStart and SelectionEnd setter just before SetAndRaise to:
https://github.com/AvaloniaUI/Avalonia/blob/1a39210febf92e9e87b3ebacca9b56d99e660913/src/Avalonia.Controls/TextBox.cs#L266
https://github.com/AvaloniaUI/Avalonia/blob/1a39210febf92e9e87b3ebacca9b56d99e660913/src/Avalonia.Controls/TextBox.cs#L284
And the delay was gone.

It seems that delay happened if SelectionStart and SelectionEnd changed, and CaretIndex still have the same value.


[Story] Notified if file won't satisfy CFPB specifications before uploading

Epic
Epic issue includes overview, complete list of user stories, technical and content requirements, user testing task ideation, and current design mock-ups.

https://github.com/cfpb/sbl-project/issues/35

User story

As a filer, I want after I select my file for it to be transferred from my computer to the CFPB, so that validation of my data can begin.

Acceptance criteria

Given [some context or conditions], when [the action that is performed], then [the expected observable outcome or behavior].

Technical tasks
Developers should create technical tasks and add links (below) prior to sprint planning.
Front end

[ ] Task (link)
[ ] Task (link)

Back end

[ ] Task (link)
[ ] Task (link)

Edited story from "As a filer, I want to be notified if my file won't satisfy the CFPB specifications for my file's extension and size before I begin uploading, so I'm able to make corrections and try selecting a file to upload again." to "As a filer, I want after I select my file for it to be transferred from my computer to the CFPB, so that validation of my data can begin.". Story #103 and the original content of #179 where very similar, so I merged the two. I replaced #179 with the story above to reflect the act of uploading a file, which was the original intent of this story, not  notifying the user of errors.


handle commiter errors

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#10
#9  👈
#8
#7
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @iuwqyir and the rest of your teammates on  Graphite

Merge activity

Sep 17, 1:14 PM EDT: @iuwqyir started a stack merge that includes this pull request via Graphite.


www.ihe.net general Intro use html

https://www.ihe.net/resources/technical_frameworks/#GenIntro

@MaryLJ should the www.ihe.net general intro section now point at the html rendering?

The General Introduction and Appendices at https://www.ihe.net/resources/technical_frameworks/ now point to the html versions.


add common words to stopwords

issue #40

hey @stephaniewhoo how about a more general solution? for example, based on idf (inverse document frequency) threshold - spacy should have a feature along these lines that gets you the idf for a term?


[BEAM-2725] remove nullFields in BeamRecord

R: @robertwb

R: + @takidau

Merged, feel free to close.

closed #3691, thanks @takidau !

Changes Unknown when pulling 4871edbc430a2e360ba59f10eeafbe2205d47ec1 on XuMingmin:BEAM-2725 into ** on apache:DSL_SQL**.


command/DieCommand

Pull Request Template
If you are committing changes that add a command, your pull request name should be in the format:
command/yourCommandName
If your pull request fixes or addresses some issue, it should look like this:
fix/yourFix
If you are cleaning the code or revising some old code, format it as such:
clean/classesToBeCleaned
Other than that, we're not very picky. Just don't go overboard with the names. If your pull request name is not indicitive of what the changes represent, maybe you should rename it.

Where's the Die Command?


possibility of adding llama3-70b as the evaluator?

GPT-4 is so expensive if we have to run hundreds of experiments for scientific studies. I wonder whether you have tried using Llama3-70b, which performs comparably to the older version of GPT-4, as the evaluator and seen its correlation with humans. That is a more affordable replacement for GPT-4, given that Llama3-70b on Together AI is only 1/12 the price of GPT-4.

I've analyzed some older open source models here but not llama3
It should be really easy to make and evaluate a new evaluator though. I'm very happy to accept a PR for that. This section of the readme explains how to make a new evaluator and how to analyze it (ie compare it to human annotations): https://github.com/tatsu-lab/alpaca_eval/blob/main/src/alpaca_eval/evaluators_configs/README.md
Lmk if you have any issues running the above!

Thanks! I just realized that I could do it myself. I have tried with llama3. The results are quite impressive. The human agreement is 67.53 (without using COT), which is slightly lower than GPT4_turbo version and Claude 3. But the speed is 10 times faster, and the price is 10 times cheaper. I will upload the evaluation result later.

Great news, I would love to accept a PR for that!


Blockly data blocks not accessible

First of I want to thank you for this awesome tool. Love to see a Lua driven home automation platform and will definitely evaluate to jump ship :)
However I could not test the blockly part because the data access block (I guess that is what it is) is broken in that it can not be dragged onto the working area (see below).
Reproducible on Void Linux with FF 109.0.1 and Chromium 111.0.5563.64.

Hello,
Thank you for reporting this issue and sorry for the late reply !
There is a bug in the blockly scripts when there is no writable things. You could workaround the issue by creating a generic basic thing.
I keep the issue open waiting for a fix. Feel free to open issue for bugs or missing features.
Have a good day,
Samuel


Allow specifying commands as flags

Let's discuss a couple of things on this PR.
Right now, it's either one or the other flags or snag file.
The issue comes when the snag file exists and flags are given. If command flags are specified the snag file won't be read. This can come off as a surprise to the user and we need to also think about adding ignores. What if the user has ignored files in the snag file but specifies commands as flags?

I'd take a naive approach to this issue. Ideally, we want to strive for a user to consume snag with a .snag.yaml. I see using the commands as a quick way to get some validation on some code or using it for some automated task.
I'd say if you specify the flags, you can not ignore any files in the directory and the .snag.yml will be ignored. We can document the exposed flags and put that in bold in the readme.

:shipit:


Implement Flux pattern using Redux for tracking state

Implement Flux pattern using Redux for tracking state. For example for tracking logged in user name.
Docs here: http://redux.js.org/docs/basics/ExampleTodoList.html

Got this mostly working. Next step is to store and initialize the state from document.cookie. And use the store instead of getting it directly from the cookie every time when doing an authenticated call. Basically, refactor Webservice.jsx to use the store not the cookie.
Also consider redesigning how webservice calls work to better mesh with flux.

Actually I'm fine with how the webservice auth works right now. No need to initialize it from document.cookie. We can keep that implementation detail private to Webservice.jsx


Add davidh-ssec to meta.yaml

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

Awesome! I can merge this without waiting for the CIs. You will be added to the team and get commit rights to this repo once the PR is processed. Let me know if you have any questions about conda-forge.

One question, are these recipes automatically built at all? Or should we add the builds do our CIs? What/who does the actual package building and pushing to the conda channel?

One question, are these recipes automatically built at all?

Yep.

Or should we add the builds do our CIs?

If you do not want to use the conda-forge channel you can fetch/download this recipe and re-build it your way anywhere as the recipe is itself is BSD 3-Clause licensed. (Even though I am part of the core conda-forge and user I do that for some of my projects.)

What/who does the actual package building and pushing to the conda channel?

The package ends up here: http://anaconda.org/conda-forge/pyresample/files
and you can install it with conda install -c conda-forge pyresample.
This repository is what we call a conda-forge "feedstock." The build and upload is configured on AppVeyor (Windows), CircleCI (Linux), and Travis-CI (OS X)
The details of each build should be in there those links. Note that on CircleCI we are using a CentOS 6 docker image.
PS: we have a docs page: https://conda-forge.github.io/ (it needs work though, but it may help ;-).


ObjectMapper. Use sharedInstance vs create new instance.

Should I always use "sharedInstance" instead of creating new instance of ObjectMapper?

shared instance is used in NSObject and NSDictionary categories, so if you don't want to use it you don't have to, but then you won't be able to use the helper categories.
https://github.com/aryaxt/OCMapper/tree/master/OCMapper/Source/Categories


Xiaomi Temp Sensor v2 (LYWSD03MMC) BLE Decryption (Stock firmware)

Hi Team,
Thanks for your work on those BLE features. I have the following sensor:
1:46:53 PM: Connecting to: LYWSD03MMC
1:46:58 PM: Hardware Revision String: B1.4
1:46:58 PM: Software Revision String: 0130
1:46:58 PM: Firmware Revision String: 1.0.0_0130
I have activated the sensor and set the bind key. My bind key: 8ef97ff4130915b0e7c0b9ca56962ae9. I am using the stock firmware. No, I do not want to use any other firmware.
I am using some Shelly devices as a BLE proxy. I receive he advertised BLE data and I forward it HTTP post to some server (python script). I am receiving the base64 encrypted data, I decrypt (base64) it.
I do receive the following data (without the spaces, I just added them to group the data as far as I know how to interpret it):
020106 1a16 95fe 5858 5b05 05 2fcfff38c1a4d57308db90000000e38dd476
I would like to write some python script to decode this data an later get the temp/humidity/battery values. I had a look at:
https://github.com/Ernst79/bleparser/blob/c42ae922e1abed2720c7fac993777e1bd59c0c93/package/bleparser/xiaomi.py
However, it is not really clear for me what data is used to properly AES decrypt.

This is fixed (020106) - flags
1a16 (this is the length 1a (26), 0x16 = Service Data - 16-bit UUID
95fe - UUID fe95

Now, I am not so 100% sure if this is correct, but looks like it does make sense:

5858 (frame control bytes?) which translate to<PHONE_NUMBER>011000 (bit 4 means encryption used, bit 5 = mac in data)
as per the 2 x control bytes, this is apparently version 5 (frctrl_version = frctrl >> 12  # version)
0101100001011000 - shift >> 12 -> 0101 (5)
5b05 -> this is 0x055b ( 0x055B: "LYWSD03MMC" - this is the device type)
05 <- this seems to be the packet ID (1 bytes)
2fcfff38c1a4 - this is the MAC address reversed, as per the control frame it is included in the announcement (a4:c1:38:ff:cf:2f)

We are left with the following bytes:

d57308db90000000e38dd476

What is now the encrypted data to decrypt (d57308db90000000)? Is the MIC e38dd476? Why are there so many zeros? Is this really part of the encrypted data? Apparently there is some counter value as well, not sure if this is used here.

What would be now my nounce for this example please?

As per the code I have seen, the nounce is calculated ( nonce = b"".join([xiaomi_mac[::-1], data[6:9], data[-7:-4]]))

Part of the nounce is the reversed MAC, which would be: 2fcfff38c1a4

What would be the other correct values for this example please?

nounce: 2fcfff38c1a4 + what? - what is data[6:9], what data[-7:-4] please?

token which is the MIC is (token = data[-4:]) - this is now d476 or e38dd476?

cipherpayload? (cipherpayload = data[i:-7]) - not sure what i is in the code - what would be the value for this example please?

First step would be do decrypt the string before to parse for the transmitted values.
Thanks for your help. I appreciate your time.
Regards,
Robert

I figured it out. If somebody is interested:
020106 1a16 95fe 5858 5b05 41 2fcfff38c1a4 5a3eeff41a 010000 9fe3bde7
bind_key = bytes.fromhex("8ef97ff4130915b0e7c0b9ca56962ae9")
2fcfff38c1a4 5b0541 010000
nonce = bytes.fromhex("2fcfff38c1a45b0541010000")
encrypted_payload = bytes.fromhex("5a3eeff41a")
mic = bytes.fromhex("9fe3bde7")
print("Bind-Key: ", bind_key)
print("Nonce: ", nonce)
print("Encrypted Payload: ", encrypted_payload)
print("MIC: ", mic)
cipher = AES.new(bind_key, AES.MODE_CCM, nonce=nonce, mac_len=4)
cipher.update(b"\x11")
data = cipher.decrypt_and_verify(encrypted_payload, mic)
print("Cleartext: ", data.hex())
Result would be: 061002ef01
This would be: 1006 length 02, value 01ef (humidity: 495 / 10 = 49.5%


Getting Error ENOSPC while starting react native application

I have just created my new react native application and I am getting error while starting it. I am using Ubuntu 12.04. I have attached screen-shot of my terminal

I have checked whether my temp is full, but found my temp has more space and has only 1% of usage. So I don't think it will be problem of that. Any suggestions

Take a look at this answer in stackoverflow. It worked for me
http://stackoverflow.com/a/32600959

Hi there! This issue is being closed because it has been inactive for a while.
But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/getting-error-enospc-while-starting-react-native-application
Product Pains has been very useful in highlighting the top bugs and feature requests:
https://productpains.com/product/react-native?tab=top
Also, if this issue is a bug, please consider sending a pull request with a fix.


Add GDPS support

Geode Version
v2.0.0-beta.21
Related Problem
No response
Your Solution
Add a custom package name selection or a custom endpoint selection
Additional Information
No response

the loader itself supports a gdps. what you're asking for is probably better suited to some mod


[Bug]: if there is only app level access and no workspace level access then the delete icon should not be displayed at the workspace level

Is there an existing issue for this?

[X] I have searched the existing issues

Description
if there is only app level access and no workspace level access then the delete icon should not be displayed at the workspace level

Steps To Reproduce

Login to https://ee-1242.dp.appsmith.com/
create a new workspace/app
now deploy the app
share the app with app viewer access/ its app level with user 1
now go to manager user page
go to user 1 and expand the resource column
The delete icon should not be there at workspace level because the user is having only app level access

Public Sample App
No response
Environment
Deploy Preview
Issue video log
No response
Version
deploy preview

This issue is fixed in DP , closing the issue

Re-opening as the changes on DS repo are yet to be merged.


Bump openssl to 0.10.66 to handle RUSTSEC-2024-0357

This PR bumps the openssl crate to version 0.10.66 to mitigate RUSTSEC-2024-0357

Closing PR to run with internal access instead.


Added location to the search queries, as google books api was thowing…

… a 'Cannot determine user location for geographically restricted operation', added a static location of US, didn't write it in the best way, just made it work

According to the Google Books API documentation:

Google Books respects copyright, contract, and other legal restrictions associated with the end user's location. As a result, some users might not be able to access book content from certain countries. For example, certain books are "previewable" only in the United States; we omit such preview links for users in other countries. Therefore, the API results are restricted based on your server or client application's IP address.

It looks like the "error" is intended by design and not within the scope of this example app.


Misc todo items

This PR has a number of little fixes and improvements.

Renamed GDBSocket to Socket and moved to utilities.
Removed websocket support. Closes #460.
Removed unused lock from GDBServer.
Renamed format parameter of FileProgrammer.program() to not conflict with builtin.
Fixed some broken logging in GDBServer.
Memory map cleanup.
Removed Flash_cortex_m class that is not used anymore.
Removed has_fpu attribute from Target.
Fixed FPU register tests in basic_test.py.
Made is_float_register() return True for both single and double precision register. This is different from is_fpu_register() that also returns True for the FPSCR.
CortexM removes any enabled watchpoints on disconnect.
DebugPort.find_aps() only saves the list of valid APs after the scan has completed successfully.
Added a setter for the CoreSightTarget.selected_core property and made the select_core() method deprecated.
Converted the few remaining timeout loops to use the Timeout utility class.

/morph test

/morph test

/morph test

/morph test

/morph test

/morph test

/morph test


Updated enforcer plugin configuration to exclude java 14

Updated enforcer plugin configuration to exclude java 14.

Please rebase

Ok - change looks good. Your build is broken because it's blocked by this: https://github.com/confluentinc/parallel-consumer/pull/157
That one test I haven't managed to figure out why it fails in CI: OffsetEncodingBackPressureTest.backPressureShouldPreventTooManyMessagesBeingQueuedForProcessing


$Global constant buffer is not reflected

When building from HLSL SPRIV-Reflect ignores $Global constant buffer.
glslangValidator -V -D -e main test.frag
uniform float4 u_test0;

cbuffer : register(b0)
{
    float4 u_test1;
};

void main(out float4 fragColor : SV_TARGET0)
{
    fragColor = u_test0 * u_test1;
}

spirv-reflect frag.spv
will output only descriptor binding for unnamed constant buffer that contains u_test1.

This seems like a compiler issue; if I build your test shader with dxc, spirv-reflect finds both descriptor bindings as expected. With glslc or glslangValidator it behaves as you describe.

How did dxc know where to bind? That seems a convention, and there are also ways to ask glslang to bind as well. For example, using --amb.
Is there an agreed on convention about how to bind $Global?  Is that convention from MS or Google?

IIRC, $Globals and $Params, using FXC, are assigned a register using what appears to be the next available register in the #b.
DXC/SPIR-V follows this same convention but assigns a binding in set 0, I believe. There is an attribute directive that permits you to force a binding number for $Globals. I can't recall what it is off the top of my head. @antiagainst will know.

+1 to what @chaoticbob said. We are following fxc behavior to use the next available binding in set 0 for the $Globals cbuffer. There is no way to manually pick the binding number for it right now. An attribute like vk::globals_binding was considered but haven't gotten implemented yet. One reason is not seeing real requests from developers; another reason is not sure about where to attach that attribute to. (Attaching to the entry point seems reasonable, but then we loose the ability to share the info among multiple entry points in the same file unless we attach all of them.)

Closing this since it's a compiler behavior and not that of SPIRV-Reflect.


cli: do findup of dagger.json for all relevant commands

dagger call/install/develop/publish/functions/config all now take into account the find-up we do of dagger.json so they can work from subdirs.
dagger init is a special case where we don't findup since it would prevent you from initializing a module from a subdir of another.

There are a few legit test failures, fixing quick so we can get this in the release tomorrow


ringbuffer ut and rule engine support

Pretty awkward nng style
And why does all test failed?

OH! Some memleak detected, will fix it soon

Pretty awkward nng style
And why does all test failed?

Wanna know what's nng style, can u find an example for me?

Pretty awkward nng style
And why does all test failed?

OH! Some memleak detected, will fix it soon

done

windows build failed...
D:\a\NanoNNG\NanoNNG\src\supplemental\nanolib\linkedlist\linkedlist.c(14,36): error C2100: illegal indirection [D:\a\NanoNNG\NanoNNG\build\nng_testing.vcxproj]
D:\a\NanoNNG\NanoNNG\src\supplemental\nanolib\linkedlist\linkedlist.c(135,25): error C2100: illegal indirection [D:\a\NanoNNG\NanoNNG\build\nng_testing.vcxproj]
  ringbuffer.c
D:\a\NanoNNG\NanoNNG\src\supplemental\nanolib\ringbuffer\ringbuffer.c(114,45): error C2100: illegal indirection [D:\a\NanoNNG\NanoNNG\build\nng_testing.vcxproj]
D:\a\NanoNNG\NanoNNG\src\supplemental\nanolib\ringbuffer\ringbuffer.c(194,39): error C2100: illegal indirection [D:\a\NanoNNG\NanoNNG\build\nng_testing.vcxproj]

windows build failed...
D:\a\NanoNNG\NanoNNG\src\supplemental\nanolib\linkedlist\linkedlist.c(14,36): error C2100: illegal indirection [D:\a\NanoNNG\NanoNNG\build\nng_testing.vcxproj]
D:\a\NanoNNG\NanoNNG\src\supplemental\nanolib\linkedlist\linkedlist.c(135,25): error C2100: illegal indirection [D:\a\NanoNNG\NanoNNG\build\nng_testing.vcxproj]
  ringbuffer.c
D:\a\NanoNNG\NanoNNG\src\supplemental\nanolib\ringbuffer\ringbuffer.c(114,45): error C2100: illegal indirection [D:\a\NanoNNG\NanoNNG\build\nng_testing.vcxproj]
D:\a\NanoNNG\NanoNNG\src\supplemental\nanolib\ringbuffer\ringbuffer.c(194,39): error C2100: illegal indirection [D:\a\NanoNNG\NanoNNG\build\nng_testing.vcxproj]

Seems like windows can not handle sizeof((void)), so set sz to 0;

this ringbuffer and linkedlist has a lot of incompatibility with nng

this is making my life harder

no nni_* var in nanolib!!!!!!!!!!!!!!!!

data structure used in conf shall be isolated from those in core/nanolib


Think about reducing the number of supported admission controllers

Given the evolving nature of admission control in k8s, I think we should evaluate reducing the number of admission controllers to a fixed set rather than the entire open ended list.
For reference see:
https://github.com/kubernetes/community/pull/132
The candidate list could be limited to things that default resources, and things that constrain resources.

LimitRanger
ResourceQuota

I am also not sure I would want to expose the full set of admission controllers at this time versus just being quota aware or not.

Any of the other admission plugins that default toleration or node selector would be a good candidate as well

All admissions taken into account are set in https://github.com/kubernetes-incubator/cluster-capacity/blob/master/config/apiserver.yaml#L7. If the supported set needs to get limited, it is a question of extending the validation of the configuration file and filtering out all non-supported admissions. Ending with failure or with warning stating all admissions that are skipped.

Conc: Replace the configuration file apiserver flag with option with a list of admission pluggins

Use ResourceQuota nad LimitRanges only at the moment

I think this is already fixed. Please reopen if it is still not addessed.


Auto-Remove CR on Save

It'd be great if there was a setting to turn on auto-removal of CRs on file save.

Great idea! I'll look this weekend on how to make this, if you want make the PR feel free!

I got halfway through the feature in a fork, but got caught up in how to develop Atom plugins. If I have time this weekend I'll try again.


(New)Boiler and SteamTurbine

Add Boiler (NewBoiler from API) technology from the API
Add SteamTurbine technology from the API
Refactor the way fuel cost is input into the model for fuel burning technologies
Uncomment some cooling-related tests in a CHP test
Refactor some thermal dispatch results names (series) to be consistent with other results
This already has the AbsorptionChiller mods from https://github.com/NREL/REopt.jl/pull/126, but that is expected to be merged into develop first so may not show as changed after that is merged

@zolanaj Thanks for the review. I can address these comments, and I'll probably get to them Monday. I'll let you know when I do and you can re-scan quickly.

@zolanaj Not related to Boiler or SteamTurbine, but I'm seeing that this HotTES storage SOC constraint sums across p.techs.heating which does NOT include CHP. Same with Constraint 4n-1 just below.  Can you double check that this is indeed missing CHP?

@zolanaj Not related to Boiler or SteamTurbine, but I'm seeing that this HotTES storage SOC constraint sums across p.techs.heating which does NOT include CHP. Same with Constraint 4n-1 just below. Can you double check that this is indeed missing CHP?

Confirmed.  In the legacy API's data manger, we define p.HeatingTechs as including CHP, but we currently don't do this in REopt.jl.  I think it makes sense to include CHP as a heating tech; we could just replace union(p.techs.chp, p.techs.heating) with p.techs.heating that way and it's more intuitive - after all, steam turbine provide both heat and electricity and it's a heating tech.  Would you agree?  I can make that change if so.

@zolanaj Not related to Boiler or SteamTurbine, but I'm seeing that this HotTES storage SOC constraint sums across p.techs.heating which does NOT include CHP. Same with Constraint 4n-1 just below. Can you double check that this is indeed missing CHP?

Confirmed. In the legacy API's data manger, we define p.HeatingTechs as including CHP, but we currently don't do this in REopt.jl. I think it makes sense to include CHP as a heating tech; we could just replace union(p.techs.chp, p.techs.heating) with p.techs.heating that way and it's more intuitive - after all, steam turbine provide both heat and electricity and it's a heating tech. Would you agree? I can make that change if so.

I agree that it's inconsistent that SteamTurbine is a heating tech while CHP is not. Both are really CHP (although both could also be just electric, if thermal production is "turned off"). I was considering taking SteamTurbine out of heating techs, but there are some constraints that loops across heating techs for SteamTurbine. We'd need to comb through the model to see if just adding CHP to heating would lead to redundant/extra constraints or possibly unintended constraints. A lot of CHP constraints are handled separately across techs.chp. So, if you have a clear path for this I'm not opposed to fixing it now, but I'm also fine to just punt on that change for now.

@zolanaj Not related to Boiler or SteamTurbine, but I'm seeing that this HotTES storage SOC constraint sums across p.techs.heating which does NOT include CHP. Same with Constraint 4n-1 just below. Can you double check that this is indeed missing CHP?

Confirmed. In the legacy API's data manger, we define p.HeatingTechs as including CHP, but we currently don't do this in REopt.jl. I think it makes sense to include CHP as a heating tech; we could just replace union(p.techs.chp, p.techs.heating) with p.techs.heating that way and it's more intuitive - after all, steam turbine provide both heat and electricity and it's a heating tech. Would you agree? I can make that change if so.

I agree that it's inconsistent that SteamTurbine is a heating tech while CHP is not. Both are really CHP (although both could also be just electric, if thermal production is "turned off"). I was considering taking SteamTurbine out of heating techs, but there are some constraints that loops across heating techs for SteamTurbine. We'd need to comb through the model to see if just adding CHP to heating would lead to redundant/extra constraints or possibly unintended constraints. A lot of CHP constraints are handled separately across techs.chp. So, if you have a clear path for this I'm not opposed to fixing it now, but I'm also fine to just punt on that change for now.

In the short term let's punt since the heating techs work right now.  My proposed punt is here: https://github.com/NREL/REopt.jl/pull/121/commits/6392e7fe61316afe2fe8c9b1dbb0c2c80f5892d2
And the new issue to address this later is here: https://github.com/NREL/REopt.jl/issues/133
Assuming tests pass and you're ok with this proposed change, feel free to merge (or let me know and I can).  Adding the bug fix to the changelog now.


fix(badge): remove margin if badge is hidden

Currently elements with a matBadge get a margin in order to free up enough space for the badge, however that space is also there when the badge is hidden which can throw some layouts off center. These changes remove the margin if the badge is hidden.
Fixes #11596.

@jelbourn @amcdnl marking this as "needs discussion" since I can see it going two ways. On one hand, we don't want to take up the extra space if we don't have to, but on the other it means that toggling between a visible and a hidden badge will cause the element to shift. IMO the shifting isn't that big of an issue, because the badge is being removed at the same time. What do you think?

Why does the badge affect layout at all?

AFAIK the reasoning is that it makes so extra space so it doesn't overlap with the element next to it.

@amcdnl do you have any opinions? I'm leaning towards not removing the margin because I think it's worse for the UI to jump than to have the extra space.

@jelbourn - I'm on the fence. I agree the jumping is not ideal but a odd white space in text might be just as frustrating. If I had to choose, I'd probably say remove the whitespace.

Removed the margins @jelbourn @amcdnl, PTAL. Also depending on how many screenshot failures we get, we might have to bump this to a major version.

Caretaker note: we need to evaluate whether this change is minor or major based on how it affects google3

Change did not affect any internal tests - I'd be alright with this being minor


Support for iOS cross compiling using cmake 3.14+

As of version 3.14, cmake has added support for cross compiling iOS (see https://cmake.org/cmake/help/latest/release/3.14.html?highlight=cross#platforms).
This means that -miphone-version-min style parameters get added automatically. This also means that currently when using cmake-rs, these parameters are being added twice, and often with conflicting values.
I've found that in order the support the new system, the following CMAKE variables need to be set:

CMAKE_SYSTEM_NAME (Set to iOS)
CMAKE_OSX_ARCHITECTURES (Set to one of: arm64, armv7, armv7s, i386, or x86_64)
CMAKE_OSX_DEPLOYMENT_TARGET (Could likely be pulled from the IPHONEOS_DEPLOYMENT_TARGET env variable)
CMAKE_OSX_SYSROOT (Set to either: iphoneos or iphonesimulator)

The target triplets for iOS are:

aarch64-apple-ios
armv7-apple-ios
armv7s-apple-ios
i386-apple-ios
x86_64-apple-ios

Additionally, I found that cmake-rs (via cc-rs) is setting the following compiler flags which are not added by cmake:

-fPIC
-fembed-bitcode

Note: cmake 3.14 also added support for tvOS and watchOS, but since I don't support them in my own app, I don't know what's required to support them.

Seems reasonable to me to support! I don't do much ios development myself but I'm more than willing to review PRs!

Did #93 fix this issue? I try this "hello world" project:
https://github.com/davemilter/cmake_rs_hello_world
it builds without modification for Android, but for iOS:
-- Check for working C compiler: /usr/bin/cc - broken
clang: warning: using sysroot for 'MacOSX' but targeting 'iPhone' [-Wincompatible-sysroot]
 ld: warning: -headerpad_max_install_names is ignored when used with -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES)
ld: dynamic main executables must link with libSystem.dylib for architecture arm64

On this system cmake crosscomping for iOS works, if I manually invoke cmake,
but always pass properly crafted cmake toolchain file to cmake.
Should this work without toolchain file, or I have to pass it?
cc @simlay

Or, it is actually works. The problem in that crate on crates.io has no #93 . @alexcrichton, any plans for new release with iOS support fix?

Oops sorry about that, published now!

@alexcrichton Could you reopen this issue on account of the fix having been reverted, as described in https://github.com/alexcrichton/cmake-rs/issues/96?

Sure!

I have encountered this issue while cross-compiling between Intel and Apple Silicon MacOS, I fixed it by simply applying CMAKE_OSX_ARCHITECTURES.


Query is broken when querying "PurchaseOrder" - It works fine with other Entities

$var = $qb_data_service->Query("select * from PurchaseOrder");
var_dump($var)
I get 500 Error
$var = $qb_data_service->Query("select * from Bill");
var_dump($var)
Works Perfect
Here is the stack trace I get on a basic Query.
[29-Jul-2019 22:50:18 UTC] PHP Fatal error:  Uncaught Exception: Exception appears in converting Response to XML. in /home//..com/vendor/quickbooks/v3-php-sdk/src/DataService/DataService.php:997
Stack trace:
#0 /home//..com/tools/bill-barcode-printer.php(23): QuickBooksOnline\API\DataService\DataService->Query('select * from P...')
#1 {main}
thrown in /home//.**.com/vendor/quickbooks/v3-php-sdk/src/DataService/DataService.php on line 997

Rolling Back to Minor Version 37 Solves the issue, but I need to be on Minor Version 38.

The difference Between 37 & 38 response from the intuit API Explorer is as follows....
Ver 38
"Line": [
{
"Id": "1",
"LineNum": 1,
"Description": "Original Genuine OEM Assembly with Frame\n5.8" Quad HD   Super Amoled (2960x1440) 570 dpi\nBrand New | Not pulled from phone\nIn stock and ship same day from Massachusetts",
"Amount": 164.85,
"Received": 0,
"DetailType": "ItemBasedExpenseLineDetail",
"ItemBasedExpenseLineDetail": {
"BillableStatus": "NotBillable",
"ItemRef": {
"value": "3018",
"name": "LCD's & Digitizers:LCD Screen Touch Screen Digitizer   Frame Gray For Samsung Galaxy S8 Plus"
},
Ver 38
"Line": [
{
"Id": "1",
"LineNum": 1,
"Description": "Original Genuine OEM Assembly with Frame\n5.8" Quad HD   Super Amoled (2960x1440) 570 dpi\nBrand New | Not pulled from phone\nIn stock and ship same day from Massachusetts",
"Amount": 164.85,
"DetailType": "ItemBasedExpenseLineDetail",
"ItemBasedExpenseLineDetail": {
"BillableStatus": "NotBillable",
"ItemRef": {
"value": "3018",
"name": "LCD's & Digitizers:LCD Screen Touch Screen Digitizer   Frame Gray For Samsung Galaxy S8 Plus"
},
The difference is, each Line item has a key as "Received" and a corresponding value.
Any chance this can be fixed?

same issue.


Message Box on git commit erros is too short

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

VS Code Version: 1.74.2
OS Version: Windows_NT x64 10.0.19044

Steps to Reproduce:

Create a git commit hook and print some lines in it (e.g. with pre-commit)
Commit a file via the gui "Commit" button

The commit hook fails.
An message box pops up:

This message box has 3 buttons which do work correct. However the text in there is not helpful.
It only shows the first line of the error. In my case this is pretty misleading. The issue is not unstaged files, it is some empty lines!
You can find the real issue with both the "Open Git Log" and the "Show Command Output" button. This is great.
I still think this should not print the first line only. I think it would be best like this:
Git commit failed!  <-- Window headline
-----
Log:
<A reasonable amount of output lines, maybe 5>
...
-----
[Open Git Log] [Show Complete Command Output] [Cancel]

I got a less confusing example after i staged all modified files so pre-commit didn't output that warning.

This still happens and is confusing since it hides the real message.


failed to create deployment

I'm getting an error when trying to create a new spinnaker deployment:
guidob@meister:~/git/github/spinnaker-deploymentmanager master ± gcloud --project xxx-sandbox-spinnaker deployment-manager deployments create --config config.jinja spinnaker --properties jenkinsPassword=xxx
WARNING: Delimiter '=' is deprecated for properties flag. Use ':' instead.
The fingerprint of the deployment is LPqm4PvYwhuJpj5r_rgIkw==
Waiting for create [operation-1490341968661-54b7547a2ca08-f02c391f-cacec7b8]...failed.
ERROR: (gcloud.deployment-manager.deployments.create) Error in Operation [operation-1490341968661-54b7547a2ca08-f02c391f-cacec7b8]: errors:
- code: RESOURCE_ERROR
  location: /deployments/spinnaker/resources/spinnaker-spinnaker-bucket
  message: '{"ResourceType":"storage.v1.bucket","ResourceErrorCode":"403","ResourceErrorMessage":{"code":403,"errors":[{"domain":"global","message":"Caller
    does not have storage.buckets.get access to bucket spinnaker-spinnaker-bucket.","reason":"forbidden"}],"message":"Caller
    does not have storage.buckets.get access to bucket spinnaker-spinnaker-bucket.","statusMessage":"Forbidden","requestPath":"https://www.googleapis.com/storage/v1/b/spinnaker-spinnaker-bucket"}}'

Is there something I'm missing here?

@guidob, in your GCP console, under IAM, make sure your GCP APIs service account has the following roles, if not add them and try again:

Compute Instance Admin (v1)
Compute Network Admin
Compute Storage Admin
Storage Admin

Thanks @danisla, didn't think about that. Will try that.


Module 2 Terraform: "Error creating launch configuration: UnsupportedOperation"

Hello,
Yesterday installed AWSGoat module1  without issues, but today I wanted to run the module2 and this error is shown at Terraform run:
aws_ecs_service.worker: Creation complete after 1s [id=arn:aws:ecs:us-east-1:318030154911:service/ecs-lab-cluster/ecs_service_worker] ╷ │ Error: Error creating launch configuration: UnsupportedOperation: The Launch Configuration creation operation is not available in your account. Use launch templates to create configuration templates for your Auto Scaling groups. │ 	status code: 400, request id: 2e6cb191-b4b8-48a0-b7f8-46be0044fa81 │  │   with aws_launch_configuration.ecs_launch_config, │   on main.tf line 351, in resource "aws_launch_configuration" "ecs_launch_config": │  351: resource "aws_launch_configuration" "ecs_launch_config" { │  ╵ Error: Process completed with exit code 1.

Change this:
resource "aws_launch_configuration" "ecs_launch_config" {
  image_id             = data.aws_ami.ecs_optimized_ami.id
  iam_instance_profile = aws_iam_instance_profile.ecs-instance-profile.name
  security_groups      = [aws_security_group.ecs_sg.id]
  user_data            = data.template_file.user_data.rendered
  instance_type        = "t2.micro"
}

resource "aws_autoscaling_group" "ecs_asg" {
  name                 = "ECS-lab-asg"
  vpc_zone_identifier  = [aws_subnet.lab-subnet-public-1.id]
  launch_configuration = aws_launch_configuration.ecs_launch_config.name
  desired_capacity     = 1
  min_size             = 0
  max_size             = 1
}

For this:
resource "aws_launch_template" "ecs_launch_template" {
  name_prefix            = "ecs-lab-launch-template-"
  image_id               = data.aws_ami.ecs_optimized_ami.id
  instance_type          = "t2.micro"
  iam_instance_profile {
    name                = aws_iam_instance_profile.ecs-instance-profile.name
  }
  vpc_security_group_ids     = [aws_security_group.ecs_sg.id]

  # Encode the user_data in base64
  user_data              = base64encode(data.template_file.user_data.rendered)
}

resource "aws_autoscaling_group" "ecs_asg" {
  name                   = "ECS-lab-asg"
  vpc_zone_identifier    = [aws_subnet.lab-subnet-public-1.id]
  desired_capacity       = 1
  min_size               = 0
  max_size               = 1

  # Reference the launch template instead of the launch configuration
  launch_template {
    id                   = aws_launch_template.ecs_launch_template.id
    version              = "$Latest"
  }
}


Aborting Fetches in Middleware

Hi all, this isn't a bug but I would appreciate some feedback.
I have a middleware that runs fetches for me, essentially I can dispatch an action like the following and it will run the fetch for me and then invoke the relevant callback.
{
  type: 'FETCH_USER'
  meta: {
    method: 'GET'
    endpoint: 'http://api.mydomain.com/user/1,
    success: successCallbackFunction // (possibly an action creator to be dispatched).
    error: errorCallbackFunction // (possibly an action creator to be dispatched).
  }

Typically this sort of action is dispatched in a componentWillMount method to do an async fetch of the data the component requires.
This has been working well for me but recently I noticed a couple of bugs relating to this approach. If the order of execution is as follows:

A component is mounted and dispatches an action like the one above.
The fetch middleware begins the fetch.
The user changes page causing the requesting component (in step 1) to be unmounted, this component, or some other higher up the tree component that is also being unmounted dispatches an action to remove various parts of the store.
The fetch completes triggering a reducer that puts data back in the store that should no longer be there due to step 3. And potentially this fetch was a subset of the data required. I.e. data is added to my store that is no longer relevant.

The react documentation here states:

When fetching data asynchronously, use componentWillUnmount to cancel any outstanding requests before the component is unmounted.

As far as I am aware fetch has no abort() method like the jQuery ajax does as used in the example on the React documentation. On top of that, because the fetch is handled by my middleware I don't really have a reference to it in my component.
To mitigate the issue I have put logic in the reducers for the callbacks to only mutate the state if relevant conditions are true. This works well but it feels like unnecessary callbacks, reducers and fetches are happening and I worry about how this would be as the app grows.
Does anyone have any feedback or tips on this kind of approach and how you deal with cleaning up when a component unmounts.
Thanks!

There currently is no cancellation support in fetch() API although that may change in the future.
If you change your middleware to use XMLHttpRequest directly you can tweak it to return the { abort } method.
const myMiddleware = store => next => action => {
  const xhr = // ...
  const ready = new Promise((resolve, reject) => {
    xhr.onload = () => { dispatch(...); resolve() }
    xhr.onerror = () => { dispatch(...); reject(...) }
    // ...
    xhr.send()
  })
  const abort = xhr.abort.bind(xhr)
  return {  ready, abort }
}

Then your components will have access to it as a part of dispatch() return value:
const operation = this.props.dispatch(fetchStuff())
operation.ready.then(...)
operation.abort()

Awesome. Thanks @gaearon I'll give that try. I didn't actually realise that middleware could return and that would then be the return value of dispatch()!

Yep, this should work as long as any middleware in chain before it takes care to return next return value. Which well-behaved middleware should do.

@gaearon , thanks for the answer above. I'm still wrapping my head around writing custom middleware, and I had a quick question based on this comment:

Yep, this should work as long as any middleware in chain before it takes care to return next return value. Which well-behaved middleware should do.

You state that well-behaved middleware should return the value of next, yet the example you gave returns { ready, abort }. Since this isn't returning next, is this middleware still considered well-behaved?

Keep in mind that you use 'next()' in your middleware simply to bypass the invocation of the current middleware again during this flow. If you had always used the same 'dispatch', you would end up in the same middleware again.


aurelia mask causes browser to freeze up

this is due to valueChanged actually updating value, which sometimes causes observers to fight

fixed 1.5.1


Question regarding crossentropy loss function for BERTMaskedLM

How does BERT handle large number of classes to predict? The number of classes is essentially the vocabulary size which is  30522 for the BERT-base model. When BERT tries to predict a word using CrossEntropy loss, it needs to compute the softmax for a large number of classes.
In shallow approach such as word2vec, negative sampling or hierarchical softmax is used. I wonder why it is not the case for BERT.
Thanks in advance.

30k is ok for a softmax, it's not that much and that because Bert is using a sub-word (open-)vocabulary.
Full word (and closed-vocabulary) models like word2vec have to handle several 100k words hence the specific speed-ups. They are also older and the computation power available at the time was more constrained.


Roll Flutter Engine from 2be41c6d0152 to 9a426d2325ff (3 revisions)

https://github.com/flutter/engine/compare/2be41c6d0152...9a426d2325ff
2023-03-03<EMAIL_ADDRESS>[Embedder API] Freeze parts of API for ABI stability (flutter/engine#39963)
2023-03-03<EMAIL_ADDRESS>Roll Skia from a0ab1e734490 to d953c63dd96b (9 revisions) (flutter/engine#40035)
2023-03-02<EMAIL_ADDRESS>Remove PlatformConfiguration and ViewConfiguration (flutter/engine#40012)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jsimmons@google.com,rmistry<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.


⚠ Contemporanea Group has degraded performance

In 8a95511, Contemporanea Group ($SITE_CNTMG) experienced degraded performance:

HTTP code: 200
Response time: 15369 ms

Resolved: Contemporanea Group performance has improved in f0f68a9.


add a datastore binding that can be used in integration tests

we should add integration tests that verify workloads function properly. it needs to be runnable via maven.

maybe sqlite?


Plot title variable too long

Current behavior:
air0 = airtemp.air.isel(time=0)
air0.plot()

Preferred behavior:

Currently the plot titles are truncated at 50 characters using DataArray._title_for_slice(self, truncate=50). To implement the new behavior we can just make this become DataArray._title_for_slice(self, truncate=50, each=10) which will additionally truncate each variable at 10 characters. This works well for dates.
For discussion- Do we add something indicating the variable was truncated? Like trailing ellipsis: time = 2012-12-31...

I would suggest reusing format_item from xray.core.formatting, which provides such a nice summary for datetimes.

nice- I had forgotten about those

:+1:  I just encountered this same problem.


Add FileStorage database engine for storing database in local file

To work in Cordova and Windows 8 application.

Added in version 0.0.38 support for file storage (tested with Node,js, Apach Cordobe on iOS, Android, and WIndows 8)


feature/fix-bce-metric-docs

@sebasarango1180 I found some bugs in the documentation of this metric.

@cgarciae I was also noticing that BCE has not implemented label_smoothing yet. Should we so it now, or is it an incoming issue?


#101 one way relay style pagination

Started on this, add to the github demo, somehow have to map the FragmentReference
  //@ts-expect-error map Connection<TItem> to ReadonlyArray<TItem>
  pendingFragment: mostRecentFragmentReference,

Closes #101

Awesome!! I will be somewhat busy for the next few days, but I'll take a look as soon as I can.

What are use cases for pendingFragment?
If I use it to suspend, then after rerender usePagination will return kind: "Complete" so it's not possible to read value of the fragment.
Wouldn't fragment with return type void be a better fit.

Sorry that this took so long for me to look at deeply.
A few nits, and it should be landable.

Happy with leaving the pending fragment as-is.
In UserRepositoryList, we no longer need to reverse the results we get. They should instead come in the correct order, since we're paginating forward. i.e. we want this to show things newest-to-oldest.
Second, my thinking is that if we call pagination.fetchMore(undefined, 1) 2x and pagination.fetchMore(undefined, 2) once, the results should be the same. But they're actually reversed in the latter case.
I think the reason this is happening is that we are attempting to reverse the natural order of the GitHub connection. If, instead, we do:

  field User.RepositoryConnection($first: Int, $after: String) {
    repositories(first: $first, after: $after) {
      pageInfo {
        hasNextPage
        endCursor

we're good (except for the stupid query/mutation mixup, which I'll work on today)

awesome, merged and landed! 3a0c06c030f4493715de92bd040c11a97c2d8e67