Elaborate stringify failure error message

I noticed the following error:
The "value" parameter cannot be stringified to JSON.
It took me hours to fully understand this JSON.stringify error notice.  I wasn't sure what to do.  I spent a lot of time trying to convert to buffer, check if my code had an error, etc.  What I did not know is that we JSON.stringify() cannot handle circular objects.  For example, DOM are often circular.
Mozilla explains this very well in their docs.  An easy way to resolve this is to use json-cycle.  It would have been very helpful if the error message said something like this
throw new Error('Unable to complete JSON.stringify().  Maybe decycle your object before storing.');
It would also be great if you updated the key-value store documentation to somethings like this:

Record data, which can be one of the following values:
If null, the record in the key-value store is deleted.
If no options.contentType is specified, value can be any JavaScript object and it will be stringified to JSON.
If options.contentType is specified, value is considered raw data and it must be either a String or Buffer.
For any other value an error will be thrown.  JSON.stringify() cannot resolve circular objects.  Maybe use https://www.npmjs.com/package/json-cycle to decycle your object before storage to get around this.

Hi @jonathanstanley, thanks for the report.
You can also use Node.js' native util.inspect() to deal with circular references. This way, you don't have to include another dependency in your project.
As far as the error message and documentation improvements go, I'd rather keep it simple. I would like to think that the fact that circular objects cannot be stringified to JSON is common knowledge and one of the first things to check, but I'd like to hear others' opinion too. @mtrunkat @jancurn

Thanks for the suggestion for util.inspect() !  I'm surprised the Mozilla docs recommend cycle.js and do not mention util.inspect.
As far as I understand it, the only reason the JSON will not stringify is if it is cyclical.  If so, I'd certainly think best practice is to give direction or solution guidance (see 6. of the article)
Or alternatively, couldn't you also change the SDK to use util.inspect() instead of JSON.stringify()?
Thanks!

@jonathanstanley We're not using util.inspect() because it modifies the source object and it's best practice to leave it to the user to decide what to do with his objects, instead of 'magically' modifying them behind the scenes.
I actually checked and the original error message when converting a circular object is very specific about the fact that you're converting a circular object and we're swallowing it, so you're right. I'll make the change.


drawRect() throws on locator.debug.showPatches==true

The title says it all... following the documentation I wanted to activate the locator.debug options to show the located patches:
locate: true,
locator: {
    patchSize: "medium",
    halfSample: true,
    debug: {
        showCanvas: true,
        showPatches: true
    }
}

Unfortunately, I get the following error in console output: Uncaught TypeError: Cannot set property 'strokeStyle' of null (in drawRect <- boxFromPatches <- findBoxes <- locate <- getBoundingBoxes <- locateAndDecode). Seems that the function parameter ctx as _canvasContainer.ctx.binary is undefined.
I'm using the current master commit (117ab05).
Thanks in advance,
Matthias

