docs($compile): refine explanation of =-bindings

The current version of this paragraph is in many ways inaccurate and confusing.

Is it looking better now?

@gkalpak pls have a look

Looks good. One suggestion, can you change all instances of widget to directive? I widget is a relict of very old times, iirc, back before the term directive was introduced.

can you change all instances of widget to directive?

What about "component"? It's already called so a bit above:

{...} (an object hash): A new "isolate" scope is created for the directive's element. [...] This is useful when creating reusable components...

I would be okay with <my-component my-attr="parentModel">, but directive definition and directive's scope. Component is a rather specific term. I think the part you quoted shows that. Components imply a certain modularity, but directives can also add events etc. without being components.

OK. Eliminated widgets and replaced 'by reference' with 'based on object identity'.
But I also don't like that it says "local scope", "directive's scope" everywhere whereas the same binding mechanism is used for controllers.

I think that's okay. The text is very information dense anyway. bindToController should make clear that it changes this behavior.

I think bindings should get a higher level section of their own, like Transcusion. It can be done later though.

LGTM

@gkalpak Can you merge? Then I can rebase the one-way PR.

@Narretz: Merged.
(Backported to v1.4.x as 8a1f600.)


Redirect not supporting query strings

I need build a query strings for my redirect path. But it does not working for now
routes:
    /test/([^\/]+)/(.*): '/test/job?data=$2'

It supposed to use /test/job files but due to the query strings, it return not found

not exactly sure what your trying to match?
Can you give me a concrete example of a URL coming in, and what it should redirect to?

What I am basically doing here is, for any url that matches the regex, redirect to /test/job. It works that way. But, when I am adding the query strings at the end, it does not work. The problem is not on the regex, but I think on the query strings.

Actually the problem is that the redirects are only consulted if a page is not found.  However, the page is going to be found because it does exists at the route you are asking for.
Either move the the pages to another route, so the redirects can be used, or a better option would be to use .htaccess/rewrite based redirects if you need this kind of functionality.


Publish 05/11/2022, 10:30 AM

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

File
Status
Preview URL
Details

skype/skype-ps/skype/Complete-CsCceApplianceRegistration.md
:white_check_mark:Succeeded

skype/skype-ps/skype/Complete-CsCceApplianceUnregistration.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


default values for number of CPU threads

In doing some experiments with q2-assembly, I noticed that the default number of CPUs is set a few different ways. For example:
qiime assembly assemble-megahit: --p-num-cpu-threads Number of CPU threads. Default: # of logical processors.
qiime assembly assemble-spades: --p-threads Number of threads. Default: 16.
In the core distribution QIIME 2 plugins, we tend to set these types of values with a default of 1, forcing the user to intentionally request more resources. This is because users will often just go with the default setting. If it's set to 1, they'll notice that it's too slow and increase the value. If it's set high by default though, it becomes easy for users to not notice and overload a system. For example, if they request a single CPU on their cluster, and then 16 subprocesses spin up, that can overload the cluster node and get them in trouble with the sys admin (and potentially give QIIME 2 a bad reputation with the sys admin if it happens regularly).
I recommend always setting the defaults for these parameters to 1, and letting the user override them.

Hey @gregcaporaso, thanks for pointing that out - will adapt!


Please invite me to the GitHub Community Organization

Please invite me to the GitHub Community Organisation.

Name: Alen Klaric

Discord Username(if exists):

Additional Context:

I am currently learning web development and would like to get involved in open source projects to gain practical experience and also to contribute and help the community. I have learned about Eddie's community on youtube when I was researching the topic open source projects.

:nerd_face:

Invitation sent for the GitHub Organisation. Welcome to the community 🎉
Don't forget after accepting to make it public so it appears on your GitHub profile for everyone else to see, you can do this by finding your name in the GitHub organisation list and change the dropdown to public https://github.com/orgs/EddieJaoudeCommunity/people
Tips for practising:
Customise your GitHub profile, here is a live stream on it https://www.youtube.com/watch?v=cT6GXCuS0Zo
Practice repo, instructions on how to add your name to the README in the README https://github.com/EddieJaoudeCommunity/hacktoberfest-practice
Remember contributing to open source is not just about code, its about collaboration, communication and adding value
I hope that helps


Can not build in Archlinux

Hi, I am Arch Linux user and interested in this project, but it can not build with Aur neovide-git or manually build with cargo build --release
Is there any dependency or environment setting missing?
Thanks.
Here is the error message is shown when building with cargo
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/yanganto/data/rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/yanganto/data/side_project/neovide/target/release/deps/neovide-17a448a2fd6d85bd.which.dorgrrwm-cgu.0.rcgu.o" "-o" "/home/yanganto/data/side_project/neovide/target/release/deps/neovide-17a448a2fd6d85bd" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/home/yanganto/data/side_project/neovide/target/release/deps" "-L" "/usr/lib" "-L" "/usr/lib" "-L" "/usr/lib" "-L" "/usr/lib" "-L" "/home/yanganto/data/side_project/neovide/target/release/build/libloading-024427c5be0552c8/out" "-L" "/home/yanganto/data/side_project/neovide/target/release/build/skia-bindings-e8369b37c49f4e2e/out/skia" "-L" "/home/yanganto/data/side_project/neovide/target/release/build/sdl2-sys-08b25664ff63fab7/out/lib" "-L" "/home/yanganto/data/rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/rustcN1TvOc/libsdl2_sys-b09c5cdaf1672cc1.rlib" "/tmp/rustcN1TvOc/libskia_bindings-c7562bdcc18f2c20.rlib" "/tmp/rustcN1TvOc/liblibloading-f78df8f811300810.rlib" "-Wl,--start-group" "/tmp/rustcN1TvOc/libbacktrace_sys-5db30a83f5489d12.rlib" "-Wl,--end-group" "/home/yanganto/data/rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-f7cd12d3ecd59a89.rlib" "-Wl,-Bdynamic" "-lharfbuzz" "-lfontconfig" "-lfreetype" "-lexpat" "-lfreetype" "-ldl" "-lstdc++" "-lfontconfig" "-lfreetype" "-ldl" "-lutil" "-ldl" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-ldl" "-lutil"
  = note: /usr/bin/ld: /tmp/rustcN1TvOc/libsdl2_sys-b09c5cdaf1672cc1.rlib(SDL_gesture.c.o):(.bss.WAYLAND_wl_proxy_get_user_data+0x0): multiple definition of `WAYLAND_wl_proxy_get_user_data'; /tmp/rustcN1TvOc/libsdl2_sys-b09c5cdaf1672cc1.rlib(SDL_events.c.o):(.bss.WAYLAND_wl_proxy_get_user_data+0x0): first defined here
...
5cdaf1672cc1.rlib(SDL_events.c.o):(.bss.WAYLAND_wl_proxy_create+0x0): first defined here
          /usr/bin/ld: /tmp/rustcN1TvOc/libsdl2_sys-b09c5cdaf1672cc1.rlib(SDL_dropevents.c.o):(.bss.WAYLAND_wl_proxy_marshal+0x0): multiple definition of `WAYLAND_wl_proxy_marshal'; /tmp/rustcN1TvOc/libsdl2_sys-b09c5cdaf1672cc1.rlib(SDL_events.c.o):(.bss.WAYLAND_wl_proxy_marshal+0x0): first defined here
          collect2: error: ld returned 1 exit status

https://github.com/Kethku/neovide/issues/306 You might be running into that. I have been working on another project but will look into updating the aur package this week. It will be my first time getting something all nice and tidy for arch.

I am a neovim and Archlinux daily user.  If this is a good for first issue, I am willing to help.  You can just leave some notes for me, and I will try to fix this.  Thanks for the response so quickly.

Did that fix your issue? I'm just guessing because the error messages look similar.

Not sure. I am a little sorry to open a duplicate issue, so I close this quick. ^^"
I will try about 4 hours later if it is a different problem I will reopen this with much clear log.

The build is passed with the following command
CFLAGS="-fcommon -fPIE" cargo build
I will help to fix aur script tomorrow.  Thanks.  :)


Fix triggering: incomplete image

Debug incomplete image problem while trigger, verify switch has jumbo packets enabled

The error persists on another switch which has jumbo packets enabled. The only situation in which the incomplete image is not noticed is in the case of the cameras being connected to different ports on the computer.

Related to https://github.com/ntnu-arl/sensor_stick/issues/4

Fixed by changing the max throughput limit. Knowledge base article added.


Floating point exception in mxnet.ndarray.op.SequenceLast

Description
(A clear and concise description of what the bug is.)
mxnet.ndarray.op.SequenceLast has floating point exception when given data's shape containing 0. Please see the provided code for example.
Error Message
(Paste the complete error message. Please also include stack trace by setting environment variable DMLC_LOG_STACK_TRACE_DEPTH=10 before running your script.)

Floating point exception (core dumped)

To Reproduce
(If you developed your own code, please provide a short script that reproduces the error. For existing examples, please provide link.)
import mxnet
import numpy as np
data = mxnet.nd.array(np.random.rand(1,0,0))
mxnet.ndarray.op.SequenceLast(data)

Steps to reproduce
(Paste the commands you ran that produced the error.)

run the provided code in python interpreter or as a script

What have you tried to solve it?

Environment
We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below:
curl --retry 10 -s https://raw.githubusercontent.com/dmlc/gluon-nlp/master/tools/diagnose.py | python

# paste outputs here

Got 404 when trying to get the script.
Some environment information:

OS: ubuntu 18.04
Python: 3.7.6
pip: 20.0.2
numpy: 1.18.5
mxnet: 1.6.0

So here's the problem:
% DMLC_LOG_STACK_TRACE_DEPTH=150 MXNET_ENGINE_TYPE=NaiveEngine lldb python3.7 -- test_18938.py
(lldb) target create "python3.7"
Current executable set to 'python3.7' (x86_64).
(lldb) settings set -- target.run-args  "test_18938.py"
(lldb) run
Process 45668 launched: '/usr/local/bin/python3.7' (x86_64)
Process 45668 stopped
* thread #2, stop reason = exec
    frame #0: 0x0000000100006000 dyld`_dyld_start
dyld`_dyld_start:
->  0x100006000 <+0>: popq   %rdi
    0x100006001 <+1>: pushq  $0x0
    0x100006003 <+3>: movq   %rsp, %rbp
    0x100006006 <+6>: andq   $-0x10, %rsp
(lldb) cont
Process 45668 resuming
[23:29:59] ../src/engine/engine.cc:55: MXNet start using engine: NaiveEngine
Process 45668 stopped
* thread #2, queue = 'com.apple.main-thread', stop reason = EXC_ARITHMETIC (code=EXC_I386_DIV, subcode=0x0)
    frame #0: 0x0000000115e85453 libmxnet.dylib`mxnet::op::SequenceLastOp<mshadow::cpu, float, int>::Forward(this=0x000000010066a490, ctx=0x00007ffeefbfc2b0, in_data=0x00000001006dcf08, req=0x00007ffeefbfc310, out_data=0x00000001006dcf50, aux_args=0x00000001006dcf38) at sequence_last-inl.h:158
   155
   156 	    auto batch = (axis != 0) ? d0 : d1;
   157 	    auto max_seq_len = in_data[seq_last::kData].size(axis);
