Map events not passed properly

When map is clicked the event passed into the handler function is not the GoogleMap click event but a simple PointerEvent.
See edited example:
https://stackblitz.com/edit/vue-google-maps-marker-hy9ekf?file=src/components/ComponentWithMap.vue
Expected behavior:
Handler function gets passed a GoogleMap event with properties such as latLng etc.
(This is similar to marker dragend events in a recent bugfix https://github.com/fawmi/vue-google-maps/issues/35)
Use case:
Add a marker on click/doubleclick.
Many thanks!

@maceksimon I encountered the same issue.
After some digging around in the code I found that Google Maps events are only registered when you have one of the following:

autobindAllEvents set to true when you initialize the plugin
reference a specific event as an attribute (this happens in src/utils/bindEvents.js).

This means that if you want a @click on the map it won't register unless you also have something like click="something" or :click="true".
Also keep in mind that the events defined in the package don't really follow Vues camelcase typing (dblclick and dragend should be all lowercase for example).
(I think the intention might have been to add a handler as an attribute instead of an event).
I'll point out two possible quick fixes: The first one does register all events defined on all components, which can lead the component into a jungle of events being fired. But being the easiest one it looks like this:
app.use(VueGoogleMaps, {
    autobindAllEvents: true, // 👈👈👈
    load: {
        key: 'YOUR_API_KEY_COMES_HERE',
    },
})

The second option would be to add click="something" (make sure it's not an empty string, this would fail the validity check and not register the event).
<GMapMap
      :click="yes"
      @click="onMapClicked"
  >

Both options shouldn't be considered as a permanent fix, Vue still fires a PointerEvent on the actual component (the container div) - though you could filter these events out.
I might open a PR tomorrow to address these issues (it's getting really late), I do have a patch available so if you want something more robust I can share that one too.

Thank you @hansvn for a great explanation! It solved the problem for me.
Second approach makes the most sense when enabling a single feature/event.
In the GMapMap, you can do:
:click="true" or click="yes"
Closing the issue.
🙏


5 of 15 TUYA smart plugs reported "Migration Error" when changing from HA 2023.8.1 to HA 2024.8.3

This form is for reporting bugs.  If you have encountered a bug, you should
generally have some log messages or device diagnostics to show something is
going wrong.  If your problem is more of a question or a request for help,
then Discussions is
probably a more suitable venue.
Describe the bug
I have about 15 TUYA smart plugs.
In HA 2023.8.1 all plugs were working fine.
In HA 2024.8.3, 5 plugs are reporting "Migration Error".
To Reproduce
Issue can be reproduced any time HA re-start.
Expected behavior
It is expected that the referred 5 plugs should connect to HA ain the same way as all others..
Additional context
Logger: homeassistant.config_entries
Source: config_entries.py:943
First occurred: 23:11:32 (5 occurrences)
Last logged: 23:11:32
Error migrating entry lTSP-1-TR3 for tuya_local
Error migrating entry lTSP-3-AG for tuya_local
Error migrating entry lTSP-2-AS for tuya_local
Error migrating entry lTSP-1-TR2 for tuya_local
Error migrating entry lTSP-1-TR for tuya_local
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 943, in async_migrate
result = await component.async_migrate_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tuya_local/init.py", line 418, in async_migrate_entry
await async_migrate_entries(hass, entry.entry_id, update_unique_id13_2)
File "/usr/src/homeassistant/homeassistant/helpers/entity_registry.py", line 1627, in async_migrate_entries
ent_reg.async_update_entity(entry.entity_id, **updates)
File "/usr/src/homeassistant/homeassistant/helpers/entity_registry.py", line 1170, in async_update_entity
return self._async_update_entity(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_registry.py", line 1109, in _async_update_entity
raise ValueError(
ValueError: Unique id 'ebab22410ed32cc2343gdy-binary_sensor_problem' is already in use by 'binary_sensor.ltsp_1_tr3_problem'

It appears you have duplicate entities somehow. You will need to remove those devices and re-add them to clear up the device registry.
I can't really support upgrading issues from arbitrary ancient versions like this, so I won't look any further into it.

Hi @make-all (Jason),
Thanks for your advice.
Now all my TUYA plugs are working.


Set the stack pointer to zero once the context function returns

This also slightly improves context switch performance.

Closing this in favor of #52, which includes these changes.


What splitter in documents?

What is the issue?
I am exploring rag function of ollama: Admin Panel->Settings->Documents, setting is as following:

What splitter and what lib you use here?(e.g: SentenceSplitter in llama_index or CharacterTextSplitter in Langchain?)
OS
macOS
GPU
Apple
CPU
Apple
Ollama version
0.4.1

ollama is just an inference engine, it doesn't do RAG.  That sort of functionality is handled by other projects, this looks like open-webui


Download only last 10 posts

Provide us a use case of the feature
Is it possible to add a feature to only download last 10 posts instead of all posts?
Describe the solution you'd like
To add an argument to enable downloading x last posts.
The reason I want this, is because i'm scraping large list of users, and I only want to download the newest posts. This would help limit API calls

Duplicate of #141.

@aandergr I'm not sure how to do this correctly, since I have no coding experience in python.
Could please guide me how to do it correctly ?


Build instructions in README.md are no longer correct

@nreid260 has updated our build to be entirely done with bazel. The mvn command is only used for pushing releases and snapshots to sonatype where users can download them.
However, the build instructions haven't been updated.
https://github.com/google/closure-compiler/blob/master/README.md
I made a couple of educated guesses at how to do the bazel build, but so far have not been successful.
For example:
$ bazel build //:compiler_unshaded
...
ERROR: Analysis of target '//:compiler_unshaded' failed; build aborted: Either the path attribute of android_sdk_repository or the ANDROID_HOME environment variable must be set.

I believe Nick fixed this.


3.8 -> 3.12 in CI (except for smoke-test)

Towards #1393

r linting failures, all of the form [object_usage_linter] no visible global function definition for .... Will try rerunning, and then see if other pushes are also failing. Possibilities:

Erratic failure: we won't see it again?
Un-pinned dependency issue?
Actually some dependency between python version and R?

Note, earlier versions of Python are still running in the test matrix. This is for dev tooling


Title property not defined correctly makes echarts crash with exception

Version
5.2.2
Steps to reproduce
Create an options variable with "title: 'This is a title'" instead of "title: { text: 'This is a title'}"
What is expected?
Ignore the attribute and show the chart
What is actually happening?
Uncaught TypeError: Cannot use 'in' operator to search for 'x' in CT Lot Status
at echarts.5.2.2.min.js:45
at Array.forEach ()
at O (echarts.5.2.2.min.js:35)
at ed (echarts.5.2.2.min.js:45)
at echarts.5.2.2.min.js:45
at Array.forEach ()
at O (echarts.5.2.2.min.js:35)
at echarts.5.2.2.min.js:45
at Array.forEach ()
at O (echarts.5.2.2.min.js:35)

I really don't think this is a bug for ECharts cause user doesn't follow the rules.

I just think that the error should be more meaningful as I took a lot of time debugging for just a simple configuration error.
It's really nota bug but a good nice to have.

I could understand resolving the error unnecessarily took up your time and sorry for that. But anytime we should read the documentation first, shouldn't we? It's not always better to add too much user input validation.


Enable running in docker / k8s

When trying to run Brozzler in docker, we get the following error:
Failed to move to new namespace: PID namespaces supported, Network
namespace supported, but failed: errno = Operation not permitted
Trace/breakpoint trap

This happens because chromium uses sandboxing for increased security by
default and its not supported when running in a container.
Adding chromium option --no-sandbox fixes the problem.
This issue is common, I found various reports about it like this:
https://github.com/Zenika/alpine-chrome/issues/33

I have some other observations when trying to run chromium / Brozzler in docker.
chromium tries to use d-bus but its not available so it reports errors like the following. Its working fine though. Maybe I need to find out how to enable d-bus in docker.
1035:1272:1115/130216.784860:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[1035:1272:1115/130216.784967:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[1035:1272:1115/130216.785068:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[1035:1272:1115/130216.785221:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[1035:1272:1115/130216.785278:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

Even though we already use chromium option --ignore-certificate-errors, we still get errors like the following:
[1064:1083:1115/130216.794595:ERROR:cert_verify_proc_nss.cc(1011)] CERT_PKIXVerifyCert for accounts.google.com failed err=-8179
[1064:1083:1115/130216.818862:ERROR:cert_verify_proc_nss.cc(1011)] CERT_PKIXVerifyCert for archive.org failed err=-8179
[1064:1083:1115/130217.578483:ERROR:cert_verify_proc_nss.cc(1011)] CERT_PKIXVerifyCert for analytics.archive.org failed err=-8179
[1064:1083:1115/130217.691415:ERROR:cert_verify_proc_nss.cc(1011)] CERT_PKIXVerifyCert for clients1.google.com failed err=-8179
[1064:1083:1115/130226.727836:ERROR:cert_verify_proc_nss.cc(1011)] CERT_PKIXVerifyCert for ssl.gstatic.com failed err=-8179

chromium cannot run as root but root is the default docker user. You need to do something like the following before launching it:
RUN groupadd -r spn && useradd -r -g spn spn
USER spn

The full command I used for testing is what Brozzler uses:
/usr/bin/chromium-browser --remote-debugging-port=33839 --use-mock-keychain --user-data-dir=/dev/shm/tmp62kztegu/chrome-user-data --disable-background-networking --disable-renderer-backgrounding --disable-hang-monitor --disable-background-timer-throttling --mute-audio --disable-web-sockets --window-size=1100,900 --no-default-browser-check --disable-first-run-ui --no-first-run --homepage=about:blank --disable-direct-npapi-requests --disable-web-security --disable-notifications --disable-extensions --disable-save-password-bubble --ignore-certificate-errors --proxy-server=http://wwwb-spn10:8000 --no-sandbox http://archive.org

If you remove --no-sandbox it crashes with the error I already mentioned in this PR.

Is there a way we can support docker without --no-sandbox?
Maybe you could investigate these leads?
https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#setting-up-chrome-linux-sandbox says
Add user so we don't need --no-sandbox.

https://github.com/Zenika/alpine-chrome#3-ways-to-use-chrome-headless-with-this-image
has this little section:
The best: With seccomp

When I'm trying to follow the instructions on the first link you posted and run:
sudo sysctl -w kernel.unprivileged_userns_clone=1
I get an error because of a read only filesystem.
Docker needs to run with some extra conf to allow this. https://docs.docker.com/engine/security/userns-remap/
I think that there will be issues when trying to run this in our k8s clusters.

When trying to use the instructions on the 2nd link, I get another error:
The setuid sandbox provides API version 1, but you need 0
Please read https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md.

@nlevitt I have two alternative suggestions:

When ENV var DISABLE_CHROME_SANDBOX is set, we enable --no-sandbox
Use ENV var EXTRA_CHROME_ARGS to pass arbitrary cli arguments to chrome.

I think that the 2nd would be better because maybe we'll need to use other options as well soon. E.g. some time ago I told you about --disable-dev-shm-usage to use /tmp for all temp files and how this is useful when running in docker. https://bugs.chromium.org/p/chromium/issues/detail?id=736452

@vbanos I like #2, let's do that. Maybe call it BROZZLER_EXTRA_CHROME_ARGS

Its ready!

Thanks!


Fix peak and net values for p1 v25

Added testfile for https://github.com/plugwise/plugwise-beta/issues/2 onto a copy of smile_p1_v2 and mapped values. Indeed peak/non-peak is not getting there. When just changing the process it would map point_logs twice as apparently both these v2.5 versions have a single point but multiple interval/cumulatives. Loop breaks out when finding the single version.


On mobile onclick not working

On android one plus 8 with chrome and many other mobile devices the clickmanager is not working. It only works after rotating the phone to landscape mode.
The onclick handlers does work in portrait but not on the 3d object it self it feels like the click register happens on the wrong orientantion. That it using the height/wiodthto see if it clicks on the object instead of height/width.

Hi @teunes1, have you tried using the "pointerdown" instead of the "click" event? Can you send a link to the page or paste your code here?

Hey @markuslerner i've the same problem with the example code:
import * as THREE from 'three';
import { InteractionManager } from 'three.interactive';

const container = document.createElement('div');
container.setAttribute('id', 'container');
document.body.appendChild(container);

const renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio(window.devicePixelRatio);
renderer.setSize(window.innerWidth, window.innerHeight);
container.appendChild(renderer.domElement);

const scene = new THREE.Scene();

const camera = new THREE.PerspectiveCamera(
  45,
  window.innerWidth / window.innerHeight,
  0.1,
  1000
);
camera.position.set(0.0, 0.0, 10.0);

const interactionManager = new InteractionManager(
  renderer,
  camera,
  renderer.domElement
);

const geometry = new THREE.BoxGeometry(1, 1, 1);
const material = new THREE.MeshBasicMaterial();

const cube = new THREE.Mesh(geometry, material);
cube.addEventListener('mouseover', (event) => {
  event.target.material.color.set(0xff0000);
  document.body.style.cursor = 'pointer';
});
cube.addEventListener('mouseout', (event) => {
  event.target.material.color.set(0xffffff);
  document.body.style.cursor = 'default';
});
cube.addEventListener('mousedown', (event) => {
  event.target.scale.set(1.1, 1.1, 1.1);
});
cube.addEventListener('click', (event) => {
  event.target.scale.set(1.0, 1.0, 1.0);
});
scene.add(cube);
interactionManager.add(cube);

const animate = (time) => {
  requestAnimationFrame(animate);

  interactionManager.update();

  renderer.render(scene, camera);
};

animate();

I use laravel framework with vite to parse the file and the result is preloading the javascript:
<link rel="modulepreload" href="https://mydomain.nl/build/assets/app.9a6b6a82.js" /><script type="module" src="https://mydomain.nl/build/assets/app.9a6b6a82.js"></script>
Not sure if this is relevant, but this might be the only thing that is different.
The installed package versions are:
  "three": "^0.146.0", // 0.149 is installed(latest)         "three.interactive": "^1.5.0// 1.5.1 is installed(latest)"

Hi @teunes1, thank you for the code. I tested it on the latest Chrome mobile app on my iPhone Xs and it works. Unfortunately I don't have an Android phone at the moment.
I used the simple.html file as a base for testing you code and the "yarn start" script of THREE.interactive.
– Have you tried adding a "handleWindowResize" handler as in the simple.html example?
– Are you using this meta tag or a similar one in your ?
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
– Have you tried pasting your code into that example?
– I have also just released the new version 1.5.2 of this library, which adds a check for touchEvent.touches.length > 0, which might also solve your problem.
Please let me know, if any of this works for you.

@markuslerner  the viewport was the fix
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
Many thanks!

Glad, this worked. Thank you, @teunes1 for the feedback and for closing this issue!


Remove duplicate variable declarations "var fn = webui.fn" in webui-components.js

No changes will be made to code. Declarations are needed in components.


chore: fixes example by not reusing the transaction.

Currently, the example was reusing the transaction which ended up in a double closing of body buffer and hence nil pointer exception.
Ping @M4tteoP

Thank you for contributing to Coraza WAF, your effort is greatly appreciated
Before submitting check if what you want to add to coraza list meets quality standards before sending pull request. Thanks!

Make sure that you've checked the boxes below before you submit PR:

[ ] My code includes positive and negative tests.
[ ] I have an appropriate description with correct grammar.
[ ] I have read Contribution guidelines, maintainers note and Quality standard.
[ ] My code is properly linted and passes pre-commit tests.

Thanks for your contribution :heart:

Codecov Report
Base: 76.75% // Head: 76.60% // Decreases project coverage by -0.14% :warning:

Coverage data is based on head (3c4910f) compared to base (812ed46).
Patch coverage: 25.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           v3/dev     #420      +/-   ##
==========================================
- Coverage   76.75%   76.60%   -0.15%
==========================================
  Files         136      136
  Lines        5966     5981      +15
==========================================
+ Hits         4579     4582       +3
- Misses       1118     1126       +8
- Partials      269      273       +4

Flag
Coverage Δ

no-tinygo
76.73% <25.00%> (-0.15%)
:arrow_down:

overall
76.60% <25.00%> (-0.15%)
:arrow_down:

tinygo
75.22% <25.00%> (-0.15%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

transaction.go
81.95% <ø> (-0.04%)
:arrow_down:

body_buffer.go
57.14% <25.00%> (-12.86%)
:arrow_down:

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

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

@jcchavezs could you include test coverage for the close modifications?

@jcchavezs could you include test coverage for the close modifications?

😱 done


Adding v1 of the contributing document

Summary
This is a first draft of the contributing guidelines. There is still scope for improvement such as adding a "Code of Conduct" or expanding further on pull request guidelines.
Closes #675

@swaathi We have created a Discord channel for open discussions and support. Also created a separate channel for contributions #contribute . Can we include that as well in this doc

Sure, can you please give me the link for the Discord group?


Zero owner_pk_hash causes unexpected results

This was observed on FPGA and sw emulator.
main branch at commit: ca319e19e550e923289beb7cfb100ab69e09de39
Using the smoke_test if owner_pk_hash is replaced with an invalid hash the expected result is IMAGE_VERIFIER_ERR_OWNER_PUB_KEY_DIGEST_MISMATCH when verifying the FW image. For non-zero incorrect owner_pk_hash values this is the result, but if the owner_pk_hash is zero the result is different.
On FPGA:
owner_pk_hash: [0xF; 12] results in IMAGE_VERIFIER_ERR_OWNER_PUB_KEY_DIGEST_MISMATCH.
owner_pk_hash: [0x0; 12] results in the ECC KAT to fail with the error ROM_KAT_ECC384_SIGNATURE_GENERATE_FAILURE
With a zero value of owner_pk_hash FPGA fails much earlier, during ROM execution of the KATs.
Using the sw-emulator;
owner_pk_hash: [0xF; 12] results in IMAGE_VERIFIER_ERR_OWNER_PUB_KEY_DIGEST_MISMATCH.
owner_pk_hash: [0x0; 12] results in the smoke test passing.
With a zero value of owner_pk_hash the sw-emulator makes it to RT firmware.
Using Verilator:
owner_pk_hash: [0x0; 12] Still running but can confirm that it doesn't fail at the KAT

Verilator also passes the smoke test with owner_pk_hash full of zeroes.

@jhand2 to confirm that a zero owner_pk_hash is acceptable. Image Verifier does explicitly only error on mismatch if the hash is non-zero.
FPGA is still a concern, we don't expect the fuses to impact the KAT.

I confirmed that succeeding with a zero'd owner_pk_hash is expected.
All the inputs/outputs to the ECC KAT are constant (including the private key, signature, etc). So the fuse values shouldn't impact the execution of that KAT.
I don't know a lot about FPGA synthesis, so I'm having a hard time speculating about what could be going wrong. One thing to check would be where exactly it's failing.
It could be here:
https://github.com/chipsalliance/caliptra-sw/blob/5eb58b0ae8e6430ac6cceb122eb7c028864b2442/kat/src/ecc384_kat.rs#L72
or here:
https://github.com/chipsalliance/caliptra-sw/blob/5eb58b0ae8e6430ac6cceb122eb7c028864b2442/kat/src/ecc384_kat.rs#L75
If it's the first block, then finding out where in the sign function it's failing and with what error code would be good.

Mistake in model-fpga-realtime. Offset takes a DW offset and the byte offset was provided for one case where the TRNG_STATUS register was read. That read was actually accessing a DW from the owner_pk_hash. When owner_pk_hash was written with the valid hash or the couple of invalid values I tried bit 0 happened to be set. ECC KAT test failed to get ETRNG data.


cannot run mobilenet_v2_quantized on pytorch/caffe2

I am trying to run mobilenet_v2_quantized on pytorch/caffe2 repo which supports int8 .
after compiling pytorch on tx2 and run the model, I meet the following error:

WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode.
WARNING:caffe2.python.workspace:Original python traceback for operator `-2110861432` in network `mobilenet_v2_quant` in exception above (most recent call last):
Traceback (most recent call last):
  File "test_caffe2.py", line 470, in <module>
    net_def = createNet(pred_net)
  File "test_caffe2.py", line 406, in createNet
    workspace.CreateNet(net_def, overwrite=True)
  File "/home/gg/pytorch/build/caffe2/python/workspace.py", line 154, in CreateNet
    StringifyProto(net), overwrite,
  File "/home/gg/pytorch/build/caffe2/python/workspace.py", line 180, in CallWithExceptionIntercept
    return func(*args, **kwargs)
RuntimeError: [enforce fail at operator.cc:46] blob != nullptr. op NCHW2NHWC: Encountered a non-existing input blob: data
frame #0: c10::ThrowEnforceNotMet(char const*, int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void const*) + 0x7c (0x7f5ac89ed4 in /home/gg/pytorch/build/lib/libc10.so)
frame #1: caffe2::OperatorBase::OperatorBase(caffe2::OperatorDef const&, caffe2::Workspace*) + 0x560 (0x7f5bc5fa18 in /home/gg/pytorch/build/lib/libcaffe2.so)
frame #2: <unknown function> + 0x13e5efc (0x7f5c088efc in /home/gg/pytorch/build/lib/libcaffe2.so)
frame #3: std::_Function_handler<std::unique_ptr<caffe2::OperatorBase, std::default_delete<caffe2::OperatorBase> > (caffe2::OperatorDef const&, caffe2::Workspace*), std::unique_ptr<caffe2::OperatorBase, std::default_delete<caffe2::OperatorBase> > (*)(caffe2::OperatorDef const&, caffe2::Workspace*)>::_M_invoke(std::_Any_data const&, caffe2::OperatorDef const&, caffe2::Workspace*&&) + 0x34 (0x7f5cb5dd9c in /home/gg/pytorch/build/caffe2/python/caffe2_pybind11_state.cpython-35m-aarch64-linux-gnu.so)
frame #4: <unknown function> + 0xfbacfc (0x7f5bc5dcfc in /home/gg/pytorch/build/lib/libcaffe2.so)
frame #5: <unknown function> + 0xfbcd0c (0x7f5bc5fd0c in /home/gg/pytorch/build/lib/libcaffe2.so)
frame #6: caffe2::CreateOperator(caffe2::OperatorDef const&, caffe2::Workspace*, int) + 0x430 (0x7f5bc60898 in /home/gg/pytorch/build/lib/libcaffe2.so)
frame #7: caffe2::SimpleNet::SimpleNet(std::shared_ptr<caffe2::NetDef const> const&, caffe2::Workspace*) + 0x3dc (0x7f5bcc016c in /home/gg/pytorch/build/lib/libcaffe2.so)
frame #8: <unknown function> + 0x101eb3c (0x7f5bcc1b3c in /home/gg/pytorch/build/lib/libcaffe2.so)
frame #9: <unknown function> + 0xfa5904 (0x7f5bc48904 in /home/gg/pytorch/build/lib/libcaffe2.so)
frame #10: caffe2::CreateNet(std::shared_ptr<caffe2::NetDef const> const&, caffe2::Workspace*) + 0x90c (0x7f5bc98f94 in /home/gg/pytorch/build/lib/libcaffe2.so)
frame #11: caffe2::Workspace::CreateNet(std::shared_ptr<caffe2::NetDef const> const&, bool) + 0x1e4 (0x7f5bcab824 in /home/gg/pytorch/build/lib/libcaffe2.so)
frame #12: caffe2::Workspace::CreateNet(caffe2::NetDef const&, bool) + 0xa4 (0x7f5bcaca7c in /home/gg/pytorch/build/lib/libcaffe2.so)
frame #13: <unknown function> + 0x51060 (0x7f5cb55060 in /home/gg/pytorch/build/caffe2/python/caffe2_pybind11_state.cpython-35m-aarch64-linux-gnu.so)
frame #14: <unknown function> + 0x512d0 (0x7f5cb552d0 in /home/gg/pytorch/build/caffe2/python/caffe2_pybind11_state.cpython-35m-aarch64-linux-gnu.so)
frame #15: <unknown function> + 0x8edfc (0x7f5cb92dfc in /home/gg/pytorch/build/caffe2/python/caffe2_pybind11_state.cpython-35m-aarch64-linux-gnu.so)
<omitting python frames>

what is the problem?

Same here. Can't run it. I've posted it here.
https://discuss.pytorch.org/t/caffe2-mobilenetv2-quantized-using-caffe2-blobistensortype-blob-cpu-blob-is-not-a-cpu-tensor-325/29065
My error msg is different, though.
What's interesting is that in a desperate attempt, I downloaded resnet-50 quantized and run the same script. I got another different error msg, a bit similar to what @pcub showed above.
I've tried both on TX2 and Rasp pi, btw. Same error msg. Hoping someone can give some pointers.

I think the reason is that workspace.CreateNet requires all blobs existed at the time of creating the network, but the input blob "data" was not existed at that time. One solution is to call workspace.CreateBlob("data") before calling createNet.

@pcub So I'm guessing I shouldn't have followed the tutorial, since your way seems different than mine and works now. Is it possible to show me some code snippet to see how it's done? I have zero Caffe2 experience, so I'd really appreciate that.


Review the inclusive language guidance

Summary
Content style
Final version of the guidance with images written, reviewed and approved

This work will be undertaken in the wider content style review.


Frames: Design of Method Activation State

Current Situation
Currently, the AST and the bytecode interpreter use two different designs for frames. [AST, BC]
Both have in common to use a Frame class, which stores various bits. The AST version splits up the state in a number of different parts, a receiver, an arguments array, an array for arguments access by inner scopes, and array for local variables, an array for local variables access by inner scopes, and an on-stack marker. Allocating this frame is rather slow. There's a lot of work that has to be done for a single method activation.
The design or the bytecode frame is different and still uses the classic SOM stack-based encoding (combining arguments, local variables, and a stack). It also holds on to a few different bits of state though, which requires the use of the Frame object. The one positive aspect here is however that the construction of a frame is much more straight forward. The major drawback is that the virtualization of a frame doesn't work as well, because the whole frame object is passed to inner scopes.
New Design
In the new design, the state for a method activation is constructed from one or two plain lists/arrays (i.e. fixed-sized lists) that represent the Frame and Inner, avoiding the overhead of constructing a whole set of different lists, and objects.
The Frame holds the receiver, any additional arguments to the method, and local variables; except for, any arguments and local variables that are accessed by an inner lexical scopes.
The Inner holds a copy of the receiver, as well as the arguments and local variables accessed by the inner lexical scopes.
The goal of this design is that the frame is most likely going to be "virtualized" by the compiler. This means, in the resulting native code after just-in-time compilation the frame is not actually allocated. Though, the Inner may need to be allocated when it escapes the compilation unit, which is often the case when there are nested loops, in which an outer scope, perhaps a counter variable, is accessed. The first slot of the Inner is also used to store whether the whole frame/activation record is still on the stack.
While the Inner might not be allocated, for simplicity, the slot will always be reserved. This also neatly aligns the indexes for receiver access in Frame and Inner.
Frame
+-----------+
| Inner     | (Optional: for args/vars accessed from inner scopes, and non-local returns)
+-----------+
| Receiver  |
+-----------+
| Arg 1     |
| ...       |
| Arg n     |
+-----------+
| Local 1   |
| ...       |
| Local n   |
+-----------+

Inner
+-----------------+
| OnStack         |
+-----------------+
| Receiver        |
+-----------------+
| ArgForInner 1   |
| ...             |
| ArgForInner n   |
+-----------------+
| LocalForInner 1 |
| ...             |
| LocalForInner n |
+-----------------+

At least as an intermediate solution, the bytecode interpreter, needs a slightly adapted design to store the stack.
It is pretty much the same as the design for the AST-based interpreter, but we reserve space for the stack at the end of the Frame. The design of Inner remains unchanged.
Frame
+-----------+
| Inner     | (Optional: for args/vars accessed from inner scopes, and non-local returns)
+-----------+
| Receiver  |
+-----------+
| Arg 1     |
| ...       |
| Arg n     |
+-----------+
| Local 1   |
| ...       |
| Local n   |
+-----------+
| Stack     | <-- stackPtr
| ...       |
+-----------+
| StackPtr  |
+-----------+

To not have to pass around where to find the stack pointer, it's encoded in the last slot. The main reason here is not to have to change the common parts between AST and BC frames. Though, performance-wise it might not be optimal, because it's not a constant offset.
Though, in the long term, I hope none of this will be needed because the stack is going to be removed from the frame entirely. In TruffleSOM, it already works nicely to keep the stack simply in the interpreter loop and never escape it from there. The hope is that a compiler has an easier time to simply eliminate the array for the stack.
For PySOM's bytecode interpreter, I'll have to see whether this works out and is worth it.

RPython Implementation Note
To make the RPython type system happy, everything stored in the Frame needs to be type erased (see rlib.rerased).
This is needed to be able to store a list together with the AbstractObject SOM objects, and the int for the StackPtr in the same list.
Since the Inner only stores AbstractObject instances, it doesn't need erasure.
For simplicity, the OnStack marker is simply a trueObject or falseObject, which should boil down to simply pointer comparisons.

Performance results for the AST interpreter changes:
https://rebench.stefan-marr.de/compare/RPySOM/3fd5865e788069ccf94775fc033242061ef1a2a2/41f23dc5073d8a8b21222e7c687739dee581cb6a#micro-steady-RPySOM-ast-jit


Feature.sysprovision

The test has to be run on at least LTM qcow2 images setup with the appropriate flavor support from the VE support matrix. You can not make provisioning changes to 1SLOT images. They will return '400 errors - Memory limit exceed' if the VE instances are not setup with at least 2104 MB dedicated to TMM.

@jgruber
Is there a way to detect if we have 1 SLOT VE beforehand? Cause if it is then it would be useful to write a helper function that would simply not allow provisioning endpoint to be run

@jgruber if you can fix up the issue @wojtek0806 mentioned, i'll review and merge

@jgruber I agree with @jasonrahm opinion, that this could use some more functional tests, also some basic unit testing would be great:

rahmen.empire [3:34 AM]
looking a @jgruberf5's PR. We need to add unit/functional tests for code coverage, and also, given how long provisioning takes, to do so we'll need to use the asynchronous tasks added in 12.0. An async task changes the URL from /mgmt/tm/sys/provision to /mgmt/tm/task/sys/provision, and then you need to check taskState for COMPLETED before moving on to the next async task.

[3:35]
so would we need to build out something similar to transactions?

adding unit and functional tests in a separate PR as this functionality is required now for the ansible modules

@caphrim007 was this not addressed with #1270 ?


Smooth transitions flag.

A finished swipe has been succeeded by a slow transition fading the current card out. Some user interfaces might find this to be hindering the experience. This PR adds a property 'smoothTransition' (default off) to bypass fading out cards and the opacity transition between cards.

Great work @hansman!
Could you update the props list on README.md ?

I updated the PR @vitorebatista accordingly.

Thanks @hansman !!

Any way to advance the decay animation without hindering the user from interacting with the next card when smoothTransition is enabled?


Advertisements/Clickbait in Blog Posts

When visiting the Spring Blog this morning I noticed an embedded Advertisement/Clickbait widget.
Was this intentionally added?  I really hope not...I hate these things.

Thanks for the heads up, it seems disqus added those recently.
I hate these things as well, and they're now deactivated in our account.

the system may take several minutes to remove your ads

Too bad, I was getting a lot of "high quality content" here.


Regularly getting disconnected status on my Homeassistant Solarman Intergration (Deye SUN-12K-SG04LP3-EU)

The integration goes from working perfectly to status_connection: disconnected without any interaction from my side.
In the HA logs I find this:
WARNING (SyncWorker_2) [custom_components.solarman.solarman] Querying [3 - 89] failed with exception [OSError: [Errno 24] No file descriptors available]
Restarting HA fixes the issue temporarly until the next disconnected (trice this week).
I'm running Solarman integration 1.5.1 via HACS

Thanks for the info, hav downgraded to 1.4.3, if it occurs again will post here then.

I also have this problem. It might be related to a change in pysolarmanv5: https://github.com/jmccrohan/pysolarmanv5/blob/main/CHANGELOG.md#v300---2023-05-21

Prior to this, the socket was implicitly closed when the PySolarmanV5 object was deferenced. Many dependent applications re-instantiate a new object for each poll. These applications will need to either remain on v2.4.0, or upgrade to v3.0.0 and ensure disconnect() is called to close the connection cleanly.

@Jan-Ole-Menz, @etam Could you verify if the issue occurs when auto_reconnect is set to false?

Since I downgraded to 1.4.3 it's running perfectly.

I can try. I run the latest version and I'm restarting HA once in a while.
You're asking to edit this line? https://github.com/StephanJoubert/home_assistant_solarman/blob/aed4c7aad3b5c5677671ea2b74e05415a13ff10b/custom_components/solarman/solarman.py#L39

Yes, this line, thank you. It seems that disabling auto-reconnect mechanism prevents leaking file descriptors.

So far so good. I checked the HA process with lsof and it seems that there are no leaks. Current uptime is 2 days, though. I'll report again in a few days.

I can try. I run the latest version and I'm restarting HA once in a while.
You're asking to edit this line?
https://github.com/StephanJoubert/home_assistant_solarman/blob/aed4c7aad3b5c5677671ea2b74e05415a13ff10b/custom_components/solarman/solarman.py#L39

I have done this, and today after 3 days mine has gone down again, rolling back to 1.4.3

Mine has been working correctly since I turned off the auto-reconnect feature a week ago.
@OneScuzzie2k Could you share the HA log?

same issue with 1.5.1 (never a problem with previous version).
Downgraded to 1.4.3 and everything back to work perfectly.

Meanwhile my instance has almost 24 days of uptime and no problems so far.
For the record: As written in comment above, I have changed auto_reconnect to False.

In HA under HACS, click on the vertical ... and select redownload, in the pop-up you will find select version you open the dropdown and select 1.4.3 and finally click download

I reloaded to 1.4.3 and reloaded HA but integration still showing 1.5.1 is that normal or did it fail to roll back?

Changing auto_reconnect=True to False for my KStar inverter did not stop the disconnection.
I have successfully rolled back to 1.4.3
Any benefits of 1.5.X and thereafter will have to wait until it is proven to work.

Hi. My Solarman integration keeps disconnecting. I change auto reconnect to false but no luck. I am trying to downgrade from 1.5.1 to 1.4.3 but I get this message : "The version selector will be removed in a future release. If you need to install a specific version, you can do so by using the service call for update entities." How do I downgrade? Please help.

Hi. My Solarman integration keeps disconnecting. I change auto reconnect to false but no luck. I am trying to downgrade from 1.5.1 to 1.4.3 but I get this message : "The version selector will be removed in a future release. If you need to install a specific version, you can do so by using the service call for update entities." How do I downgrade? Please help.

Hi, had the same issue... Hope you already got this. In case someone else stumbles over this and needs help (took me an hour to find out...):
Go to Developer Tools -> Services and use the service update.install
Choose update.solarman_integration_update as the Entity you want to update (make sure you use the entity, not the device). If you can not find the update entity, make sure that experimental features are enabled in the HACS Configuration.
Check the Version box and insert v1.4.3 and fire away. You will get an error if you got something wrong but no "update successful" screen or something like that if you got it right.
Wait a Minute and restart home assistant. If you have auto updates on the integration enabled, you can see that it worked because home assistant found the update to the newer version. Make sure to skip this so you do not update again.

Delete all remaining files with File editor after uninstalling and before downgrading to 1.4.3.

Delete all remaining files with File editor after uninstalling and before downgrading to 1.4.3.

Could you get more detailed on how to do that?

Delete all remaining files with File editor after uninstalling and before downgrading to 1.4.3.

Could you get more detailed on how to do that?

Go to folder:
custom components > Solarman
Delete all remaining files and restart before installing 1.4.3.

yeah, but going the way with updating over the developer-Tools, you have to have the newer version already installed... So I can't uninstall it before? Or is there a possibility to directly install the older Version? Over HACS, it seems like it is not possible

If you have the 1.4.3 files already then:

Delete the files described above
Restart
Manual installation of 1.4.3.
Restart
Configure

I have this problem too. Same symptoms. Rollback to 1.4.3 seems a valuable workaround.

Go and install this version:
https://github.com/davidrapan/ha-solarman
More Sensors
5 sec Intervall
It works perfectly with Deye!

Yes I use it too. Works great with my sofar.

Thanks for your fast help. Installed the new version but doesnt work. Any hints on which config file to choose?

Ask here to get full support:
https://github.com/davidrapan/ha-solarman/discussions


Reduce "prop drilling"

The current frontend setup passes data around from the Experiment component to deeply nested children. This is a hurdle both for future maintainers (looking up dependencies through multiple parents is no joy), and for reusability.
For state that doesn't change much, e.g., participant and session, we may move the state logic to a useContext hook. Perhaps this will also allow us to make API calls from children components, instead of passing around callbacks.
The onNext function in the Experiment component (which retrieves the next action from the next_round array, or makes a call to the backend for a new round if that array is empty) still needs some consideration, however. Perhaps useContext would also be fine here, since we typically do rerender anyway every time we get a new action, but there are efficiency warnings all over the place about useContext which make me wonder whether we should use it as a catch-all solution to maintain state over components.
Making this issue to collect ideas, which can hopefully be turned into more concrete issues.

What about useSyncExternalStore for participant / session data? It seems that this is exactly what we want: creating an Observable that multiple components can subscribe to to get the latest participant and session information. We do want to avoid that new components subscribing trigger a new API call, however.


make SHOW queries work with FROM //

looks good, +1

oh, update the changelog

@pauldix changelog updated

+1

@david this one needs a rebase after the name => measurement change got merged in. rebase and you're good to merge!


[WIP] Implement AmberTools WBO

[ ] Closes #507
[ ] Add tests
[ ] Update docstrings/documentation, if applicable
[ ] Update changelog

I had to lower the aromatic bond cutoff to 1.05 for some molecules -- I'd like to look into why this is (maybe I shouldn't allow geometry opt) before we merge.

Codecov Report

Merging #508 into master will increase coverage by 0.1%.
The diff coverage is 95%.

Ok, so for our "detailed" test molecule (protonated and deprotonated versions of [1]), AmberTools narrowly failed some tests that we had calibrated against OETK. Basically, we tested to ensure that every aromatic bond fell in the range of 1.15 to 1.60 in both the neutral molecule and anion. AmberTools returns values in the range 1.06 to 1.61, which caused these tests to fail. Here's a full summary:

Charge state
AmberTools WBO range
OE WBO range

neutral
1.34 - 1.44
1.35 - 1.44

anion
1.06 - 1.61
1.12 - 1.55

So basically AmberTools returns slightly more extreme values, but everything is around the same magnitude. Because these differences are small, so I'm going to relax the aromatic tolerances for these tests to accept between 1.05 and 1.65.
Huge thanks to @sukanyasasmal and @Chayast and for making this thoughtful test. It was very quick to plug in AmberTools and get results!
[1]

[2] Printout of aromatic bond orders in these tests (molecule is loaded from SDF so indexing is the same):
OpenEye neutral aromatic order: 1.4249782910821187
OpenEye neutral aromatic order: 1.4247535696661562
OpenEye neutral aromatic order: 1.3993880829721475
OpenEye neutral aromatic order: 1.386557474305936
OpenEye neutral aromatic order: 1.3864636016050376
OpenEye neutral aromatic order: 1.3721272356508605
OpenEye neutral aromatic order: 1.3798238226278605
OpenEye neutral aromatic order: 1.4308855238777132
OpenEye neutral aromatic order: 1.3485824537022644
OpenEye neutral aromatic order: 1.3484389250490467
OpenEye neutral aromatic order: 1.4361705759121075
OpenEye anion aromatic order: 1.4214715268113562
OpenEye anion aromatic order: 1.4082261746981803
OpenEye anion aromatic order: 1.4083384738085785
OpenEye anion aromatic order: 1.421413561882213
OpenEye anion aromatic order: 1.3418572306137813
OpenEye anion aromatic order: 1.3418629033811214
OpenEye anion aromatic order: 1.282103697809885
OpenEye anion aromatic order: 1.2819662464523884
OpenEye anion aromatic order: 1.5524099209448596
OpenEye anion aromatic order: 1.1228566259220674
OpenEye anion aromatic order: 1.1228857329592095
OpenEye anion aromatic order: 1.5523016417471136

AmberTools neutral aromatic order: 1.42847694
AmberTools neutral aromatic order: 1.42838216
AmberTools neutral aromatic order: 1.38847364
AmberTools neutral aromatic order: 1.38967052
AmberTools neutral aromatic order: 1.38955476
AmberTools neutral aromatic order: 1.36395535
AmberTools neutral aromatic order: 1.38584981
AmberTools neutral aromatic order: 1.42623811
AmberTools neutral aromatic order: 1.3548221
AmberTools neutral aromatic order: 1.3413636
AmberTools neutral aromatic order: 1.44752967
AmberTools anion aromatic order: 1.42697576
AmberTools anion aromatic order: 1.40317476
AmberTools anion aromatic order: 1.40317794
AmberTools anion aromatic order: 1.42697246
AmberTools anion aromatic order: 1.31119999
AmberTools anion aromatic order: 1.31119746
AmberTools anion aromatic order: 1.23414108
AmberTools anion aromatic order: 1.23414195
AmberTools anion aromatic order: 1.61292386
AmberTools anion aromatic order: 1.06733526
AmberTools anion aromatic order: 1.06733486
AmberTools anion aromatic order: 1.61292474

It's likely the case that OpenEye quacpac uses some "quick and dirty" tolerances and convergence criteria to give a semiquantitative result faster, so this is a perfectly reasonable approach!

Overall looks really good, with great test coverage! One thing to check is subprocess I think could get the same result using run with check=True.

Thanks for the quick review, @jthorton. I've addressed your comments and will merge when tests pass


gfx942 80cu BBS/HHS TN GridBased + Equality tuning and Shrinking

same tuning config for both BBS and HHS
209 existing sizes (each BBS, HHS GridBased)
59 new sizes  (each BBS, HHS GridBased)
1 existing size (each BBS, HHS Equality)
reduced the amount of sizes in M,N,K directions (around by half)

The tuning in this PR requires PR#817 to get correct results.


Save as PDF doesn't work on Windows

printToPdf doesn't work on Windows.
I think that is the electron bug.
Right now the only way to save pdf is to print from browser.

Save as PDF now works on Windows.
Tested on Windows 10


Inline display

I see on server, that PDF is created correctly , but I have problem display it automatically in client browser via the method $pdf->send();
Browsers shows nothing even not some attention.
PopUps are enabled.
PDF plugin installed.
tested in Chrome, Firefox.
How can I debug it?
Thnx

Have you seen #270? Maybe related? There are issues if compression is enabled in the web server.
Apart from that you can debug with curl -I http://... and inspect the headers. Maybe compare to a file where everything works as expected.

Oh, and maybe try with "raw" PHP to send any file. The relevant code for our library is here:
https://github.com/mikehaertl/php-tmpfile/blob/master/src/File.php#L72
There's nothing really special there. If there's something to tweak, let me know.

Thank You for the answers.
On same server I found another php file where I also generate PDF and there it works.
It must be something in the php file which generated the PDF correctly, but doesn't open it via the "inline display"
<?php
//header("Content-type: text/html; charset=utf-8");
//header("Content-type:application/pdf");

ini_set("memory_limit", "128M");
ini_set('display_errors', '1');
error_reporting(E_ALL);

//load necessary library (PDF renderer)
require __DIR__ . '/phpwkhtmltopdf/vendor/autoload.php';
use mikehaertl\wkhtmlto\Pdf;

//GET values from web FORM
$PDF1 = $_POST["PDF1"];
$PDF1Decoded = json_decode($PDF1, true);
//>

//create DB connection
define('SQL_HOST','localhost');
define('SQL_DBNAME','xxx');
define('SQL_USERNAME', 'xxx');
define('SQL_PASSWORD','xxx');

$induce = 'mysql:dbname=' . SQL_DBNAME . '; host=' . SQL_HOST . '';
$user = SQL_USERNAME;
$password = SQL_PASSWORD;
//>DB

if(isset($_POST['PDF1'])){
try     {
 $pdo = new PDO ( $induce, $user, $password, array(
						PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
						PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8",
								  ));
 $prepared = $pdo->prepare("SELECT Letter,Commission,Status,KW,DeliveryDate, DeliveryAddress FROM prodlist WHERE KW = :KW ORDER BY DeliveryDate");

		  $prepared->bindParam(':KW', $PDF1Decoded["KW"], PDO::PARAM_STR);
		  $KW = $PDF1Decoded["KW"];
		  $pdfName = 'CommissionSimpleList_KW'. $KW .'.pdf';
		  $printed = StrFTime("%d.%m.%Y_%H:%M", Time());
		  // provede se dotaz
		  $prepared->execute();
		  $result = $prepared->fetchAll(PDO::FETCH_ASSOC);
		  $table = "

			      Letter
			      Commission
			      DeliveryDate
			      KW
			      Status	";

		  foreach( $result as $row ) {
		    $table .=     "
"  . $row['Letter'] .
				  "	" . $row['Commission'] .
				  "	" . $row['DeliveryDate'] .
				  "	" . $row['KW'] .
				  "	" . $row['Status'] .
				  "
";
					      }
		  // end of the table
		  $table .= "
";
		} //end of try
catch (PDOException $e) {
                        die('Connection failed: ' . $e->getMessage() );
                        }
}

$pdf = new Pdf(array(
	    'no-outline',         // Make Chrome not complain
	    'margin-top'    => 0,
	    'margin-right'  => 0,
	    'margin-bottom' => 0,
	    'margin-left'   => 0,

	    // Default page options
	    'disable-smart-shrinking',
	    'user-style-sheet' => '/var/www/www.erka-metaltec.com/pdf/prod-commission-pdf.css',
	    'commandOptions' => array(
				      'procEnv' => array(
				      // Check the output of 'locale' on your system to find supported languages
				      'LANG' => 'en_US.utf-8',
						    ),
				      ),
));

$pdf->addPage('
			      <!DOCTYPE html>

			      <meta charset="UTF-8">

 KW '.$KW.'

'.$table.'

Generated on: '.$printed.'

');

$pdf->send();
?>

Response Headers:
HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Thu, 02 May 2019 07:06:51 GMT
Content-Type: application/pdf
Content-Length: 79821
Connection: keep-alive
Pragma: public
Expires: 0
Cache-Control: must-revalidate, post-check=0, pre-check=0
Content-Transfer-Encoding: binary

You should also check the return value of send(). If it's false something in PDF generation went wrong and you'd probabyl also get no output.

when I send the request via Ajax, is possible that makes the problem dataType: "json",  ?

Sorry, I can't help you any further here. It's quite clear a problem somewhere in your environment. Comparing the response headers should help you. The send method works fine for me and others.
I'm closing this for now. If you find something is broken in the library and have a clear (simple!!) example to reproduce we can reopen it.


Grammar fixes for fragments/header.sh

I am making this PR because I found a few grammatical issues with the comments of fragments/header.sh. I took it upon myself to make the changes and open this PR. Cool project by the way!

Thanks. Maybe you will help with clearing up our README.md that we dream of updating…


Javascript let variable creation phase

Request type

[ ] Please close this issue, I accidentally submitted it without adding any details
[ ] New documentation
[ X] Correction or update

Details

I saw that in the website, MDN has wrote that let variables are not set to undefied during creation phase of Javascript.
As far I know, let variables are also set to undefined before it really gets into execution phase where actual value is assigned to the variable.
But according to ECMA standard, there is specified that, let variable value is set to undefined before setting actual value
Please see it here:
https://tc39.es/ecma262/#prod-LexicalBinding

Hi @sujalK

Can you identify the page and section where you see the problem?
Do you mean here where it says:

Unlike variables declared with var, which will start with the value undefined, let variables are not initialized until their definition is evaluated.

And the problem is that you think that the note means that the variable is set to undefined ?

let and const declarations define variables that are scoped to the running execution context's LexicalEnvironment. The variables are created when their containing Environment Record is instantiated but may not be accessed in any way until the variable's LexicalBinding is evaluated. A variable defined by a LexicalBinding with an Initializer is assigned the value of its Initializer's AssignmentExpression when the LexicalBinding is evaluated, not when the variable is created. If a LexicalBinding in a let declaration does not have an Initializer the variable is assigned the value undefined when the LexicalBinding is evaluated.

I don't think the spec says or implies what you think it does. What the spec says (point 2) is that once the LexicalBinding is evaluated, if no initialiser has been set, then the value will be set to undefined. However it doesn't say when the LexicalBinding is evaluated.
I tested this and the javascript is definitely behaving as indicted on MDN - you get the reference error because it is not defined until the definition is evaluated.

Please see the last sentence:
If a LexicalBinding in a let declaration does not have an Initializer the variable is assigned the value undefined when the LexicalBinding is evaluated.

@sujalK Thanks. I don't think it quite says "let variable value is set to undefined before setting actual value". What it says, precisely is that the variable gets the value of undefined:

if it does not have an initaliser in the declaration
when the LexicalBinding has been evaluated (before that it has no value at all - hence the reference error).

My understanding is that declaring a var or let (without assignment) results in the value being set to undefined. The difference is that a var is hoisted and a let is not. That means that var always has a value (even if you declare it after you try and access it), while let will only have that value if you declare it before trying to access it.
So if MDN says let variables are not set to undefined on declaration that would be wrong. Can you point me to where it says that?

FYI I did some experimentation to confirm my understanding:

Declaration using let or var (without assignment) results in undefined{
  let foo;
  var bar;
  console.log(foo); // Undefined
  console.log(bar); // Undefined
}

Declaration using let (without assignment) results in reference error if occurs after access{
  console.log(foo); // ReferenceError
  let foo;
}

But assignment using var after access is still undefined{
  console.log(bar); // undefined
  var bar=1;
}

So the MDN section let > Temporal dead zone is an example which is technically correct but unhelpful

Unlike variables declared with var, which will start with the value undefined, let variables are not initialized until their definition is evaluated. Accessing the variable before the initialization results in a ReferenceError.

Because it implies that let variables do not start with the value undefined when in fact they do (if no value is assigned). Perhaps this would be better:

Unlike variables declared with var, accessing a let variable before it has been declared will result in a ReferenceError (let variables are not hoisted (initialized before other code is run, regardless of declaration order).

@chrisdavidmills What do you think (at least on this specific case). I think the whole term "Temporal dead zone" is horrible. Perhaps "Using Uninitialized Variables"? "Using Undeclared Variables" would be better?
Again, the only difference between let and var is that all var variables get initialised before anything else runs.

In my opinion, the let variables is set to undefined in creation phase but Javascript engine is not allowing to access before code execution reaches to the line: For example:- where let someVar=1; is reached during execution phase.

"but Javascript engine is not allowing to access before code execution reaches to the line: For example:- where let someVar=1; is reached during execution phase."

Yes, a let variable is set to undefined in the creation phase, which occurs when the variable is declared - i.e. let somevar. Once the variable has been initialised though you can access it because it exists. Prior to that you get a reference error because it does not exist.
So this text is not quite correct - the engine allows you to try access the variable at any time. It's just that before the variable is declared it does not exist - hence the reference error because it does not exist. This isn't a matter of opinion - you can test it.
But in any case, you still haven't pointed to specific text with an error in MDN. That makes it hard for me to fix anything. Can you please point to the specific error text?

@chrisdavidmills What do you think (at least on this specific case). I think the whole term "Temporal dead zone" is horrible. Perhaps "Using Uninitialized Variables"? "Using Undeclared Variables" would be better?

I think it is some kind of official term, but I agree it is still horrible ;-)
So we should probably use some kind of language along the lines of "Using Undeclared Variables (creating what is sometimes known as a "temporal dead zone")" ... ?

on this text:
Unlike variables declared with var, which will start with the value undefined, let variables are not initialized until their definition is evaluated.
On this link:
https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#Temporal_dead_zone

@sujalK Thanks. I have updated the text in https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#Temporal_dead_zone_TDZ to make this more clear:

let variables cannot be read/written until they have been fully initialized, which happens when they are declared (if no initial value is specified on declaration, the variable is initialized with a value of undefined). Accessing the variable before the initialization results in a ReferenceError.

This is strictly correct according to the spec.
@chrisdavidmills Can you give my changes a quick look? I also took the time to explain why this is a Temporal DZ and not just "using undeclared identifiers", and tidied up some of the description.
I also added the note below. Strictly speaking this is always "good advice" - define and assign your values for all variables before you use them. I put this here because  for let you get the reference error. IMO it is a pity you don't also get one for var :-)

As we know var variables in creation phase sets it's value to undefined, Is is not that let variables are set to undefined in creation phase of an Execution context ? I mean the ReferenceError is generated due to JS engine not allowing us to access the let variable before it's defined with some value in it ?

I'm sorry but I don't understand your question, or how it affects the updated documentation. But let me have a try at answering anyway.

As we know var variables in creation phase sets it's value to undefined,

The main point to take away here is that for a var variable creation phase happens before any code is executed due to hoisting. That means the order of declaration of the var does not matter in the sense that when code is executed the var aways has a value.

Is is not that let variables are set to undefined in creation phase of an Execution context ?

"The variables are created when their containing Environment Record is instantiated".

That means the at this point item in memory is created associated with the current block.
There is nothing I see that says what value it has - I would guess random. However it does not matter since you can't access it.

The let value only gets assigned when the variable is declared and/or initialised with a value, at which point it will have a value of undefined OR the initialiser.

I mean the ReferenceError is generated due to JS engine not allowing us to access the let variable before it's defined with some value in it ?

Well, that would be a semantic question. Is the reference error because the JS engine won't allow us access the variable until after declaration, or is it because the variable has no value you get a reference error. The spec seems to indicate the former, but it doesn't matter - the rule is you can't access a variable that hasn't been initialised.

I think we can close this one now. @hamishwillee has clarified the point on the page, and there is no point debating this round in circles.

I also added the note below. Strictly speaking this is always "good advice" - define and assign your values for all variables before you use them. I put this here because for let you get the reference error. IMO it is a pity you don't also get one for var :-)

I happened upon this note, which ended up in my finding it was a recent addition mentioned in this issue discussion.
I disagree; where is that codified as a good practice? The opposite is generally considered good practice, to declare variables close to where they are needed.

I disagree; where is that codified as a good practice? The opposite is generally considered good practice, to declare variables close to where they are needed.

I don't think you are in disagreement here — but "scope" here could mean the global scope, or it could mean the top of the part of the code that uses the variables. So the note should maybe be rewritten to make it clearer. Do you fancy having a go at rewriting it, @Blade2187 ?

Bah, I knew I'd have problems with that note. @Blade2187, you're right about what I meant, and yes this is an arguable practice.
I have modified as shown, which I think is probably less of a trigger :-)


feat(shape): support shape generating users

This PR adds support for TestLoadShapes generating users.
In practice, this means:

being able to send new classes to workers
properly register new classes on runner and environment to avoid runtime errors and broken stats

This allows you to dynamically create users from an external source.
users: list[type[User]] = []

class GeneratorShape(LoadTestShape):
    def get_user(self, index: int) -> type[User]:
        if index >= len(users):
            user = self.runner.register_user(f"User{index}", (BaseUser,), {})
            users.append(user)
        return users[index]

    def tick(self):
        index = trunc(self.get_run_time())
        if index >= 2:
            return None
        return (index + 1, 1, [self.get_user(index)])

This will create a new User each second (User0, User1...).
Note that we are using the register_user(name, bases, attributes) form which create the class itself,
but you can entirely craft your own class:
users: list[type[User]] = []

class GeneratorShape(LoadTestShape):
    def get_user(self, index: int) -> type[User]:
        if index >= len(users):
            user = types.new_class(f"User{index}", (BaseUser,), {})
            user. __module__ == "my_module"
			setattr(sys.modules[user.__module__], user.__name__, user)
            self.runner.register_user(user)
            users.append(user)
        return users[index]

    def tick(self):
        index = trunc(self.get_run_time())
        if index >= 2:
            return None
        return (index + 1, 1, [self.get_user(index)])

Note: those are dumb examples just dynamically setting a class name, in practice, this PR allows to dynamically define:

ancestors
attributes including:

tasks as methods
tasks as tasks attribute
any of the wait_time, weight, fixed_count... attributes

In fine, this allows dynamic user creation from:

logs
HAR traces
any external specification file (JSON, yaml...)

Hmm. Would this work in a distributed run?
I’m not sure this is a good idea. There should be other ways to solve this. And this really has opening-a-can-of-worms potential.

I am totally OK with that: I hesitated to submit this PR as I was sure that pickle+sync on class sharing would not be an easy thing to accept, but I did it anyway because I work on different projects using the same pattern, so I thought it might be useful for others.
Anyway, as it is already working for me except for 2 details, would you accept instead an alternative PR just removing those limitations ? 🙏🏼
Those would be:

only raise an exception for locustfile without non-abstract user class if the locustfile has a non-abstract shape in it (given only the shape will be used and if you import it, you might have the user not declared in the locust file)
delay the warning raised for user classes without tasks and raise it when the class is actually used, dispatched or added to the (Runner|Environment).user_classes (instead of on locustfile load today, resulting in warnings raised whether the class is actually used or not)

Those 2 points would allow the user generation for those using it without making the user generation built-in locust.

Hmm... Both of those changes would result in a slightly worse experience for other use cases than yours. Perhaps you can hack your way around it some other way?


Fix rule inheritance issue against the 0.10-maintenance branch

Supersedes PR #675 which is against master.

Thanks!


Priority plugin should use get/stopped/since endpoint instead of get

This will allow users to only use the most recent records. How far to look back must be configurable.

fixed in #56


Docks Integration?

Any chance we can get this to work in Docks? It would be great if it was just next to the normal Diagnostics tab when open.  I noticed the original fork also does not have this feature.

duplicate of #49

closed as duplicate


Fix #16: Disallow user names with spaces

Hello,
Hope you're doing well
As it has been requested in issue #16, I have added a condition to check if the username consists of spaces or not
If it does, then an error would be thrown
Else the flow would go through as it is
Here's an example:

I hope these code changes meet the requirements
Sincere apologies for my mistakes if you find any
Thanks and Regards,
Mohit Kambli

Great work, I appreciate the pr.


[AutoPR reservations/resource-manager] chore: jsonfmt reservations

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/6234

This PR has been merged into https://github.com/Azure/azure-sdk-for-python/pull/5945

(message created by the CI based on PR content)


[Delve Localdev Bug] - Investigate why testsuite fails against go image

The testsuite fails with OOMKilled on the go image running the armada components. This should be investigated.
I think trying golang:1.18-alpine3.17 would be a good start.

Closing due to it being a pod memory issue,


[New game]: Bulls and Cows game could be added

🎮 Game Request
Game logic and basic description
One player, the Chooser, thinks of a four-letter word and the other player, the Guesser, tries to guess it.
At each turn the Guesser tries a four-letter word, and the Chooser says how close it is to the answer by giving:
The number of Bulls - letters correct in the right position.
The number of Cows - letters correct but in the wrong position.
The Guesser tries to guess the answer in the fewest number of turns.
If either word has repeated letters the rule is that each letter can only count towards the score once, and Bulls are counted before Cows.
can be done against computer
Point down the features
Playing against computer is one of the features.
@kunjgit can you assign me this
Select program in which you are contributing
GSSoC24
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @Ankitapanda25 !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

/assign


mirror tarballs: fixing the service

(deployed already but apparently still needs further fixes to succeed)

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/is-tarballs-nixos-org-stuck-at-19-09/13647/6

Maybe merge this if the changes here work even if the uploading doesn't work

With this the git parts look OK to me, but the AWS part still breaks with permission access, but that should be mostly independent.


README: Update console output for inspecting visually microservice's JAR layers, log, and routes data store.

Subj. — :point_up:

She loks good ! :+1:


Docker build image task failed on VSTS (UtilityVM: the system cannot find the path specified)

Environment
Using VSTS
Account name: devops-sandbox
Team Project: Phoenix
Build Definition: Phoenix Portal Container - CI
Build number: 20180223.6 or 20180222.1
Agent: Hosted VS2017
Issue Description
I created a new .NET Core project (default Web template) without any customization with Windows container support. Everything run on my computer, but failed on VSTS.
I'm using the VSTS build docker template to build and push.
Error logs
==============================================================================
Task         : Docker
Description  : Build, tag, push, or run Docker images, or run a Docker command. Task can be used with Docker or Azure Container registry.

C:\Program Files\Docker\docker.exe failed with return code: 1

Finishing: Build an image

I found maybe an explication about this error: VSTS agents seem not support nanoserver-1709 actually. Maybe this will change with the next version 1803.
See details here: https://github.com/Microsoft/vsts-agent/issues/1393
When I setup and host a custom agent on a machine on Azure, it's working. So it's not a bug with this task. I close this issue. Thanks!


Improve: arbitrary integer baseline multiplication algorithm

Hm. It looks like base-case multiplication performs worse than it should. I'll take a closer look at some point.

A quick rewrite makes UXL(400_000) 3x faster. Hm. I might fiddle with this for a bit.

The poor performance seems to be mostly due to the poor implementation of:
MutableDataInt.Body/incrementSubSequence(by:times:plus:)

Increasing the Karatsuba threshold to 32 elements (from 16) also improves performance (the opposite was true before).


Add search command

This would allow to search if a binary is available in binenv without having to use versions and then search through the output to find it.

Interesting. Any "pseudo-output" so we can see how this could look ?

I was thinking about something that emulate a grep :
$ binenv versions | grep krew
krew: 0.4.0 0.3.4 0.3.3 0.3.2 0.3.1 0.3.0 0.2.1 0.2.0 0.1.1 0.1.0-alpha.1

Having the versions available displayed can be nice


[Bug]:  Name tag gets removed when joining a class

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
When you join a class other players name tags get removed, you can see an example in this video https://www.dropbox.com/s/0bb3gngfxkmshra/uQO4Huar3I.mp4?dl=0
Expected Behavior
Name tags should not be removed when joining a class
Steps To Reproduce
You need 2 accounts to see this happen.
Join one account to a class, then while looking at that player join your other account to a class and you'll see the name tag of the other player get removed.
Environment
- Server Software: Paper
- ProSkillAPI Version: <IP_ADDRESS>
- ProMCCore Version: <IP_ADDRESS>
- Plugins: https://i.imgur.com/rhpcpDj.jpeg

latest.log
No response
Anything else?
No response

A similar issue also happens with /scoreboard objective setdisplay belowName [name]  and /scoreboard objective setdisplay list [name]. When the player does not have a class, the two scoreboard displays show. As soon as the player professes to a class, with the proskillapi sidebar enabled, those scoreboard displays disappear. If the proskillapi sidebar is disabled in config.yml, the normal functionality (without a class) resumes. This should be a bug since proskillapi only uses the "sidebar" display and should not be "locking out" the other scoreboard display types.
To reproduce:

Create a /scoreboard objective (can be dummy)
Set display for that objective to "belowName" or "list"
(optional) check to ensure objectives display on the player list or under player name
Profess into a proskillapi class (a different user does not need to)
The "belowName" and "list" displays disappear.

[https://discord.com/channels/818973833570680882/837842746587742228/916857039542702170]("list" display visible before professing class)
[https://discord.com/channels/818973833570680882/837842746587742228/916857113345671198]("belowName" display visible before professing class)
[https://discord.com/channels/818973833570680882/837842746587742228/916871463141781565](After professing class)

The problem here @kylejolly is that SkillAPI uses it's own Scoreboard, and players can only be part of a single scoreboard at a time. So when professing, they actually change scoreboards. The whole scoreboard functionality of the plugin will likely need to be redone to fix both of these issues. It'll need to be adapted so that it uses the existing scoreboard if one exists, otherwise it'll create a new one. I did make some adjustments so that the packet portion of scoreboards should be functioning properly now, however.

Can no longer replicate after the scoreboard fix in ProMCCore.


Increase minimal required cmake version

Move from 3.8.2 to 3.13.1

Can I be a little grumpy here?  If we truly need a bleeding edge cmake version (I mean, does any distro ship this yet?) we should have it in the SDK, no?
I mean, there's a pretty big burden on the user to ask them to go out and build their own tooling.   What is it we actually truly need for this version and is it really impossible to work around until distros start shipping it?

Can I be a little grumpy here? If we truly need a bleeding edge cmake version (I mean, does any distro ship this yet?) we should have it in the SDK, no?

I agree with including it in the SDK. We already do that for Device Tree.

I mean, there's a pretty big burden on the user to ask them to go out and build their own tooling. What is it we actually truly need for this version and is it really impossible to work around until distros start shipping it?

For what it's worth, they don't have to build it. Only download and extract, like the Zephyr SDK.

Debian testing already has 3.13.1

Debian testing already has 3.13.1

does any distro ship this yet?

3.13.1 is a stable release that is supported at least as well as
3.8.2 on OSX, Windows, Debian testing, and Arch
Linux-derivatives.

we should have it in the SDK

Having it in the SDK makes sense to me.

What is it we actually truly need for this version?

The ability to report bugs to CMake upstream and have them fixed
is a major benefit. When we find bugs[0] today we are forced to
either fork[1][3] CMake functionality or live with the bug[2].
The same applies to missing features.
[0] https://github.com/zephyrproject-rtos/zephyr/issues/11103
[1] https://github.com/zephyrproject-rtos/zephyr/pull/11306
[2] https://github.com/zephyrproject-rtos/zephyr/pull/11411#issuecomment-440651685
[3] https://github.com/zephyrproject-rtos/zephyr/commit/18f9bb04f71d0428b46573e7b8cc5d52c224e1d6
Features and bugfixes that I personally have observed that we can
leverage (I'm sure there are more that I am unaware of):
3.13:
The cmake(1) command gained the -S <source_dir> command line option to specify the location of the source directory.
The cmake(1) command gained the -B <build_dir> command line option to specify the location of the build directory.
The cmake(1) -E create_symlink command can now be used on Windows.
The target_link_options() command was created to specify link options for targets and their dependents.
The target_link_libraries() command may now be called to modify targets created outside the current directory.
The target_sources() command now interprets relative source file paths as relative to the current source directory.
3.12:
The cmake(1) Build Tool Mode (cmake --build) gained --parallel [] and -j [] options to specify a parallel build level.
The list() command learned a JOIN sub-command to concatenate list’s elements separated by a glue string.
target_compile_options() and add_compile_options() commands gained a SHELL: prefix to specify a group of related options using shell-like quoting.
The target_link_libraries() command now supports Object Libraries. Linking to an object library uses its object files in direct dependents and also propagates usage requirements.
3.11:
A new FetchContent module was added which supports populating content at configure time using any of the download/update methods supported by ExternalProject_Add().
3.10:
The include_guard() command was introduced to allow guarding CMake scripts from being included more than once.
A CheckIPOSupported module was added to help projects check whether interprocedural optimization (IPO) is supported by the current toolchain and CMake version.

is it really impossible to work around until distros start shipping it?

Nothing is impossible, but IMHO it is time to update.

@aescolar @nashif @mbolivar @galak @dbkinder @dleach02
I have now removed cmake from requirements.txt and instead reworked the documentation in order to clearly state the options available to users:
https://github.com/zephyrproject-rtos/zephyr/pull/12022/files#diff-70fddc930861bd2504ff59e60ecd7e15R105

recheck


Update vpn-gatewat-add-gateway-subnet-portal-include.md - Image Fix

Have swapped the images around as previously the image under step 3 was referencing step 4 and the image under step 4 was referencing step 3

@BaileyLawson : Thanks for your contribution! The author, @cherylmc, has been notified to review your proposed change.

@BaileyLawson - Great catch! Thank you!  #sign-off

@ktoliver : Thanks for your contribution! The author, @cherylmc, has been notified to review your proposed change.


⚠ Mobitopup has degraded performance

In 29b2f4c, Mobitopup (https://napcard.voz.tech) experienced degraded performance:

HTTP code: 200
Response time: 3774 ms

Resolved: Mobitopup performance has improved in 7f933f4.


buddy_list: Fix bug where headers weren't being updated often enough.

$(".buddy-list-subsection-header").children() has length more often than I had thought. Using the narrow filter is more direct way of managing this state.
Fixes bug reported here: https://chat.zulip.org/#narrow/stream/137-feedback/topic/hiding.20inactive.20users.20in.20right.20sidebar/near/1958300

Merged, thanks @evykassirer!


Tabs example snack uses deprecated TabNavigator

The Tab Navigation example links to this basic-tabs snack, which uses react-navigation 1.0.0-beta.27 and the now-deprecated TabNavigator function. This should be updated to link to a snack that runs the actual example code on that documentation page.

Note: this appears to be the case for the other examples on that page as well.

thanks, fixed. feel free to create issues for any others that are outdated


✨ Add codemod and rule to add type annotations or TODO comment for fields with a default and no type annotations

✨ Add codemod and rule to add type annotations or TODO comment for fields with a default and no type annotations
This would fix https://github.com/pydantic/bump-pydantic/issues/149

Gracias!


Update Exoplayer to 2.17.1

Exoplayer version used in react-native-video is old. In 2.17.1 exoplayer has solved many issues. What is the plan to upgrade to 2.17.1

Any update on this?

https://github.com/react-native-video/react-native-video/pull/2498


Add an example to the Readme

Hi,
The readme would really benefit from a visual example, especially for a visualization library. Otherwise, it's hard to evaluate the quality of the library:

If the visual is bad, the library is useless,
If the visual is good, it makes me want to use the library!

Hmmm, the README.md already has an example. Could you direct me in how to improve it? Could you clarify what you mean by "visual" example?

Hmmm, then I was mislead by the title: I feel that "render" is usually associated with creating an image from a specification, so I expected a visual representation of the AST (maybe graphviz or something like that). But you render the AST to text, which is a bit confusing.
I don't have a clear improvement in mind, but on a quick glance, the readme is a bit confusing.

No it actually renders AST. Look at the second example.

Your second example doesn't have an image, I don't see what it does:

No, there should be an AST tree there. I can paste an example but it would be huge. Maybe I'll put a small sample of the data it renders.
It's not a renderer that renders a UI. It renders an AST tree and optionally text from the AST tree. It's a bit confusing because it's a brand new concept. A concept that's only 12 hours old :laughing:
It is however by definition a true react renderer.

I think a screenshot here would be very helpful, it's hard to grasp your 12h-old concept from just this text description :)

Yeah, I definitely agree. I added a better example. I really appreciate the feedback.

You can paste the example rendered code at astexplorer.net and you will see it matches the rendered AST.


Protect Cluster Resources from All Mutating Operations Until They Reach Steady State

See linked issue: https://github.com/reactioncommerce/launchdock/issues/80
Deleting a resource record while that resource is still being created causes the application to drop a stack trace and fails to resolve the state after the failure.

Recreate the issue:
$ curl -i -XPOST -H "Content-Type: application/json" -d '{"name":"reaction-engineering"}'  http://localhost:8080/v1/projects
HTTP/1.1 201 Created
Content-Type: application/project+json
Date: Mon, 02 Oct 2017 18:01:37 GMT
Content-Length: 134

{"created_at":"2017-10-02T11:01:37.687635214-07:00","id":"4daf554e","name":"reaction-engineering","namespaces":null,"type":"project"}

$ curl -i -XPOST -H "Content-Type: application/json" -d '{"name":"reaction-engineering"}'  http://localhost:8080/v1/projects/4daf554e/namespaces
HTTP/1.1 201 Created
Content-Type: application/namespace+json
Date: Mon, 02 Oct 2017 18:03:16 GMT
Content-Length: 155

{"applications":null,"created_at":"2017-10-02T11:03:16.322428141-07:00","id":"f2d65ad1","name":"reaction-engineering","resources":null,"type":"namespace"}

$ curl -i -XPOST -H "Content-Type: application/json" -d '{"namespace_id":"f2d65ad1", "nodePoolSize":1}'  http://localhost:8080/v1/projects/4daf554e/cluster
HTTP/1.1 400 Bad Request
Content-Type: application/vnd.goa.error
Date: Mon, 02 Oct 2017 18:04:51 GMT
Content-Length: 257

{"id":"2ToPwjeS","code":"bad_request","status":400,"detail":"[vjJ0ytjO] 400 invalid_request: response.nodePoolSize must be greater than or equal to 3 but got value 1, attribute: response.nodePoolSize, value: 1, comp: greater than or equal to, expected: 3"}

Previously this last step left an unassociated OID in place for a non-existent object.  The result was a panic stack trace during the delete step that follows.
$ curl -i -XDELETE http://localhost:8080/v1/projects/4daf554e/namespaces/f2d65ad1
HTTP/1.1 204 No Content
Date: Mon, 02 Oct 2017 18:06:22 GMT


There should be some documentation on how to use tags

I tried to figure out how to get the display-nametag to use in a command, and there was not a single line of documentation on how to access the tags.
I gave the bot the ["tags", "membership", "commands"] capabilities, and attempted to get the display-name tag like so
  def handle_message("k!" <> command, sender, chat, tags) do
    case command do

      "test123" ->
        say(chat, "#{tags["display-name"]}, test123")

      _ ->
        say(chat, "unrecognized command")
    end
  end

However, it did not work. I tried putting the tags from the handle message into a debug line, and it did not give me any.
At this point, I'm not sure if I'm in the wrong here, or the library.
Please send help, thank you.

Tags look like:
%{
  "@badge-info" => "subscriber/25",
  "badges" => "broadcaster/1,subscriber/0",
  "color" => "#333333",
  "display-name" => "JohnDoe"
}


'SWMessageView.Style' cannot be constructed because it has no accessible initializers

ver. 2.0
SWMessageView.styleForMessageType = { type in
            if type == .Message {
                let contentFontSize = CGFloat(12)
                let titleFontSize = CGFloat(14)
                return SWMessageView.Style( //'SWMessageView.Style' cannot be constructed because it has no accessible initializers
                    image: nil,
                    backgroundColor: UIColor.blackColor(),
                    textColor: UIColor.whiteColor(),
                    textShadowColor: nil,
                    titleFont: UIFont.systemFontOfSize(titleFontSize),
                    contentFont: UIFont.systemFontOfSize(contentFontSize),
                    shadowOffset: nil
                )
            }
        }

        SWMessage.sharedInstance.showNotificationInViewController(self,
          title: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus",
          subtitle: nil,
          image: nil,
          type: .Message,
          duration: .Automatic,
          callback: nil,
          buttonTitle: nil,
          buttonCallback: nil,
          atPosition: .Top,
          canBeDismissedByUser: false)

I'm not sure why, because Style struct is public and should have

I think it is due to swift 3.0 change,
public -> open
Submit a patch if you can 👍

I'm using swift 2.2 so ver. 2.0 is on which I'm working.

I know for sure that SWMessageView.Style() should work.

Ok I've reviewed my knowledge. In fact if you want access to any structs init outside of module then you have to make it public otherwise it's internal, all of them synthesized or not.

@sai-prasanna turns out I can't do that because you don't have dedicated branch for swift 2.2. Could you add such branch?

@bwdowikowski Oh , ok will create a new branch from v0.2.0 tag

Created Branch with swift-2.2 with tag v0.2.0
Give a pull request, I will publish to pods as v0.2.1

Thanks, PR Created

@bwdowikowski  Checkout https://github.com/SwiftKickMobile/SwiftMessages , Its better in all aspects, I think I will be stopping development on this and ask people to use that instead.


Spurious error when using --isolatedModules in development

https://github.com/typed-ember/glint/blob/e35714c5fbccf279eaf476dd6e0b2161397085d2/packages/environment-ember-loose/-private/index.ts
This file needs export {}; to avoid a spurious error when typechecking a project that uses --isolatedModules.
../../../repos/glint/packages/environment-ember-loose/-private/index.ts:1:1 -
error TS1208: 'index.ts' cannot be compiled under '--isolatedModules' because it is considered a global
script file. Add an import, export, or an empty 'export {}' statement to make it a module.

This issue only affects use of a directly-linked glint repo (e.g. during development / testing of glint itself using a different project as the subject). The generated index.d.ts does contain the export {};, so users of the npm package are unaffected.

environment-ember-template-imports and environment-glimmerx are also affected.


Resolve paths instead of joining

Hi there.  I'm trying to use your plugin with an absolute path, but it doesn't work.  I made a small change (replaced path.join with path.resolve), which allows absolute paths to be used in addition to relative paths.

Anybody behind the project?
I have the same problem and this PR solve it.

:+1: on this.

Thank you and sorry for the delay! Not sure how I missed this PR


Update native-messaging.md

Adding content for OS X.

Docs Build status updates of commit d6ece8f:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-edge/extensions-chromium/developer-guide/native-messaging.md
:white_check_mark:Succeeded

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

Docs Build status updates of commit 6c4db8e:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-edge/extensions-chromium/developer-guide/native-messaging.md
:white_check_mark:Succeeded

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


Elasticsearch auth enhancement

Adding auth support to use for connecting to an elasticsearch node.
Code taken from the official PHP-client for Elasticsearch (https://github.com/elasticsearch/elasticsearch-php/blob/master/src/Elasticsearch/Connections/CurlMultiConnection.php)

Moved to elasticsearch repo https://github.com/yiisoft/yii2-elasticsearch/pull/50


add isrd-tester group to the catalog on the dev.isrd

@robes can you add the group to the catalog? If not, would @svoinea know how to do this?

@hongsudt add isrd-tester for? read or write or both?

@hongsudt and... add the group to which catalog?

@robes we should allow isrd-testers to read/write to all catalogs on the isrd test server.

documented here: https://github.com/informatics-isi-edu/ermrest/blob/master/api-doc/rest-catalog.md
we need to know what is the URI for the isrd-testers group.

A script like this will do it locally:
#!/bin/sh
# 1 - database
# 2 - acl
# 3 - rolename (like a globus uri)
psql -c "insert into _ermrest.meta (key, value) values ('${2}', '${3}');" ${1}

It can be run like:
isrd-dev::ermrestddl[~] ./update_acl.sh facebase-legacy "content_write_user" "https://auth.globus.org/9d596ac6-22b9-11e6-b519-22000aef184d"

If the acl already exists, it will fail like this:
ERROR:  duplicate key value violates unique constraint "meta_key_value_key"
DETAIL:  Key (key, value)=(content_write_user, https://auth.globus.org/9d596ac6-22b9-11e6-b519-22000aef184d) already exists.

I put that script under the ermrestddl user on 'dev.isrd.isi.edu'.
I ran the test on all the original catalogs like facebase-legacy, facebase-isa, rbk, gpcr and they already had those permissions set. I ran on one of the newer _ermrest... catalogs and the first one did not have the perms -- does now.
Anyone can do this for any catalog they create.

@svoinea has helped us set this up.. I also put the howto to the chaise wiki page. https://github.com/informatics-isi-edu/chaise/wiki/Ermrest-Howto-(set-ACL,-cookies)
I am closing this issue since you guys can now set it up yourselves. Here is the isrd-testers GUID https://auth.globus.org/9d596ac6-22b9-11e6-b519-22000aef184d


update welcome page

The welcome page can be improved namely;

The cryptopower logo should be added to the content of the page
the should be a back button at the top left to go back to the previous step

I am working on this

I am working on this

Sorry, I wasn’t fast enough here. It is because I am trying to understand the codebase. I was already doing something though, but I can see that another PR has addressed this issue. I will move to another one.


⚠ Bofrost.es has degraded performance

In b4187bd, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1555 ms

Resolved: Bofrost.es performance has improved in 53cd0f2 after 6 minutes.


Roll Flutter Engine from ef0f97185aec to bddaa401a750 (1 revision)

https://github.com/flutter/engine/compare/ef0f97185aec...bddaa401a750
2022-07-02<EMAIL_ADDRESS>Roll Dart SDK from 6ca7a185e036 to 5f5cc636e87e (1 revision) (flutter/engine#34440)
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<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.


feat: add C implementation for math/base/special/coversin

Resolves a part of #649 .
Description

What is the purpose of this pull request?

This pull request:

add C implementation for math/base/special/coversin

Related Issues

Does this pull request have any related issues?

This pull request:

resolves a part of #649.

Questions

Any questions for reviewers of this pull request?

No.
Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.
Checklist

Please ensure the following tasks are completed before submitting this pull request.

[X] Read, understood, and followed the [contributing guidelines][contributing].

@stdlib-js/reviewers

lkkl;l,m

lkjhgfvcdfvgbhjkl;lkjhbv****

kjhghujlk
kjhjklkjnjklkm;klkmn
kjnjmklkm


How to initialize the enc_with_bottleneck.vq as paper said?

Hi,

when i use the next code snippet to load a pretain model as paper's setting, the output dim is (batch_size, 2048), so how can i input it to enc_with_bottleneck?

resnet50 = torch.hub.load('facebookresearch/dino:main', 'dino_resnet50')

just as the above setting, how can i use that pertrained model to initialize my enc_with_bottleneck.vq? especially how to initialize the codebook's keys

i try to slove my problem with the next code snippet, but my evluation on testset show accuracy is 0.1(just like random choice)

from discrete_key_value_bottleneck_pytorch import DiscreteKeyValueBottleneck
enc_with_bottleneck = DiscreteKeyValueBottleneck(
    dim = 384,
    num_memory_codebooks=64,
    num_memories = 128,
    dim_memory = 32,
    decay = 0.8,            # the exponential moving average decay, lower means the keys will change faster
)
enc_with_bottleneck.to(device)
optimizer_kvib = optim.SGD(enc_with_bottleneck.parameters(), lr=0.001,momentum=0.8)

for x in enc_with_bottleneck.vq.parameters():
    x.requires_grad = True
optimizer_kvib_vq = optim.SGD(enc_with_bottleneck.vq.parameters(), lr=0.001,momentum=0.8)
for e in range(5):
    for i, data in tqdm(enumerate(trainloader, 0)):
        inputs, labels = data
        inputs, labels = inputs.to(device), labels.to(device)

        x = resnet50(inputs)
        print(x.shape)
        x = torch.unsqueeze(x,dim=1)
        optimizer_kvib_vq.zero_grad()
        _, _, loss = enc_with_bottleneck.vq(x)
        loss.backward()
        optimizer_kvib_vq.step()

for x in enc_with_bottleneck.vq.parameters():
    x.requires_grad = False

I look forward to your reply
zhang ruiyuan

Hi Zhang,
I hope you had already solved this question, anyway in this repoI was able to replicate their results. More specifically you cand find here how to create the model with both DKVB and VectorQuantizer.
I will show the way I have been able to replicate their results in a simple snippet:
"""python
class DKVBClassifier(nn.Module):
def init(
self,
embedding_dim: int = 1024,
codebook_size: int = 8192,
num_codebooks: int = 1,
vq_decay: float = 0.99,
threshold_ema_dead_code: int = 2,
value_dimension: Union[int, str] = "same",
freeze_encoder: bool = True,
freeze_decoder: bool = False,
**kwargs,
):
    self.embedding_dim = embedding_dim
    self.codebook_size = codebook_size
    self.num_codebooks = num_codebooks
    self.value_dimension = value_dimension
    self.vq_decay = vq_decay
    self.threshold_ema_dead_code = threshold_ema_dead_code

    # embedding dimension and number of key-value pairs must be divisible by number of codes
    assert (self.embedding_dim % num_codebooks) == 0
    assert (self.codebook_size & num_codebooks) == 0

    # Getting pretrained encoder with DINO
    encoder_raw = torch.hub.load("facebookresearch/dino:main", "dino_resnet50")

     # Getting all the model up to the second to last bottleneck block, as the paper says. (output dim 1024 as in the paper)
     self.encoder = nn.Sequential(
         encoder_raw.conv1,
         encoder_raw.bn1,
         encoder_raw.relu,
         encoder_raw.maxpool,
         encoder_raw.layer1,
         encoder_raw.layer2,
         encoder_raw.layer3,
     )

    # Freezing the encoder
    for param in self.encoder.parameters():
        param.requires_grad = False

    self.key_value_bottleneck = DiscreteKeyValueBottleneck(
        dim=self.embedding_dim,  # input dimension
        codebook_dim=self.embedding_dim // self.num_codebooks,
        num_memory_codebooks=self.num_codebooks,  # number of memory codebook
        num_memories=self.codebook_size,  # number of memories
        dim_memory=self.embedding_dim // self.num_codebooks,  # dimension of the output memories
        decay=self.vq_decay,  # the exponential moving average decay, lower means the keys will change faster
        threshold_ema_dead_code=self.threshold_ema_dead_code,  # (0.1·batch-size·h·w/num-pairs)
    )

    self.decoder = nn.Sequential(
        nn.Linear(self.embedding_dim, 512),
        nn.ReLU(),
        nn.Linear(self.embedding_dim, 256),
        nn.ReLU(),
        nn.Linear(self.embedding_dim, 10),
        nn.Softmax(dim=1),
    )

def forward(self, x):

    if self.freeze_encoder:
        with torch.no_grad():
            embeddings = self.encoder(x)
            embeddings.detach_()
    else:
        embeddings = self.encoder(x)

    encoder_output_size = embeddings.shape[-1]
    batch_size = x.size()[0]

    embeddings = torch.reshape(
        embeddings,
        (embeddings.shape[0], self.embedding_dim, encoder_output_size**2),
    )  # B, Dim, H, W -> B, Dim, N
    embeddings = torch.permute(embeddings, (0, 2, 1))  # B, Dim, N -> B, N, Dim

    memories = self.key_value_bottleneck(embeddings)

    memories = torch.permute(memories, (0, 2, 1))  # B, N, Dim -> B, Dim, N
    memories = torch.reshape(
        memories,
        (
            batch_size,
            self.embedding_dim,
            encoder_output_size,
            encoder_output_size,
        ),
    )  # B, Dim, N -> B, Dim, H, W

    # Processing final output
    return self.decoder(memories)

"""
I hope this helps, please feel free to reach out to me in case you need more help! :)

Wow, you are so nice !!!
Thanks for your code and a really clear explanation.


one alphanumeric and lots of space are valid for length attribute

Hi all, I'm facing such a problem and appreciate your help.
I'm using length attribute for validating user input length. Suppose I need minimum 50 characters. If user enters one alphanumeric and 49 spaces, the input is considered to be valid. How can I avoid that behavior?
Thanks in advance

@k-lusine why don't you trim your input before your validation?

@mcabs3 hmm thanks, I was thinking of smth more complex. For example a format attribute to specify which symbols shouldn't be considered when calculating the length. Anyway, thanks