why '7z' not supported by Command

I have a question why 7z not supported by Command but supported by Library ?
Is there some technology reason?

Archiver v4 has no CLI (yet) -- and the 7z implementation did not exist when Archiver v3 was made.

thanks


How to use ssl client certificate (p12) with colly?

How to use ssl client certificate (p12) with colly?

Like this :
curl
--cert ./.p12
--pass
-H "Authorization: orgId=<ORG_ID>"
"https://api.searchads.apple.com/api/v1/campaigns/<CAMPAIGN_ID>"


could you do a haxelib release please? it does not compile with 3.4.5 but its recommended by haxe compiler

Hello,
when we compile with haxe 3.4.5 lots of warnings recommend to use your lib.
but if we get the latests release with haxelib install the code does not compile.
only for a very obscure reason:
the code of this release is exactly the same than in haxe 3.4.5 std library except for two lines that are the reason of the compilation error:
HaxeToolkit\3.4.5\lib\record-macros/1,0,0-alpha/src/sys/db/RecordMacros.hx:785: characters 8-12 : Capture variables must be lower-case
the case OpIn: line but OpIn does not exist in haxe 3.4.5
to make the haxe 3.4.5 adoption easier, could you please release a lib version that is working fine with haxe 3.4.5 please? a perfect copy of the standard lib code without warnings, at least, or the latests code version, if its passing all tests.
thanks

sorry i made a mistake


Page addition: /product/automation-api

Let's add a landing page for automation API.
Affected feature
Marketing website

does this mean a drop-down under the top-nav item?
if so, do we need to add others there as well?

@lindsaymarolich (or @gthuang?) is going to add more details here

cool ill just add a few thoughts here for consideration

we've had a past pattern of adding new pages that don't appear in any navigation and are difficult to discover
id love to stop that pattern and strategize about how new pages fit into the current navigation
we can always shift and change the navigation over time as needed to fit the model of our new pages


devcontainer build fails with invalid windows mount type: 'bind'

I am struggling to build a simple Windows container. devcontainer fails with the following error message:
> devcontainer.cmd build .
(node:13512) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `Code --trace-deprecation ...` to show where the warning was created)
[2023-03-15T07:34:38.873Z] @devcontainers/cli 0.32.0. Node.js v16.14.2. win32 10.0.19044 x64.
[2023-03-15T07:34:39.789Z] Start: Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f C:\Users\SAMUEL~1.POL\AppData\Local\Temp\devcontainercli\container-features\0.32.0-1678865679652\Dockerfile-with-features -t vsc-software-31eb9ee92803919de749f062f644c234 --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label c:\dev\XPS\Software\.devcontainer
[2023-03-15T07:34:40.265Z] 2023/03/15 08:34:40 http2: server: error reading preface from client //./pipe/docker_engine: file has already been closed

[2023-03-15T07:34:40.979Z] #1 [internal] load .dockerignore
#1 transferring context:

[2023-03-15T07:34:41.009Z] #1 transferring context: 2B done
#1 DONE 0.0s

#2 [internal] load build definition from Dockerfile-with-features
#2 transferring dockerfile: 246B 0.0s done
#2 DONE 0.0s

[2023-03-15T07:34:41.010Z] ERROR: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: failed to mount in-place: {bind C:\ProgramData\Docker\windowsfilter\m2ojs66ypkp47r1ye6evbmvbb [rbind ro]}: invalid windows mount type: 'bind'

[2023-03-15T07:34:41.059Z] Exit code 1
Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f C:\Users\SAMUEL~1.POL\AppData\Local\Temp\devcontainercli\container-features\0.32.0-1678865679652\Dockerfile-with-features -t vsc-software-31eb9ee92803919de749f062f644c234 --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label c:\dev\XPS\Software\.devcontainer
    at pie (c:\Users\samuel.polacek\.vscode\extensions\ms-vscode-remote.remote-containers-0.284.0\dist\spec-node\devContainersSpecCLI.js:1921:1698)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async DF (c:\Users\samuel.polacek\.vscode\extensions\ms-vscode-remote.remote-containers-0.284.0\dist\spec-node\devContainersSpecCLI.js:1920:3917)
    at async poe (c:\Users\samuel.polacek\.vscode\extensions\ms-vscode-remote.remote-containers-0.284.0\dist\spec-node\devContainersSpecCLI.js:2059:26903)
    at async doe (c:\Users\samuel.polacek\.vscode\extensions\ms-vscode-remote.remote-containers-0.284.0\dist\spec-node\devContainersSpecCLI.js:2059:25026)
{"outcome":"error","message":"Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f C:\\Users\\SAMUEL~1.POL\\AppData\\Local\\Temp\\devcontainercli\\container-features\\0.32.0-1678865679652\\Dockerfile-with-features -t vsc-software-31eb9ee92803919de749f062f644c234 --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label c:\\dev\\XPS\\Software\\.devcontainer","description":"An error occurred building the image."}

I tried to run the command devcontainer runs separately and that produces the same error:
> docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f C:\Users\SAMUEL~1.POL\AppData\Local\Temp\devcontainercli\container-features\0.32.0-1678865247929\Dockerfile-with-features -t vsc-software-31eb9ee92803919de749f062f644c234 --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label c:\dev\XPS\Software\.devcontainer
2023/03/15 08:36:34 http2: server: error reading preface from client //./pipe/docker_engine: file has already been closed
[+] Building 0.0s (2/2) FINISHED
 => [internal] load build definition from Dockerfile-with-features                                                                                0.0s
 => => transferring dockerfile: 246B                                                                                0.0s
 => [internal] load .dockerignore                                                                                0.0s
 => => transferring context: 2B                                                                                0.0s
ERROR: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: failed to mount in-place: {bind C:\ProgramData\Docker\windowsfilter\m2ojs66ypkp47r1ye6evbmvbb [rbind ro]}: invalid windows mount type: 'bind'

> devcontainer.cmd --version
0.32.0

Docker Desktop settings
{
  "experimental": true,
  "features": {
    "buildkit": true
  }
}

I tried setting "buildkit": false, but that does not work either.
Can someone point me in the right direction? There has to be some misconfiguration on my side that I struggle to understand and I can't diagnose.
> docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.10.3)
  compose: Docker Compose (Docker Inc., v2.15.1)
  dev: Docker Dev Environments (Docker Inc., v0.1.0)
  extension: Manages Docker extensions (Docker Inc., v0.2.18)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.25.0)
  scout: Command line tool for Docker Scout (Docker Inc., v0.6.0)

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 20.10.23
 Storage Driver: windowsfilter (windows) lcow (linux)
  Windows:
  LCOW:
 Logging Driver: json-file
 Plugins:
  Volume: local
  Network: ics internal l2bridge l2tunnel nat null overlay private transparent
  Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
 Swarm: inactive
 Default Isolation: hyperv
 Kernel Version: 10.0 19044 (19041.1.amd64fre.vb_release.191206-1406)
 Operating System: Windows 10 Enterprise Version 2009 (OS Build 19044.2604)
 OSType: windows
 Architecture: x86_64
 CPUs: 12
 Total Memory: 31.76GiB
 Name: CZBRN-5D1F1Z2
 ID: STYO:R3BR:SIE5:4IXN:X55H:4BU5:WYDA:6YZL:FOVX:WTPD:BL5X:LVB3
 Docker Root Dir: C:\ProgramData\Docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: true
 Insecure Registries:
  <IP_ADDRESS>/8
 Live Restore Enabled: false
 Product License: Community Engine