-> 158 	    auto rest_size = dsize / (d0 * d1);
   159
   160 	    Tensor<xpu, 3, DType> data =
   161 	        in_data[seq_last::kData].get_with_shape<xpu, 3, DType>(

https://github.com/apache/incubator-mxnet/blob/9bdd4d6347c284770ee5bfe5ae98f1dabc283829/src/operator/sequence_last-inl.h#L158
The code needs to guard against zero-size array for right operand of /, and we should add a smoke test to guard against such problem in this op, similar to https://github.com/apache/incubator-mxnet/pull/18972/files

This was fixed on master, PR waiting to be reviewed: https://github.com/apache/incubator-mxnet/pull/19833

An additional caveat for this one, what's the expected return of SequenceLast if only the first dimension of the input is zero sized? In the current fix, it would end up returning a non-zero sized array if only the first dimension is zero sized, should it throw an exception instead? E.g. if input shape is [0, 2, 3], the fix will return a shape [2, 3] with some random values

@r3stl355 thanks for the fix! Since any array with a 0-dim is an empty array, I think the expected return array would still be of shape [0, 2, 3] without any data in it.

Hey @szha, thank you for merging this. As for the expected shape of the returned array, SequenceLast by design returns an array with one dimension less than the input array, e.g. if input has shape [2, 3, 4], SequenceLast will return an array of shape [3, 4]. However, this becomes tricky if the first dimension of the input array is zero because following the same logic, SequenceLast will end up returning a non empty array given an empty array, e.g. given an array with shape [0, 3, 4], it will still return an array of shape [3, 4].


mbt could not support 4-digit version number in mta.yaml

Seems mbt could not support 4-digit version number in mta.yaml.
But our project need to use 4-digit version number (i.e. <IP_ADDRESS>) for release, is there any way to solved this problem?

MBT Version: 1.0.16
OS Version: MacOS
If possible, provide a link to the project.

Steps to Reproduce:
1.Any ui5 project which use mbt to generate .mtar build
2.Open mta.yaml and changed the version to <IP_ADDRESS>
3.Execute mbt build, you will see the following error:
ERROR the "mta.yaml" file is not valid:
line 3: the "<IP_ADDRESS>" value of the "root.version" property does not match the "^(0|[1-9]\d*).(0|[1-9]\d*).(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-])(.(0|[1-9]\d|\d*[a-zA-Z-][0-9a-zA-Z-])))?(+[0-9a-zA-Z-]+(.[0-9a-zA-Z-]+)*)?$" pattern

Hi,
The version must be in the semantic version format, see the documentation.
The MTA deployer uses the version number to determine if the new mtar you are deploying is older or newer than the current version, this is why following the semantic version format is required.
Best regards,
Tal


Implement epochs EarlyStopping

Implement epochs EarlyStopping to optimize computational cost of simulations.

@RomainGoussault this issue could go in a next milestone (0.2), I don't think it is needed to present and demo the project.

Done in PR #34


NullPointerException Radiation

Created new world and after few secs game crashed
https://paste.dimdev.org/makihemoza.mccrash

NuclearCraft should check the type of ray trace result before using the position in the result.
https://github.com/turbodiesel4598/NuclearCraft/blob/f186fbeaf8c432a0644f817cb55f1780785c1095/src/main/java/nc/radiation/RadiationRenders.java#L154

Ah, this is actually a duplicate of #476

Fixed - will get a new build out now!


Unable to get DEBUG output

I am trying to increase the DEBUG loglevel for troubleshooting, but I am unable to get debug output in the console
I tried:

editing env/peering-manager.env to set DEBUG=True and LOGLEVEL=DEBUG
editing configuration/logging.py to uncomment the custom settings (hardcoding LOGLEVEL='DEBUG')
manually changing log statements from log.debug to log.info

The console output after docker-compose up remains at the same level.
Any suggestions?

Solution is to define specific loggers:
    'loggers': {
        'peering.manager.peeringdb': {
            'handlers': ['console'],
            'level': 'DEBUG'
        },
        'peering.manager.napalm': {
            'handlers': ['console'],
            'level': 'DEBUG'
        },

Could be included by default


display pagination for app/ and db/ operations lists

The API will return pagination info for collection resources (see https://github.com/aptible/api.aptible.com/pull/146). Diesel should use these to display pagination links, starting with the apps/:id/operations and and databases/:id/operations history pages.

I'll assume the API will respond to a GET /apps/:id/operations request with a payload like:
{
  page: 1,
  total_pages: 10,
  per_page: 10,
  _embedded: {
  }
}

@sandersonet Is the "app activity" (and db activity) page the place where the paginated list of operations will end up in you 2.0 designs, i.e.:

Do you have a UX or UI in mind for the pagination? This PR adds very simple pagination (prev current-page next) as shown in the image ^^

@bantic Correct, 'activity' is the new page name for app/db operations.
For now, just use the bootstrap default: http://getbootstrap.com/components/#pagination for pagination links.  Someday we can consider an infinite scroll UX.

PR over at #60 .
Will do the basic bootstrap styling separately.

closed in #60


Unable to access localhost : npm start failed

Hello Team,
This might be a stupid question but here is what I am getting-

I installed npm and when I did npm start below is the error I received -
$ npm start
npm ERR! missing script: start
npm ERR!      C:\Users\xx44079\AppData\Roaming\npm-cache_logs\2018-07-16T21_19_03_748Z-debug.log
below is log file -
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli   'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli   'start' ]
2 info using<EMAIL_ADDRESS>3 info using<EMAIL_ADDRESS>4 verbose stack Error: missing script: start
4 verbose stack     at run (C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:151:19)
4 verbose stack     at C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:61:5
4 verbose stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:115:5
4 verbose stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:402:5
4 verbose stack     at handleExists (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:366:20)
4 verbose stack     at FSReqWrap.cb [as oncomplete] (fs.js:312:19)
5 verbose cwd C:\Program Files\nodejs\node_modules\npm\lib
6 verbose Windows_NT 6.1.7601
7 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
8 verbose node v8.11.3
9 verbose npm  v5.6.0
10 error missing script: start
11 verbose exit [ 1, true ]
Kindly assist.
Regards,
Sunil

Could anyone please assist on this issue?

@suniltikar were you able to serve the simulator locally now? Please make sure you clone the code to local link and then run commands within the project directory.

Please help reopen if there is still an issue. Thanks for contributing to webdataconnector!


Update scp, ssh, and logs command options

This depends on https://github.com/cloudfoundry/bosh-cli/pull/610 being merged.

Merging now that https://github.com/cloudfoundry/bosh-cli/pull/610 is merged


Download all songs from playlist

Yet another edit.
Download all songs from the playlist.
Skip already downloaded songs (the ones available in the download folder).
Messagebox showing the results.
Did some code cleanup to seperate UI from logic with the goal to make downloading multithreaded so it is possible to download a couple of songs at the same time. This isn't working yet.

tageditor.exe and youtube-dl.exe where previously in the bin folder, which isn't tracked anymore. I added the files to the project root, so for future updates they can be replaced there.


Mapping fromJS should support plain arrays

Looks like the fromJS expects the root object to be an object. I very ordinarily want to take:
var data = [{name = "", id = ""}, {name = "", id = ""}, ];
var model = ko.mapping.fromJS(data);
But this always returns an empty array. I shouldn't have to wrap it in an object just to get this to work.  This should return an observable array of the inner objects.

This issue should be closed.
Assuming you're using the correct syntax that works fine.
var data = [{name: "", id: ""}, {name: "", id: ""}];
var model = ko.mapping.fromJS(data);

model becomes an observableArray, and both name and id are observable.

@shawnwildermuth : Can you confirm?


Automated cherry pick of #10849: Feature/yousong zombie

Cherry pick of #10849 on release/3.5.
#10849: Feature/yousong zombie

Codecov Report

Merging #11270 (0b8988a) into release/3.5 (6a15e02) will increase coverage by 2.83%.
The diff coverage is 0.73%.

@@               Coverage Diff               @@
##           release/3.5   #11270      +/-   ##
===============================================
+ Coverage         5.98%    8.81%   +2.83%
===============================================
  Files              796      417     -379
  Lines           125693    51913   -73780
===============================================
- Hits              7522     4578    -2944
+ Misses          117504    46904   -70600
+ Partials           667      431     -236

Flag
Coverage Δ

aFlag
8.81% <0.73%> (+2.83%)
:arrow_up:

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

Impacted Files
Coverage Δ

pkg/apigateway/handler/auth.go
0.00% <0.00%> (ø)

pkg/apis/input.go
0.00% <ø> (ø)

pkg/baremetal/cronjobs.go
0.00% <0.00%> (ø)

pkg/baremetal/manager.go
0.50% <0.00%> (-0.01%)
:arrow_down:

pkg/baremetal/tasks/baseprepare.go
0.00% <0.00%> (ø)

pkg/baremetal/tasks/bm_register.go
0.00% <0.00%> (ø)

pkg/baremetal/tasks/ipmiprobe.go
0.00% <0.00%> (ø)

pkg/baremetal/utils/ipmitool/ipmitool.go
0.00% <0.00%> (ø)

pkg/cloudcommon/db/db_dispatcher.go
0.00% <0.00%> (ø)

pkg/cloudcommon/db/jointbase.go
0.00% <ø> (ø)

... and 398 more

Continue to review full report at Codecov.

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


Why after Logout, coontinue to pass the Authorize attribute?

Hi, I'm logged at Mvc Implicit and after log out. Ok home screen show that I'm not logged in but the secure route can be access yet, is that right?
Update: App logs in me again.

I have the same issue. I logout, the system confirms I am logged out, then when I pressure SECURE again, it logs me back with the user I previously logged in with.

Because the logout did not occur in identityserver, only on the client. The authentication cookie is still alive in the domain of identityserver. While this cookie stay the client will understand that the user is authenticated.
This behavior is not an issue.

Yes yes, you are right @ircnelson. I add an update and because saw that I was redirect to idsrv and after to app authenticated. Thanks :)


WIP: Partitioning based on ROIs

Closes #651 - this is still only a simple sketch of the API, although the basic functionality is already there.
Refs https://github.com/Ptychography-4-0/ptychography/issues/6
Still to do:

[ ] The actual implementation needs changes in at least the UDFRunner, which depends on having a slice associated to the Partition.
[ ] Maybe add Partition.shape_for_roi(roi) method, which can override the current partition_shape=partition.slice.adjust_for_roi(roi).shape used when constructing the UDFMeta object, which can then also be used in the short-circuit logic that decides not to generate tasks for empty ROIs
[ ] "nested" ROI support - you should still be able to pass a roi argument to run_udf on a RoiDataset. Needs tests for the case that the Partition ROIs actually overlap, and the roi selects elements from the overlapping region, etc.
[ ] Implement DataSet.meta property on all DataSet impls
[ ] Optimizations for reading a single "macrotile" from multiple partitions
[ ] Documentation

Question about partition sizing: as the user may have requirements for overlapping etc. we don't have control over the size and number of partitions, as we can't use generic logic here. I guess this is the question: where do the partition ROIs come from? Should the user pass in a callable that generates the ROIs? For example, the decisions could depend on the number of GPUs available on the system, and the available memory, so this is actually a per-node decision. I guess the size of each ROI should fit the memory of the "smallest" GPU, for the edge case of having more than one GPU, but with different memory sizes.
Contributor Checklist:

[ ] I have added or updated my entry in the creators.json file
[ ] I have added a changelog entry for my contribution
[ ] I have added/updated documentation for all user-facing changes
[ ] I have added/updated test cases
[ ] I have included the rebuilt production build of the client (only if
changes were made to the GUI)

So, in numpy, once you apply fancy indexing, the affected dimensions are collapsed into one flat dimension, which is "compressed" to the number of nonzero entries. This is also how I currently handle the "normal" ROI.
When dealing with overlapping ROIs, assigning coordinates to tiles becomes a bit more difficult. Just passing on the coordinates from the wrapped dataset (as in the API sketch in this PR) does not work, as the coordinates would all start at zero. My proposal here is to also flatten the navigation axis of the whole RoiDataSet, and have the navigation axis expand, so its navigation shape would be basically sum(np.count_nonzero(roi) for roi in rois). The origin of each partition would be determined by the number of non-zero entries in the preceding ROIs in the list.

Discussion with @sk1p on behavior (WIP):
Two options to implement the navigation dimension:

If the ROI partitions don't overlap and cover the entire navigation space, the interface should work with all existing UDFs and yield results as if it was running with default partitions (keep the navigation dimension of the original dataset).
The ROI partitions give results in a new navigation dimension, which is a concatenation of all the ROIs.

In the second case, we need tools to translate between the coordinates in the new navigation dimension and the navigation dimension of the underlying dataset.
As a comment, the automatisms of kind="nav" result buffers will probably not be too useful for ROI partitions since ROI partitions are introduced for use cases where normal 1:1 merging isn't sufficient. For that reason, kind="single" result buffers with suitable extra_shape will likely be used often.

Running an UDF with ROI partitions yields live-updating results as the partition results come in. That means a usable result can not only be generated in a final postprocessing step, but there are ways to generate them at every merging step. Refs #628

The merge function needs information on the ROI of the current incoming partition result.

In the second case, we need tools to translate between the coordinates in the new navigation dimension and the navigation dimension of the underlying dataset.

Maybe the DataSet could provide a hook for coordinate transformation, which is then used by UDFMeta.coordinates - so the default implementation works like the implementation from #793 by @AnandBaburajan, but the ROIDataSet can override this to provide the "original" coordinates, "punching" through to the underlying DataSet. As a next step, we can then see if we need to provide additional helper functions, or extensions to the UDF interface.

Maybe the DataSet could provide a hook for coordinate transformation, which is then used by UDFMeta.coordinates - so the default implementation works like the implementation from #793 by @AnandBaburajan, but the ROIDataSet can override this to provide the "original" coordinates, "punching" through to the underlying DataSet.

Sounds good! 👍

FYI, in the Ptycho 4.0 call we just discussed this item. Since Simeon is picking up work on the CUDA/Alpaka side of this, we should put it on the short list after 0.6 is out. We can already test with SSB and @Sniper2k 's merge function, taking into account that SSB results change if you constrain it differently. :-)


Supporting pagespeed on ARM devices?

Is there any further plans on adding support for arm devices with ngx_pagespeed?
I think that theres s a growing demand with more and more providers selling and hosting servers based on the arm architecture..

We don't currently have plans to support ARM mostly because I don't think we've especially been peppered with requests for it.
We have a lot of library dependencies and I imagine at least some of them don't support ARM, which makes this a lot more painful.

Will there be a mod_pagespeed supported for armhf? I am running a webserver on my Pi and would like to have mod_pagespeed too

+1 here, I am interested in trying this with NextCloudPi

I too am running a webserver on a Pi-like board and would be really interested in having this module.

+1 im interested in this module

+1 It would be a really nice thing to have

+1 ARM based servers are becoming much more mainstream.

I to would like this to work on armv7 and armv8 (64bit) for a raspberry running apache.

+1 really would be nice

+1 would love to have pagespeed for the pi4 - Raspbian  - tried the Automated Install build from source, but no sucess,,,

Yeah that would be the best thing ever. 💓
On Thu, Dec 12, 2019, 3:33 AM petter5<EMAIL_ADDRESS>wrote:

+1 would love to have pagespeed for the pi4 - Raspbian - tried the
Automated Install build from source, but no sucess,,,
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/apache/incubator-pagespeed-ngx/issues/1213?email_source=notifications&email_token=AEWWTVEO54RX5BBWUQIPUV3QYFMBVA5CNFSM4CGPPH72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGUUSXA#issuecomment-564742492,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEWWTVA5B6PTGFBDYCPMA53QYFMBVANCNFSM4CGPPH7Q
.

I have ngx_pagespeed running on aarch64 and armv7l.
You can find the PSOL binaries and instructions here:
https://gitlab.com/gusco/ngx_pagespeed_arm
I believe we are about to see ARM grow in the server space this year,
thought it would be a shame for ngx_pagespeed to miss out.

nice! would you consider upstreaming your work to
https://github.com/apache/incubator-pagespeed-mod ?
On Sun, May 10, 2020 at 7:07 PM Linux From Scratch on the Raspberry Pi <
<EMAIL_ADDRESS>wrote:

I have ngx_pagespeed running on aarch64 and armv7l.
You can find the PSOL binaries and instructions here:
https://gitlab.com/gusco/ngx_pagespeed_arm
I believe we are about to see ARM grow in the server space this year,
thought it would be a shame for ngx_pagespeed to miss out.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/apache/incubator-pagespeed-ngx/issues/1213#issuecomment-626403751,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAO2IPMRTPQJEDMVG72M3PLRQ4XULANCNFSM4CGPPH7Q
.

I tried @pilfs instructions and can verify that they do work. I tried it out on an AWS m6g instance.
That said, a few other things to note:

The ngx_pagespeed build script downloads pre-built binaries for PSOL. Thus, in order for that script to work on Arm machines, we will need pre-built binaries released for aarch64 (arm64) and armv7l.

The ngx_pagespeed script does offer a switch (-s) which tells it to build PSOL rather than download the pre-built binary. This script is broken. I ran it on both Arm and x86 instances. If this script weren't broken, then you would not necessarily need the pre-built PSOL binaries.

I was poking around at the patches @pilfs posted. I see a bunch of stuff around atomic operation intrinsics. There are legacy __sync, and newer __atomic intrinsics. I'd guess that there is room to improve performance, especially since newer Arm 8.2 added newer/improved atomic instructions. I don't claim to know what should be done, but it feels like there's room for lots of improvement.

All of that said, I think pilfs changes should be merged to get the Arm support in.

I too tried @pilfs instructions and they helped me move forward with my AWS M6g Arm instance. The concern I have is getting PSOL to build from source without needing the patch. For example a new version of pagespeed was released recently (<IP_ADDRESS>) and I am not sure if the arm patches are compatible.
Come on people AWS no longer supports x86 on their latest generation of boxes. This problem is not going away - can we pretty please solve this?

This problem is not going away - can we pretty please solve this?

@Firegarden I'd be happy to review pull requests related to this. Probably best to land this on branch 36 (corresponding to the 1.14.X releases).

Same issue here, trying to build a webserver on pi4 8gb, for some testing / tweaking.
adding module in ../incubator-pagespeed-ngx-latest-stable Architecture not supported: armv7l
Any news?

+1

Totally needed on new AWS servers.

yeah thats the case for me... dang

Our whole infra is on AWS Graviton processor (arm64). Totally need it

How about the Apple Silicon processors. ARM support would be very helpful for the growing number of developers on the new M1 devices as well.
I currently fail in building a docker image for development on a M1 Mac because of the missing ngx_pagespeed ARM support. 😢
https://github.com/intershop/intershop-pwa/blob/develop/nginx/Dockerfile#L4-L5
It would be great if this could work as nicely as for the other platforms. 👍

I am afraid the project isn't being developed at the rate it should, surely because Google seems to have lost interest in the project, and we can see the latest stable release was released almost 1 year ago.
Having this in mind, I found other viable solutions to achieve some features of PageSpeed. For example, minification can be achieved by PHP (there's even an older nignx perl module); if done properly, you can even gz or br the files to squeeze even more performance. Removing images metadata can be done server side with programs like EXIFTool. Same applies for WebP images and many other features.
The main problem with this approach is you must find and tune every solution for your webserver. I am thinking about creating a repository to group solutions and solve this mess.
DISCLAIMER: This is by no means a message intended to offend devs or trying to push things out of nowhere. All the work done so far is much appreciated.

Please see https://groups.google.com/g/mod-pagespeed-discuss/c/SYx1nOS6HsE/m/4kkGpZ_3AgAJ TL;DR mod_pagespeed is in the hands of volunteers and is now incubating at the Apache Software Foundation. Volunteers welcome, particularly if there is a feature or platform you want supported.

I can second a vote for an arm version (specifically for raspberry pi 4). I am running a webserver off of nginx on a raspi, and definitely need to be sure that I can get Pagespeed working on it in the future. Any places where I can petition developers to add this into the pagespeed roadmap?

https://gitlab.com/gusco/ngx_pagespeed_arm

@pilfs I also got this running on my raspberry Pi 4 using the nginx mainline version 1.21.5. Thanks a ton for this! Is there anything that I should consider or be worried about since I'm using nginx mainline 1.21.5? Do you keep the code for this up to date? Sorry if it sounds like a noob question. I'm most likely still a noob!

Is there any further plans on adding support for arm devices with ngx_pagespeed?
I think that theres s a growing demand with more and more providers selling and hosting servers based on the arm architecture..

I wrote a tutorial to compile the pagespeed module for the Raspberry Pi 4 and Raspberry Pi 3 (aarch64 ARM) based on @pilfs work and instructions, as well as instructions from linuxbabe.com. Both instruction sets have been modified to compile the Pagespeed Module for Nginx-1.21.6. Feel free to check it out and report back anything that doesn't work properly.
Tutorial is HERE:
https://nerd-tech.net/2022/01/26/how-to-compile-and-ngx_pagespeed-nginx-pagespeed-module-for-arm-architecture-on-the-raspberry-pi-4-or-any-other-aarch64-devices-running-ubuntu-server-20-04/

We don't currently have plans to support ARM mostly because I don't think we've especially been peppered with requests for it.
We have a lot of library dependencies and I imagine at least some of them don't support ARM, which makes this a lot more painful.

I believe the only thing incompatible with arm is that there are no arm PSOL libraries other than , which is believe are outdated. I have successfully compiled pagespeed on Ubuntu Server for the Raspberry Pi 4 using these aarch64 PSOL libraries, but I don't quite understand the repercussions of using these outdate libraries. Do you know if there is any way to compile updated arm64 versions of the PSOL libraries myself to include in pagespeed during ps compilation? If you have any ideas, please let me know. Otherwise, consider this post me peppering you with requests for an ARM compatible pagespeed module.


Xnero: Watch status.saver.story(?#Google Play WhatsApp status saver app)

Xnero requests the watch of the watch_keyword status\.saver\.story(?#Google Play WhatsApp status saver app). See the MS search here and the Stack Exchange search in text, in URLs, and in code.

status\.saver\.story(?#Google Play WhatsApp status saver app) has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Spevacus in Charcoal HQ


Extract BLS lib files to separate repo/package

Problem
The Solidity BLS libs in this repo are a separate and reusable component outside of the optimistic rollup functionality in the contracts. As more projects use or build upon BLS functionality they will likely want these components. Currently they must correctly copy/pasta the correct pieces out, and will not have an easy way to get updates.
https://github.com/jzaki/bls-wallet-contracts is one current example.
We already have extracted similar functionality from JS/TS to https://github.com/thehubbleproject/hubble-bls
Solution

Create the Github repo thehubbleproject/hubble-bls-contracts.
Extract BLS Solidity libraries from https://github.com/thehubbleproject/hubble-contracts/tree/master/contracts/libs (BLS.sol,  BNPairingPrecompileCostEstimator.sol, ModExp.sol, etc.) to an new repo that will be an npm package (like https://github.com/OpenZeppelin/openzeppelin-contracts)
Do the same for tests that verify the functionality in those files, such as test/fast/bls.test.ts.
Setup Github actions pipeline to run tests and deploy the package to @thehubbleproject/bls-contracts on releases. We can likely copy/pasta parts of  https://github.com/thehubbleproject/hubble-bls
(Optional) If possible, extract the deployment scripts and pipeline for BNPairingPrecompileCostEstimator.sol to make it easier for projects to deploy needed BLS deps.

FYI @ChihChengLiang @kautukkundan @jzaki


Columns with Falsey values won't get returned in item, but I would like them to

Hi, this is maybe not an issue but a feature. When I have values in my columns like FALSE, 0 they don't get returned, so the items that I get back don't have that Column at all.
Or if some values in the Column are with numbers, and one of them is TRUE/FALSE, the true-false value doesn't get pulled back also
Since I am using conditional logic on my React based on that value I would like to have them, can someone guide me on how to do this?
The simplest way is to treat everything as text, is there an option for this or maybe an option in Google Sheets I can set for this
Use case: Keeping track of items that are in stock.
Works fine if we have items in stock (1,4,55,..) but once we get to 0, the value I get is basically undefined (key doesnt exist at all for that item) and I would like to have 0.  And based on it  I would like to do my conditionals.
Use case 2: I have a toggle for a button and sometimes it expects true/false based on the item
I can work around my logic for myself, but I am making an app maker (people use my app to make apps) so my selection logic has to be dynamic and they should decide when something is disabled, based on pattern matching for string. So sometimes I need the 0 or the FALSE as a response instead of the whole key being omitted.
Is there a setting for this or should I fallback and try to use the  underlying fetch for this myself
https://docs.google.com/spreadsheets/d/{sheetID}/gviz/tq?

Sure man, https://docs.google.com/spreadsheets/d/1_9YFfrJ9WDHMGEG0JUy2PSdZMgheqQuoTtfOsppyTgE/edit#gid=0, but I tested it and your lib doesn't cover this.
I did my own workaround with the code and a second trick someone can use is to do the Select Cells > Format > Number > Plain text and all will be a string type
I know sheets wasn't intended for this but I'm using it as a CMS and lets say I have a ratings value and someone enters a value like 4/5, well for Spreadsheets that's automatically converted to a date lol, well this is the same type of problem.

I have the same issue. Only checkbox with true value get returned

Please get it merged @fureweb-com
I got the same problem - whenever the value is 0 or false it disappeared from the result. The fix is as simple as do not use .v to check for existing value


exhaust reponse body before close for client reuse

Signed-off-by: arthur yang<EMAIL_ADDRESS>It helps re-use the http client.
See https://github.com/prometheus/prometheus/pull/5479

@h2non this looks like its worth while merging ?


Please add some explanation to the user keymap

It will much better to add a README.md to the user keymap, easily to read the keymap.
With this https://www.reddit.com/r/vim/comments/pmqj0x/kmonad_gives_you_superpowers_youll_end_up_using/, will be much easier to read this file:
https://github.com/kmonad/kmonad/blob/master/keymap/user/zim0369/kmonad.kbd
@zim0369
Thank you very much.

I'm not sure I understand; we already have a quick-reference (of sorts).  The tutorial being an executable keyboard file has a lot of advantages I think, like one being able to easily try out new stuff
What exactly do you feel is missing from the current tutorial (apart from it not being a markdown file)?

Er, tutorial is good, but not that practical. We're talking about different things.
I'd like to learn from the users' keymaps, but I'm not a master yet, so I (the other beginners) cannot understand the keymap very quickly, I'd like to find some good ideas from others config. It will be wonderful if there's a explanation with the keymap.


Details popup window

In this PR, I have implemented the following requirements:

When the user clicks (or taps) the button to check project details, the popup with details about the project appears.
When the user clicks (or taps) the close (X) button, the popup disappears.
I need to use a JavaScript array to store all of the information for all projects.
For each project I need to store the following pieces of data in a JavaScript object, at a minimum: name, description, featured image, technologies, link to live version, link to source.
I need to update the main page so that the projects section is created dynamically using the information stored in that JavaScript object. Remember, all of the HTML in that section is created when the page loads.

Although you have implemented the desktop popup well, you still need to implement for mobile popup too. When I check the mobile popup, I see like this:

Kindly fix the mobile popup style and you are good to go!

Nice work adjusting the mobile popup window, but I think it would be better if you can adjust the overlapping text and btns as shown in the screenshot.


Adding ppc64le support for PyTorch engine

Description
Adding support to ppc64le architecture to pytorch-engine.
By referring these instructions  have built and test jni locally on my ppc64le VM with opence conda pytorch. Build and tests completed successfully.

We don't have plan to ship ppc64le native libraries for PyTorch engine.
Since you are able to build JNI, you can package your JNI and the .so files in a jar or save them in DJL cache folder. DJL should be able to pick it up.

@frankfliu
DJL is dependency for https://github.com/opensearch-project/ml-commons
We are working on enabling ppc64le support for opensearch. Here is issue https://github.com/opensearch-project/opensearch-build/issues/3122.
If you can consider this request, we are happy to work with you.

The challenge part is how to create a release pipeline for ppc. And how to maintain this pipeline for new version of PyTorch


A little patch for shadertoy.c that allows for variables sent through a socket

Since I saw that some other people also wanted to be able to pass in variables into a shader, I hacked this patch together (with the help of GPT-4) which adds four uniforms vec4 iAux0, iAux1, iAux2 and iAux3 to the shader code and which can be updated by sending new values via a socket connection (e.g. from a Python script). Since this alters the functionality I did not want to submit this as a pull request, so please the excuse the bloatedness of this post.
It is all very rough and basic, but maybe someone with better C skills than me can turn this into something more universal. Of course you can also alter the variable names or types depending on your needs.
In Makefile you will have to add -lpthread to the libs since the socket runs in a thread, so the line has to be changed to this
LDLIBS=-lGLESv2 -lEGL -ldrm -lgbm -lxcb-randr -lxcb -lpthread
Patched shadertoy.c
/*
 * Copyright © 2020 Antonin Stefanutti<EMAIL_ADDRESS> *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sub license,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the
 * next paragraph) shall be included in all copies or substantial portions
 * of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */

#define _GNU_SOURCE

#include <err.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <regex.h>
#include <stdlib.h>

#include <GLES3/gl3.h>

#include "common.h"

/*
* Socket Server Code start
*/

#include <pthread.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>

volatile float vec0[] = {0.0f, 0.0f, 0.0f, 0.0f};
volatile float vec1[] = {0.0f, 0.0f, 0.0f, 0.0f};
volatile float vec2[] = {0.0f, 0.0f, 0.0f, 0.0f};
volatile float vec3[] = {0.0f, 0.0f, 0.0f, 0.0f};
volatile int updated = 0;

void* socketServer() {
    int sockfd = socket(AF_INET, SOCK_STREAM, 0);
    struct sockaddr_in server_addr;
    server_addr.sin_family = AF_INET;
    server_addr.sin_port = htons(1234);
    server_addr.sin_addr.s_addr = INADDR_ANY;
    bind(sockfd, (struct sockaddr*) &server_addr, sizeof(server_addr));
    listen(sockfd, 5);

    while(1) {
        int new_sock;
        struct sockaddr_in client_addr;
        socklen_t addr_size = sizeof(client_addr);
        char buffer[1024] = {0};
        printf("\nListening for incoming connections...\n");
        new_sock = accept(sockfd, (struct sockaddr*) &client_addr, &addr_size);

        while(1) {
            memset(buffer, 0, sizeof(buffer));
            int nbytes = read(new_sock, buffer, sizeof(buffer));
            if(nbytes <= -1) { // -1 is returned by read() if there's an error
                perror("read error or connection closed by client");
                break;
            }

            sscanf(buffer, "%f,%f,%f,%f %f,%f,%f,%f %f,%f,%f,%f  %f,%f,%f,%f",
                   &vec0[0], &vec0[1], &vec0[2], &vec0[3],
                   &vec1[0], &vec1[1], &vec1[2], &vec1[3],
                   &vec2[0], &vec2[1], &vec2[2], &vec2[3],
                   &vec3[0], &vec3[1], &vec3[2], &vec3[3]);

            updated = 1;
        }
        close(new_sock);
    }
    return NULL;
}

/*
* Socket Server Code end
*/

GLint iTime, iFrame, iAux0, iAux1, iAux2, iAux3;

static const char *shadertoy_vs_tmpl_100 =
		"// version (default: 1.10)              \n"
		"%s                                      \n"
		"                                        \n"
		"attribute vec3 position;                \n"
		"                                        \n"
		"void main()                             \n"
		"{                                       \n"
		"    gl_Position = vec4(position, 1.0);  \n"
		"}                                       \n";

static const char *shadertoy_vs_tmpl_300 =
		"// version                              \n"
		"%s                                      \n"
		"                                        \n"
		"in vec3 position;                       \n"
		"                                        \n"
		"void main()                             \n"
		"{                                       \n"
		"    gl_Position = vec4(position, 1.0);  \n"
		"}                                       \n";

static const char *shadertoy_fs_tmpl_100 =
		"// version (default: 1.10)                                                           \n"
		"%s                                                                                \n"
		"                                                                                \n"
		"#ifdef GL_FRAGMENT_PRECISION_HIGH                                                    \n"
		"precision highp float;                                                               \n"
		"#else                                                                                \n"
		"precision mediump float;                                                             \n"
		"#endif                                                                               \n"
		"                                                                                \n"
		"uniform vec3      iResolution;           // viewport resolution (in pixels)          \n"
		"uniform float     iTime;                 // shader playback time (in seconds)        \n"
		"uniform int       iFrame;                // current frame number                     \n"
		"uniform vec4      iMouse;                // mouse pixel coords                       \n"
		"uniform vec4      iDate;                 // (year, month, day, time in seconds)      \n"
		"uniform float     iSampleRate;           // sound sample rate (i.e., 44100)          \n"
		"uniform vec3      iChannelResolution[4]; // channel resolution (in pixels)           \n"
		"uniform float     iChannelTime[4];       // channel playback time (in sec)           \n"
		"uniform vec4      iAux0;                 // Auxillary value from socket              \n"
		"uniform vec4      iAux1;                 // Auxillary value from socket              \n"
		"uniform vec4      iAux2;                 // Auxillary value from socket              \n"
		"uniform vec4      iAux3;                 // Auxillary value from socket              \n"
		"                                                                                \n"
		"// Shader body                                                                       \n"
		"%s                                                                                \n"
		"                                                                                \n"
		"void main()                                                                          \n"
		"{                                                                                \n"
		"    mainImage(gl_FragColor, gl_FragCoord.xy);                                        \n"
		"}                                                                                \n";

static const char *shadertoy_fs_tmpl_300 =
		"// version                                                                           \n"
		"%s                                                                                \n"
		"                                                                                \n"
		"#ifdef GL_FRAGMENT_PRECISION_HIGH                                                    \n"
		"precision highp float;                                                               \n"
		"#else                                                                                \n"
		"precision mediump float;                                                             \n"
		"#endif                                                                               \n"
		"                                                                                \n"
		"out vec4 fragColor;                                                                  \n"
		"                                                                                \n"
		"uniform vec3      iResolution;           // viewport resolution (in pixels)          \n"
		"uniform float     iTime;                 // shader playback time (in seconds)        \n"
		"uniform int       iFrame;                // current frame number                     \n"
		"uniform vec4      iMouse;                // mouse pixel coords                       \n"
		"uniform vec4      iDate;                 // (year, month, day, time in seconds)      \n"
		"uniform float     iSampleRate;           // sound sample rate (i.e., 44100)          \n"
		"uniform vec3      iChannelResolution[4]; // channel resolution (in pixels)           \n"
		"uniform float     iChannelTime[4];       // channel playback time (in sec)           \n"
		"uniform vec4      iAux0;                 // Auxillary value from socket              \n"
		"uniform vec4      iAux1;                 // Auxillary value from socket              \n"
		"uniform vec4      iAux2;                 // Auxillary value from socket              \n"
		"uniform vec4      iAux3;                 // Auxillary value from socket              \n"
		"                                                                                \n"
		"// Shader body                                                                       \n"
		"%s                                                                                \n"
		"                                                                                \n"
		"void main()                                                                          \n"
		"{                                                                                \n"
		"    mainImage(fragColor, gl_FragCoord.xy);                                           \n"
		"}                                                                                \n";

static const GLfloat vertices[] = {
		// First triangle:
		1.0f, 1.0f,
		-1.0f, 1.0f,
		-1.0f, -1.0f,
		// Second triangle:
		-1.0f, -1.0f,
		1.0f, -1.0f,
		1.0f, 1.0f,
};

static const char *load_shader(const char *file) {
	struct stat statbuf;
	int fd, ret;

	fd = open(file, 0);
	if (fd < 0) {
		err(fd, "could not open '%s'", file);
	}

	ret = fstat(fd, &statbuf);
	if (ret < 0) {
		err(ret, "could not stat '%s'", file);
	}

	return mmap(NULL, statbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
}

#define GLSL_VERSION_REGEX "GLSL[[:space:]]*(ES)?[[:space:]]*([[:digit:]]+)\\.([[:digit:]]+)"

static char *extract_group(const char *str, regmatch_t group) {
	char *c = calloc(group.rm_eo - group.rm_so, sizeof(char));
	memcpy(c, &str[group.rm_so], group.rm_eo - group.rm_so);
	return c;
}

static char *glsl_version() {
	int ret;
	regex_t regex;
	if ((ret = regcomp(&regex, GLSL_VERSION_REGEX, REG_EXTENDED)) != 0) {
		err(ret, "failed to compile GLSL version regex");
	}

	char *version = "";
	const char *glsl_version = (char *) glGetString(GL_SHADING_LANGUAGE_VERSION);
	if (strlen(glsl_version) == 0) {
		printf("Cannot detect GLSL version from %s\n", "GL_SHADING_LANGUAGE_VERSION");
		return version;
	}

	size_t nGroups = 4;
	regmatch_t groups[nGroups];
	ret = regexec(&regex, glsl_version, nGroups, groups, 0);
	if (ret == REG_NOMATCH) {
		printf("Cannot match GLSL version '%s'\n", glsl_version);
	} else if (ret != 0) {
		err(ret, "failed to match GLSL version '%s'", glsl_version);
	} else {
		char *es = extract_group(glsl_version, groups[1]);
		char *major = extract_group(glsl_version, groups[2]);
		char *minor = extract_group(glsl_version, groups[3]);

		if (strcmp(minor, "0") == 0) {
			free(minor);
			minor = malloc(sizeof(char) * 3);
			strcpy(minor, "00");
		}

		bool is100 = strcmp(major, "1") == 0 && strcmp(minor, "00") == 0;
		bool hasES = strcasecmp(es, "ES") == 0 && !is100;

		asprintf(&version, "%s%s%s", major, minor, hasES ? " es" : "");

		free(es);
		free(major);
		free(minor);
	}
	regfree(&regex);

	return version;
}

static void draw_shadertoy(uint64_t start_time, unsigned frame) {
	glUniform1f(iTime, (GLfloat) (get_time_ns() - start_time) / NSEC_PER_SEC);
	// Replace the above to input elapsed time relative to 60 FPS
	// glUniform1f(iTime, (GLfloat) frame / 60.0f);
	glUniform1ui(iFrame, frame);

	if(updated) { // check if vectors has been updated
	    /*
        printf("Updated iVecs: [%f, %f, %f, %f] [%f, %f, %f, %f] [%f, %f, %f, %f], [%f, %f, %f, %f]",
        vec0[0], vec0[1], vec0[2], vec0[3],
        vec1[0], vec1[1], vec1[2], vec1[3],
        vec2[0], vec2[1], vec2[2], vec2[3],
        vec3[0], vec3[1], vec3[2], vec3[3]);
        */
        /*
        printf("Updated iVecs: iAix0: [%f, %f, %f, %f]\niAux1: [%f, %f, %f, %f] ",
        vec0[0], vec0[1], vec0[2], vec0[3],
        vec1[0], vec1[1], vec1[2], vec1[3]);
        */
        glUniform4fv(iAux0, 1, (const GLfloat*)vec0);
        glUniform4fv(iAux1, 1, (const GLfloat*)vec1);
        glUniform4fv(iAux2, 1, (const GLfloat*)vec2);
        glUniform4fv(iAux3, 1, (const GLfloat*)vec3);

        // Reset the flag after print
        updated = 0;
    }

	start_perfcntrs();

	glDrawArrays(GL_TRIANGLES, 0, 6);

	end_perfcntrs();
}

int init_shadertoy(const struct gbm *gbm, struct egl *egl, const char *file) {
	int ret;
	char *shadertoy_vs, *shadertoy_fs;
	GLuint program, vbo;
	GLint iResolution;

	const char *shader = load_shader(file);

	const char *version = glsl_version();
	if (strlen(version) > 0) {
		char *invalid;
		long v = strtol(version, &invalid, 10);
		if (invalid == version) {
			printf("failed to parse detected GLSL version: %s\n", invalid);
			return -1;
		}
		char *version_directive;
		asprintf(&version_directive, "#version %s", version);
		printf("Using GLSL version directive: %s\n", version_directive);

		bool is_glsl_3 = v >= 300;
		asprintf(&shadertoy_vs, is_glsl_3 ? shadertoy_vs_tmpl_300 : shadertoy_vs_tmpl_100, version_directive);
		asprintf(&shadertoy_fs, is_glsl_3 ? shadertoy_fs_tmpl_300 : shadertoy_fs_tmpl_100, version_directive, shader);
	} else {
		asprintf(&shadertoy_vs, shadertoy_vs_tmpl_100, version);
		asprintf(&shadertoy_fs, shadertoy_fs_tmpl_100, version, shader);
	}

	ret = create_program(shadertoy_vs, shadertoy_fs);
	if (ret < 0) {
		printf("failed to create program\n");
		return -1;
	}

	program = ret;

	ret = link_program(program);
	if (ret) {
		printf("failed to link program\n");
		return -1;
	}

	pthread_t thread_id;
    pthread_create(&thread_id, NULL, socketServer, NULL);

	glViewport(0, 0, gbm->width, gbm->height);
	glUseProgram(program);
	iTime = glGetUniformLocation(program, "iTime");
	iFrame = glGetUniformLocation(program, "iFrame");
	iAux0 = glGetUniformLocation(program, "iAux0");
	iAux1 = glGetUniformLocation(program, "iAux1");
	iAux2 = glGetUniformLocation(program, "iAux2");
	iAux3 = glGetUniformLocation(program, "iAux3");

	iResolution = glGetUniformLocation(program, "iResolution");
	glUniform3f(iResolution, gbm->width, gbm->height, 0);
	glGenBuffers(1, &vbo);
	glBindBuffer(GL_ARRAY_BUFFER, vbo);
	glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), 0, GL_STATIC_DRAW);
	glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(vertices), &vertices[0]);
	glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, (const GLvoid *) (intptr_t) 0);
	glEnableVertexAttribArray(0);

	egl->draw = draw_shadertoy;

	return 0;
}

A simple python test script which sends new random values every 2 seconds:
import socket
import time
import random

def generate_random_vector():
    return [random.random() for _ in range(4)]

client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(("<IP_ADDRESS>", 1234)) # replace with your server's IP and port if not running on the same machine

while True:
    vecs = [generate_random_vector() for _ in range(4)]
    data = ' '.join(','.join(str(v) for v in vec) for vec in vecs)

    client_socket.sendall(data.encode())

    time.sleep(2)

client_socket.close()

Thanks a lot! This really gives a good idea of what a socket based approach would look like.
I still need to review the solution space, and probably the problem space a little bit :). I'd really like to come up with a solution that's be generic and versatile.
Anyhow, your proposition is a very good candidate, and gives us a good baseline to start with.
I'll keep you posted here ASAP.

Thanks - I am happy if this motivates you to improve this library since it is really great for standalone work on affordable hardware! But yeah this definitely needs to be generalized more and the socket stuff also needs some more error handling and recovery from disconnect.

@Quasimondo I've been able to iterate on this, and finally landed on another approach that provides a Python wrapper around the native library.
I've just merged #21 that contains the bulk of the work. You'll be able to find some examples on how to bring your own inputs in the glsl.py file here:
https://github.com/astefanutti/kms-glsl/blob/f85385532afdddbd0f42e554c94047e8d203f06c/glsl.py#L19-L126
Do not hesitate to share any feedback or ideas you might have 🙏🏼.


Remove BootstrapConfig::total_oracles and total_ballots

Close #91

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
74 unchanged lines in 3 files lost coverage.
Overall coverage increased (+0.06%) to 60.56%

Files with Coverage Reduction
New Missed Lines
%

core/src/box_kind/ballot_box.rs
1
90.0%

core/src/cli_commands/bootstrap.rs
6
86.0%

core/src/serde.rs
67
3.21%

Totals

Change from base Build<PHONE_NUMBER>:
0.06%

Covered Lines:
1448

Relevant Lines:
2391

💛  - Coveralls


[QUESTION] How do I rename a channel?

I'd like to rename a channel.
Basically I'm doing this:
var channel = connection.channelById(22);
channel.update({
	name: 'new Channel Name',
	linksAdd: null,
	linksRemove: null,
	parent: null,
});

But for some reason the channel won't update its name.
P.S.: I nulled the other properties because I got the following error:
TypeError: Cannot call method '_addChild' of undefined
    at EventEmitter.Channel._checkParent (path/to/node-mumble/lib/Channel.js:2
    at EventEmitter.Channel.update (path/to/node-mumble/lib/Channel.js:120:14)

update() is an internal function. It should really have been called _update(), but you can deduce that also from the fact that it hasn't been documented.
That function updates the local Channel instance based on data coming from the server - it won't alter the server state.
There is no convenience method for renaming the channel, but I believe following would work.
client.connection.sendMessage( 'ChannelState', {
  channel_id: channel.id,
  name: 'new name'
});

Thanks for your quick response!
This worked as you said. =)


Test coverage

Fae.jl is currently lacking tests. Here are some that we need:

[x] A test for each object (square, circle, sierpinski, barnsley)
[ ] A test for fractal executable chaining. In other words, if we have 4 operators $H_1$ , $H_2$ , $H_3$ , and $H_4$ , we need to make sure that $(H_1, H_2)$ can create the correct object primitive and $(H_3, H_4)$ can create the correct postprocessing operation. Maybe start with a square and move it around with each operation, then check the pixels of the final image to make sure it's actually correct? If you do it on a 9x9 pixel grid, you could have $H_1$ create the square, $H_2$ move it to the right, $H_3$ move both squares up, and $H_4$ rotate both 90 degrees and move to the lower left. This would color every pixel except the top left and bottom right.
[x] Make sure all examples run
[x] GPU tests (Can now be run, but not on CI)
[x] Layering tests (just use a small array and check the output at certain elements to make sure it's fine)

[x] FUMLayer, ColorLayer, FractalLayers as canvas
[x] layering of all on top of each other

[ ] Edge detection tests

Broken Tests:

[ ] chaos_testsuite(ROCArray) causes a segfault and system freeze

Important note: the chaos_test introduced in #24 causes a segfault on AMDGPU, but not on CUDA / CPU. This will take some digging to figure out, so I disabled it for AMD specifically.

So I am not quite sure where to put this. In #28 I added a test to run all examples. It will run locally, but something about the julia namespace bugs out on the testsuite:
 Got exception outside of a @test
  MethodError: no method matching smear_example(::Int64, ::Int64, ::Int64; ArrayType=Array)
  Closest candidates are:
    smear_example(::Any, ::Any, ::Any; ArrayType, output_type) at ~/projects/Fae.jl/examples/smear.jl:3
  Stacktrace:
    [1] example_tests(ArrayType::Type{Array})
      @ Main ~/projects/Fae.jl/test/example_tests.jl:28
    [2] macro expansion
      @ ~/projects/Fae.jl/test/example_tests.jl:40 [inlined]
    [3] macro expansion
      @ ~/builds/julia-1.7.1/share/julia/stdlib/v1.7/Test/src/Test.jl:1283 [inlined]
    [4] example_testsuite(ArrayType::Type{Array})
      @ Main ~/projects/Fae.jl/test/example_tests.jl:40
    [5] top-level scope
      @ REPL[59]:1
    [6] top-level scope
      @ ~/.julia/packages/CUDA/DfvRa/src/initialization.jl:52
    [7] eval
      @ ./boot.jl:373 [inlined]
    [8] eval_user_input(ast::Any, backend::REPL.REPLBackend)
      @ REPL ~/builds/julia-1.7.1/share/julia/stdlib/v1.7/REPL/src/REPL.jl:150
    [9] repl_backend_loop(backend::REPL.REPLBackend)
      @ REPL ~/builds/julia-1.7.1/share/julia/stdlib/v1.7/REPL/src/REPL.jl:244
   [10] start_repl_backend(backend::REPL.REPLBackend, consumer::Any)
      @ REPL ~/builds/julia-1.7.1/share/julia/stdlib/v1.7/REPL/src/REPL.jl:229
   [11] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool)
      @ REPL ~/builds/julia-1.7.1/share/julia/stdlib/v1.7/REPL/src/REPL.jl:362
   [12] run_repl(repl::REPL.AbstractREPL, consumer::Any)
      @ REPL ~/builds/julia-1.7.1/share/julia/stdlib/v1.7/REPL/src/REPL.jl:349
   [13] (::Base.var"#930#932"{Bool, Bool, Bool})(REPL::Module)
      @ Base ./client.jl:394
   [14] #invokelatest#2
      @ ./essentials.jl:716 [inlined]
   [15] invokelatest
      @ ./essentials.jl:714 [inlined]
   [16] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
      @ Base ./client.jl:379
   [17] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:309
   [18] _start()
      @ Base ./client.jl:495
Test Summary:                  | Pass  Error  Total
running all examples on Arrays |    4      1      5

We get such errors at random, so I am not sure how to fix this right now.


Move only in view bounds

Is that possible?

no not right know but I am trying to improve it more and more. :)


Use Multisend to batch transactions for Safes

Description
Safe smart accounts can accept & sign batched transactions. With the implementation of #400 & #401 in the March Safe hackathon, we will assume that all Cadastre users have this setup. All land market transaction windows should batch the required transactions for a single action button UX.
Requirements

Consolidate transactions required for claiming/bidding on/editing parcels into a single button that triggers a Multisend batch

Add a link & module for (advanced) users to optionally preview their transaction bundle

Include contract addresses, function names, & tx details

Until ETHx is able to be used to pay gas fees via Gelato's SyncFee, wrap ETH to ETHx incrementally with each batch transaction. Wrap the lesser of:

Required ETHx transfer (claim payment/bid collateral/+ buffer deposit) + For Sale Price*.1 (1 year worth of streamed network fees) = minimumEthXForTransfer
ETH Balance - .002 (i.e. leave .002 ETH for gas) = ethBalanceSubGasBuffer

If this value is equal to or less than the Required ETHx Transfer, then the "Insufficient Funds" error message should be shown and the claim button should be greyed out (i.e. they at least need to be able to pay upfront costs) ethBalanceSubGasBuffer <= minimumEthXForTransfer = Error: Insufficient Funds

Bundle composition for users with ETHx less than the above threshold

Wrap 100% of the ETH to ETHx

Post hackathon, we'll consider Safes that are used for more than just the Geo Web and conditional or manual wrapping amount

Authorize the appropriate ETHx ERC-20 transfer amount
Authorize the appropriate ETHx stream amount
Claim the parcel/place the bid/change the price

Bundle composition for users with enough ETHx for the transaction:

Authorize the appropriate ETHx ERC-20 transfer amount
Authorize the appropriate ETHx stream amount
Claim the parcel/place the bid/change the price

Utilize Gelato’s SyncFee for users to pay for their batch transaction gas fees with ETHx
https://docs.gnosis-safe.io/learn/safe-core-account-abstraction-sdk/relay-kit

Note: The Safe, not the EOA/signer, should pay the gas fees associated with the batch from its balance

Note: For the Safe hackathon, we won't be setting the content fields because it will require a new approach for the management of Ceramic streams. We can leave the Name & Link fields on the UI, but don't bother trying to submit that info with the Claim batch.

Closed with #413 merged into the Safe branch. Will open a ticket for merging any changes to develop & production when appropriate.


operator-sdk upgrade to v1.17.0 for olm prow jobs

Description of changes:

operator-sdk upgrade to v1.17.0 for olm prow jobs
I have already published the 0.0.3 images for olm-bundle-pr and olm-test

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

cc: @acornett21

/lgtm


Meteor.neo4j.collection('players') and the Neo4j browser on port 7474 disagree about the contents of the database

I thought that the Neo4j browser running on localhost:7474 and the Meteor-Leaderboard-Neo4j app share the same data in the database. However, I am seeing some evidence that seems to contradict this.
Here are my steps.

I run the application. 7 "players" are created.

I delete all 7 players.

I check in the Neo4j browser on port 7474 that all seven have been deleted:
MATCH (p:Player) RETURN p
// (no rows)

I add 2 lines to the 2nd function argument for Players.publish('allPlayers':

At the beginning, when it is called:
console.log("subscribe callback", Players.find().count())
At the end of if (Players.find({}).count() <= 0) statement, after any new players have been created:
console.log("players inserted", Players.find().count())

I stop Meteor and restart it.

When I refresh the web page at localhost:3000, I expect to see...
subscribe callback 0
players inserted 7

... in the Terminal window, and this is indeed what happens, and...
MATCH (p:Player) RETURN p

... returns 7 rows. All well and good.

In the browser at port 3000, I now delete each of the players by clicking on their [x] buttons. At port 7474, I check that MATCH (p:Player) RETURN p returns 0 rows. This is what I expect.

I refresh the browser at port 3000.

In the Terminal, I see subscribe callback 7. This is unexpected. This is not what the Neo4j browser at port 7474 reports.
No new players are created. This is logical, given that the Meteor app believes that there are still 7 players.
No players appear in the browser client at port 3000. This is not logical, since the Meteor.neo4j.collection('players') object on the server still considers that there are 7 players to publish.

I stop the Meteor app and restart it, then refresh the browser window for port 3000. The Terminal window now correctly indicates:
subscribe callback 0
players inserted 7

Why does the server object created with Meteor.neo4j.collection('players') still (wrongly) consider that there it contains 7 players, and yet not publish them when the browser subscribes?

I belive we need to add cache flush on meteor restart.

No players appear in the browser client at port 3000. This is not logical, since the Meteor.neo4j.collection('players') object on the server still considers that there are 7 players to publish.

How do you check Meteor.neo4j.collection('players') content?

@blackslate saw mention of console.log(), will came back after testing

@blackslate please update to v0.9.1, all issues should be solved, please update me after testing on your end, thank you for contribution.

Hi,
I have the same or similar behaviour with v0.9.1. After meteor restart, the Players.find({}).count() returns 0, despite there are 7 nodes in database, so new 7 players are added. Then console (server side) shows 7, but on client I have 14 players.


Update configure-access-multiple-clusters.md

just correction

Hi @DKImprowised could you please sihn the cla?

Hi @DKImprowised could you please sihn the cla?

I signed it, but I don't know why its not reflecting. @irvifa

/approve


I06 archetypes shading fw

send @daren-thomas new pull request

jimeno... i can't run emissions.py, because it requires the demand... and that doesn't work anymore?
looks like Calc_Rf_sh might have changed? Do you have any idea?
>python demand.py
Traceback (most recent call last):
  File "demand.py", line 122, in <module>
    test_demand()
  File "demand.py", line 118, in test_demand
    demand_calculation(locator=locator, gv=gv)
  File "demand.py", line 95, in demand_calculation
    list_uses, T_ext, T_ext_max, RH_ext, T_ext_min, locator.get_temporary_folder(), gv, 0, 0)
  File "C:\projects\CEAforArcGIS\cea\functions.py", line 483, in CalcThermalLoads
    Rf_sh = Calc_Rf_sh(Sh_typ)
  File "C:\projects\CEAforArcGIS\cea\functions.py", line 966, in Calc_Rf_sh
    ValuesRf_Table = pd.DataFrame(d)
  File "C:\Users\darthoma\Anaconda\envs\esri103\lib\site-packages\pandas\core\frame.py", line 201, in __init__
    mgr = self._init_dict(data, index, columns, dtype=dtype)
  File "C:\Users\darthoma\Anaconda\envs\esri103\lib\site-packages\pandas\core\frame.py", line 323, in _init_dict
    dtype=dtype)
  File "C:\Users\darthoma\Anaconda\envs\esri103\lib\site-packages\pandas\core\frame.py", line 4548, in _arrays_to_mgr
    index = extract_index(arrays)
  File "C:\Users\darthoma\Anaconda\envs\esri103\lib\site-packages\pandas\core\frame.py", line 4596, in extract_index
    raise ValueError('arrays must all be same length')