As already pointed out in #96, make sure to not use web-workers. Due to a configuration-missmatch, you currently have to define showCanvas twice:
{
locator: {
    showCanvas: true,
    debug: {
      showCanvas: true
    }
}

Using the web worker was the problem, setting numOfWorkers: 0 and your temporary config "hack" worked. Thanks so much!


userextras headers lost in exchanger.ProxyConnect

when i add extra header in http request to clusternet proxy（clusterrole rule is already  added before），such as
$ curl -k -XGET  -H "Accept: application/json" \
  -H "Impersonate-User: clusternet" \
  -H "Authorization: ${PARENTCLUSTERAUTH}" \
  -H "Impersonate-Extra-**MY-EXTRA-HEADER**: xxxxxx" \

i found that the exchanger  can not  receive MY-EXTRA-HEADER from the httprequest in exchanger  ProxyConnect func；
but if i add a prefix “clusternet” before my header，the  httprequest in exchanger  ProxyConnect func  can receive it and works well；
$ curl -k -XGET  -H "Accept: application/json" \
  -H "Impersonate-User: clusternet" \
  -H "Authorization: ${PARENTCLUSTERAUTH}" \
  -H "Impersonate-Extra-**clusternet-MY-EXTRA-HEADER**: xxxxxx" \

I wonder why only http header with “clusternet” prefix can pass to the exchanger.ProxyConnect？ could somebody please explain the reason to me？

i found that the exchanger can not receive MY-EXTRA-HEADER from the httprequest in exchanger ProxyConnect func；

Please try clusternet-MY-EXTRA-HEADER.

i found that the exchanger can not receive MY-EXTRA-HEADER from the httprequest in exchanger ProxyConnect func；

Please try clusternet-MY-EXTRA-HEADER.

i  just can‘t find  where is the filter for clusternet header，is this setted in clusternet-hub  ？ or apiserver impersonate mechanism originally works like this？

or apiserver impersonate mechanism originally works like this？

By default all the headers will be deleted from the http.Request objects after authentication.

but in my test，header set in http.request without  Impersonate-Extra- can pass to the exchanger.ProxyConnect，only headers setted as impersonate-extra will be filter  by the clusternet prefix；

I  have  readed  kubernetes-1.23.8\staging\src\k8s.io\apiserver\pkg\endpoints\filters\impersonation.go   func  WithImpersonation（），it changes header from impersonate-extra  to  user-extra，but it seems no special delete  for user-extra subresource；
I think it maybe happened in conversion  from user-extra to x-remote-extra；is it right？ can you give me some hint for the clusternet trick？
：）

the requirement is，i need to access not only apiserver，but also some application in clusternet  managed kubernetes，without direct access network，so the request need  to pass  through  clusternet-hub；
some application need to set their own header in the request，so  I'm trying to find a general method to let user set those headers，for example jenkins；
I think this is a common  requirement，if we can find a good way，maybe I can make a pr to enhance the clusternet ability  to access  apps in agent managed cluster；

the requirement is，i need to access not only apiserver，but also some application in clusternet managed kubernetes，without direct access network，so the request need to pass through clusternet-hub；
some application need to set their own header in the request，so I'm trying to find a general method to let user set those headers，for example jenkins；

You can add clusternet as prefixes for all extra headers. Then you can pass down all those headers to child clusters and applications running out there.

I have readed kubernetes-1.23.8\staging\src\k8s.io\apiserver\pkg\endpoints\filters\impersonation.go func WithImpersonation（）

Actually this has nothing to do with impersonation.

You can add clusternet as prefixes for all extra headers. Then you can pass down all those headers to child clusters and applications running out there

but this will mix clusternet system header logic with  app header logic， I think add another header perfix for custom headers and handle those in a special func  will be better， for example  “application” or  “custom ”；   so the question actually is how to add a customize prefix？

Actually this has nothing to do with impersonation.

so this trick is about apiserver  authentication to aggregate-apiserver？

but this will mix clusternet system header logic with app header logic， I think add another header perfix for custom headers and handle those in a special func will be better， for example “application” or “custom ”； so the question actually is how to add a customize prefix？

Currently clusternet only cares about a few known headers, such as clusternet-token. For your case, I think you can add clusternet-app- or clusternet-extra- as prefixes. That wont' be a problem.

so this trick is about apiserver authentication to aggregate-apiserver？

Yes, you're right. By default, after authentication, the extra headers are removed.

I found the trick here   ：）

this confused me several days，so clusternet need a customized apiserver code to build it's own apiserver；
thanks for the hint


Use 64 Bit Terminals on 64 WIndows

VSCode Version: 1.2.0-Insiders
OS Version: Windows 10

Steps to Reproduce:

The terminal opened by default is the 32bit terminal for cmd.exe or Powershell.exe
On 64 Bit OS Code should be interacting with the sysnative variants.

There is a sort of work around by adding the sysnative path like below, but this should be handled by default. The PowerShell Extension does this for it's terminal session.
{
    "terminal.integrated.shell.windows": "C:\\WINDOWS\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"
}

Using 32bit breaks a lot of modules and also causes issues when testing your code. PSReadLine is an example of one Module that breaks. One example that could cause problems in your code, is if you are testing something with parts of the registry, the 32 bit console is going to give you bad results since it will be giving you results for the wow3264Node instead.

@gerane see my comments on https://github.com/Microsoft/vscode/issues/6684#issuecomment-221459969 about my experiences with 64-bit powershell, back when powershell was the default.
Right now the default is %COMSPEC% which defines the default terminal for the environment, if powershell.exe or cmd.exe is used, it's grabbed off the path. So we're leaving it up to powershell and windows which bitness is selected.

@Tyriar On Windows, this is not going to be the desired way for this to function. Is it planned to be changed?
%SystemRoot%\sysnative does not actually exist, it functions as a folder redirect for 64bit systems. So if a 64bit system uses %SystemRoot%\sysnative it is reditected to %SystemRoot%\System32.
%SystemRoot%\SysWOW64 is actually what is being executed when running in a 32bit process on a 64bit machine. A 32 process targeting %SystemRoot%\System32 is redirected to %SystemRoot%\SysWOW64 and is the root of the problems. For a 32 bit process to actually run %SystemRoot%\System32, it has to use %SystemRoot%\Sysnative redirect. There are countless issues this will cause in the long run, any many of them may be silent to the end user. They may not find out until their code gets closer to production.
Here is a shorter diagram:
32Bit on 64Bit >> %SystemRoot%\System32\ >> %SystemRoot%\SysWOW64
32Bit on 32Bit >> %SystemRoot%\System32\ >> %SystemRoot%\System32\
32Bit on 64Bit >> %SystemRoot%\Sysnative\ >> %SystemRoot%\System32\

Thanks for the info @gerane, really useful!
So you would suggest that getWindowsShell, which powers both internal and external terminals, becomes "%SystemRoot%\sysnative\cmd.exe" or something similar? After the environment variable is resolved, querying c:\Windows\sysnative\cmd.exe should work?
Then maybe add a note about %SystemRoot%\sysnative in the Windows shell config descriptions? I'd prefer to avoid messing with the paths that users enter in their settings.json.

You would need to check the OS Arch and Process Arch, or since code doesn't have a 64 bit client, just check OS Arch, and if 64bit use sysnative. You can test this out by opening both %SystemRoot%\System32\cmd.exe and %SystemRoot%\syswow64\cmd.exe to see how these act.
Sysnative does not exist for a session that has normal access to %SystemRoot%\System32\. So 64bit  Process on 64bit OS and 32bit Process on 32bit OS can't use sysnative. Sysnative is just for use for 32 bit processes on a 64 bit OS.
If you use C:\Windows\syswow64\cmd.exe and run dir %SystemRoot%\sysnative\ it will return the contents of a C:\windows\sysnative\ directory even though it really doesn't exist. It is actually returning the contents of C:\windows\system32\.
Then if you use C:\windows\system32\cmd.exe and run dir %SystemRoot%\sysnative\ you get a File Not Found error.
I just wanted to bring up that this is a bigger issue on Windows than most realize. I have been heavily burned by this in the past and it cost me months of my time and a lot of gray hairs. I just wanted to try to help others avoid the same issues I have gone through in the past. Sometimes you don't realize an issue is even present until after the damage is done when dealing with Windows 32 bit redirections.
Even just running normal command line tools it is executing the 32bit versions instead of the 64 bit versions which could have some undesired results. Just look at reg.exe for example, most people don't use it's /reg:32 or /reg:64 flags, so it might not target the key they think it is targeting.

Ok, well I guess resolving this will involve:

Using a 64-bit terminal if available over %COMSPEC% as the default for internal and external terminals
(Maybe) Add a note to the config descriptions to guide Powershell users to choosing the correct bitness.

@gerane do you know how far back in Windows support for sysnative goes? Would it be reasonable to just set the default to c:\\Windows\\sysnative\\cmd.exe or would that fail on Windows 7 or something?

Just added this to settings:

@Tyriar sysnative is only present on 64 bit Windows. So you would have to determine what platform you are running on. Sysnative won't exist on 32bit Windows.
I think the comment should help those who are going to change it. Would it be beneficial to include a link to information about it? I know it is a confusing topic, and I even regularly see people offering advice on stack overflow or other forums that is incorrect. They often mix the paths up etc.

I'd prefer not to include a link to it, help is always available from our website if needed. After a few months to think about this, while it's tempting to hard code either sysnative on 64bit systems or system32 on 32-bit systems, that would break the %COMSPEC% feature which has been explicitly requested in the past. I think the comment is a good compromise and I haven't seen too many issues come in to do with bitness since so I think I'll close this one off.

Hi,
I am facing the same problem, What is the solution for this? thanks.

@shabbi75 the recommended config is here https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration

Thanks Tiyar for your kind reply. Really appreciate, but I dont see the folder "sysnative" in my windows folder, looking forward to your further help, thanks.

It's a special folder that you can't see in windows explorer, put it in your config and it should work on a 64-bit machine.

Thanks, could you please provide this information in detail that which config I need to change, thanks. I dont have any information for that, thanks.

For 64-bit powershell, add this to your settings.json file (File > Preferences > Settings):
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"

Sorry, am bothering you a lot.
I have searched my system and found below files, could you please advise me which one I need to change, thanks.

Best Regards,
Shabber Abbas Rizvi

You open it from within the applications file menu.

I don't see this please

That is visual studio, not visual studio code. Different product.


Data

As I've stated elsewhere I think the real power will come from being able to script multiple sites at once. For that we need to be able to keep a list of the user's sites and his/her jwt token (we don't need to store passwords) for that site.
My plan (and I've begun work on that in the PR #6 is that this is a json file next to the dll. The json file stores the sites with (a) a key, (b) a url and (c) the token. I plan to encrypt the token for security using SecureString. The key is used by the user to refer to that site (instead of having to hammer out the url every time he/she wants to run a command).

I got the token encryption working just now using DPAPI from Microsoft (like local secure string storage). Checking stuff off my list.

Very nice work @donker


First attempt to get Vive running wit OpenVR and Godot

Hi,
I cloned and compiled Openvr as explained successfully. However, my first stumble is in the readme at the "Linux otes" section: "You can place the libopenvr_api.so file alongside the libgodot_openvr.so file in the bin folder. "
Which "bin" folder are you referring to? Godot? Steam? My programm?
My second stumble is at the line "/home//.steam/steam/steamapps/" . There is no such folder called "steamapps" in my ./steam/steam folder. Is this because of the broken steam client?
As steam keeps crashing on my Ubuntu, I'd like to use the approach with the run.sh command and bypass as much steam as possible. (yeah I know I gotta use the lib a.s.o)  So I tried the following:

Imported the demo from the godot_openvr/demo folder. That runs on my screen find.
Exported the demo as a binary to /tmp/vrtest.x86_64
run: /home/user/.steam/steam/ubuntu12_32/steam-runtime$ ./run.sh /tmp/vrtest.x86_64
Result:
I see the same output on my screen as when I run the demo directly from godot. (It only throws the recursive error at me: ERROR: find_by_type_and_id: Condition ' p_tracker_id == 0 ' is true. returned: __null At: servers/arvr_server.cpp:305.

... aaand the Vive remains dark.
How can I debug the problem?

One more thing: I connected the Vive to my GeForce GTX 1070 via an HDMI to DVI adapter to my secondary out, as the primary HDMI port is used by my monitor.
Do I have to tell the demo somehow where to reach the Vive?

Ok, I updated the nvidia driver using:
apt-get install nvidia-driver-430
Now the Steam client runs without this error and installed steamvr.
However, in the console, it threw at least one error:
steam[2081]: LHR-FFA7BB43: Connected to receiver 3620D4F601 steam[2081]: 3620D4F601: Firmware Version<PHONE_NUMBER> @�kW steam[2081]: 3620D4F601: ERROR: firmware does not meet minimum required version<PHONE_NUMBER>). Please update device.
But at least steam finally runs its vr room setup. will update...

ok, good news and bad news. For the first time in about 3 years now, the vive steamvr demo runs under linux  and I can see my controllers + the default room of steamvr.
bad news: the openvr demo still only runs on the monitor and completely ignores the vive. it remains dark.

In the demo the .so files are already placed correctly - in demo/addons/godot-openvr/bin/x11/.
For your own game, make sure to place both libgodot_openvr.so and libopenvr_api.so in the same directory - where depends on your organization, really.
Now run Godot with /home/user/.steam/steam/ubuntu12_32/steam-runtime/run.sh /path/to/godot (or alternatively, the exported project) - alternatively, you could add Godot (or the exported project) to Steam directly "Add non-Steam game...".
If it still remains dark, check the log output in the terminal.

Ok, update: When I do "run.sh Godot_v3.1.1-stable_x11.64" and open the openvr demo and start it,
I very briefly see the Steam default room, then very shortly the OpenVR Demo and then the app crashes.
The Godot Log loops indefinitely to:

servers/arvr_server.cpp:305 - Condition ' p_tracker_id == 0 ' is true. returned: __null

Update: It works. Partially. The openvr demo crashes as soon as one controller becomes active.
The error log outputs only warnings, so no problem here.
The main log only says:
Controller vr_controller_vive_1_5_3 became active
Loading: vr_controller_vive_1_5
** Debug Process Stopped**

Ok, more insight:

When I place libopenvr_api.so and libgodot_openvr.so in the same folder with the binary of my exported demo, it also works. Nice!
I have to close Godot to make the freeze go away. I guess the load was to high for my system to calculate 3 views (vive, duplicate of vive on screen, godo 3d view).
When I start the openvr demo, it starts steamvr. When I kill the demo, the steamvr remains running. When I now start the demo again, the vive remains stuck in the SteamVR default room, trying to load the "Steam Home" application but failing. I therefore recommend to stop SteamVR before restarting one's own application.

I guess since the demo is running, I will gladly close this issue. Thanks for the support!

If you run the module from the master branch and Godot 3.1 it would crash when activating a controller -> the master version needs Godot 3.2 beta. I do recommend 3.2 anyway, as there have been other improvements for VR.
Also, I ought to fix that p_tracker_id == 0 issue, that is just because in the properties of the left controller the id is 0 when it should be 1.
Glad it works for you now though :)

Hey, I also had an issue with it, I found that it only works if I place the addon binary for linux in:
res://addons/godot-openvr/bin/x11/
If I import it seems to import the path to:
res://godot_openvr_1.1.0/addons/godot-openvr/bin/x11/ (note the extra godot_openvr_1.1.0 in the project path)
Which then fails to load.
I managed to figure out where to place it thanks the the error output on stdout when running godot from a terminal.


typo in koans/type-checking.lsp

In line 94, the docs in the test test-functionp
the functionp predicate is true iff the argument is a function
iff should be  if

The thought is iff stands for if and only if.


Closes upon execution for the .exe

I am currently in the process of attempting to find the problem, but I do not have enough time. I ask that you do not use <IP_ADDRESS> until then.
I will close the post when I fix the problem.

Deleted <IP_ADDRESS> from the releases, however it can still be found in the Old-Versions branch.


can't support my laravel 5.4 project

Hi
The package uses some features of Laravel which are not available in Laravel 5.4. When I first released the package Laravel 5.5 was the most recent version (it's also a LTS version) so I stuck to that.
I can only suggest to update your Laravel application to a newer version (or even better, to the latest version).
Laravel 5.4 also doesn't receive security fixes since January 2018 (See Laravel's support policy).


Update C and Fortran docs examples

This PR revises the C and Fortran examples in the docs based on recent updates to the babelizer.
Two other minor changes are included here:

Added a code of conduct document
Removed Sphinx makefiles from the docs directory in favor of nox -s build-docs

This fixes #95.

@mcflugen Are you OK with me removing Makefile and make.bat from the docs directory?

@mdpiper & @mcflugen, thanks for your work to update the documentation to the new build examples! We're looking forward to trying this new workflow.
Unfortunately, @Volk3rJ, @ptomasula, and I had quite a bit of trouble following your previous Babelizer documentation to build https://github.com/csdms/bmi-example-cxx. We're hoping for more success with this meson build approach.
Is it in your roadmap to provide a C++ example?

Is it in your roadmap to provide a C++ example?

@aufdenkampe Would you be willing to add an issue requesting a C++ example for the docs? My hunch, based on working on the C and Fortran examples, is that we'll find problems to be fixed along the way.


Right click from point A to point B

I dont know if that really is a bug or a feature :), but i noticed that I can draw with right click as well. Moreover if i Right click to point random point A and then click to a random point B it kind of draws a line between those two points(which might have unpleasant results if you paint for hours :P)

Nice spot! I've changed it so now only left click works.


Issue on mobile devices

When tag-input is the last input field in shadcn form we can enter tags as the button is submit but when it's not the last input the button is tab (to go to the next input), so we can't submit and no tag is entered.

Hey @codergigachad. To better assist you, could you please provide a few more details:
Version Information: Could you confirm the version of the package you are currently using? This will help us understand if you have the latest updates where the issue was addressed.
Code Snippet: Could you share a snippet of how you're implementing the autocomplete feature in your setup? This will help us identify any potential misconfigurations or specific use cases.
Browser and Environment: Which browser and version are you using? Also, are you seeing this behavior in a specific environment (e.g., development, production)?
Error Logs: Are there any console errors when you attempt to use the autocomplete feature or when the issue occurs?
Any additional information or screenshots you could provide would be greatly helpful in diagnosing the problem more accurately.
Thanks for your cooperation!

Got same issue, In mobile devices keyboard enter shows tab instead of enter.
Show Image

Version: 1.4.4
Snippet ( using shadcn Form )
// same from (https://emblor.jaleelbennett.com/introduction)
<FormField
    control={form.control}
    name="tags"
    render={({ field }) => (
        <FormItem>
            <FormLabel>Tags</FormLabel>
            <FormControl>
                <TagInput
                    {...field}
                    styleClasses={{
                        inlineTagsContainer:
                            "border-2 border-[#E4E6EA] p-2 rounded-2xl",
                        tag: {
                            body: "flex text-[#619A17] items-center gap-2 bg-[#EDFFD6] rounded-full",
                            closeButton:
                                "text-red-500 hover:text-red-600",
                        },
                    }}
                    className="sm:min-w-[450px]"
                    placeholder="Enter Tags (optional)"
                    tags={tags}
                    setTags={(newTags) => {
                        setTags(newTags);
                        setValue(
                            "tags",
                            newTags as [
                                Tag,
                                ...Tag[],
                            ],
                        );
                    }}
                    activeTagIndex={
                        activeTagIndex
                    }
                    setActiveTagIndex={
                        setActiveTagIndex
                    }
                />
            </FormControl>
        </FormItem>
    )}
/>


[BUG] UdonSharp prevents VRC SDK from being the correct version

Due to an issue with UdonSharp's package.json format, updating to 1.3.0 and beyond wont automatically update the VRC SDK to the required version, leading to a project that will open with compile errors due to missing namespaces
Related:
VCC #277
VCC #275
U# #125

the PR was merged, but the fix wont be live till there is a U# release. This will require a dependency bump on U#


Using resium offline

Is there anyway to use Resium offline? I notice in the network tab there are various dependencies that are coming from external sources.
How would I go about leveraging these resources in an offline setting?
Thanks

Whether an application can be used offline or not is not a Resium issue, but a build tool configuration issue: if you load React or other software from a CDN, it will not work offline, and if you build it including React and distribute the build results properly, it may work offline. If you build with React and distribute the build result properly, it may work offline.


Clamp the editor theme's base colors to avoid various issues

This fixes the profiler backgrounds being black when using the light editor theme (which is a regression from using a negative contrast setting by default for the Light preset).
Preview

Thanks!


Lots of CA1416 warnings in XAML generated code-behind files

Describe the bug
What the title says, really. These warnings only appear in the *.g.i.cs generated code-behind files, not in my user code.
Steps to reproduce the bug
Build this repro project.
Expected behavior
No warnings.
Version Info
NuGet package version: WinUI 3 - Project Reunion 0.8 Preview: 0.8.0-preview
Windows app type:

UWP
Win32

Yes

Windows 10 version
Saw the problem?

Insider Build (21390)
Yes

October 2020 Update (19042)

May 2020 Update (19041)

November 2019 Update (18363)

May 2019 Update (18362)

October 2018 Update (17763)

April 2018 Update (17134)

Fall Creators Update (16299)

Creators Update (15063)

Device form factor
Saw the problem?

Desktop
Yes

Xbox

Surface Hub

IoT

Oops. I meant to file this on the WinUI repo, as it is a bug in their code, not in Reunion generally. Please transfer if appropriate. Thanks!


[0.24] Stashed the image on quay.io to avoid rate limits (#297)

Same as https://github.com/openshift-knative/eventing-kafka/pull/297
/assign @maschmid

/lgtm

/test 47-e2e-aws-ocp-47


rolling_update: fix facts gathering delegation

this is kind of follow up on what has been made in #2560.
See #2560 and #2553 for details.
Closes: #2708
Signed-off-by: Guillaume Abrioux<EMAIL_ADDRESS>

jenkins test luminous-ansible2.4-update_cluster

jenkins test luminous-ansible2.4-update_docker_cluster

BZ?


Committing after adding changes related to access token payload injec…

…tion in ctx header and also added test case.
Description

Fixes # (issue)
Checklist

[ ] I have explained the need for this PR and the problem it solves
[ ] I have explained the changes or the new features added to this PR
[ ] I have added tests corresponding to this change
[ ] I have updated the documentation to reflect this change
[ ] I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Add a window resize easy

Contributing guidelines

[X] I have read CONTRIBUTING.md
[X] I have read CODE_OF_CONDUCT.md

Module(s)
winresize
Description
Please,
Create a module like this https://github.com/roxma/vim-window-resize-easy
With this will be easier to resize windows

Well, seems not that hard. I'll think about it.
I personally use <M-hjkl> in Normal mode for resizing, so it is not a big problem for me.

So It's a good idea too.
I'll use this  too, thanks

I've created this shortcut and It's good enough


Poll time widget

Fixes #16821
Testing plan:
GIFs or screenshots:

@zulipbot add "needs review"

@andersk I have fixed the issues pointed by you in the subsequent commits. Could you review this PR again and merge it?

@godlike786 thanks for working on this!  Please squash the fixes into the original commit that introduced the relevant bugs -- the goal is to make a readable branch consisting of atomically correct commits.
Check out the Zulip commit guidelines for more details: https://zulip.readthedocs.io/en/latest/contributing/version-control.html

@timabbott I have squashed the commits as you mentioned.

Thanks for working on this @godlike786!
Unfortunately, I think it really only makes sense to do a more generic feature for allowing the markdown processor to run on poll entries than something that allows doing so only if there's <time syntax involved.
Unfortunately, the architecture of our widgets doesn't make that super convenient to do without security model impact (switching to the frontend markdown processor for rendering user-facing content for other users, not just for yourself), which you needed to do to make this PR work anyway.  I'm not sure if that means we should abandon this or try to do a design for markdown-in-poll widgets more broadly.

@timabbott I could come up with writing a more generic markdown processor for the poll widgets.

Closing in favor of https://github.com/zulip/zulip/pull/28079.


When placed within a KeyboardAvoidingView it seems to avoid the keyboard twice

Bug description:
When placing the Webview within a KeyboardAvoidingView, the web page viewed gets some extra padding at the bottom. The green area in the screen shot is 100vh in height, so without the keyboard showing it is not possible to scroll the page. When the keyboard appears, the page is getting scrollable when it should not be.
I could sort of solve this issue by not using a KeyboardAvoidingView, but I guess that would cause other issues later on if I actually need that in place. My guess is that this is related to a known issue with Safari for Ios which seems to not resize the viewport correctly when opening the keyboard. I am not sure if my issue is even solvable by react-native-webview but it would be great to discuss possible workarounds anyway.
To Reproduce:
    <SafeAreaView style={{ flex: 1 }}>
      <KeyboardAvoidingView
        style={{ flex: 1 }}
        behavior={Platform.OS === "ios" ? "padding" : "height"}
      >
        <WebView
          style={{
            flex: 1,
            borderColor: "pink",
            borderWidth: 1,
            borderStyle: "solid",
          }}
          source={{ uri: "http://localhost:3001" }}
          hideKeyboardAccessoryView
          bounces={false}
        />
      </KeyboardAvoidingView>
    </SafeAreaView>

Expected behavior:
The page should not scroll.
Screenshots/Videos:

Screen shot when the view is scrolled to bottom. The grey area is the extra unwanted space.
Environment:

OS: IOS
OS version: 14.7.1
react-native version: Expo 42
react-native-webview version:

This is not an iOS-exclusive problem. It also happens on Android where there seems to an arbitrary amount of "grey space"... :/

same on ios, the problem still exists.

same on ios, the problem still exists.

Have you tried setting the scrollEnabled to true?
You can see in the docs

any fixed on this?

The fix in our case was to set scrollEnabled to false. This took waaaaaay too long to track down the cause of. iOS is weird.


Feature request: allow to choose relays when sending messages

When sending messages (e.g. events) via Client, they are sent to all connected relays. It would be useful to allow to choose to which relays the message is going to be sent.
Something like this, for illustration:
pub async fn send_event(&self, event: Event) -> Result<EventId, Error>

pub async fn send_event_to_some_relays<P>(&self, event: Event, accept_relay: P) -> Result<EventId, Error>
where P: Fn(&Url, &Relay) -> bool

Currenty it's possible to send an event to a specific relay.
let relays = client.relays().await;
let url = Url::parse("wss://relay.damus.io")?;
let relay = relays.get(&url).unwrap();
relay.send_msg(...).await?;

But yes, I can add a method to Client to do this directly.

You can now use send_event_to or send_msg_to methods:
let event = ...;
client.send_event_to("wss://relay.damus.io", event).await?;


Change EVP_CIPHER_CTX_iv_length() to return current ivlen for some modes

Master branch changes
Changes for 1.1.1 are here #9499

Checklist

[ ] documentation is added or updated
[ ] tests are added or updated

Thanks.. Merged to master


Fixed #33198 -- Corrected BinaryField.max_length docs.

https://code.djangoproject.com/ticket/33198

@fraziern Thanks :+1:


[FEAT] Use svg image for the home 'why diagram'

Using a vector format ensure we always have a good definition whatever the
screen resolution is.

comparison after (where the text is selected) / before
SVG creation

load the resources/BPMN_Spec_example_Email_Voting.bpmn in https://cdn.statically.io/gh/process-analytics/bpmn-visualization-examples/v0.21.0/demo/load-and-navigation/elements-identification.html
download as SVG
clean svg with https://jakearchibald.github.io/svgomg/: 155.44k --> 107.5k
in the svg node, add style="background-color:white" --> we may add options to set the background color during the svg export

About the 'what diagram'
I haven't succeeded to get a svg for this one.
--> text of labels in foreignobject don't show up

extract the innerHTML of the 'bpmn-container' in https://cdn.statically.io/gh/process-analytics/bpmn-visualization-examples/v0.21.0/demo/monitoring-all-process-instances/index.html
on the svg node

set the role and xmlns
set the width and height attribute (taken from min-xx value on the svg style)
remove the style attribute
add a style node to the svg node
copy the CSS from the page into the new style element

what_diagram_attempt.svg.txt

In Mobile format


Adopt UEFI in Windows 2k12, 2k16 and 2k19

What this PR does / why we need it:
Adopt UEFI in Windows 2k12, 2k16 and 2k19 by enabling EFI and Secureboot in the respective preferences.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Release note:

Adopted UEFI in Windows 2k12, 2k16 and 2k19 by enabling EFI and Secureboot in the respective preferences.

/hold Still need to rebuild images and verify everything works

/cc

@0xFelix awesome! can you add a releasenote and then this lgtm!
/approve
/hold

/hold cancel

@stu-gott please help to keep the common-instancetype in sync to the common-templates. When is the change to common-templates expected to happen?

/hold
Why was secureboot introduced as part of this change? SecureBoot and UEFI are independent.
/cc @acardace

/hold
Why was secureboot introduced as part of this change? SecureBoot and UEFI are independent.
/cc @acardace

Not within our API, by default if you enable EFI you get secureboot:
https://kubevirt.io/user-guide/virtual_machines/virtual_hardware/#biosuefi

Enabling EFI automatically enables Secure Boot, unless the secureBoot field under efi is set to false.

@dominikholler to answer your question directly, we're aiming for making the change soon. Hopefully, within the next month-ish.

/hold
Why was secureboot introduced as part of this change? SecureBoot and UEFI are independent.
/cc @acardace

Not within our API, by default if you enable EFI you get secureboot:
https://kubevirt.io/user-guide/virtual_machines/virtual_hardware/#biosuefi

Enabling EFI automatically enables Secure Boot, unless the secureBoot field under efi is set to false.

Yes, but you can still opt-out. Do we need secureboot for Windows? @stu-gott @fabiand

In my mind, switching to UEFI is already such a major change that also adding SB is a non-issue from a technical complexity point of view. Since Windows ships vendor keys for all active versions, there should be no problem with enabling it.

/lgtm


maxSliceSize for decoding slices

https://github.com/tendermint/go-wire/issues/102

Looks like the rewrite didn't carry on https://github.com/tendermint/go-wire/pull/38

@ebuchman we need to rebase, I'll do that and include tests as well.

The length of bz is indicative... currently there's no way to tell the max number of items, besides by checking the length of bz.  e.g. if the length of bz is 100, you can't decode a slice of 101 items.


add python images

add python images

[ ] slim
[x] main
[x] develop

https://github.com/EpicMorg/docker-scripts/pull/69/commits/30e4ae95865e6a01383d3389deebc1509e1b86fd


What is the relationship between the project spring-security and this project

I want read the source code.Is there any document about the source code structure? Or any books about the spring-security?

spring-security-oauth已经进入维护模式,oauth2功能将维护进入spring security


Only static values are allowed inside of a stylex.create() call.

Describe the issue
When using even the exact code from the sample in the documentation:
const styles = stylex.create({
  // Function arguments must be simple identifiers
  // -- No destructuring or default values
  bar: (height) => ({
    height,
    // The function body must be an object literal
    // -- { return {} } is not allowed
  }),
});

I am constantly receiving the error Only static values are allowed inside of a stylex.create() call.
I am using the webpack loader in case that matters
Expected behavior
Should be able to using dynamic styles
Steps to reproduce

using latest (0.5.1)
using storybook with the webpack loader
just paste in the sample code from the docs into a component

const styles = stylex.create({
  // Function arguments must be simple identifiers
  // -- No destructuring or default values
  bar: (height) => ({
    height,
    // The function body must be an object literal
    // -- { return {} } is not allowed
  }),
});

you do not even need to try to use the styles, it fails immediately

Test case
this is my webpack config, very minimal
webpackFinal: async (config, { configType }) => {
    config.module = config.module || {}
    config.module.rules = config.module.rules || []

    config.plugins = config.plugins || []
    config.plugins.push(
      new StylexPlugin({
        // get webpack mode and set value for dev
        dev: config.mode === "development",
        // Required for CSS variable support
        appendTo: "head",
        unstable_moduleResolution: {
          // The module system to be used.
          // Use this value when using `ESModules`.
          type: "commonJS",
          // The absolute path to the root directory of your project.
          rootDir: __dirname,
        },
      }),
    )

    return config
  },

Additional comments
No response

I just verified that dynamic styles are working as expected. Perhaps there are some other non-static values being used within your usage of stylex.create?
https://stackblitz.com/edit/stylex-next-h9bqgw?file=app%2Fcomponents%2FDynamicHeight.tsx
'use client';

import * as stylex from '@stylexjs/stylex';
import { useState } from 'react';

export default function RedCard() {
  const [height, setHeight] = useState(20);

  return (
    <>
      <input
        type="range"
        min="20"
        max="300"
        value={height}
        onChange={(e) => {
          setHeight(parseFloat(e.currentTarget.value));
        }}
      />
      <div {...stylex.props(styles.base, styles.bar(height))} />
    </>
  );
}

const styles = stylex.create({
  btn: {
    padding: 16,
  },
  base: {
    backgroundColor: 'blue',
  },
  bar: (height) => ({
    height,
  }),
});

https://github.com/facebook/stylex/assets/3582514/0512f558-aeb1-48db-899a-52cf7719b097

also your stackblitz is using v0.4.1

@conarwelsh I just updated the deps in my example and it all still works. Looking at your config, the appendTo: "head", looks wrong. The appendTo property appends to an existing CSS file. Could you share a minimum project example to figure out what's broken in your setup?
NOTE: The webpack plugin has known issues that I've spent a lot of time working on!

I removed that config param and the same result happened.
but as I was building a sample repo I discovered it worked, and the only difference between the two setups was this plugin @storybook/addon-webpack5-compiler-swc which I hadn't even noticed as it went in from storybooks initial scaffold.  I removed it at the problem went away.
Thank you for your time


Help w/ NavBar

Hey sorry this is really unrelated to this module, but I have been trying to debug a sort of related issue that maybe you have more knowledge than I do.
My desire is to have the navbar DISABLED, which it is by default on stock so no problems here. I am running stock rooted with magisk, but no modules.
HOWEVER
In magisk's post-fs-data script folder (scripts that run early on boot right after /data is mounted), I have a script that sets selinux status to permissive (setenforce 0). Its strange, but just by doing this, it causes a navigation bar to show up upon boot (you can actually see the nav bar blink through the keyguard right after boot completes). It is really strange issue, as soon as I remove this setenforce 0, this no longer happens.
Do you have any idea why setting selinux permissive would cause a navigation bar to show up? and how it might be prevented?

It is very likely that Onyx's Android developers changed something for the convenience of themselves. They often do changes that confuse me a lot...
You may want to decompile SystemUI.apk, framework-res.apk or something else to confirm it

It is very likely that Onyx's Android developers changed something for the convenience of themselves. They often do changes that confuse me a lot...
You may want to decompile SystemUI.apk, framework-res.apk or something else to confirm it

It is very likely that Onyx's Android developers changed something for the convenience of themselves. They often do changes that confuse me a lot...
You may want to decompile SystemUI.apk, framework-res.apk or something else to confirm it

Yes, I agree on all your points. I already decompiled the apk's but cant find anything obvious. I'll keep looking, thanks!

It is very likely that Onyx's Android developers changed something for the convenience of themselves. They often do changes that confuse me a lot...
You may want to decompile SystemUI.apk, framework-res.apk or something else to confirm it

Yes, I agree on all your points. I already decompiled the apk's but cant find anything obvious. I'll keep looking, thanks!

During a normal boot without touching SELinux, you can see the following message in logcat:
887   887 W libc    : Unable to set property "qemu.hw.mainkeys" to "0": error code: 0x18

Someone is always setting qemu.hw.mainkeys at boot, but when you have SELinux set to enforcing, the attempt is blocked by SELinux. So setting it to permissive allows that attempts and shows the navigation bar.
To find out who is setting this system property, I think Riru is a good tool.

During a normal boot without touching SELinux, you can see the following message in logcat:
887   887 W libc    : Unable to set property "qemu.hw.mainkeys" to "0": error code: 0x18

Someone is always setting qemu.hw.mainkeys at boot, but when you have SELinux set to enforcing, the attempt is blocked by SELinux. So setting it to permissive allows that attempts and shows the navigation bar.
To find out who is setting this system property, I think Riru is a good tool.

amazing! Thank you! I dont know how I missed that.... I'm not sure how I would use Riru to find out the process? I think maybe I could just find out which process is running via PID 887 (in your example) might work, but I'm not sure

On my Max3 with ROM 2020-11-04_07_07_3.0_9aed398, it is caused by /system/vendor/bin/init.qcom.sh: https://github.com/LineageOS/android_device_oneplus_sdm845-common/blob/fac1372b4d18dc0f9185c20efc095c767048b358/rootdir/etc/init.qcom.sh#L360 (the file is identical to sdm845's).
A Magisk module overwriting it should fix the issue.

On my Max3 with ROM 2020-11-04_07_07_3.0_9aed398, it is caused by /system/vendor/bin/init.qcom.sh: https://github.com/LineageOS/android_device_oneplus_sdm845-common/blob/fac1372b4d18dc0f9185c20efc095c767048b358/rootdir/etc/init.qcom.sh#L360 (the file is identical to sdm845's).
A Magisk module overwriting it should fix the issue.

You are 100% correct! This file was the culprit. Commenting out the proper line and replacing the file with magisk fixed the issue. Thanks again for your help, this was bugging me for months


Barotropic streamfunction plots

This draft notebook plots the barotropic streamfunction for each model as the time mean of the last available year for Ocean0, Ocean1 and Ocean2 COM runs. Heavily hacked from OverturningStreamfunction.ipynb (thanks!)

Thanks @chrisb13 !


Cannot find module 'dmg-license'

Can you please provide a little bit more information?
I assume you are trying to compile the project for MacOS.
Have you made any changes to the project, or do you get this error with a fresh revision of the template?

Can you please provide a little bit more information? I assume you are trying to compile the project for MacOS.
Have you made any changes to the project, or do you get this error with a fresh revision of the template?

"Without making any changes, I built a Windows package, and then when I tried to build a Mac package, it threw an error: Cannot find module 'dmg-license'."


[SwipeableDrawer] Doesn't open with Firefox

Component SwipeableDrawer doesn't open in Firefox Developer tools with "Touch emulation" enabled, but instead throws TypeError: touches[0] is undefined error. And throws it also on it's way closing the drawer.

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
Component SwipeableDrawer can't be opened in Firefox Developer tools with "Touch emulation" enabled, although it can be closed.
And it throws error:
TypeError: touches[0] is undefined SwipeableDrawer.js:30
    calculateCurrentX SwipeableDrawer.js:30
    handleBodyTouchEnd SwipeableDrawer.js:229
    useEventCallback useEventCallback.js:15
    sendTouchEvent touch-simulator.js:467
    handleEvent touch-simulator.js:323

Expected Behavior 🤔
Firefox developer tools should just work, like Chrome/Chromium developer tools.
Steps to Reproduce 🕹

Open in Firefox https://material-ui.com/components/drawers/#swipeable
Click "Left" button
Close it halfway (it errors and stucks)
Close it fully (it wiggles, resets, and does wierd along the way, and get more errors)
Open it via swipe, not clicking button (can't)

Context 🔦
I'm trying to develop a mobile-friendly website using Firefox as my browser for preview and testing.
Your Environment 🌎
It can be observed on

Tech
Version

Material-UI
what's deployed to https://material-ui.com as of 2020-05-14?

React
what's deployed to https://material-ui.com as of 2020-05-14?

Browser
Firefox 76.0.1 (64-bit)

TypeScript
what's deployed to https://material-ui.com as of 2020-05-14?

OS
Ubuntu 20.04, x86_64, 5.4.0-29-generic

This is a bit tricky since I can't reproduce this due to firefox' touch simulation not working: https://bugzilla.mozilla.org/show_bug.cgi?id=1621206
Can you reproduce this with a real device?

@eps1lon That bug looks related. On mobile it works fine (Android 8.0.0, Firefox 68.8).


rewrite wordlist random word selection to fix issues with multibyte characters in wordlists

I had issues with multibyte characters when using a wordlist, e.g. European umlauts and special chars (äöüßñø). The end value of the substring in the old code would sometimes be smaller than the start value, resulting in a long string containing multiple words. This code fixes these issues and should also be a bit faster.

Sorry it took forever. I have pushed a fix that should resolve your issues that is still fast and memory efficient.
Yours works fine but I would avoid the use of the file function because that will read the entire file into memory as a PHP array which could get fairly large depending on the size of the wordlist. And on a busy site invoking this over and over could be an unnecessary drain on resources.
Thank you and I hope my change works if you are still using it.

Also note, depending on the character set of your wordlist, it is very important to specify the wordlist_file_encoding option.
e.g.
<?php

$options = [
 'use_wordlist' => true,
 'wordlist_file' => '/path/to/list.txt',
 'wordlist_file_encoding' => 'WINDOWS-1251', // GB2312, UTF-8, etc...
 // ...other options
];

$img = new Securimage($options);

The options can also go in config.inc.php located in the securimage directory, or located elsewhere and passed in to the constructor using the config_file option.


Support async disposable service scopes

Mirrors AsyncServiceScope struct in .NET 6.
See:

https://github.com/dotnet/runtime/blob/aa96f04ea821effaa6cbf786c6328550f4d7ca98/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/AsyncServiceScope.cs

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

38 of 38 (100.0%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.5%) to 95.369%

Totals

Change from base Build<PHONE_NUMBER>:
-0.5%

Covered Lines:
1681

Relevant Lines:
1714

💛  - Coveralls


Move C.RTLD_DEEPBIND do linux-specific file

This change ensures that the dl package works on Darwin platforms where C.RTLD_DEEPBIND is not defined.
Before this change:
➜  go-nvml git:(main) ✗ go build ./pkg/dl/...
# github.com/NVIDIA/go-nvml/pkg/dl
pkg/dl/dl.go:36:18: could not determine kind of name for C.RTLD_DEEPBIND
➜  go-nvml git:(main) ✗ echo $?
1

After this change:
➜  go-nvml git:(fix-deepbind) ✗ go build ./pkg/dl/...
➜  go-nvml git:(fix-deepbind) ✗ echo $?
0
```

/blossom-ci

/blossom-ci

/blossom-ci

/blossom-ci


Proceed without clicking the search icon

https://member.iotex.io/profile/claim-rewards/
https://member.iotex.io/profile/moveto-ethwallet/
User has to input a legit addr and click the search icon to continue. we should remove the "click icon" step -- as long as the input addr is legit, display the results.

this task belongs to web-bp. I am going to revert this change.


Integration of a scalar Coefficient over a 2D domain

I have a Coefficient which is a scalar over a 2D domain. I wrote some code to integrate the scalar over selected area identified by an attributes. I wrote two functions and each seems to work fine, they gave the same results. I would like to understand why the second one work fine, I was thinking that the test function will be involved and provide different result.
A confused Denis !!!
double IntScalar1(FiniteElementSpace &fes, Coefficient &coeff, int Attr)
{
   // Integrate the scalar function over the entire domain manually
   double integral_value = 0.0;
   for (int i = 0; i < fes.GetMesh()->GetNE(); i++)  // Loop over elements
   {

      if(fes.GetAttribute(i) == Attr)
      {
       ElementTransformation *trans = fes.GetMesh()->GetElementTransformation(i);
       const FiniteElement &fe = *(fes.GetFE(i));

       // Use a quadrature rule that matches the element's order
       const IntegrationRule &ir = IntRules.Get(fe.GetGeomType(), 2 * fe.GetOrder());

       for (int j = 0; j < ir.GetNPoints(); j++)  // Loop over quadrature points
       {
           const IntegrationPoint &ip = ir.IntPoint(j);
           trans->SetIntPoint(&ip);

           // Evaluate scalar function at the quadrature point in physical coordinates
           double scalar_value = coeff.Eval(*trans, ip);

           // Accumulate the integral (scalar value * weight * Jacobian determinant)
           integral_value += scalar_value * ip.weight * trans->Weight();
       }
   }
   }
   return integral_value;
}

double IntScalar2(FiniteElementSpace &fes, Coefficient &coeff, int Attr)
{
   double integral_value = 0.0;
   int NbrOfAttributes= fes.GetMesh()->attributes.Max();
   if (NbrOfAttributes>0 && Attr<=NbrOfAttributes)
   {
      Array<int> Marker(NbrOfAttributes);
      Marker=0;
      Marker[Attr-1] = 1;

      LinearForm lf(&fes);
      lf.AddDomainIntegrator(new DomainLFIntegrator(coeff), Marker);
      lf.Assemble();
      integral_value= lf.Sum(); // * gf; // dot product product operator of Vector class.
   }
   return integral_value;
}

Hi @denislachapelle,
The basis functions $\phi_i$ have the property that $\sum_{i=1}^N \phi_i \equiv 1$. Your second code constructs the linear form that is represented by the vector $\int_\Omega f \phi_i ~ dx$, where $f$ is your coefficient.

Thank you for your explanation, I will finish one day to be enlightened !!!
I suspect the more efficient and elegant is the second one using the LinearForm?

The second is perhaps more elegant (that may be subjective...), but both versions should be roughly equally efficient (the second actually requires $\mathcal{O}(N)$ storage for the vector whereas the first is $\mathcal{O}(1)$, but this is likely unimportant). The first one also skips entirely elements with different attributes.
You can also try doing this:
QuadratureSpace qs(fes.GetMesh(), 2*fes.GetMaxElementOrder());
Array<int> attrs(1);
attrs[0] = Attr;
RestrictedCoefficient restr_coeff(coeff, attrs);
return qs.Integrate(restr_coeff);

I try this code ..
double IntScalar3(FiniteElementSpace &fes, Coefficient &coeff, int Attr)
{
QuadratureSpace qs(fes.GetMesh(), 2*fes.GetMaxElementOrder());
Array attrs(2); attrs=0;
assert(fes.GetMesh()->attributes.Max() >= Attr);
attrs[0] = Attr;
RestrictedCoefficient restr_coeff(coeff, attrs);
return qs.Integrate(restr_coeff);
}
and it fail with this message when qs.Integrate is called.
Assertion failed: (i>=0 && i<size) is false:
--> Access element 2 of array, size = 2
... in function: T& mfem::Array::operator [with T = int]
... in file: /mnt/c/mfem-4.7/general/array.hpp:755
But its ok since I will use IntScalar1 previously discussed above.

Can you try this version? I made a mistake in the definition of attrs.
real_t IntScalar3(FiniteElementSpace &fes, Coefficient &coeff, int Attr)
{
   QuadratureSpace qs(fes.GetMesh(), 2*fes.GetMaxElementOrder());
   Array<int> attrs;
   if (fes.GetMesh()->attributes.Size())
   {
      attrs.SetSize(fes.GetMesh()->attributes.Max());
      attrs[Attr-1] = 1;
   }
   RestrictedCoefficient restr_coeff(coeff, attrs);
   return qs.Integrate(restr_coeff);
}

I tried it and the compilation works fine but the result is near zero (E-19) while the result shall be about 0.000798. Up to you if you want to look at the details the entire file is available here: https://github.com/denislachapelle/mfemelectrostatic/blob/master/proximity2d_iss4563.cpp
On my side I use mfem-4.7 on WSL under Windows 10.
Thank you.

Can you share the mesh file too? (I see there are Python scripts to generate the meshes, but it will be easier with the actual .msh file).

Here is the mesh file
https://github.com/denislachapelle/mfemelectrostatic/blob/master/mesh/proxroundroundwires2d.msh
and here is the python script generating the mesh file using gmsh api.
https://github.com/denislachapelle/mfemelectrostatic/blob/master/mesh/ProxRoundRoundWires2d.py
and the command is
./proximity2d -m mesh/proxroundroundwires2d.msh -f 50.35 -o 1 -nd
Denis

Sorry, the code I posted had a small bug. I updated it so it should be correct now.
The line
attrs=0;

should come after the line
attrs.SetSize(fes.GetMesh()->attributes.Max());

Great it work just fine now.

Closing for now. Please re-open if you have other questions.


[Feature] Adding Frequency Calculator

Description
A Frequency Calculator is designed to compute the frequency of a periodic event or waveform. Frequency is a fundamental concept in physics, particularly in the study of waves, oscillations, and alternating current (AC) circuits. It refers to the number of cycles or oscillations that occur in a unit of time, typically measured in hertz (Hz), where 1 Hz equals one cycle per second.
Screenshots

Checklist

[X] I have checked the existing issues.
[X] I follow Contributing Guidelines of this project.
[X] I am a GSSOC'24 contributor.
[ ] I am a IWOC'24 contributor.
[ ] I am a JWOC'24 contributor.
[ ] I am a SWOC'24 contributor.

Code of Conduct

[X] I agree to follow this project's "Code of Conduct".

@Rakesh9100 can you please assign this to me?

Go ahead @Maheshwari-Love


Fixing typo in grace period heading

Purpose of this pull request
This pull request (PR) ...
Affected pages

...

Links to Magento Open Source code

...

Closing as abandoned


getting email data from facebook login

Hi,
I am unable to get the user email using facebook auth.
At the back end in this step profile contains id and name fields.
// Step 2. Retrieve profile information about the current user.
request.get({ url: graphApiUrl, qs: accessToken, json: true }, function(err, response, profile) {
Here is my frontend config;
$authProvider.facebook({
clientId: '20198098210',
url: API_CONFIG.authUrl + 'facebook',
scope: ['email'],
scopeDelimiter: ',',
requiredUrlParams: ['display', 'scope']
});
I want to get email and other possible user info. How do we do this?
Is it related with the facebook app configuration?
Thanks

Do you request the email via the 'graphApiUrl' in request.get()?
The URL must be: var graphApiUrl = 'https://graph.facebook.com/v2.3/me' + '?fields=email,name,id';

Yeah I discovered the fields paramaters then after. Thanks.


Is there any way IFRAME can accept values from outside and pre-fill some of the fields?

Hi Team,
Is there any way IFRAME can accept values from outside and pre-fill some of the fields?
Like I want to pass username from my application to IFRAME and let the field in IFRAME prefilled with the value provided from outside?
Is this currently acheivable?

Hey @manojgsequoia. This is currently not possible. However, we'll be sure to update you if we decide to include these fields as options you can pass into the SDK constructor in the future


New editor settings to toggle the editability and visibility of ColorPicker presets

These additions are related to the enhancements suggested in issue #26176.

With visibility removed:

With editability removed:
Looks the same but the preset items and button  don't respond to input events.

Honestly, I think the original issue is pointless. If you don't want presets, just don't use them. We do not need an editor settings to disable each feature of the engine.
This is going to bloat the engine settings and burry the useful options.

I could see this being somewhat useful if it was a option for each ColorPicker node, which I think that's what the original issue was actually referring to.

I could see this being somewhat useful if it was a option for each ColorPicker node, which I think that's what the original issue was actually referring to.

Ah indeed, that might be a parameter of the ColorPicker node, if people want to use it in games.

I actually meant for this to be something that could be set on the colorpicker itself, not an engine-wide setting. Sorry if my wording was bad.
The reason I want this is because I want to have a colorpicker that doesn't have any presets on it, while still allowing all other colorpickers to have presets on.

I'll update this later today so that the editor settings are removed and then replace the logic with properties for the ColorPicker class.

There is already an older PR which looks like more or less the same thing: #22766. Maybe you can collaborate with @lupoDharkael.


AND-230 Removed colorSurface attributes

They are used by the Switch View, or perhaps by other items, too.
Replaced by specific attributes for background and help.
Added a Switch style not to use material colours which are more in contrast with the background.
Description
Removed probably obsolete theme attributes.
Screenshots 📸
Show/Hide content

How Has This Been Tested? 👨🔬
In Android Studio Preview
What Has Not Been Tested? 🙅🏻♂
Checklist ✅

[x] I have performed a self-review of my own code.
[ ] I have commented my code, particularly in hard-to-understand areas.
[x] I have checked all visual changes in both light and dark mode.

Will tell the testers, I am just limited by the device I have

@vandus How about emulator with newer Android version?


linux ctrl +c can't kill the program at after call Connection

15  int main(void)
16 {
17         io_service ioService;
18
19         boost::asio::strand            strand_(ioService);
20         boost::asio::io_service::work  workOracle(ioService);
21
22         Environment::Initialize();
23         Connection con("<IP_ADDRESS>:1521/orcl", "system", "zhxq");
24
25        /* Statement st(con);
26
27         string  strSql ="SELECT TO_CHAR(SYSDATE, 'YYYY-MM-DD HH24:MI:SS') FR    OM DUAL";
28
29      st.Execute(strSql);
30
31         Resultset rs = st.GetResultset();
32         while (rs.Next())
33         {
34                 std::cout <<"time: " << rs.Get(1) << std::endl;
35         }*/
36
37
38         ioService.run();
39
40         Environment::Cleanup();
41         return EXIT_SUCCESS;
42 }
this code, after Compiled and run, can't kill by ctrl +c; but do away with Connection ,ctrl +c kill the program ok ??

Closing the isssue as no news from OP


status() Shutting Off Power on v3.1 Device

OK, I thought I was crazy before (in fairness, I likely was 😆), but now seeing it a second time. Let me explain ...

Had an earlier Tuya switch, it was v3.1 - and it seemed like when I did a status() query, it was (sometimes?) shutting the switch off. Wasn't 100% sure, but got Tuya to push a firmware upgrade ... it went to v3.3, and the issue went away. Case closed ... I thought, but then ...
Bought another switch, it's on v3.1 - and Tuya says there is no firmware update for this one. It does the same ... shuts off (often / always - to be confirmed yet) when I run a status() command.

So, time to figure out why? Is there a defined format for messages in and out? I can try to capture the traffic, and we can decipher then (i.e. tcpdump and/or Wireshark).
Thanks!

Hi Russell, you have some of the best problems. :).
I've heard others who have seen this with other 3.1 devices, even when not using a valid LOCAL_KEY.  I have never seen it myself so hard to troubleshoot. It always goes away with upgrade so I suspect the websocket implementation for those particular devices is buggy and when we poll it direct, it has a chance of crashing in a way that causes a power cycle.  There should be no way to hijack a Tuya switch without the LOCAL_KEY yet these devices seem easily vulnerable to attack without a key.  My $0.02 is that I wouldn't run these on my local network without a firmware upgrade regardless of what I have it controlling (think Stuxnet type attack that could destroy whatever it is powering).
Having said that, I still would love to know if there is a way to identify these types of devices and if there is a custom way to manage communication with them without crashing.  It is likely not high on most people's list since Tuya devices do not use local control (the Tuya device and the related SmartLife app communicate with the cloud, not the device directly, as you know).  Those of us wanting local Tuya control are the only ones who would care. ;-)
Did you recently buy this device?   If so, can you send me a link?  If not too expensive, it may be a fun to dissect.

Hi Russell, you have some of the best problems. :).

I'm not sure what that means, but my wife says the same 🤣.

wouldn't run these on my local network without a firmware upgrade

Understand - but I reached out to Tuya, they said this is the current firmware for this device. I thought about returning in then (just bought it), but the engineer in me said ... "no, I want to figure this out" 😄.

Having said that, I still would love to know if there is a way to identify these types of devices and if there is a custom way to manage communication with them without crashing. It is likely not high on most people's list since Tuya devices do not use local control (the Tuya device and the related SmartLife app communicate with the cloud, not the device directly, as you know). Those of us wanting local Tuya control are the only ones who would care. ;-)

Agreed! We are 100% aligned there. And I have been doing some debugging, a few thoughts / odd findings,

I turned on tcpdump, on my firewall, filtered traffic to this device. Found that the communication to the cloud is MQTT based (was a new one to me, bit of digging on that one). So,
Set up an MQTT server here (mosquitto), and https://github.com/TheAgentK/tuya-mqtt. Interestingly enough, I only seem to be able to make it switch off with MQTT if I sent the get-states command directly to a dps value (i.e. 19). Otherwise, through MQTT I can't seem to get it to turn off (in error, I can toggle it if desired). But then, I tried,
https://github.com/codeclinic/TuyaPower2MQTT/tree/master/tuyapower2mqtt ... and I again saw (MQTT) queries turning the device off. Hmm ... only with python code? An issue in the interface (in python) perhaps? Not sure, still digging.

Sort of clear? It is interesting, and I can use tuya-mqtt to subscribe / publish (communicate via MQTT), seems stable, no shut off.

Did you recently buy this device? If so, can you send me a link? If not too expensive, it may be a fun to dissect.

I did! As above, I just can't let it go now, the engineer has a hold of me 😆. Here is the link,
https://www.amazon.com/gp/product/B07FDLBGQT/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1
Thoughts? Do you use MQTT under the hood? I just haven't had a chance to look yet.

FYI, as a test (same switch), running MQTT, in a loop (same timing as tinytuya).  So something in the command being sent? Will let this run overnight, let's see!

OK, ran MQTT for 24 hours, query once a minute - no issues at all. So now to figure out what in the message is causing grief. Let me try to run some tcpdump captures, will let you know what I find.

Hmmm ... OK, captured tcpdump from the internet to my switch => looks like all traffic is MQTT. Is that expected.
BTW, MQTT does respond quite quickly, and actually sends asynchronous updates, when dps values change.

I won't have time to dig into this until this weekend but I want to check the code you are using.  Quick glance, it looks like it is a MQTT connector that uses tuyapi to talk to the Tuya device.  I'm assuming:
MQTT Client/CLI -------> MQTT Server <------ (tuya-mqtt)  ======> Device
Where

--------> is MQTT traffic and
======> is Tuya protocol traffic

If you are seeing constant DPS changes, it is likely making a persistent connection to the Device (e.g. d.set_socketPersistent(True) with tinytuya).

No worries! Just keeping you in the loop as I dig 😄. Your "diagram" looks right to me, but still digging.
Interestingly, I think (just happened) ... directly using tuyapi causes shutoff, but not with MQTT. Hmm ... need to noodle on that one a bit yet 🤣.

OK, some digging with tcpdump and WireShark. I think (may have this wrong, but ...) that from the internet to the switch ... yep, it's MQTT (still not quite sure how WireShark is detecting that, I can't find a defined packet header anywhere). v3.1 is somewhat readable (or at least it makes sense), v3.3 is TLSv1.2 encrypted.
So that aside, looking locally - and using mosquitto + tuya-mqtt => I can query all day long, no switch toggling. I can also see the (TCP) packets, they look "similar" to what tinytuya sends. Do you have any info on the expected packet format? Then I can check if I see any packet related issues. Again, no panic - just trying to help.
Thanks!

Oh, and one little tidbit - just in case you find it interesting, I did at least ... 🤣. With MQTT, if you are subscribed, when measurements change (e.g. power consumption), the switch (device) sends a message autonomously - kinda cool.

FYI, looping right now, using tuyapi, getting dps info - not seeing the switch turn off so far (~ 20 loops complete, would have expected it). I do see some (slight?) differences in the packets sent across (no mqtt involved here, just tuyapi vs. tinytuya), thinking that's likely the delta. No panic, but when you have a chance - if you can just point me at the "packet builder", I can try to figure out if the deltas there are the issue.
I'm not looking at the TCP or IP headers, assuming this is just in the TCP payload (but feel free to disagree).

@arrmo Can you share the code you are using for both tuyapi and tinytuya?  I would like to look deeper into the tuyapi code to see what we may be missing/different in tinytuya.  I need to also revisit the localtuya work to see if there is any advancements there we could pull in.
As for packet payload, it depends on the command sent to the device.  Check out the code and description here: https://github.com/jasonacox/tinytuya/blob/1f4644c78682f0cfded21b7b38fa9fee04341501/tinytuya/init.py#L217-L269
The payload is built by the generate_payload() function here:
https://github.com/jasonacox/tinytuya/blob/1f4644c78682f0cfded21b7b38fa9fee04341501/tinytuya/__init__.py#L385-L456

Can you share the code you are using for both tuyapi and tinytuya?

Sure, NP! Here is what I'm doing,

Python, tinytuya (dps results OK, but switch turns off) - tried it manually, code pasted here.

import tinytuya
d=tinytuya.OutletDevice('###', '<IP_ADDRESS>', '###')
d.set_version(3.1)
d.status()

JS / NodeJS, tuyapi (ran this in a loop, got sidetracked ... 18k iterations, 😆. No issues seen).

const TuyAPI = require('tuyapi');
const device = new TuyAPI({
  id: '###',
  key: '###',
  ip: '<IP_ADDRESS>',
  issueGetOnConnect: false});
(async () => {
  await device.connect();
  let status = await device.get({schema: true});
  console.log(`Current status: ${status.dps['1']}, power: ${status.dps['5']}`);
  device.disconnect();
})();

Make sense?

Check out the code and description here

Thanks! Seems I have been looking the right place. A couple notes,
a. DP_QUERY seems to be missing dps {}, vs. tuyapi. Not sure it's critical, and I tried adding it locally - that's not (all of) it. From WireShark, I belive the prefix and suffix are being added correctly.
b. The crc approaches look different - may be the same, haven't had a chance to dig more on that yet.

OK, now this is really screwy 😜. Pulling my hair out, and I can't afford that! Let me explain what I tried,

Using WireShark, I captured one of the packets sent by tuyapi (NodeJS), wrote it to a binary file.
Used python to send that (raw) binary packet to the switch. I wasn't sure if it would work, as time is part of the information sent, but it seems to be OK => I get a sane (and correct) response back. So I have a "proven" good packet.
Put the python call (raw packet send, response) in a loop ... boom! After ~ a half dozen or so (it does vary, checked that), the switch turns off. I also tried changing the timing (~ every 15 sec, changed to ~ 5 sec ... still about the same number of send / receive operations to make it turn off). I also (SmartLife app) turned the switch back on, then restarted Python ... the output is correct, for another group of runs (< 10 each time).

Clear as mud? Is this somehow Python socket related? Or am I just nuts (entirely possible!). That packet format was OK with NodeJS for ~ 18k packets, so something happens when using Python?
Thanks!

Thanks for putting the code snips there!  So there is one big difference.  The tuyapi code is using persistent sockets and your tinytuya code is not.  Make a slight change to see if this makes a difference:
import tinytuya
d=tinytuya.OutletDevice('###', '<IP_ADDRESS>', '###')
d.set_version(3.1)
# Keep socket connection open between commands
d.set_socketPersistent(True)

By default tinytuya builds and tears down socket connections with each call.  It would be interesting to see if this is what is causing the instability.   Likely that would mean that the tuya device is keeping those connection threads alives and is hitting some resource limit causing a crash (power off?).  One other tune we could make without changing code:
# Disable fast no-delay for TCP connect
d.set_socketNODELAY(False)

Let me know what you find out. ;)

Sure, will do! But one question - my (~ 18k) loops run as below ... so even NodeJS is tearing down every time?
#!/bin/bash
while :
do
        echo "$(date) Sending tuyapi command ..."
        node tuyapi.js
        sleep 15
done

Meaning - the loop is bash, calling node (JS file), not a loop in JS.
Thanks!

You may be on to it! I ran 50 loops, persistence = True, and it stayed up. But then (to test), set it to False, Very quickly,
1: Sun Dec 20 02:55:16 PM CST 2020 Sending tinytuya command ...
{'1': True, '2': 0, '4': 0, '5': 0, '6': 1211, '7': 1, '8': 1739, '9': 17771, '10': 52153, '11': 395}
2: Sun Dec 20 02:55:21 PM CST 2020 Sending tinytuya command ...
{'1': True, '2': 0, '4': 0, '5': 0, '6': 1211, '7': 1, '8': 1739, '9': 17771, '10': 52153, '11': 395}
3: Sun Dec 20 02:55:26 PM CST 2020 Sending tinytuya command ...
Unexpected status() payload=b'json obj data unvalid'
Traceback (most recent call last):
  File "./tinytest.py", line 8, in <module>
    print(result['dps'])
TypeError: byte indices must be integers or slices, not str
4: Sun Dec 20 02:55:32 PM CST 2020 Sending tinytuya command ...
{'1': False, '2': 0, '4': 0, '5': 0, '6': 1216, '7': 1, '8': 1739, '9': 17771, '10': 52153, '11': 395}

Let me run it a bit longer, with persistence = True. And realizing - this may be persistence on the (Tuya switch) side? Just trying to understand.
Thanks!

OK, 5k runs, no issue - switch still on. That's it, thanks!
I have to ask though ... why? 🤣.
Appreciate it!

From a code logic perspective, the only difference is that instead of immediately closing the connection after the payload is delivered by the device, the persistence logic leaves it open until python terminates. That would mean that the connection stays open slightly longer.  Why would that help?
I love trying to solve puzzles like this.  But at the same time, I am slightly worried about this device.  I suspect you could run the same status query loop (non persistent) without a device key and it would eventually power off.  But either way, even if there is some python socket or tinytuya protocol usage error here, there seems something vulnerable that is related to poor error handling on the device itself.  All that to say, I wouldn't put this device on anything critical like a freezer. :)
I've been analyzing the tuyapi code and there are some things I like and want to try to incorporate.  For one thing, the persistence mode is default.  However, I notice that when I leave persistence on for tinytuya, subsequent d.status() calls are getting bloated payloads that have the right data but no longer fit within the packet size (it adds what appears to be extraneous/extended data).  The tuyapi code handles this by extracting the payload between the prefix and postfix signatures and recursively processing the "remainder" in case there are other payloads there.  I think that is the right approach so I intend to update the parsing in tinytuya to do something similar.
Thanks for all your investigation and help with this!

That would mean that the connection stays open slightly longer. Why would that help?

Agreed! And was thinking the same thing ... 😆. Wondering if it gives the Tuya device time to clean up on it's side perhaps? I did accidentally leave it running, and it completed 10k runs without an issue. A bit better than < 10 😜. So clearly the issue, just not 100% sure why it matters (except clean up perhaps).

All that to say, I wouldn't put this device on anything critical like a freezer. :)

Agreed! And it doesn't occur with v3.3 devices, only v3.1. Odd.

subsequent d.status() calls are getting bloated payloads that have the right data but no longer fit within the packet size (it adds what appears to be extraneous/extended data).

Really? I don't see that. I accidentally left WireShark on as well (above), captured almost 90k packets - and they were all a consistent size. You see the response packet size growing? With a v3.1 device?

I think that is the right approach so I intend to update the parsing in tinytuya to do something similar.

Agreed, makes a lot of sense. Just yell if you want me to try something here.

Thanks for all your investigation and help with this!

No worries at all, glad to help. Thanks so much for all you have done here, really is a great tool / driver. Appreciate it!

Arrgh! OK, thought it was all good - then moved the switch to the "freezer" LOL. Actually, outdoor lights. Hmmm - still have persistence on, and it's switching off again. More than just persistence perhaps. Need to dig more.

OK, I see the difference (moved to different code, vs. the test I was running) => seems even when calling the Python code (that accesses d.status()), a delay is needed after the call, before the script exists. For example (this is called by a script),

No delay, this breaks,

            device.set_socketPersistent(True)
            currData = device.status()

Delay, all good

            device.set_socketPersistent(True)
            currData = device.status()
            time.sleep(2.0)

In both cases, persistence is on. Do you see it acting similarly?
Thanks!

Interesting.  Maybe whatever 3.1 firmware that device is using requires additional time to clean up the TCP handshake?  Or it crashes?  I wonder what it is about NodeJS socket handling that is different from python if the tuyapi version doesn't experience this.  What OS are you using?

Yep, wondering here as well! I'm using Ubuntu 20.10 (OS).
I set my code up to only add the delay for v3.1 devices. So far, all working OK.
Thanks!

Hi,
Just curious - have you been able to duplicate this? No biggie!
Thanks!

Hi,
Just curious - have you been able to duplicate this? No biggie!
Thanks!

Hi Russell, I haven't been able to duplicate this.  Have you figured out the right "delay" amount for these 3.1 devices?   I see 2s above but wondering if it could be an optional setting for 3.1 devices I could accomodate in the code.  Also, have you tried with different python versions?

Hi Russell, I haven't been able to duplicate this.  Have you figured out the right "delay" amount for these 3.1 devices?   I see 2s above but wondering if it could be an optional setting for 3.1 devices I could accomodate in the code.  Also, have you tried with different python versions?

Hi.
I haven't optimized it, but did this in my code - and works just fine. I likely could go less, but only have a couple devices, poll them once every 5 min - so not worth shaving 100 ms ... LOL.
            if currdevice['ver'] == 3.1:
                time.sleep(0.5)

And only have tried Python 3.
Thanks!

Hi.
I haven't optimized it, but did this in my code - and works just fine. I likely could go less, but only have a couple devices, poll them once every 5 min - so not worth shaving 100 ms ... LOL.
            if currdevice['ver'] == 3.1:
                time.sleep(0.5)

And only have tried Python 3.
Thanks!


[BEAM-1312] DataflowRunner: move source for properties into pom

Also drop unused properties that are now in the root
pom.xml.
R: @davorbonaci

Coverage increased (+0.003%) to 69.768% when pulling a6621e595ab45428713c4a1674f69517f74b7a10 on dhalperi:dataflow-runner-pom into 7402d760004f8e7f79ca122c5fd26ec4f35dbdbe on apache:master.

LGTM. Please self-merge.


Menu items not properly centered on LInux

The menu entries on linux are not properly verticaly centered. This is especialy visible when the item is selected. Notice in the picture how there is more "blue" space beneath the item than above the iteam.
fyi @misolori to verify if my eyes are correct

@isidorn are you seeing this in insiders? I cannot repro on insiders on my Ubuntu machine, but this was an issue that was fixed for all platforms earlier this milestone.

@sbatten I see this when running out of source - so with latest. This should not depend on if it is a packaged product or out of source. I am using ubuntu 18.04

I still get this with latest vscode insiders

font used was not same as the rest of the UI and this surfaced issues only on 18.04


new command: dbt ls

List models selected by CLI args. Eg.
$ dbt ls --models salesforce.* --exclude salesforce_accounts
models/salesforce/salesforce_users.sql
models/salesforce/salesforce_contacts.sql
models/salesforce/salesforce_leads.sql
....

This will be especially valuable when dbt supports selecting models by tags, materialization type, etc, etc.
Great idea @emilielimaburke

I think I'd prefer the command to be list as opposed to ls, and for it to just return the model names.
$ dbt list --models salesforce.* --exclude salesforce_accounts
salesforce_users
salesforce_contacts
salesforce_leads
....

Maybe it could have a flag like --verbose that shows the fqn versions:
$ dbt list --models salesforce.* --exclude salesforce_accounts --verbose
salesforce.salesforce_users
salesforce.salesforce_contacts
salesforce.salesforce_leads
....

I personally am less interested in the file paths, especially since the file paths don't include the name of my own project.
I'm not sure what the ordering of the output should be. Probably alphabetical? But I can also imagine someone might want to see them in the order they appear in the DAG, but that gets tricky.

Really nice spec here, @clrcrl! Let's do it!
$ dbt list
  --resource_type {model|source|...|default|all}
  --select {list of selectors}
  --exclude {list of selectors}
  --output {json|name|path|selector}

Available resource types:

default:

model
archive
seed
test
source

all:

default+
documentation
analyses
macros

Resource type labels:

default
all
refable (everything in default except tests)

DEFAULTS:

resource_type = default
output = selector

OUTPUTS:

For name/path/selector, sort alphabetically
For json, use a dictionary indexed by node unique_id... sorting is not applicable. Assume output will be consumed programmatically

CAVEATS:

The path output should return file paths to resources relative to the cwd
The json output should return serialized ParseNodes (possibly a subset... we care about package name, tags, configs, depends_on, etc.... we care less about sql text). TBD if we normalize the json output across resource types... it's ok if these vary
Provide a (hidden?) ls alias for list (is that ok?)


Remove primitive declarations

E.g., s:string as a local variable. It detracts from the cleanliness of the language, and its semantics are undefined. s="" is preferred.
Maybe?

Eh, I think I still like this, especially for things like forward declaration of record variables.


2.1.0 - nickname not getting honored as operationId

Springfox seems to not honor the nickname as operationId.
It was working in the earlier Springfox releases. Is it a regression ? @adrianbk @dilipkrish
CONTROLLER
    @ApiOperation(value = "Get the list of VM's in the system", nickname = "getVMs")
    @ApiResponses(value = { @ApiResponse(code = 500, message = "Internal Server Error", response = com.acme.rest.api.model.error.Error.class) })
    @RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
    @ResponseStatus(value = HttpStatus.OK)
    public Resources<VM> getVMs() {
    }

SPEC
"/api/vms" : {
			"get" : {
				"tags" : [ "vm" ],
				"summary" : "Get the list of VM's in the system",
				"operationId" : "getVMsUsingGET",
				"consumes" : [ "application/json" ],
				"produces" : [ "application/json" ],
				"responses" : {
					"200" : {
						"schema" : {
							"$ref" : "#/definitions/Resources"
						}
					},
					"500" : {
						"description" : "Internal Server Error",
						"schema" : {
							"$ref" : "#/definitions/Error"
						}
					}
				}
			}
		}

May be a regression have you tried 2.1.2?

@rajeshkamal What is your expectation here. I think its working as expected. This is basically using our algorithm to generate a unique operation name across the service namespace. For e.g. if you rename nickname to @ApiOperation(value = "Get the list of VM's in the system", nickname = "getMyVms") you'll get an output
"operationId" : "getMyVMsUsingGET",

By the way this is based on the feature you had requested #825 :)
Closing this issue as works as designed. Please reopen if you still find issues

@dilipkrish How can I override them and give custom method names? Since these are eventually getting into the code generation and it looks really odd to have method names like getVMsUsingGET etc.

I was expecting to work something like this,
CONTROLLER
@ApiOperation(value = "Get the list of VM's in the system")
    public Resources<VM> getVMs() {
    }

SPEC - Since nickname is not give you can produce something like the below. This can be the default behavior.
                "operationId" : "getVMsUsingGET",

CONTROLLER
@ApiOperation(value = "Get the list of VM's in the system", nickname = "getMyVMs")
    public Resources<VM> getVMs() {
    }

SPEC - When a nickname is given it should be a customized behavior. And the operationId should be getMyVMs only
                "operationId" : "getMyVMs",

@dilipkrish If you take this use-case,
Lets say if I have many different ways to fetch a VM, if you are saying that the operations ID's will be like this as a default behavior. It is OK to have it. But many would not prefer this one. Since it does not convey the meaning of these different methods.
fetchVMUsingGET()
fetchVMUsingGET_1()
fetchVMUsingGET_2()
fetchVMUsingGET_3()

But what if I want to customize this and provide my own names to those methods using the nickname property. By doing this the user/developer takes care of the responsibility of providing proper unique names. Ex:
fetchVMById()
fetchVMByName()
fetchVMByDatacenter()
fetchVMByUser()
fetchVMByOperatingSystem()

Currently there seems to be no way of achieving the above.
The only thing we can get is using the nickname currently is,
fetchVMByIdUsingGET()
fetchVMByNameUsingGET()
fetchVMByDatacenterUsingGET()
fetchVMByUserUsingGET()
fetchVMByOperatingSystemUsingGET()

If you look ate the above methods, "UsingGET" doesn't seem to provide any additional value & uniqueness since by providing the nickname I had already achieved that.
Let me know you thoughts @dilipkrish

When you're using the spring provisions, then the compiler guarantees the uniqueness, and if a method with the same name is in another controller, then springfox guarantees name uniqueness. Now when you use @ApiOperation(nickname="some-unique-name") then the immediate problem is that if you don't specify a method and we generate methods for all the different http methods, immediately code-generation is going to fail.
So this is the only sure fire way to ensure uniqueness without ever breaking the code generator.
Secondly, what uniqueId is optional according the swagger spec. So our choice is either to not generate any uniqueId and pass the buck to the code generator or do a best effort in generating a unique id.
More on this issue and discussion here We're open to better ideas of course, and you've contributed quite a few of them, but I'm of the opinion that this might be the best solution barring a few naming aesthetics for which there can be no unanimous opinion.

Hello @dilipkrish, in the #682 discussion there seems to be a consensus that the nickname should be used without modification as operationId when present.
Quote from @who @adrianbk @rajeshkamal

Generated operationIds will be unique but ugly, as they will be based on the HTTP verb + URI

If an author changes nicknames in such a way that introduces duplicates, don't worry about throwing exceptions.

I also think that if a user uses nicknames then he knows what he is doing and if there are duplicates then it is its problem. But at least he can chose the operationId he wants.

True but not sure what the happy medium is. If you dial the switch like you suggested, people using codegen are going to create issues saying the swagger definitions are causing compilation errors.
I think dealing with code generated names is better than the latter. Ultimately we want the library users to "fall into the pit of success". Open to suggestions tho'

Maybe we can had a warning on using nicknames (in javadoc ?) that it can mess up the spec if not used carefully.

If you want code generated names, simply don't use nicknames !

I have the same issue. Version 2.0 was allowing to customize the method names with the Nickname attribute, which is not the case for 2.2. This breaks our generated APIs and prevents us to upgrade. It's unclear in this discussion if it will get fixed or not. What's the status?


Getting line number of config where error has occurred ?

It will be more intuitive if the Exceptions thrown also includes the line number of the config where error has occurred. for eg:
<open>
       a    1
</close>
Then we may get something like  "In line no:3 closing tag without any opening tag" or something similar.

Right!
Let's see if commit fe7454a6ba0568e7475c807444e36b046a85eb77 improves this?


Not encoding colon in query key/value

When adding query key/value containing colon, it stays unencoded.

CxxUrl is an url parser. It is not intended to modify or extend urls.
Is the problem you report related to parsing ?

Oh I see...
this is very confusing, as in your README you don't mention this, you even mention "Setting the different fields of an Url object" with example adding a query and have public add_query method.
In that case, I suggest altering the README a little bit so this is clear.
Thanks anyway for letting me know 👍

I will check what I did. Maybe I’m wrong. This is old now, and I didn’t program in C++ for years now.

You are right.
I have to fully review the code. What you report is then a significant shortcoming of the library.

According to RFC 3986, the query part of the URL is query = *( pchar / "/" / "?" ) (page 24), and pchar is defined as pchar = unreserved / pct-encoded / sub-delims / ":" / "@" (page 23) which means that the colon (:) does not need to be percent encoded.
Thus to me, the current code is correct.


Add nvm?

I am aware that this isn't the first time this has come up but now that nvm is an incubating project of the OpenJS Foundation, would you be willing to reconsider and add nvm to this curated list?

Sorry, no. The problem was never who owned/maintained nvm, but rather its fundamental flaws, which are still there.

What you said reminded me of this:

A decision can be both elegant for its time and short-sighted for the future. For example, see the recent crtique of Unix’s fork system call, “A fork() in the road,” by Andrew Baumann et al., from HotOS ’19. In fact, nearly all designs end up being short-sighted given a long enough time scale. We’d be fortunate for all our designs to last the 50 years that fork has. The most important part is to guard against short-term failures of vision, not very long-term ones.

Source: https://research.swtch.com/proposals-representation
Please don't mistake this as an argument, just sharing something you might find interesting.


Issue with program with value after position 72

When in your input cobol program, you have a string from position 73 to 79 (here value "MP029C "), this string is added as a new line in the generated cobol program like you can see below :

It could be great to ignore  this string to prevent bad generation like we have here with extra "dirty" lines.

Hi @Thibaut69,
Glad to have you working with CC hope you are enjoying :)!
Published a branch with a fix feel free to use it for this Issue. I will be doing a PR in the future that will implement that fix.

Hi @samdion1994, thanks a lot for your quick answer.
I'm not familiar with gradle, I've download your new branch and try to build with command : gradle build (I had 8 tests not OK, see below)

If i try to build without the test with command : gradle build -x test, I have a jar under build/libs
But when i try to launch ".\cobol-check.cmd -p myprog", i got an issue no main manifest attribut in the cobol-check.jar

Hi @Thibaut69,
You are right... I add a validation can you pull and rebuild the dist then try is out :)!

Hi @samdion1994, just tested and there is no more new lines between Identification division to FILE-CONTROL, but below DATA DIVISION the new lines are still there :


Login page background, dynamic, fancy flowing waves.

IT looks a bit static, I'd like to make this a gif or video and make it move it a bit with some girls popping in and out.

PR here https://github.com/own-me/frontend/pull/7


feat: add UI frontend

fix #8
working through it with Martin in class today, getting some stuff moving.

I see start_time initialized with None which is cool. I see total_hours initialized as 0 which should be initialized with data from the database, but considering you don't have the database it okay.
In the clock_in function the if statement should eventually get replaced if in the database because right now the conditional only checks if the user inputted any data for username and pin. The conditional should get split up into three parts: if the username and pin are in the database, if they aren't in the database (option to add them), and if not enough data was inputted.


stuff happening while testing

Doubles check when creating new entity

Consultant create: Check if not yet exists (same name / same email)
Client: same kbo

(hard) delete project / consultant (from the list)
(when no projectMonth records yet attached)

create new invoice -> select projectMonth -> create new invocie
--> projectMonth is not reset


flashplayeractivex v<IP_ADDRESS> outdated url

C:\>cup -y flashplayeractivex
flashplayeractivex v<IP_ADDRESS> [Approved]
flashplayeractivex package files upgrade completed. Performing other installation steps.
Attempt to get headers for https://download.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_24_active_x.msi failed.
  The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://download.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_24_active_x.msi'. Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (404) Not Found."
Downloading flashplayeractivex
  from 'https://download.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_24_active_x.msi'
ERROR: The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://download.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_24_active_x.msi'. Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (404) Not Found."
The upgrade of flashplayeractivex was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\flashplayeractivex\tools\chocolateyInstall.ps1'.
 See log for details.

https://download.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_24_active_x.msi redirects to http://fpdownload.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_24_active_x.msi.
Correct URL is https://download.macromedia.com/pub/flashplayer/pdc/<IP_ADDRESS>/install_flash_player_24_active_x.msi redirecting to http://fpdownload.macromedia.com/pub/flashplayer/pdc/<IP_ADDRESS>/install_flash_player_24_active_x.msi.

thank you for opening this issue, we are aware of the issue.
The url have been fixed in the repository, but have yet to be pushed out.
I'm waiting for the go ahead from the rest of the core team packages maintainers on  https://github.com/chocolatey/chocolatey-coreteampackages/pull/543
When that one is merged we would then be able to send out an update for this package.

@pyhedgehog a updated version of all the flashplayer packages have been pushed to chocolatey.org


CONTRIBUTING: Spelling fix, propoals -> proposals

Just a small spelling fix in CONTRIBUTING.md.

/release-note-none

/release-note-none

FYI, you can also write into the release-note block a NONE. That is the preferred way.

/lgtm
/approve

FYI, you can also write into the release-note block a NONE. That is the preferred way.

Thanks, I will try it next time!