devcontainer.json
{
	"name": "Windows test",

	"build":{
		"dockerfile": "Dockerfile"
	}
}

Dockerfile
FROM mcr.microsoft.com/windows:ltsc2019

Looks similar to https://github.com/microsoft/vscode-remote-release/issues/7394
@samopolacek Do you have Docker Desktop or Docker CLI installed?

I have uninstalled Ubuntu, uninstalled WSL, reinstalled Docker Desktop. Still the same error message.
Turning "Use the WSL 2 based engine" in Docker Desktop settings does not help either.

Support for Windows containers is tracked with https://github.com/microsoft/vscode-remote-release/issues/445. Currently only Linux containers are supported.


web: fix report prompt logging for OpenAI models

/gcbrun exp -n dk1000

As it is now:

With the changes in this PR:

/gcbrun exp -n dk1000

/gcbrun exp -n dk1001

/gcbrun exp -n dk1002

/gcbrun exp -n dk1002

/gcbrun exp -n dk1003

Thanks @DavidKorczynski
The code looks great, but the report appears to have a regression, e.g., on avahi_dns_packet_new_reply.
Daily: https://llm-exp.oss-fuzz.com/Result-reports/scheduled/2024-06-14-daily-comparison/index.html
This PR: https://llm-exp.oss-fuzz.com/Result-reports/ofg-pr/2024-06-13-315-dk1003-comparison/index.html
I suspect this is because the project's fuzz target was not added to the prompt and not related to this PR.
I will merge this now, but could you please confirm why it is not added? Thanks @DavidKorczynski !


Option requireSignInToAccess not working in 3.3

Hi Devs.
Just upgraded to 3.3. Great work! But now i'm not forwarded anymore to my keycloak server. It's possible now to enter a room without authentication. Any ideas whats going on here? server config.js is unchanged from 3.2.
thanks and cheers, t.

You need to change your config. Take a look at the example config, requireSignInToAccess does not exist anymore.

Thanks for your answer @havfo. Could you please a little bit more specific. I'm looking at the example config for quite a while now. :-)

Sorry about that, I was on my phone. You need to set up a userMapping function, look at the examples. In the userMapping you need to add some sort of userRole to the peer object, again look at the examples.
Further you need to set up accessFromRoles, and especially, set [BYPASS_LOBBY] to contain the userRole you granted the peer in userMapping. As an example, if you did:
peer.addRole(userRoles.AUTHENTICATED);

in the userMapping, set:
[BYPASS_LOBBY]     : [ userRoles.AUTHENTICATED ]

in accessFromRoles. Then only the peers with the AUTHENTICATED role will be able to enter from the lobby.

Now i'm starting to understand. Let's see how far I come. :-)

@havfo I think  we need to add to documentation more info about the auth concept..

Redirect to Keycloak and back is working now. Thank you.


[objc][samples] Add weather sample

Weather Sample
This sample shows an Objective-C Mac app consuming a managed .NET assembly.
Building instructions
You'll find two solutions

MyManagedStuff: Managed C# library.
theweather : An Objective-C Xcode project for a Mac App.

In order to run this sample, you need to run make from the CLI, this will build the managed .NET library and use Embeddinator-4000 on it to place the needed support files under theweather/MyManagedStuff. Once you have this files you can open theweather Xcode project and run it.

Build and tests passed.

Build and tests passed.

@spouliot it is already on separated commit, I guess you meant PR? Agree on test 👍

Build and tests passed.

Once https://github.com/mono/Embeddinator-4000/pull/139 is merged I'll fix this PR

Nice samples are running 🎉
19:06:14 + test -f samples/Makefile
19:06:14 + make -C samples all
19:06:14 for i in  mac/weather ; do (cd $i && make); done
19:06:14 rm -rf theweather/MyManagedStuff MyManagedStuff/MyManagedStuff/bin MyManagedStuff/MyManagedStuff/obj
19:06:14 /Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild /p:Configuration=Debug MyManagedStuff/MyManagedStuff.sln

Build and tests passed.

Build and tests passed.

@spouliot @rolfbjarne ready for a second review 👍

Yes my bad @spouliot I thought I had fixed everything and had to remove the other commit in order to make it mergeable but it seems I missed the commit history in the process will address your feedback

@spouliot done

Build and tests passed.


Fix to_input for protocol constants so that all fields are included

Fixes #15085.

!ci-build-me

@mrmr1993 Can you do me a favor and make the other functions in the file use destructuring as well? I was applying that change locally but had to switch off onto the hardfork stuff.

!ci-build-me

!approved-for-mainnet

!ci-build-me

!approved-for-mainnet


rating feature missing

Description
want to add a feature in the footer for ratings, so that users can rate the site after using it
Screenshots
No response
Checklist

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[X] I am willing to work on this issue (optional)

Congratulations, @paulkrishanu4! 🎉 Thank you for creating your issue. Your contribution is greatly appreciated and we look forward to working with you to resolve the issue. Keep up the great work!We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our contributing guidelines

As of now we're not planning for feedback :/


Return VanillaDockerApplication context for containers

This is wrong. The problemn is that you cannot reference another application in a blueprint. I think this needs to be a Brooklyn change, with a scope like APPLICATION that would look up an app by name or id, and then component() or entity() can be used to select an entity from that. Also, the GLOBAL scope is misleading, but probably too late to change. Perhaps a BROOKLYN scope that returns all entities in all applications, for selectioin?


fix(lifecycle-operator): retrieve KeptnEvaluationDefinition before creating KeptnEvaluation

Changes

fix the issue in evaluationHandler, where only KeptnEvaluationDefinition name was propagated to the created evaluation -> the whole EvaluationDefinition should be propagated
change behavior of the phase state to display Pending instead of Unknown when Definition is not found
regression unit tests
add integration tests
polish integration tests

will you have a separate PR for Tasks? I thought we also have this Unknown state for that controller 🤔

will you have a separate PR for Tasks? I thought we also have this Unknown state for that controller 🤔

No for the tasks it works. I added an integration test to confirm it. No code changes needed there

will you have a separate PR for Tasks? I thought we also have this Unknown state for that controller 🤔

No for the tasks it works. I added an integration test to confirm it. No code changes needed there. See here the adapted test for example #3144 (files)

Have not checked the task code but I am confused, wasn't that test already passing with Unknown? Doesn't that mean that the state is initially Pending by default and then changed to Unkown in task definition when it is not found? So the current integration test just exits immediately before the state is changed to unknown?


kCLAuthorizationStatusAuthorized deprecated in 8.0 SDK