ValueError: arrays must all be same length

Weird, i just (5 sec ago) run demand and it works all the way through
sync perhaps?

From: Daren Thomas<EMAIL_ADDRESS>Sent: Monday, April 25, 2016 6:30 PM
To: architecture-building-systems/CEAforArcGIS
Cc: Jimeno Fonseca; Author
Subject: Re: [architecture-building-systems/CEAforArcGIS] I06 archetypes shading fw (#155)
jimeno... i can't run emissions.py, because it requires the demand... and that doesn't work anymore?
looks like Calc_Rf_sh might have changed? Do you have any idea?

python demand.py
Traceback (most recent call last):
File "demand.py", line 122, in
test_demand()
File "demand.py", line 118, in test_demand
demand_calculation(locator=locator, gv=gv)
File "demand.py", line 95, in demand_calculation
list_uses, T_ext, T_ext_max, RH_ext, T_ext_min, locator.get_temporary_folder(), gv, 0, 0)
File "C:\projects\CEAforArcGIS\cea\functions.py", line 483, in CalcThermalLoads
Rf_sh = Calc_Rf_sh(Sh_typ)
File "C:\projects\CEAforArcGIS\cea\functions.py", line 966, in Calc_Rf_sh
ValuesRf_Table = pd.DataFrame(d)
File "C:\Users\darthoma\Anaconda\envs\esri103\lib\site-packages\pandas\core\frame.py", line 201, in init
mgr = self._init_dict(data, index, columns, dtype=dtype)
File "C:\Users\darthoma\Anaconda\envs\esri103\lib\site-packages\pandas\core\frame.py", line 323, in _init_dict
dtype=dtype)
File "C:\Users\darthoma\Anaconda\envs\esri103\lib\site-packages\pandas\core\frame.py", line 4548, in _arrays_to_mgr
index = extract_index(arrays)
File "C:\Users\darthoma\Anaconda\envs\esri103\lib\site-packages\pandas\core\frame.py", line 4596, in extract_index
raise ValueError('arrays must all be same length')
ValueError: arrays must all be same length