locationAuthorizationStatusPermitsAccess: is referencing a deprecated constant (kCLAuthorizationStatusAuthorized) which causes a compiler warning. Would be nice if this could be fixed (with a check for __IPHONE_8_0 etc.).

@bravobug  Could you please post the code line you think should be changed?

There are no references to kCLAuthorizationStatusAuthorized anymore, last I checked, so closing this :)


Does not have an Intel CPU option

All you need to do is make the Intel CPU option write scrypt's N-Factor as the actual value and not the level.
Scrypt Level 10 is 2048.
-a scrypt:2048

Is this for CCMiner or SGMiner?

SGMiner is only for AMD GPU's.
I've tried to get it to work with Intel GPU's and nVidia GPU's but it never worked successfully due to needing to find the raw intensity which can be from 0 to 2.47 billion. Using intensity or other factored switches never worked even when using the absolute lowest levels.
You'll need to grab CPUMiner-Multi from trupvot who made the SGMiner and CCMiner forks as well.
That guy's a mining software genius.
CCMiner is only for nVidia GPU's. CCMiner uses Leveled Factors for Scrypt-N.
1-20
CPUMiner-Multi uses the actual valued difficult factor such as 1024, 2048, 4096 etc.
So just add in CPUMulti-Miner and when people select the CPU Option, make it write -a scrypt:
Also, they have an avx2 exe inside and one for core 2 and for core i7.
They all use -a scrypt:2048.
AVX2.exe is for AMD CPU's/APU's.
Core2.exe is for ANY Intel CPU that IS NOT a Core-i CPU.
i7.exe is for ANY Core-i CPU i3, i5, i7, i9, etc.


Bug: Blade render

Laravel Version
10.48.12
PHP Version
8.2.18
Database Driver & Version
No response
Description
the first line starts with #! will disappear
Steps To Reproduce
open tinker
php artisan tinker

echo Blade::render("#!/bin/bash\nabc\n#!/bin/bash\nabc");

expect output
#!/bin/bash
abc
#!/bin/bash
abc

actual output
abc
#!/bin/bash
abc

Hey there,
While this may be a legitimate issue, can you first try posting your problem or question on one of the support channels below? If this issue can be definitively identified as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

Thanks!


Presence in Teams

[Enter feedback here]
Dear Team,
I think we are missing some information about the Busy status. For example in the text below, where do the Busy status fit?
App-configured presence states are based on user activity (Available, Away), Outlook calendar states (In a meeting), or Teams app states (In a call, Presenting). When you're in focus mode based on your calendar, Focusing will be the state people see in Teams. Focus mode will display as Do not disturb in other products.
Also, there are no information about what triggers the Busy state when we let the App configured settings apply.
There are a not of open discussion out there on forums regarding the Busy state and how it's actually App managed.
Some additional inputs would be useful
Thanks

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: a162ef5c-3099-7f58-4178-d29e3ec2b5a7
Version Independent ID: 6ca31e56-052d-6c62-1323-b5aaaae1f04a
Content: User presence in Teams - Microsoft Teams
Content Source: Teams/presence-admins.md
Service: msteams
GitHub Login: @msdmaguire
Microsoft Alias: dmaguire

@lalles67  Thank you for submitting feedback and contributing to the docs. We are currently investigating this.

Hi @lalles67, thank you for your feedback.
Based on the information in this article I think we can understand that when you have a meeting in the Outlook calendar, and you take a call or do a presentation in the Teams app your presence will be updated to Busy.
These are the action that triggers the Busy state.
If I misunderstand you, please provide more detail. Thank you again!

@lalles67  Thank you for submitting feedback. We understand that this issue has been resolved.
Please feel free to re-open this issue if there is a specific area of the docs that we can improve or make better. Thank you.


[Add] ReactPlay

Site URL
hackertab.dev
Description of the above provided site
ReactPlay
Category
Frontend
Sub Category
react
Checklist

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[X] I am willing to work on this issue (optional)

disregard


Add TypeScript types

This repo must not have our standardization lib yet because "refactor!" in the commit message would've failed

This repo must not have our standardization lib yet because "refactor!" in the commit message would've failed

Did we intentionally choose not to support using a ! to signify a breaking change? I guess I don't remember.

Did we intentionally choose not to support using a ! to signify a breaking change? I guess I don't remember.

Oh ... I didn't know about that. Maybe we do support it. @jimjenkins5 ?

Did we intentionally choose not to support using a ! to signify a breaking change? I guess I don't remember.

Oh ... I didn't know about that. Maybe we do support it. @jimjenkins5 ?

Not intentionally. At least I can't recall. I don't see anything in our rules that would disable it, so it must be off by default ¯_(ツ)_/¯

I fixed the typo, but also made some changes to the README that I overlooked. Sorry about that 🤦

published in +<EMAIL_ADDRESS>


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_6c_9hk5gt4/clone/recipe/meta.yaml:14: pip_install_args: pip install should be run with --no-deps.
ERROR: /tmp/abs_6c_9hk5gt4/clone/recipe/meta.yaml:21: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_6c_9hk5gt4/clone/recipe/meta.yaml:21: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_6c_9hk5gt4/clone/recipe/meta.yaml:38: missing_dev_url: The recipe is missing a dev_url
ERROR: /tmp/abs_6c_9hk5gt4/clone/recipe/meta.yaml:38: missing_documentation: The recipe is missing a doc_url or doc_source_url
ERROR: /tmp/abs_6c_9hk5gt4/clone/recipe/meta.yaml:38: missing_license_family: The recipe is missing the about/license_family key.
WARNING: /tmp/abs_6c_9hk5gt4/clone/recipe/meta.yaml:38: missing_description: The recipe is missing a description
Errors were found


The default sidebarUrlProcessor does not account for the domain

See https://github.com/FabricMC/fabric-docs/issues/180
https://github.com/IMB11/vitepress-versioning-plugin/blob/16bc30996b2245bfd48cb15732900ba214c3affb/src/defaults.ts#L17-L18
Should be similar to:
sidebarUrlProcessor: (url: string, version: Versioned.Version) =>
  url.startsWith("/") ? `/${version}${url}` : url,

This is what the extended skip/dont process field is for in sidebar entries.


Anomaly detection issue

Honestly the code/process in Anomaly detection was way over my head, but I was slowly going through it and ran into an error. I was in the second code cell after "Choose a radius. Anything beyond this bound from the centroid of that category is considered an outlier."
range_ = np.arange(0.3, 0.75, 0.02).round(decimals=2).tolist()
num_outliers = []
for i in range_:
  num_outliers.append(detect_outlier(df_train, emb_c, i))

And got:

I honestly don't know if this is expected, or I messed something up earlier. As far as I know I ran every previous cell and it worked ok.

If you have

run every previous cell and it worked ok

the only possible issue I can imagine is that you have restarted the Kernel, because when you restart the Jupyter kernel, all variables defined in previous sessions are lost.

Our notebooks are designed to be run from start to finish, in order. If you skip a cell then you can run into errors like that, try running step by step from the start again.
FWIW, the cell where emb_c is defined contains this:
emb_c = get_embedding_centroids(df_train)

Make sure you are running that.
If running step-by-step doesn't work, you may have deleted the cell. Try loading the notebook fresh, running step-by-step, and then if you still encounter issues you can re-open this.


Fixes #5183: Redirect requests based on user/GeoIP info

What's this PR do?
Addresses the two use cases in #5183, specifically when and how to redirect anonymous and authenticated user requests to node URLs.
Where should the reviewer start?
All of the work is in dosomething_global.module. Start at this comment in dosomething_global_init():
  // Handle translation redirects for authenticated and anonymous users when
  // they request bare (Global English) URLs.

The code below calls a different function depending on whether the user is authenticated: dosomething_global_redirect_node_auth() or dosomething_global_redirect_node_anon(). The rest of the logic is in those two functions.
Both functions end with calling the helper function dosomething_global_redirect_node_language(), which is also part of this PR.
How should this be manually tested?
As an anonymous user: Use Chrome's ModHeaders extension, or something similar, to fake requests from different locations to node content. The header is
X-Fastly-Country-Code: US | BR | MX | etc.

Request a bare URL (e.g., /campaigns/test) from a supported country (e.g., BR) where the node has a translated, published version. You should get redirected.
Request a bare URL (e.g., /campaigns/test) from a supported country (e.g., BR) where the node has a translated, unpublished version. You should not get redirected.
Request a bare URL (e.g., /campaigns/test) from an unsupported country (e.g., IN). You should not get redirected.

As an authenticated user: Update the user profile to test with different language settings.
N.b.
We base "privileged" on whether you can access the admin area (permission: access administration menu).

Request a bare URL where the node has a published version in your language. You should get redirected.
Request a bare URL where the node has an unpublished version in your language. You should not get redirected.

Any background context you want to provide?
This gets hella bejesus confusing, so the goal in the code is to make the logic as simple as possible.
What are the relevant tickets?
#5183
Screenshots (if appropriate)
N/A
Questions:

Does the knowledge base need an update? Probably

Example of simple local tests (assuming a node with published translations) for the anonymous use case:
$ curl -I -H "X-Fastly-Country-Code: BR" http://dev.dosomething.org:8888/campaigns/boss-test-campaign
HTTP/1.1 301 Moved Permanently
[...]
Location: http://dev.dosomething.org:8888/br/voluntario/boss-test-campaign

$ curl -I -H "X-Fastly-Country-Code: MX" http://dev.dosomething.org:8888/campaigns/boss-test-campaign
HTTP/1.1 301 Moved Permanently
[...]
Location: http://dev.dosomething.org:8888/mx/campa%25C3%25B1as/boss-test-campaign

Looks good!


MudFileUpload: Remove IActivator and Add Defaults

Description

Remove IActivator from MudFileUpload
Add Default behavior to MudFileUpload
Add built in Drag and Drop behavior to MudFileUpload
Created public property DragandDrop to enable built in drag and drop functionality
Created public property Dragging to monitor drag and drop events or interact directly
Created public method GetFilenames
Created public method RemoveFile
Extensive Docs modifications
Ensure minimal change for existing installations - Migration guide would include:

[!CAUTION]
MudFileUpload's ActivationContent won't automatically open the picker any longer. Please add an onclick handler as needed. e.g<EMAIL_ADDRESS>
MudFileUpload:  ActivationContent was renamed to CustomContent which contains a MudFileUpload context.
MudFileUpload:  Activate(...) was removed, use OpenFilePickerAsync() instead
MudFileUpload:  If SelectedTemplate was not used it will render a default file list. <SelectedTemplate /> will remove it.
How Has This Been Tested?

Visually, Unit Tests (Added missing and new tests as well)
Type of Changes

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] Documentation (fix or improvement to the website or code docs)

Default MudFileUpload
<MudFileUpload T="IReadOnlyList<IBrowserFile>"
               AppendMultipleFiles />

Default MudFileUpload with DragandDrop
<MudFileUpload T="IReadOnlyList<IBrowserFile>"
               Style="height: 300px;width: 300px;"
               AppendMultipleFiles
               DragAndDrop />

Checklist

[x] The PR is submitted to the correct branch (dev).
[x] My code follows the code style of this project.
[x] I've added relevant tests.

@ScarletKuro @henon If this meets approval I'll redo the Docs page, list all the fixes, and change from draft PR. This changes MudFileUpload to follow the style of other components using context inside the ActivatorContent instead of IActivator. I also took the time to create default implementations.

Updated https://try.arctechonline.tech with this version if you want to test anything.

@Mr-Technician could you take a look too please?

In general LGTM for the built-in drag and drop functionality, however I think that the ActivatorContent is now confusing to use.
The original goal of ActivatorContent was to make it so that anything within ActivatorContent triggers the file picker, without any extra user setup. Previously you had to mess around with a label button + for attribute:

With this implementation we're asking the user to add an @onclick to define the activator.
My preference would be to keep anything within the ActivatorContent as an activation trigger for the file picker, but we could also just rename the ActivatorContent for clarity.

If I am being honest, ActivatorContent and SelectedTemplate are the wrong terms, it should be CustomContent (or something to indicate they are overriding) and FilesTemplate (or something to indicate they can customize the style of files). That being said IActivator I think caused more issues than it solved and this removes it by using context (like MudStepper and soon MudMenu). It's an easy change for people to make and doesn't require anything funny to make work, the user has full control.
I wasn't around for the label button + for, glad I missed those days! Either way I'm 100% flexible my goal was to make the component easier to use in the future while maintaining past functionality as much as possible.

That being said IActivator I think caused more issues than it solved

You're right, your implementation makes sense, it's more flexible, and less magic behind the scenes with the IActivatable. I'm happy as long as we fix up the naming and documentation surrounding usage!
As for ActivatorContent and SelectedTemplate... couldn't they just be merged now? Don't we have access to the files within the ActivatorContent context?
For naming I have no clue, CustomContent, FileUploadContent, FileUploadTemplate, ... I'll let people better at naming than me decide :')

That being said IActivator I think caused more issues than it solved

You're right, your implementation makes sense, it's more flexible, and less magic behind the scenes with the IActivatable. I'm happy as long as we fix up the naming and documentation surrounding usage!
As for ActivatorContent and SelectedTemplate... couldn't they just be merged now? Don't we have access to the files within the ActivatorContent context?
For naming I have no clue, CustomContent, FileUploadContent, FileUploadTemplate, ... I'll let people better at naming than me decide :')

So do we want to rename them now? I like the idea of them being separate so the user can use the default setup and still customize or not show the files as they choose. (For example if they upload immediately they might just want to show a progress bar)

I'd say we should definitely rename ActivatorContent with this PR for clarity, the rest is extra and up to the team 🤷🏼♂

Docs Layout, added Basic

Modified lots of the text, wording, and layout of previous examples
Added a Drag and Drop example taking advantage of the new DragAndDrop and Dragging properties.

Added popular custom examples


Update and rename Downloader Script.txt to Downloader Script.js