—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHubhttps://github.com/architecture-building-systems/CEAforArcGIS/pull/155#issuecomment-214254672

i think i found the problem: your archetypes commit changed functions.py on line 965 to have a different length for Type vs. ValueOUT.
Can you confirm my last commit, changing ValueOUT back to: [1, 0.08, 0.08, 0.15, 0.57, 0.1]
NOTE: please check the order of the coefficients too...

ok. so I have fixed this and will push as soon as github lets me... somehow it doesn't want to let me :(


rename the app,

add new gallery icon,
add feature user can add custom image to recipe icon, add coil

@coderabbitai summary


chore: license checker

Makes a license checker available locally and as a CI job.
Related Issue or Design Document
https://github.com/ory-corp/general/issues/603
Checklist

[x] I have read the contributing guidelines and signed the CLA.
[x] I have referenced an issue containing the design document if my change introduces a new feature.
[x] I have read the security policy.
[x] I confirm that this pull request does not address a security vulnerability.
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact<EMAIL_ADDRESS>from the maintainers to push the changes.
[x] I have added tests that prove my fix is effective or that my feature works.
[x] I have added the necessary documentation within the code base (if appropriate).

This PR causes a lot of extra files in the repo. I'm also happy to not check licenses for this repo since it's an internal dev tool and already open source.