Filename extension update; Auto-updating URL added

Thank you, good addition I forgot about that.


Upload without registation

Just wondering what exactly would need to be changed to allow users to upload without registering?
Looking to host a free image upload site that's quick to use for friends and this base looks amazing and is smooth to use.

Currently it's not possible to allow anonymous users to upload anything, but you could change the UploadController to remove the checks for upload-tokens and to set the user associated with the images to a predefined account.


/android/node_modules/react-native/ReactAndroid/gradle.properties (No such file or directory)

Description
It suddenly faced an issue on this topic
/android/node_modules/react-native/ReactAndroid/gradle.properties (No such file or directory)
React Native Version
0.71.4
Output of npx react-native info
System:
OS: macOS 13.2.1
CPU: (8) arm64 Apple M2
Memory: 74.38 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 19.4.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.2.0 - /opt/homebrew/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.3 - /Users/sahandmahdavi/.rvm/gems/ruby-2.7.5/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9123335
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.17 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.4 => 0.71.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
when I trigger yarn android the issue raises.
Snack, code example, screenshot, or link to a repository
Commented this:
apply from: "../../node_modules/react-native/react.gradle"
Added This:
apply plugin: "com.facebook.react"
`* What went wrong:
A problem occurred configuring project ':app'.

Failed to notify project evaluation listener.
/Users/sahandmahdavi/Documents/GitHub/letsact-app/android/node_modules/react-native/ReactAndroid/gradle.properties (No such file or directory)`

Fixed thanks.

for React Native 0.72.6 I solved this issue with the above solution and also including the configuration mentioned here https://reactnative.dev/docs/react-native-gradle-plugin

@ceberm I have done the changes mention in the docs but still i'm facing this issue. React Native - 0.73.0

I am facing a similar issue too.
I have a monorepo of two RN Apps (both running on RN 0.73.2) and a shared JS module. When I try running the first app on Android, it throws me the error -

Did anyone face/ solve this?

This is how my build.gradle looks like (android/app)

@DivyatejaChe I am not sure how your folder structure looks like, but you may need to add another double dot slash:
reactNativeDir = file("../../../../node_modules/react-native")
codegenDir = file("../../../../node_modules/@react-native/codegen")
cliFile = file("../../../../node_modules/react-native/cli.js")

That's where I made a mistake, because I forgot that I am in the android/app/build.gradle file

https://reactnative.dev/docs/react-native-gradle-plugin

You saved my day!

This is how my build.gradle looks like (android/app)

@DivyatejaChe I am not sure how your folder structure looks like, but you may need to add another double dot slash:
reactNativeDir = file("../../../../node_modules/react-native")
codegenDir = file("../../../../node_modules/@react-native/codegen")
cliFile = file("../../../../node_modules/react-native/cli.js")

That's where I made a mistake, because I forgot that I am in the android/app/build.gradle file and not in android/build.gradle 😅

You saved my day!

I also have the same problem

Where:
Build file 'E:\aiozswap\apps\interface\android\build.gradle' line: 21

What went wrong:
A problem occurred evaluating root project 'aiozswapapp'.

Failed to apply plugin 'com.facebook.react.rootproject'.
A problem occurred configuring project ':app'.
Failed to notify project evaluation listener.
E:\aiozswap\apps\interface\node_modules\react-native\ReactAndroid\gradle.properties (The system cannot find the path specified)