Account Boilerplate for Express Server

Being able to generate a fully functional express server with account authentication would be extremely useful. Obviously this use case if very popular based on the Hackathon Starter project. So, I think it would be beneficial to allow users the ability to do so.
Types of authentication:
Default

Local Email and Password

Optional

Facebook
Twitter
Google

Maybe

Passwordless Token

This had now been added. Check it out in the new release

Would love to see some social login features


Fix handling of floats in generated deserialize

Fixes handling of floats in the generated deserialize. Instead of putting the literal float values in code, we now just fetch the in-memory value from the ApplyDefault. Also add additional test coverage to exercise this, which were broken first and then fixed in the second commit.

Failed tests before the fix
1) Error:
generated code::deserialize#test_0001_validates:
T::Props::GeneratedCodeValidation::ValidationError: Unexpected receiver in nil handler: s(:send,
  s(:const, nil, :Infinity), :-@)
    ~/sorbet/gems/sorbet-runtime/lib/types/props/generated_code_validation.rb:205:in `validate_deserialize_handle_nil'
    ~/sorbet/gems/sorbet-runtime/lib/types/props/generated_code_validation.rb:150:in `validate_deserialize_ivar_set'
    ~/sorbet/gems/sorbet-runtime/lib/types/props/generated_code_validation.rb:44:in `block in validate_deserialize'
    ~/sorbet/gems/sorbet-runtime/lib/types/props/generated_code_validation.rb:40:in `each'
    ~/sorbet/gems/sorbet-runtime/lib/types/props/generated_code_validation.rb:40:in `each_with_index'
    ~/sorbet/gems/sorbet-runtime/lib/types/props/generated_code_validation.rb:40:in `validate_deserialize'
    ~/sorbet/gems/sorbet-runtime/test/types/props/serializable.rb:1398:in `block (3 levels) in <class:SerializableTest>'

  2) Error:
Opus::Types::Test::Props::SerializableTest#test_0005_can deserialize a complex object:
NameError: Error in Opus::Types::Test::Props::SerializableTest::ComplexStruct#__t_props_generated_deserialize: uninitialized constant Opus::Types::Test::Props::SerializableTest::ComplexStruct::Infinity
at line 4 in:
  val = hash["infinity_float"]
  @infinity_float = if val.nil?
    found -= 1 unless hash.key?("infinity_float")
    Infinity
  else
    begin
    val.to_f
  rescue NoMethodError => e
    raise_deserialization_error(
      :infinity_float,
      val,
      e,
    )
    val
  end

    ~/sorbet/gems/sorbet-runtime/lib/types/props/serializable.rb:70:in `rescue in deserialize'
    ~/sorbet/gems/sorbet-runtime/lib/types/props/serializable.rb:60:in `deserialize'
    ~/sorbet/gems/sorbet-runtime/lib/types/props/serializable.rb:212:in `from_hash'
    ~/sorbet/gems/sorbet-runtime/lib/types/props/serializable.rb:374:in `from_hash'
    ~/sorbet/gems/sorbet-runtime/test/types/props/serializable.rb:1376:in `block in <class:SerializableTest>'

  3) Error:
generated code::deserialize::with custom module_name_mangler#test_0001_mangles the custom type names in generated code:
T::Props::GeneratedCodeValidation::ValidationError: Unexpected receiver in nil handler: s(:send,
  s(:const, nil, :Infinity), :-@)
    ~/sorbet/gems/sorbet-runtime/lib/types/props/generated_code_validation.rb:205:in `validate_deserialize_handle_nil'
    ~/sorbet/gems/sorbet-runtime/lib/types/props/generated_code_validation.rb:150:in `validate_deserialize_ivar_set'
    ~/sorbet/gems/sorbet-runtime/lib/types/props/generated_code_validation.rb:44:in `block in validate_deserialize'
    ~/sorbet/gems/sorbet-runtime/lib/types/props/generated_code_validation.rb:40:in `each'
    ~/sorbet/gems/sorbet-runtime/lib/types/props/generated_code_validation.rb:40:in `each_with_index'
    ~/sorbet/gems/sorbet-runtime/lib/types/props/generated_code_validation.rb:40:in `validate_deserialize'
    ~/sorbet/gems/sorbet-runtime/test/types/props/serializable.rb:1420:in `block (4 levels) in <class:SerializableTest>'

895 runs, 2831 assertions, 0 failures, 3 errors, 1 skips

Motivation
Float has some special values where the .inspect does not reflect what the value should be in code:

Float::INFINITY.inspect => Infinity
-Float::INFINITY.inspect => Infinity 😬
Float::NAN => NaN

Also, while I couldn't reproduce anything related to regular floats, it feels like there could be lurking issues with long repeating or irrational numbers so the safest option is to just fetch all float values via decorator.props_with_defaults.fetch(#{prop.inspect}).default.
Test plan
See included automated tests.

@froydnj - thanks for unblocking the tests. Realized I forgot to run rubocop before pushing up so that failed. Just fixed and pushed up so should be ready to go again.

We have a policy of testing changes to Sorbet against Stripe's codebase before
merging them. I've kicked off a test run for the current PR.  When the build
finishes, I'll share with you whether or how it failed. Thanks!
Stripe employees can see the build results here:
→ https://go/builds/bui_PWzUw9GkFo8gCa
→ https://go/builds/bui_PWzUtFg4xn1tWR
→ https://go/builds/bui_PWzUt4zg5JI8S1
This change also has sorbet-runtime changes. Those tests:
→ https://go/builds/bui_PWzcO45wRTdaIn


What are entity versions used for aside from marking tombstones?

I have been reading through the documentation and the source for entities and i am a bit confused on what are entity versions used for except for marking tombstones. What i understand is that tombstone entities are identified by a special version number, and that when an entity is removed from a registry the version is incremented (or set explicitly).
What are other possible uses for entity versions (both within the library and in general)?

Identifiers are recycled in EnTT since day 0. That is, when you destroy an entity, its version is increased by 1.
Imagine to store identifiers aside for some reasons now. For example, in a quad tree. How do you know if that specific entity is still the same or a recycled version with a completely different set of components?
The version helps with it. You can compare versions and find that the two identifers are not the same element, even though their entity part is the same.

I see, thank you!
Which is why i guess most data-driven systems have entity versions.
Completely missed that fact, need to get more sleep and less caffeine :D


Test load balancing - parallelize jest tests

Specification
Since we are expanding our testing to include other platforms like macos and windows, this creates an issue for VERY large tests that we have in PK.
In PK we are spinning up a test job for each subdirectory under tests, this is not efficient under the 10 minute startup routines for windows and mac runners. This is also done via child pipelines, which relies on a script that generates the child pipeline jobs.
The only way to do this would be to do test load balancing instead. This is where we create N number of linux, mac, windows runners, and then distribute tests across the N runners. The N number is determined based a tradeoff between fastest pipeline completion time vs total minutes being used. That is we want highest possible pipeline completion with the lowest total minutes being used. The intersection between the 2 lines is the sweet spot. This would have to be figured out manually & iteratively.
However upon using load balancing, we lose track of individual jobs tackling test directories. Right now we are able to see that only certain areas fail, while other areas succeed. To regain this ability, we have to use the test reporters (which is currently integrated already as junit).
Our test reporters now can tell us which test/tests are failing without us having to dig through the logs.
But jest is not capturing STDOUT or STDERR anymore.
The alternative is to change our logger to use the console.error instead, which is intercepted by jest and buffered up and should be shown to the test reporters.
The buffering causes an issue during development though, it's nice to be able to see the logs immediately when we are debugging test issues especially for the networking code where the ordering matters.
If we can get jest to unbuffer the logs, or change back to process.stderr when the --ci flag is not set, then we can see the logs unbuffered when running the tests. Right now the --ci flag is set when running the tests in the CI/CD.
Finally within our test runners, because each runner only 1 CPU, we can use --runInBand to keep it simple.
Additional context

According to this discussion: https://github.com/jest-community/jest-junit/discussions/208, the STDERR and STDOUT isn't being captured by jest anymore, so test reporters aren't able to show them.
https://gitlab.com/gitlab-org/gitlab/-/issues/201869 - Gitlab themselves have used a custom scheduler to split up their jest tests so that it can be parallelised, see associated issues and the MR that they did
https://docs.gitlab.com/ee/user/gitlab_com/index.html#gitlab-cicd - CI/CD shared runner limitations
https://forum.gitlab.com/t/what-are-resource-limits-for-ci-jobs-on-gitlab-com-ram-cpus/29821/4 - discussion claiming that there's only 1 CPU for each job

Tasks

...
...
...

I believe we can reuse the child pipeline script generator, which would end up dynamically generating N number of parallel jobs.
It's also possible that child pipelines won't be necessary, and instead we can just use the parallel keyword too https://about.gitlab.com/blog/2021/01/20/using-run-parallel-jobs/.
However I quite like the child pipeline script, it should be useful for any kind of dynamic pipeline creation. Perhaps something to quickly calculate/estimate what the N should be.

Note that there's a commercial service for this called knapsack (https://hackernoon.com/how-to-run-parallel-rspec-specs-on-gitlab-ci-in-ruby-and-jestcypress-parallel-tests-a913346x). However I believe we don't need to use this. I believe there's a jest scheduler script that we can write inspired by Gitlab's prior work, that ultimately takes all the tests and splits them up.
Queuing mode would be more efficient, as that means, each job can read in the job when they are finished, that would probably definitely require a child pipeline, where a scheduler is handing out jobs like a queue, and each runner can atomically read one off.

Note that resource limits for windows and mac runners are different:

MacOS has 4 CPUs - https://docs.gitlab.com/ee/ci/runners/saas/macos/environment.html
Windows has 2 CPUs - https://docs.gitlab.com/ee/ci/runners/saas/windows_saas_runner.html

At this time there is only one available machine type offered, gbc-macos-large.

Instance type
vCPUS
Memory (GB)

gbc-macos-large
4
10

Windows runners on GitLab.com autoscale by launching virtual machines on the Google Cloud Platform. This solution uses an autoscaling driver developed by GitLab for the custom executor. Windows runners execute your CI/CD jobs on n1-standard-2 instances with 2 vCPUs and 7.5 GB RAM. You can find a full list of available Windows packages in the package documentation.

This means we don't need as many of these runners during load balancing. Also --runInBand shouldn't be used here.

Jest 28 supports sharding natively:
https://medium.com/@mfreundlich1/speed-up-your-jest-tests-with-shards-776e9f02f637
I believe the scheduling ultimately relies on file size as a proxy for the test time.
However I read in circle CI https://circleci.com/docs/2.0/parallelism-faster-jobs/, that they actually keep track of test times. If you had something like this, you could re-use timing data to better optimise how to split the tests later.
The best would be a queue system, but that doesn't yet exist for work-stealing.
Furthermore once you shard the tests, the coverage report being generated have to be put together again. We would use istanbul to merge the coverage reports back together: https://github.com/istanbuljs/nyc, see the medium post too: https://medium.com/@mfreundlich1/speed-up-your-jest-tests-with-shards-776e9f02f637

Actually our coverage reports are XML cobertura reports, so I'm not sure if istanbul is sufficient for that. Low priority though.

It might be actually quite easy, no need to merge, just put all the files into one location to push out as a report: https://gitlab.com/gitlab-org/gitlab/-/issues/328772#note_769205384


Cannot specify web worker src location (specifically prevents use of PDF.js)

This issue has been generated from a comment by @gaearon in #1015. This issue will probably want to be labelled as a discussion. The objective of raising this issue is to capture a real-world use case to be resolved.
Essentially my objective is to be able to use PDF.js in my application. In order to do this I need to be able to configure the workerSrc attribute on the PDFJS global object.
The recommended approach (as described in this example) is to add a new entry into the webpack configuration so that a new bundle will be generated (just containing the worker source) and then pass a relative path to that bundle.
i.e. in webpack.config.js
  entry: {
    'main': './main.js',
    'pdf.worker': 'pdfjs-dist/build/pdf.worker.entry'
  },

then when using PDF.js
var pdfjsLib = require('pdfjs-dist');

// Setting worker path to worker bundle.
pdfjsLib.PDFJS.workerSrc = '../../build/webpack/pdf.worker.bundle.js';

Unfortunately #1084 deals with the requirement to add additional entries (which at the time of writing is still unresolved). I've raised this as a separate issue because although there is some overlap the is a specific requirement here to enable relative paths to JS files to be specified that can still be resolved as individual files after build.... adding additional entries is one solution, but is entirely dependent upon webpack and my understanding is that a more generic solution (not specific to webpack) is required.
I've explored some other solutions (like using file-loader as described for this project) and have also explored using require.ensure.

Thanks for raising this! It’s an interesting use case. We’ll keep this in mind when we consider supporting multiple entries.

Sorry for the fly-by, but I use PDFJS successfully in my react-scripts application by just requiring pdfjs-dist/build/pdf.combined.js.
Please don't mind the mess, this code is a year or so old (though in production!).
https://gist.github.com/Timer/25401841c527ee5b7672fefba236e35d

@Timer My understanding of pdf.combined.js is that it doesn't use web workers (effectively it disables them). This means that large PDFs will take a really long time to render. You can for example just specify a false path for the workerSrc and it will have the same effect. However I want to try and get the best performance out of PDF.js so want to use web workers.

Fair enough @draperd, in my experience renders are pretty quick except for on raspberry pis, for example. If you're showing the same PDF over and over that component does cache the PDF after first render so it never has to do so again.
I was just trying to give you a temporary solution until we can work out something more permanent. :)

My temporary workaround at the moment is just to point to provide a web hosted location (i.e. "http://mozilla.github.io/pdf.js/build/pdf.worker.js") as this will always work, but we want to be able to provide a solution inside the firewall where access to the outer internet is not allowed. We're also looking at dealing with fairly substantial PDF files with many pages and you tend to notice the slow-down quite quickly.

Another option I've just realised is to copy the worker source file to the public folder and reference is like this:
window.PDFJS.workerSrc = process.env.PUBLIC_URL + "/pdf.js/build/pdf.worker.js";

This also seems to work within the application, but for my specific use case (I'm using create react app as a development environment to build re-usable components that I'm then publishing to NPM) this won't work.... but as a solution just within create react app this would definitely work.
I'm happy to close this issue as my specific requirements are almost certainly outside the scope of this project.

OK. I'll close in favor of a more generic https://github.com/facebookincubator/create-react-app/issues/1277.

just wanted to comment on this, this is a little tricky if your CRA is behind a proxy as part of a larger app. in development, public url is not the sub path :( . hopefully serve-app-under PR and the dependent webpack-dev-server PR will get some traction.

@draperd I've been trying just about everything and I didn't get to load the worker even with your solution

@jesusgp22 I've not looked at this for quite a while as I switched company so this no longer became an issue for me... unfortunately I don't have access to the project where I had this all setup so I can't really help unfortunately :(

I have managed to work around this issue by using worker-loader directly:
$ npm install worker-loader --save-dev

import PDFJSWorker from "worker-loader!pdfjs-dist/build/pdf.worker.js";
import PDFJS from "pdfjs-dist";

PDFJS.GlobalWorkerOptions.workerPort = new PDFJSWorker();
const loadingTask = PDFJS.getDocument(url);


content-type with charset=utf-8

I think we don't want to make this change if everything is already using UTF-8 and working. We had a content-type issue on iOS recently.


Add Function Comment

I added some comment into the functions in src/kakarot/account/eoa/library.cairo.

i work on this 1 day period.
Time spent on this PR: 1 day.
Pull request type

Added function comment into src/kakarot/account/eoa/library.cairo.
Please check the type of change your PR introduces:

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ X] Documentation content changes
[ ] Other (please describe):

What is the current behavior?

Resolves # #516
What is the new behavior?

No behavior changes in this PR since its a added comments into functions.

Added comments to the code no behaviour change.

Other information

@makluganteng would be able to finish the work?

yes i will, sorry iwasnt able to do it this past few weeks now ill try to finish the PR

@makluganteng please fir your conflicts


Fix bug in file switching

Fixes #4576
Add debounce mechanism to handle rapid file switching in the editor.

frontend/src/context/files.tsx

Import debounce from lodash.
Add debouncedSetSelectedPath to handle rapid file switching.
Update value to use debouncedSetSelectedPath.

frontend/src/components/file-explorer/FileExplorer.tsx

Import debounce from lodash.
Add debouncedSetSelectedPath to handle rapid file switching.
Update FileExplorer to use debouncedSetSelectedPath.

frontend/src/routes/_oh.app._index/route.tsx

Import debounce from lodash.
Add debouncedSetSelectedPath to handle rapid file switching.
Update CodeEditor to use debouncedSetSelectedPath.

For more details, open the Copilot Workspace session.

@neubig I'm not able to fix them

OK, let's close this then. Thanks for trying!


Magic/Ranged gauges need Visibility toggles on all components

See "Visible Components" section for Necromancy. I was lazy and didn't bother adding it to Magic/Ranged gauges yet.
Presentation wise I'm not really happy with a massive list for every gauge. I kind of want to move gauge-specific settings into tabs like this:

However doing so requires updating A1 Sauce to be able to create tabbed/grouped settings. This would help with settings saturation / users being overwhelmed by the number of settings too by decluttering the Settings window.

A1 Sauce supporting tabs/groups is not strictly required but is desired.
Tabs should be images which contain an icon - similar in-game NIS interface tabs. Clicking the tab sets it to active and changes which of the tab groups is visible. No need to worry about resorting tabs (unlike in-game) they can be in a fixed order (Melee -> Ranged -> Magic -> Necromancy)