with settings.gradle using monorepo was hoisted module to root folder:
pluginManagement { includeBuild("../../../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'aiozswapapp'
include ':app'
includeBuild('../../../node_modules/@react-native/gradle-plugin')
metro.config.js:
`const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config')
const { FileStore } = require('metro-cache')
const path = require('node:path')
const { wrapWithReanimatedMetroConfig } = require('react-native-reanimated/metro-config')
const projectRoot = __dirname
const workspaceRoot = path.resolve(projectRoot, '../..')
const configRoot = getDefaultConfig(projectRoot)
configRoot.watchFolders = [workspaceRoot]
configRoot.resolver.nodeModulesPaths = [
path.resolve(projectRoot, 'node_modules'),
path.resolve(workspaceRoot, 'node_modules'),
]
configRoot.cacheStores = [new FileStore({ root: path.join(projectRoot, 'node_modules', '.cache', 'metro') })]
/**

Metro configuration
https://reactnative.dev/docs/metro

@type {import('metro-config').MetroConfig}
*/
const config = {}

module.exports = mergeConfig(configRoot, wrapWithReanimatedMetroConfig(configRoot))
`

I also have the same problem

Where:
Build file 'E:\project\apps\interface\android\build.gradle' line: 21

What went wrong:
A problem occurred evaluating root project 'project'.

Failed to apply plugin 'com.facebook.react.rootproject'.
A problem occurred configuring project ':app'.
Failed to notify project evaluation listener.
E:\project\apps\interface\node_modules\react-native\ReactAndroid\gradle.properties (The system cannot find the path specified)

settings.gradle:
pluginManagement { includeBuild("../../../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'project'
include ':app'
includeBuild('../../../node_modules/@react-native/gradle-plugin')

metro.config.js:
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config')
const { FileStore } = require('metro-cache')
const path = require('node:path')
const { wrapWithReanimatedMetroConfig } = require('react-native-reanimated/metro-config')

const projectRoot = __dirname
const workspaceRoot = path.resolve(projectRoot, '../..')

const configRoot = getDefaultConfig(projectRoot)

configRoot.watchFolders = [workspaceRoot]
configRoot.resolver.nodeModulesPaths = [
  path.resolve(projectRoot, 'node_modules'),
  path.resolve(workspaceRoot, 'node_modules'),
]

configRoot.cacheStores = [new FileStore({ root: path.join(projectRoot, 'node_modules', '.cache', 'metro') })]

/**
 * Metro configuration
 * https://reactnative.dev/docs/metro
 *
 * @type {import('metro-config').MetroConfig}
 */
const config = {}

module.exports = mergeConfig(configRoot, wrapWithReanimatedMetroConfig(configRoot))


Support merging conflicts with moved files.

Previously, moved files were removed from one group and added to
another. This caused the build files referencing them to remain
dangling. This was solved by identifying files that were moved and using
the appropriate functions to move them.

F&Sed


feat: introduce environment variables for args

adds fallack to environment variables the --no-version-check command line argument (FLUTTER_VERSION_CHECK)

Fixes: #107046
Signed-off-by: TheOneWithTheBraid<EMAIL_ADDRESS>Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
List which issues are fixed by this PR. You must list at least one issue.
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated/added relevant documentation (doc comments with ///).
[ ] I added new tests to check the change I am making, or this PR is test-exempt.
[ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Thank you for contributing! You will need to get all CI tests (other than luci-flutter) passing before this will PR will be reviewed.

Thank you for contributing! As you have not responded within 3 weeks, I will be closing this PR as stale. If you are still interested in landing this, feel free to rebase this PR upstream, address code review feedback, and re-open this PR.


flutter IOS: got throwToolExit error when running on simulator

I am trying run my application on IOS simulator, After pod install and run application I got this error:
[+2469 ms] Could not build the application for the simulator.
[   +2 ms] Error launching application on iPhone 11 Pro.
[   +3 ms] "flutter run" took 32,047ms.
[   +4 ms]
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:669:9)
           <asynchronous suspension>
           #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1125:27)
           <asynchronous suspension>
           #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #4      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
           <asynchronous suspension>
           #5      FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
           <asynchronous suspension>
           #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
           <asynchronous suspension>
           #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #10     main (package:flutter_tools/executable.dart:92:3)
           <asynchronous suspension>

[ +255 ms] ensureAnalyticsSent: 253ms
[   +1 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 1

This is my doctor:
alt@alts-MacBook-Pro ~ % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.3, on macOS 12.0.1 21A559 darwin-x64, locale
    en)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.62.0)
[✓] Connected device (2 available)

• No issues found!
alt@alts-MacBook-Pro ~ %

What is the problem ? and how could I found what is the problem?

@tazik561
Can you provide flutter run --verbose and ios/podfile ?  The log will be huge, so you can put that in a text file and share it here.

@tazik561 Can you provide flutter run --verbose and ios/podfile ? The log will be huge, so you can put that in a text file and share it here.

How can I save all output from flutter run --verbose to text? because its so long

@tazik561 Can you provide flutter run --verbose and ios/podfile ? The log will be huge, so you can put that in a text file and share it here.

This is flutter run
https://drive.google.com/file/d/1tKwqo2ms-tjX2tXFF_lEyecFVN54GBpi/view?usp=sharing
and this is pod file :
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

@tazik561
From the log, it's failing due to below error:
` /Users/alt/Mobile/Sdk/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.2.0/ios/Classes/FLTWebViewFlutterPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
               #import <Flutter/Flutter.h>
                       ^~~~~~~~~~~~~~~~~~~`

I guess that's because the plugin doesn't seem to support arm64 simulator and maybe you are hitting https://github.com/flutter/flutter/issues/85713. Can you try to switch to latest master and try again to see if it works ?
flutter channel master
flutter upgrade


how many frames generated by the Hi3D for once.

I see your demo is rendered at range of 360°,  how many frames generated by the Hi3D,
the SVD model generate video is usually less than 25 frames, and they can not cover 360° views with continue renderings，how does  Hi3D achieve this ?

Hello, Hi3D generates 16 frames at a time, with the 16 frames being uniformly sampled in azimuth. For the specific implementation, you can refer to our paper.


Type safety of the C++ code

This issue is to discuss issues and possible improvements to enhance the type safety of the C++ code, and thereby increase the maintainability.
The main issue that I can see is the int dtype.  This is used as a index into arrays of function pointers, and occasionally there are large switch statements to select amongst the various possible types.  This has the effect of moving all of the type checking to runtime, and the compiler is not able to detect a large class of potential bugs.  It is rather fragile (eg if you changed the order of Float and Int64 in the enumeration, then it will break the library in very hard-to-detect ways). Extending the supported types (eg with a float128 or a bigint) would be very difficult, and require intrusive changes to many files.  If two such extensions were done independently, then using both additions at the same time would not be possible.

I have put a sketch of what a std::variant-based version of the Storage, Tensor, Scalar etc classes might look like on: https://godbolt.org/z/fhqo7GKqs
The top part is just some helper functions, the actual code starts around line 87:
using dtypes = std::variant<std::complex<double>, std::complex<float>, double, float, int>;

which is easily extensible to whatever types you want.  It isn't possible to use exactly the same set of types, since void isn't allowed in a std::variant, but if some other dummy type was used instead (cytnx_void perhaps?) then it would be possible to get Tensor::dtype() to return the identical index to what it does currently, so it should be possible to drop it in and progressively refactor the functions that are currently called via function pointer tables later on.
The example code at the end simulates some simple operations,
int main() {
   // Create a Scalar and Tensor
   Scalar s1(3.0);  // Scalar holding a double
   Tensor t1;
   t1.storage = Storage<double>{};  // Tensor holding a Storage<double>

   // Multiply Tensor by Scalar
   Tensor t2 = Mul(t1, s1);  // This should call Mul(Storage<double>, double)

   // Multiply Tensor by another scalar type (int for example)
   Tensor t3 = Mul(t1, 2);  // This should call Mul(Storage<double>, int)

   Tensor t4;
   t4.storage = Storage<std::complex<float>>{};

   Tensor t5 = Mul(t4, s1);  // product of a complex<float> tensor and double should produce a tensor of complex<double>
}

It is all fairly type-safe.  As an example, during testing I added the example for multiplication of complex<float> without adding complex<float> to the dtype variant first, and got an error:
> 203:46: error: no match for ‘operator=’ (operand types are ‘Tensor::StorageType’ {aka ‘std::variant<Storage<std::complex<double> >, Storage<double>, Storage<float>, Storage<int> >’} and ‘Storage<std::complex<float> >’)
>   203 |    t4.storage = Storage<std::complex<float>>{};

It is possible to construct a Storage<T> of any type, but you can't put it into a Tensor unless it is a supported type.

A backward of the new and current design of Scalar is that Scalar cannot be used while iterating a container which is Storage and Tensor. Because Scalar cannot be a pointer or a reference of the element in the container.
using dtypes = std::variant<std::complex<double>, std::complex<float>, double, float, int>;

struct Scalar {
   dtypes _elem;  // or shared_ptr<dtypes> if you want shared reference semantics on copying

   template <typename T>
   Scalar(T const& x) : _elem(x) {}

   template <typename T>
   Scalar& operator=(T const& x) { _elem = x; return *this; }

   // etc

};

Besides using invariant, do we consider just templatizing everything? For example, if Tensor is also templatized then we may not need to use visit in this function
// copy from @ianmccul 's godbolt
template <typename T>
Tensor Mul(const Tensor& x, T y)
{
   return std::visit([&](auto&& x) -> Tensor {
      Tensor result;
      result.storage = Mul(x, y);
      return result;
   }, x.storage);
}

On the question of templatizing everything, the python interface cannot be templatized, so at some level there needs to be type erasure.  I guess that could be a PyObject, keeping everything in C++ as a template, but then the C++ interface would be completely different from the Python interface.  It would be useful though to have a type-safe version of Tensor. Eg, TypedTensor<T>, that actually defines tensor operations, contractions, etc and Tensor contains a std::variant of the different possible TypedTensor<T>.

I agree with this issue and also suggest we make Tensor typed.
For iterating a tensor, we do not have to worry about the physical location storing the data and symmetries. The data in Storage may be stored at different locations (GPU or elsewhere). We still need to design iterators for Storage. At the same, the location where the data is stored does not restrict us from designing iterators for Tensor. And then, the symmetry properties are bound with UniTensor instead of Tensor. Tensor is just a container with shapes. In this context, it's fine to design an iterator for Tensor.
Although, the job needing iterators of Tensor can be done by using the iterators of Storage, which is a 1-D array, the iterators of Tensor let the user be able to iterate the data with the shape of the Tensor. For example, the iterators of Tensor will make "doubling one row of a matrix" more straightforward.
The necessity to make Scalar as a value pointed by the iterators of Tensor or Storage depends on the function interfaces of the linear algebra. If the functions consume type-less Tensor or Storage or we allow users to iterate over type-less Tensor or Storage, we should have a class representing the type-less scalar.

Sure, it would be very easy to make a typed version of Tensor, and then the untyped version can use a variant to store the options (the actual type would be given by the alias VariantMap_t<dtypes, Tensor>).  I guess there is a question on the naming - in C++ code there probably isn't much reason to use a type-erased UntypedTensor, since in practice you would either know the type, or if you don't know the type then you could make it a template.  But there surely is a use in the Python interface for a dense Tensor.  So perhaps Tensor should remain as the type-erased version, and have a new type for the template?  BasicTensor<T> perhaps?

And it probably makes sense for UniTensor to be a template as well, right?    Is there anything now that forces a UniTensor to contain all the same dtype in each block?  Is there a use case for them to be different?

For creating typed Tensor and typed Storage, I published the proposal at #500.

I am confused. Whats wrong with the iterator? We have a Proxy class that was design to do that. Its carrying a pointer so that the lval and rval get/set item can be done with single interface to support both the following semantic:
x[3] = 0.5;
y = x[3];

Another reason for this proxy is that one might access elements from a BlockUniTensor that does not exists, then the proxy allows you to check that.

And it probably makes sense for UniTensor to be a template as well, right?  Is there anything now that forces a UniTensor to contain all the same dtype in each block? Is there a use case for them to be different?

There is a need to have different blocks to be on different devices (which its also another "type"). Another potential use case is mix precision/ hybrid precision on different blocks. Its probably better to keep this flexibility than restrict all blocks to be same type/device

On the question of templatizing everything, the python interface cannot be templatized, so at some level there needs to be type erasure. I guess that could be a PyObject, keeping everything in C++ as a template, but then the C++ interface would be completely different from the Python interface. It would be useful though to have a type-safe version of Tensor. Eg, TypedTensor<T>, that actually defines tensor operations, contractions, etc and Tensor contains a std::variant of the different possible TypedTensor<T>.

wrapping and unwrapping PyObject is a very expensive operation, so usually you want to avoid it.

@kaihsin said:

I am confused. Whats wrong with the iterator? We have a Proxy class that was design to do that. Its carrying a pointer so that the lval and rval get/set item can be done with single interface to support both the following semantic:
x[3] = 0.5;
y = x[3];

You don't use Scalar to do iteration

I guess @IvanaGyro was talking about a (hypothetical) typed version of an iterator?  TProxy is very expensive, you wouldn't want to use it in performance critical code.  I tried a simple benchmark:
#include "cytnx.hpp"
#include <iostream>
#include <vector>
#include <chrono>
#include <cassert>

using namespace cytnx;
using namespace std;

class SimpleMatrix {
   public:
      SimpleMatrix(int rows, int cols) : rows_(rows), cols_(cols), storage_(rows*cols) {}

      double& operator()(int r, int c) { assert(r >= 0 && r < rows_ && c >= 0 && c <= cols_); return storage_[r*cols_ + c]; }
      double operator()(int r, int c) const { assert(r >= 0 && r < rows_ && c >= 0 && c <= cols_); return storage_[r*cols_ + c]; }

   private:
      int rows_;
      int cols_;
      std::vector<double> storage_;
};

int const N = 1000;
int const num_iterations = 10;

int main() {
   // Benchmark cytnx::Tensor
   double tensor_total_time = 0.0;
   for (int iter = 0; iter < num_iterations; ++iter) {
      auto start = chrono::high_resolution_clock::now();

      Tensor A({N, N}, Type.Double);
      for (int i = 0; i < N; ++i) {
         for (int j = 0; j < N; ++j)
         {
            A(i,j) = i-j;
         }
      }

      auto end = chrono::high_resolution_clock::now();
      chrono::duration<double> duration = end - start;
      tensor_total_time += duration.count();
   }

   double tensor_avg_time = tensor_total_time / num_iterations;
   cout << "Average time for Cytnx Tensor: " << tensor_avg_time << " seconds" << endl;

   // Benchmark SimpleMatrix
   double simple_matrix_total_time = 0.0;
   for (int iter = 0; iter < num_iterations; ++iter) {
      auto start = chrono::high_resolution_clock::now();

      SimpleMatrix B(N, N);
      for (int i = 0; i < N; ++i) {
         for (int j = 0; j < N; ++j)
         {
            B(i,j) = i-j;
         }
      }

      auto end = chrono::high_resolution_clock::now();
      chrono::duration<double> duration = end - start;
      simple_matrix_total_time += duration.count();
   }
   double simple_matrix_avg_time = simple_matrix_total_time / num_iterations;
   cout << "Average time for SimpleMatrix: " << simple_matrix_avg_time << " seconds" << endl;
}

With no optimizations (g++ -O0 ./bench.cpp) this gives

Average time for Cytnx Tensor: 0.674874 seconds
Average time for SimpleMatrix: 0.00317587 seconds

With optimizations (g++ -O3 ./bench.cpp):

Average time for Cytnx Tensor: 0.229474 seconds
Average time for SimpleMatrix: 0.000544618 seconds

Yes. I agree. Another reason for that slowdown is the accessor overhead. I believe that is another hotspot.

@kaihsin said:

@ianmccul  said:

And it probably makes sense for UniTensor to be a template as well, right?  Is there anything now that forces a UniTensor to contain all the same dtype in each block?

To answer my own question, yes, https://github.com/Cytnx-dev/Cytnx/blob/fa4596e1620cc304f698286905818a2118b2bd8e/include/UniTensor.hpp#L655
constrains a UniTensor to only hold blocks of the same dtype.

Is there a use case for them to be different?

There is a need to have different blocks to be on different devices (which its also another "type"). Another potential use case is mix precision/ hybrid precision on different blocks. Its probably better to keep this flexibility than restrict all blocks to be same type/device

I think there is some confusion, I was referring to the dtype, as the enumeration of the different concrete types that a tensor can hold.  The device() parameter is a different quantity, and as far as I can tell it is completely independent of the dtype.  (It is also a possible candidate to store in some kind of variant, but that is a separate topic so I will not mention that further here!).
I cannot think of a situation where it is useful to have different types for each block.  It would add a lot of complexity, and operations that need to return a common type of each block (norm, trace, etc) would need to iterate through the blocks and find a common type.  And there would be issues, for example if you have a UniTensor that contains some blocks that are float and some blocks that are double, and you calculate the norm.  To what precision should the norm be calculated?  Clearly the overall norm should be a double, but should the blocks that are float be promoted to double first?  That would make a difference to the result!
But the point is, with good generic design it would be possible to get both possibilities, if you wanted.  For an example sketch:

// Start with a concrete tensor, parametrized by the data type

template <typename T>
class TypedTensor {
   using value_type = T;
   // uses Storage<T> as the backing store
};

// implement functions for TypedTensor<T>
double norm(TypedTensor<double> const& t) {
    return ...
}

// or as a template, where possible
template <typename T>
auto norm(TypedTensor<T> const& t) -> decltype(norm(T())) {
    return ...
}

// now a Tensor type, that can store a TypedTensor<T> for any type T in dtypes

class Tensor {
   // helper alias for std::variant<TypedTensor<float>, TypedTensor<double>, ...>
   using TensorVariant =  VariantMap_t<TypedTensor, dtypes>;

   using value_type = Scalar;
   TensorVariant data_;
};

// implement Tensor operations by visitor pattern on t.data_
Scalar norm(Tensor& t) {
   return std::visit(norm, t.data_);
}

// Now we move onto a UniTensor, adding symmetry....

// implementation helper is a templated UniTensor, templated on the block type
template <typename BlockType>
class BasicUniTensor
{
   using value_type = typename BlockType::value_type;
   std::vector<BlockType> blocks_;
}

// implementation of functions for UniTensor<BlockType>.  In most cases, these should be possible
// to implement as a template function.
template <typename BlockType>
auto norm(BasicUniTensor<BlockType> const& t) -> typename BlockType::value_type
{
   // calculate norm of each block ...
}

// alias for a TypedUniTensor, with the same type on each block
template <typename T>
using TypedUniTensor = BasicUniTensor<Tensor<T>>;

// The current implementation of UniTensor is roughly equivalent to this:
class UniTensor
{
   // an alias for std::variant<TypedUniTensor<float>, TypedUniTensor<double>, ...>
   using UniTensorVariant = VariantMap_t<TypedUniTensor, dtypes>;
   using value_type = Scalar;

   UniTensorVariant data_;
};

// dispatch operations on a UniTensor using visitor pattern
Scalar norm(UniTensor const& t)
{
   return std::visit(norm, t.data_);
}

// Alternatively, we could have a version of UniTensor that allows each block to have a different type.
// This is simply a typedef!
using BlockTypedUniTensor = BasicUniTensor<Tensor>;

// The following should "just work", given complete implementations of the above
int main()
{
   UniTensor t1;
   std::cout << norm(t1) << '\n';   // calls norm(UniTensor), then dispatches to the norm for whatever type

   TypedUniTensor<double> t2;
   std::cout << norm(t2) << '\n';  // calls norm(BasicUniTensor<TypedTensor<double>>)

   BlockTypedUniTensor t3;
   std::cout << norm(t3) << '\n';  // calls norm(BasicUniTensor<Tensor>)
}


fix(aot): Remove listeners if there is an error with opening the AOT window

Does this PR need to be updated?


improve test stability

Why are these changes needed?

improve compatibility test stability by increasing the initial wait time in liveness/readiness probe.
remove unnecessary gofumpt run in Makefile.

Related issue number
N/A
Checks

[ ] I've made sure the tests are passing.
Testing Strategy

[ ] Unit tests
[X] Manual tests
[ ] This PR is not tested :(

What's the reason the test takes that long to finish?

@Jeffwan I did some investigation, it looks like the root cause for the failure and long waiting time is because in our test environment, the initial delay seconds is too small.  I am working on this right now.

Currently seems it has two issues

flaky and unstable issue - sometimes succeed and sometimes failed
takes long time to finish

If we can resolve the flake issue and reduce running time to 10mins, that would be great.

From what i observed, when we killed the head node in a ray cluster in our github testbed, the worker readiness probe can fail for more than 30 seconds. This will lead to our default readiness probe getting involved and kill the worker node.
I increased the readiness probe timeout to 40 seconds for now.
FYI: @iycheng @brucez-anyscale @Jeffwan @scarlet25151 @DmitriGekhtman

@iycheng I think the worker node readiness or liveness do not depend on head node. Because if worker node cannot connect head node, it will return healthy.
Can you confirm?

Yes. Tested here https://github.com/ray-project/ray/blob/master/dashboard/modules/healthz/tests/test_healthz.py#L32

@wilsonwang371 Can you confirm the worker issue is caused by head node down?

@wilsonwang371 Can you confirm the worker issue is caused by head node down?

this is due to probe timeout is not big enough for kind cluster


Last deleted item always comming back

Everytime I select multiple itens just for view, not upload, and I delete them to select new ones, the last deleted file comes back with selected files.
e.g.: I select files: 'a', 'b', 'c', and I delete all, being 'c' the last one deleted. Then I select 'd' and 'e', in this new selection, file 'c' appears in the list too.
Anyone has already seen something like this? And how could I solve it?
Note: I used the complete example to make a custom dropzone. In my case, the file list appears above dropzone, not inside.

Hey there @LeninBoccardo !!!
Thanks for creating the issue.
Unfortunately we couldn't reproduce the behaviour you described. As you can see in the video above we used the complete example .
In order to help you, we kindly ask you to provide us a link to a git repo or a codesandbox (you can fork the "complete example") or even a screenshot of the code.
Thanks in advance.
https://user-images.githubusercontent.com/43678736/208829225-65602331-3fe3-47c7-8830-99b488bbfea2.mp4

The project I'm working is from my company, then I can't provide the full code but some screenshots are allowed:

First picture is the variables that control states
Second one is the functions used to handle the dropzone and file Items
Third is the dropzone code
Fourty and fifthy is the FileItems list
Last one is the result

https://user-images.githubusercontent.com/55263449/208902252-0a125c28-776f-47d7-ae82-0c724130a24b.mp4
This is a video showing the problem

Hi @LeninBoccardo !!
After checking your code in the screenshots and testing it (we rewrited it in a test project 👀 ).
We found that the error is located in the 2nd picture in the last line. Instead of:
  const getFiles = () => filesData.length && filesData.map((f) => f.file);

you should write:
  const getFiles = () =>  filesData.map((f) => f.file);

Because the value of the filesData.length is 0 when the user deletes all the files one by one, the function getFiles will not be executed correctly and will cause a bug.
Try changing that line and tell us if that worked for you.
Thanks in advance.

@JinSSJ3 , I can't believe such a tiny code was causing all trouble. It worked for me, thanks for your help.


Consistently reference jq version 1.6

I'm still opposed to default expression language being jq for a number of reasons, but if it must be referenced then it should be referenced with a specific version.
Please specify parts this PR updates:

[x] Specification
[ ] Schema
[ ] Examples
[ ] Extensions
[ ] Roadmap
[ ] Use Cases
[ ] Community
[ ] TCK
[ ] Other

What this PR does / why we need it:
To avoid implying that post-1.6 jq expressions are portable.
Special notes for reviewers:
n/a
Additional information (if needed):
n/a

Thank you for the PR. We will address this as a global update before our 1.0 release. Have a great day.


Getting-started footer should only show Legal and Privacy links

Comparing:
https://main--vonage--hlxsites.hlx.page/unified-communications/getting-started-account-super-user/support-resources

to:
https://www.vonage.com/unified-communications/getting-started-account-super-user/support-resources/

Per discussion with the customer, closing this issue as it's not necessary to replicate the getting-started-account-super-user pages.