Roadmap: move cty into the libc repo

I talked with @japaric on Discord, and we agreed on moving the cty crate into the libc repo. This should get it the same kind of testing as libc, and get some more hands maintaining this crate (e.g. adding support for new targets in a backwards compatible way).
We could stop there.

However, there have been a couple of issues open in the past about addressing the use case of just using C types, without bringing in the whole libc (https://github.com/rust-lang/rust/issues/36193 , https://github.com/rust-lang/rust/issues/47027, https://github.com/rust-lang/libc/issues/881, https://github.com/rust-lang/libc/issues/375 , https://github.com/rust-lang/libc/pull/1244 ).
For libraries doing this, it would be great if these types were also the same C types that libc uses, so that if they expose them in their API, a dependency that does use libc internally can just use them to interface with libc (and std::raw, etc.).
This is something that would require review by the libs team, because:

it would "bless" cty as the way to obtain C types,
cty would become a dependency of libstd via the libc crate.

Iff we were to do that, there is one aspect of cty's design that differs from libcs and that is worth calling out: libc is empty on unsupported platforms, while cty is not.
The cty crate provides some types on all platforms, past, present, and future ones. This seems like a no brainer for, e.g., int16_t. C implementations do not need to provide this type, so one design would be to only conditionally provide it. But if a C implementation provides this type, there is only one way in which it could be provided AFAICT, and that is type int16_t = i16; [0]. So the design decision of always providing this type, which is what cty does, seems fine to me.
However, cty also provides other C types on all platforms, like ssize_t (#13 ) or intptr_t (see CHERI comments by @Gankro and @Amanieu : https://github.com/rust-rfcs/unsafe-code-guidelines/issues/52#issuecomment-460112025), where the argument that there is only one single way in which C could provide this is less clear.
If we make cty a dependency of libc, it would be unfortunate to have to perform a breaking change in the cty crate (and therefore libc), if we ever add a platform in which some of these default types are incorrect. We might be able to get away with this breaking change then, because the platform wasn't officially supported before, therefore we would be breaking something that was unstable. But if, for example, we decide to not provide ssize_t by default anymore on unsupported platforms, we will probably end up breaking a lot of people using xargo to build unsupported platforms as a consequence.
The safest design is to make cty empty on unsupported platforms, that is, we would need to manually vetto new platforms into cty support. However, some users want "reasonable" C types in unsupported platforms (e.g. https://github.com/rust-lang/libc/pull/1244). In that PR, my recommendation was to allow that behind some cargo feature. That is, when the user enables a feature in cty, if the platform is unsupported, we would expose some "reasonable" C types (depending on arch, etc.) instead of having the crate be empty.
cc @SimonSapin @denzp

[0] I suppose that if the platform has padding bits or trap representations in the int16_t type, then i16 would probably do so as well - I'm not 100% sure what we guarantee about this in the Rust side.

Have you considered the alternative of just adding those types to core::ffi like c_void already is?

Have you considered the alternative of just adding those types

Not much, yet. The bar for adding those to core::ffi is the same as for libc: these types have to be correct on all past, present, and future platforms. Also, because libc supports older Rust toolchains, cty could only re-export these from core::ffi for toolchains for which this is available, and will still need to continue to provide these themselves on older toolchains. That is, we have to get this right for cty/libc anyways.
I suspect that once we get this right for the cty crate, then "moving" these to core::ffi should be easy. All the work making sure that these are correct can be reused in an RFC that proposes that, and we'll already have the experience that "we did it for libc and nothing broke".
Implementation-wise, we probably want to avoid duplicating the maintenance of all of this. So what will happen is that core::ffi will actually depend on a "special" build of cty and re-export some of its types, which then cty gets to use when libcore is available as a dependency. But I'd rather worry about these implementation details later, since all of this still requires having a well functioning cty crate.

What do you think about moving cty into a separate module within libc - let's say libc::generic_cty?
Then whitelisted targets can implicitly reexport (or override some of them) types from the submodule, and users of not-supported targets will have to explicitly specify the types from libc::generic_cty?
Eventually, in order to achieve a complete concistency:

make core::ffi reexport the libc::generic_cty::*;
make std::os::raw reexport target-specific libc::{c_int, ...} types for the whitelisted targets.

Later we can go deeper and let a user build only "the C types" out of the libc with crate features.

… and has been stabilized aiming for 1.64.


Error enumerating and uploading files

Hello,
I'm unsure if this is related to issue #215 and decided to create a separate incident.
Setup:
Domain Controller with Myrtille on Windows Server 2016.
Computer named "qeevtsd1" that is joined to the domain and on Windows Server 2016.
I am connecting to qeevtsd1 remotely via the Myrtille web portal on the DC using a domain user.
The domain user's account has folder redirection enabled via Group Policy and is configured as described in the Myrtille Documentation.
Everything appears to be working correctly except for files.
GetUserDocumentsFolderFiles Error:
2020-03-23 14:25:26,191 [9] ERROR System.Diagnostics redirection [(null)] - Failed to retrieve the user documents (System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Logon failure: the user has not been granted the requested logon type at this computer (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.ComponentModel.Win32Exception: Logon failure: the user has not been granted the requested logon type at this computer
   at Myrtille.Helpers.AccountHelper.GetUserDocumentsFolder(String userDomain, String userName, String userPassword)
   at Myrtille.Services.FileStorage.GetUserDocumentsFolderFiles(Guid remoteSessionId, String userDomain, String userName, String userPassword)
   at SyncInvokeGetUserDocumentsFolderFiles(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean is...).)

UploadFileToUserDocumentsFolder Error:
2020-03-23 14:25:26,213 [9] ERROR System.Diagnostics redirection [(null)] - Failed to upload file Domains.xlsx to user one.qeev documents folder, remote session 7008bba3-ac66-4bd7-8362-c9fbcd13c97a (System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Logon failure: the user has not been granted the requested logon type at this computer (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.ComponentModel.Win32Exception: Logon failure: the user has not been granted the requested logon type at this computer
   at Myrtille.Helpers.AccountHelper.GetUserDocumentsFolder(String userDomain, String userName, String userPassword)
   at Myrtille.Services.FileStorage.UploadFileToUserDocumentsFolder(UploadRequest uploadRequest)
   at SyncInvokeUploadFileToUserDocumentsFolder(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)).)

I have modified the security settings for the folder and share to allow Full Control to Everyone to ensure that this is not related to the file permissions. Thanks!

Are you using the domain input field, in addition to username and password, into the login page ? indeed, you can login with user = "domain\username", but it should help for file upload if you login with domain = "domain" and user = "username"

I have tried both ways but the method I typically use (and other users will use in my environment) is connecting directly via URL query params. Example:
https://web.address/Myrtille/?__EVENTTARGET=&__EVENTARGUMENT=&server=qeevtsd1&domain=cjdevcam7.local&user=one.qeev&passwordHash=[passwordHash]&connect=Connect!

Hi, the problem is not related to the permissions on the network share but to the user account, which is not allowed to logon on the domain.
Is the DNS able to resolve the domain name from the myrtille machine? you can try a nslookup cjdevcam7.local for that purpose. Otherwise, you can also use the netbios name of the domain (CJDEVCAM7) instead of the FQDN.

I think i get a related error. I'm trying the whole day to get the file upload working.
Inspecting the logs tells me that the GetUserDocumentsFolder function is failing:
2020-03-24 15:10:56,259 [7] INFO  System.Diagnostics redirection [(null)] - Requesting authentication of user INTERNAL\vaske_yannick 2020-03-24 15:10:57,216 [7] INFO  System.Diagnostics redirection [(null)] - Requesting session host list 2020-03-24 15:10:58,817 [7] INFO  System.Diagnostics redirection [(null)] - Requesting session details 2020-03-24 15:11:00,008 [8] INFO  System.Diagnostics redirection [(null)] - Connecting remote session f3bbb4f9-f140-4511-939c-48f1c8d09207, type RDP, security AUTO, server (:port) <IP_ADDRESS>, vm (none), domain INTERNAL, user vaske_yannick, program (none) 2020-03-24 15:11:22,464 [7] ERROR System.Diagnostics redirection [(null)] - Failed to retrieve file(s) from user vaske_yannick documents folder C:\Users\TEMP\Documents, remote session f3bbb4f9-f140-4511-939c-48f1c8d09207 (System.IO.DirectoryNotFoundException: Ein Teil des Pfades "C:\Users\TEMP\Documents" konnte nicht gefunden werden.    bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)    bei System.IO.FileSystemEnumerableIterator1.CommonInit()
bei System.IO.FileSystemEnumerableIterator1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler1 resultHandler, Boolean checkHost)
bei System.IO.Directory.GetFiles(String path)
bei Myrtille.Services.FileStorage.GetUserDocumentsFolderFiles(Guid remoteSessionId, String userDomain, String userName, String userPassword))`
The Folder Redirection ist working and the maschine where Myrtille is running has access to the folder. But somehow (i don't know if this is normal) when i try to upload a TEMP User is created and shortly after the Upload deleted again.

@cedrozor you're correct, I was able to enumerate and upload/download files when using a domain admin account to connect. I'll have to narrow down the access that the user accounts are missing. Thank you for your help!
@DrVaskee while the symptom/error is similar I believe that is a different issue. I'm marking this one as closed since my original inquiry is resolved. Obviously it's up to cedrozor but you may want to open a separate issue.

@DrVaskee I don't know about this "temp" profile, this is something managed by Windows.
Did you allowed multiple sessions per user ? (https://github.com/cedrozor/myrtille/blob/master/DOCUMENTATION.md#remote-desktop-services). By doing so, Windows should have a synchronization mechanism for roaming profiles (and avoid locking or creating temporary profiles).
@camjcorley is right, you should open another issue if the problem persists.

For future reference the problem was as follows:
The user accounts I'm using have logon access to the domain computer but not to the infrastructure server where Myrtille is installed.
To resolve this, I made the following change:
Myrtille.Services
|_ AccountHelper.cs
   |_ GetUserDocumentsFolder()
      |_ if (LogonUser(userName, string.IsNullOrEmpty(userDomain) ? Environment.MachineName : userDomain, userPassword, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, ref token) != 0)

The change was to replace "LOGON32_LOGON_INTERACTIVE" with "LOGON32_LOGON_NETWORK".
This change seems to cause the account to authenticate against the domain instead of locally on the computer.

Thanks for your input. I remember having more luck with LOGON32_LOGON_INTERACTIVE  but it makes sense using a network authentication with a domain. I will make more tests and update the code accordingly.

Also just fyi.
My Problem had nothing to do with the multiple sessions per user.
Somehow there was a Userprofile out of chinese letters. The Userprofile was not on the filesystem but in the registry, where the profilelist is stored.
The maschine was freshly installed before i added myrtille. After removing the entry from the registry it worked seamless.

Yes, I already noticed the chinese characters in profile names in some circumstances. I think hey are due to accentuated characters, or any other non ASCII character, in the user profile name. The Windows API methods work with wide strings (multibytes per character) and I must have forgot a conversion in some part of the managed C# code.
I will re-check that. Re-opening this issue for future reference.
Thanks for your inputs! :)

I made further investigations and found this:

https://help.duo.com/s/article/1093?language=en_US
https://social.technet.microsoft.com/Forums/lync/en-US/95ed510e-1a2e-47d5-a0e4-3a411857a46e/logon-failure-the-user-has-not-been-granted-the-requested-logon-type-at-this-computer-win-server?forum=winserver8gen

Ensure that the users have been delegated the “Allow log on locally” rights for console logins, or have been delegated both the “Allow log on locally” and “Allow log on through Remote Desktop Services” rights in the computer’s local or domain-level security policy.

Basically, waiting for me to change the log on method from interactive to network when using a domain, as explained above, you can allow the domain users to log on locally, in addition to allow log on through remote desktop.

done in 2.9.0


Change of types-PySide2 breaks Python 2 compatibility

Hi,
We just started seeing none of our pipelines on Python 2 working anymore, after the latest release tag.
types-PySide2 is not available as Python 2 package and is now a required part of the installation of Qt.py (https://github.com/mottosso/Qt.py/blame/master/setup.py#L38).
I believe rolling back the change to the previous line would fix the issue (by making types-PySide2 an extras require not a install requirement).
    extras_require={
        "stubs": ["types-PySide2"],
    },

For now we've pinned our Python2 version to 1.3.7, but ideally we'd continue to get latest packages if it would be possible.
cc @chadrik for visibility.
Thanks!

Thanks for pinging this, we literally merged and released this version 2 hours ago.

https://github.com/mottosso/Qt.py/releases/tag/1.3.8

Also leaning on Chadrik for this, would it resolve by making a version of types-PySide2 for Python 2?
Till then, the last version 1.3.7 will work. Sorry about this, we've lost our test suite a while back due to the CI service Travis becoming a paid platform, so this release was not fully tested on all platforms and versions of Python.

Thanks for the quick reply - pinning to 1.3.7 for now unblocked us!

Sorry!  I just uploaded a wheel that supports python 2 and 3:  types-PySide2 <IP_ADDRESS>.3.   I didn't have anything in my pyproject limiting the version and I just missed the fact that the wheel defaulted to python3-only.

Can you confirm this works for you @friedererdmann?
Given we haven't pinned the specific version of types-PySide2 this should already get picked up. However, that also means there's a chance Qt.py may break again sometime in the future due to updates to types-PySide2. I'd prefer to pin the version in our setup.py, and explicitly update it when necessary. What do you think @chadrik?

Yes, I can confirm it works now. Thanks both of you!

I'd prefer to pin the version in our setup.py, and explicitly update it when necessary.

@mottosso , I disagree with pinning external dependencies in setup.py/cfg's main requirements. Sure, it makes it so Qt.py will work with types-PySide2, but what if another package requires a different version of types-PySide2? I'm mostly concerned about explicit style pinning like types-PySide2==<IP_ADDRESS>.3, using types-PySide2>=<IP_ADDRESS>.3 or types-PySide2!=<IP_ADDRESS>.2 is generally acceptable.
I would be ok with pinning it as an optional dependency(extras_require), that gives the flexibility to easily cover the "may break" case.
setup(
    name="Qt.py",
    ...,
    install_requires=["types-PySide2>=<IP_ADDRESS>.3"],
    extras_require={
        "pinned": ["types-PySide2==<IP_ADDRESS>.3"],
    },
)

This lets you use pip install Qt.py and it just requires a version of types-PySide2. If you use pip install Qt.py[pinned] you know that its an blessed version of the requirements.
The reason I'm concerned about this is more to do with pkg_resources(I assume importlib.metadata is similar) raising exceptions if there are version conflicts with the current pip setup. This breaks pip exe's launching and resolving plugins with pkg_resources.
Note: I couldn't come up with a better name than pinned, it can have any name and I'm not really a fan of the name pinned.

Oof, yes you are right. The >= requirement doesn't solve for when a future update to types-PySide2 breaks Qt.py.
In that case, can we somehow embed types-PySide2 into Qt.py? Similar to how we already embed the stubs?
https://github.com/mottosso/Qt.py/blob/4a9abaec163f28739cd7639605ba5dbc871f797e/setup.py#L36

Why is types-PySide2 a hard requirement? I don't use pycharm so why do I need a collection of .pyi files I'm not using and aren't being used to make Qt.py work? Also, why do I need it for Qt.py to work in maya/nuke/houdini/3ds Max/etc I'm using pip to install Qt.py? It seems to me like the definition of a optional requirement.
I like the original suggestion of just making it an extras_require(In my last comment, I didn't actually read the first comment suggesting it 😃I was just responding to you suggesting pinning it). I won't object to hard pinning  the requirement if its only in an extras_require.
Looking at the original PR the reason to make it a hard requirement seems to be:

the reality is that 99% of people who experience broken code completion for Qt.py will not read this documentation, they'll simply be frustrated that it doesn't work out of the box.

This seems to me like its making it hard on everyone just so users don't have to read the readme/install instructions.
In general pinning requirements does not belong in install_requires. https://stackoverflow.com/a/44938662

the reality is that 99% of people who experience broken code completion for Qt.py will not read this documentation, they'll simply be frustrated that it doesn't work out of the box.

This seems to me like its making it hard on everyone just so users don't have to read the readme/install instructions.

It's not really hard on everyone, though is it?   types-PySide2 has zero affect on python runtime, so it can't break your code.  The primary thing that could go wrong is that it doesn't support the version of python that you're using with Qt.py, which we just experienced.  Sorry for that mistake, but it's now fixed, and it's hard to imagine a scenario where it could become unfixed.
My recommendation is to leave it as it is, and if lots of people complain about it, make it an extra.  I will be very surprised if anyone complains at all, let alone more than they've complained on various threads here about completion support.

In general pinning requirements does not belong in install_requires

I agree with this.  We should leave it unpinned.  End users can pin it if they need to.


Could not able to install angular/cli - getting<EMAIL_ADDRESS>postinstall error

Versions
Node -v = v6.10.2
npm -v  = v5.6.0
Window 7 version
Repro steps
By entering the below command, get the following error(in observed behaviour). I don't know how to fix this error
D:>npm i -g @angular/cli
Observed behavior

D:>npm i -g @angular/cli
C:\Users\barumugam2\AppData\Roaming\npm\ng -> C:\Users\barumugam2\AppData\Roaming\npm\node_modules@angular\cli\bin\ng

<EMAIL_ADDRESS>install C:\Users\barumugam2\AppData\Roaming\npm\node_modules@angular\cli\node_modules\node-sass
node scripts/install.js

<EMAIL_ADDRESS>postinstall C:\Users\barumugam2\AppData\Roaming\npm\node_modules@angular\cli\node_modules\webpack\node_modules\uglifyjs-webpack-plugin
node lib/post_install.js

npm WARN rollback Rolling back<EMAIL_ADDRESS>failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\barumugam2\AppData\Roaming\npm\node_modules@angular\cli\node_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules@angular\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules@angular\cli\node_modules\node-sass):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>install: node scripts/install.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn C:\Windows\system32\cmd.exe; ENOENT
npm ERR! file C:\Windows\system32\cmd.exe;
npm ERR! path C:\Windows\system32\cmd.exe;
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn C:\Windows\system32\cmd.exe;
npm ERR<EMAIL_ADDRESS>postinstall: node lib/post_install.js
npm ERR! spawn C:\Windows\system32\cmd.exe; ENOENT
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR!      C:\Users\barumugam2\AppData\Roaming\npm-cache_logs\2018-01-08T13_30_38_133Z-debug.log

package.txt
Desired behavior
I should not get this error, initially i was not getting any error, i'm not sure how i can fix this error.
because of this we are stuck of the production release.
Please guide us, to fix this issue.
Thanks
Babu

Hi, I just had the same problem. Steps to solve

uninstall your node and delete all the cache
install it again:
type on your CMD: npm init, just type enter to install all the default data
end with npm install -g @angular/cli


aez.simulateCropCycle error

@kidstoneszk Our team has just updated the code repo, please re-clone and try again. Thank you!


Deployment

Is the documentation deployed somewhere?

yes, here https://cheminfo.github.io/cheminfo-types/


Set up Notebook Examples of different configurations (with refactored syntax)

[ ] Echogram Plotting
- multiple frequency, tricolor, colormap, Sv_range_slider, example of passing parameters
[ ] Echogram and Map plotting, example with changing tiles
[ ] Curtain plotting on its own, example changing aspect ratio, echogram and curtain
[ ] Echogram and stats plotting

@ldr426 add extra possible configurations for each case.

Thanks @valentina-s, Coding was done just. Let me start documents and demos work.


Database table/PF objects are not recognized by actions feature.

Is your feature request related to a problem? Please describe.
I was trying to implement a pseudo PDM options feature using the actions.  My action I want to implement is a CPYF command to copy data from the selected table object and be prompted for the target table to copy to.   I have my action built but the object browser sees my table as a file and thinks it need to be operated on like a PF-SRC object and not another object.
Describe the solution you'd like
Since database SQL tables (FILES) (PF-DTA attributes) (SYSTABLES -> FILE_TYPE <> 'S') cannot have more than one member and search thing can be problematic the right-click options my table objects are limited to are useless.   It save you time developing any right-click options I ask that FILE_TYPE <> 'D'  be treated like other object types and have the Run Actions option on their right-click menu.
Describe alternatives you've considered
Since there isn't a command line available to me (i don't have the 5250 terminal installed) I have to return to the ACS 5250 tool to run my PDM options there.
Additional context
You may need to augment the query of SYSTABLEs to return the FILE_TYPE so that other processing knowledge maybe possible.
Thanks, Matt

So I think what you're asking for is: can an action be created for specific object attributes as well as types?
Because a PF-SRC, PF/table, LF, etc, are all types of *FILE. We do actually return the attribute, but Actions do not take it into account. It gets tricky here because the type is already kind of specific, but I can see how checking the attribute would be useful also.
Got to think about how it would work for a UI perspective.

Let's start by adding the attribute to the item description in the object browser.

I ended up figuring it out and it was tons easier than I was expecting. Will release it tonight!

Great!  Works like a charm!


Rework/optimize form and table styles

Standardized form styles.
Optimized styles.css by removing unused, unneeded styles and by combining styles where possible

Thank you very much, looks super 👍


Repeated messages with protobuf id >= 16 are packed incorrectly

RepeatedMessages.zip
In the attached project, I've generated a client and server from the included 'repeated.proto'. It includes a nested message like this:
// Nested repeated message
message RepeatedMessage
{
    repeated SimpleMessage field_id_15 = 15;
    repeated SimpleMessage field_id_16 = 16;
}

To reproduce, run the TestRepeatedMessage_server.Run Service.vi and then run TestPacking.vi in the project.
Inspecting the resulting Any from TestPacking.vi, field_id_15 and field_id_16 are serialized differently. In the case of field_id_16, there is one byte left off of the end (the '64' byte at index 19 from field_id_15).
Compare the serialized bytes from the two fields:

It appears that because the field id takes two bytes to serialize, grpc-labview is off-by-one on its byte count. These are the likely code error candidates that we've identified:
https://github.com/ni/grpc-labview/blob/0f954d484feeab837faf11ea89f18e161aff86fa/src/lv_message_value.cc#L55
This code appears to always allocated 1 byte for the field instead of something like this that calculates the tag value size:
https://github.com/ni/grpc-labview/blob/0f954d484feeab837faf11ea89f18e161aff86fa/src/lv_message_value.cc#L32
Software:
Using grpc-labview <IP_ADDRESS> and LabVIEW 2020 SP1

@dixonjoel I tried debugging this. While I agree that line 55 grpc-labview/src/lv_message_value.cc calculates it wrong and it needs to use TagSize() method, even after fixing that I still get one byte extra for the field_id_16. Its due to nature of grpc serialization, I guess.
I also saw that in grpc protobuf documentation its mentioned that it will take two bytes for field index 16 and above, that is why we see extra byte.
Do you have an example outside of grpc-labview which serializes field_id_15 and field_id_16 with same number of bytes?

@dixonjoel I tried debugging this. While I agree that line 55 grpc-labview/src/lv_message_value.cc calculates it wrong and it needs to use TagSize() method, even after fixing that I still get one byte extra for the field_id_16. Its due to nature of grpc serialization, I guess.
I also saw that in grpc protobuf documentation its mentioned that it will take two bytes for field index 16 and above, that is why we see extra byte.
Do you have an example outside of grpc-labview which serializes field_id_15 and field_id_16 with same number of bytes?

@ni-sujain That is correct and expected. The field index does take an extra byte. And this part of the serialization is already correct. As you can see in the screenshots, the byte '122' for field index 15 and the bytes '130' and '1' for field index 16 are correct at the beginning. The problem lies at the end of the buffer. In the field index 15 case, the last byte is '64' whereas in the field index 16 case, the last byte is '0'. There should be an additional '64' at the end and that buffer should be 1 byte longer overall. So with your change, you may already be able to see the last byte as '64' which would indicate your change fixed the bug.

This is now available as part of this release https://github.com/ni/grpc-labview/releases/tag/v<IP_ADDRESS>


Matlab in a remote server

Describe the bug
Not connecting to Matlab when connected to a server with matlab using a tunnel
To Reproduce
Steps to reproduce the behavior:

Start a tunnel to a server with Matlab installed
In Matlab configuration, add the result of the remote server's matlabroot
Ask to connect to matlab
See forever MATLAB: Establishing Connection

Expected behavior
I would like to run 1+1 in my remote file with shift+enter in my console, that actually runs in the remote server's matlab
Screenshots
I don't think it is required
Useful Information

OS Version: server Ubuntu, local: macos Sequoia
VS Code Version: 1.93.1

Additional context
No more context, it would be great to have a system to test if local VS Code is able to see remote Matlab. Right now, I edit the .m in the remote machine, and I copy and paste into a remote terminal, where I have a "matlab -nodesktop' opened

Thank you for raising this to us!
Can you please share the language server logs from your VS Code session. These can be found using the following directions:

Open the Output panel in VS Code (can be opened using Shift+Cmd+U)
In the drop-down, select "MATLAB Language Server"
At the top of the log, there should be a "Log Directory" printed
Please share the log flies from this directory

It would also be helpful if you could provide example steps of how you are setting up the tunnel, including the value you are specifying as the matlabroot.
Thank you!


[TUBEMQ-531] delete cluster

[TUBEMQ-531] delete cluster

+1

+1

Codecov Report

Merging #407 (d80e065) into TUBEMQ-421 (b8b323d) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@               Coverage Diff               @@
##             TUBEMQ-421    #407      +/-   ##
===============================================
- Coverage          8.00%   7.97%   -0.04%
+ Complexity          468     464       -4
===============================================
  Files               249     249
  Lines             27125   27125
  Branches           4441    4441
===============================================
- Hits               2172    2163       -9
- Misses            24482   24498      +16
+ Partials            471     464       -7

Impacted Files
Coverage Δ
Complexity Δ

...pache/tubemq/corebase/policies/FlowCtrlResult.java
0.00% <0.00%> (-60.00%)
0.00% <0.00%> (-1.00%)

.../apache/tubemq/corebase/policies/FlowCtrlItem.java
36.66% <0.00%> (-3.34%)
7.00% <0.00%> (-2.00%)

.../tubemq/corebase/policies/FlowCtrlRuleHandler.java
42.52% <0.00%> (-2.06%)
34.00% <0.00%> (-1.00%)

.../java/org/apache/flume/sink/tubemq/TubemqSink.java
55.42% <0.00%> (+4.00%)
14.00% <0.00%> (ø%)

Continue to review full report at Codecov.

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

Codecov Report

Merging #407 (d80e065) into TUBEMQ-421 (b8b323d) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@               Coverage Diff               @@
##             TUBEMQ-421    #407      +/-   ##
===============================================
- Coverage          8.00%   7.97%   -0.04%
+ Complexity          468     464       -4
===============================================
  Files               249     249
  Lines             27125   27125
  Branches           4441    4441
===============================================
- Hits               2172    2163       -9
- Misses            24482   24498      +16
+ Partials            471     464       -7

Impacted Files
Coverage Δ
Complexity Δ

...pache/tubemq/corebase/policies/FlowCtrlResult.java
0.00% <0.00%> (-60.00%)
0.00% <0.00%> (-1.00%)

.../apache/tubemq/corebase/policies/FlowCtrlItem.java
36.66% <0.00%> (-3.34%)
7.00% <0.00%> (-2.00%)

.../tubemq/corebase/policies/FlowCtrlRuleHandler.java
42.52% <0.00%> (-2.06%)
34.00% <0.00%> (-1.00%)

.../java/org/apache/flume/sink/tubemq/TubemqSink.java
55.42% <0.00%> (+4.00%)
14.00% <0.00%> (ø%)

Continue to review full report at Codecov.

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


network does not support ENS

If a user tries to Sign-In-With-Ethereum using the public OIDC with a non-supported ENS network, a console error appears stating: network does not support ENS (so far only Ethereum Mainnet and Goerli supports it. Polygon, Arbitrum and Avalanche have throw me the same error).
The problem is that when a normal user tries to sign in with a different network, there is no error message indicating him that he should change network or use a ENS-supported network. I think there could be two solutions:

In our application (and I assume most applications) we don't need to know the wallet network, we only need to have a valid signature to login in our users. We could send a query param on the siginwithethereum.org link with useENS = true || false so users can sign in without worrying about the currently set network.

Add an error handler in the Client Web3 Modal to indicate the user that the current selected network does not support ENS.

Currently blocked by:

[ ] https://github.com/spruceid/siwe-web3modal/issues/10

Thank you for your support! It looks like https://github.com/spruceid/siwe-web3modal/issues/10 was closed successfully. When are these changes going to be available at https://oidc.signinwithethereum.org/?


Couldn't login

How to reproduce the behaviour

I have pulled the project in the past 3 months, and today I run the docker server, I didn't remember the username and password. After I sign up again, I couldn't log in anymore.
Thanks for helping!

Your Environment

Operating System: Mac OS
Python Version Used: 3.6
When you install doccano: 3 months ago
How did you install doccano (Heroku button etc): docker

Please use Django Admin page or re-install doccano.

Thank you


Mouse: Middle Button Signals/Method

Adds support for Mouse.MiddleDown, Mouse.MiddleUp and Mouse:IsMiddleDown()

Thanks!


chore: rename master to main across the repo

This PR aims to replace all occurrences of master to main across the repository.

A side-effect of the rename is making the GH Pages unavailable:

I tried to change the source for GH Pages to the /docs folder on main and then back to / (root) again but it didn't seem to do the trick.


Modal window while moving other window.

If you start a modal window while moving other window this will crash!

Have to be solved on frame side!

Partially solved! By checking if I m in debug mode before switching automatically.


TF2 msgs not implemented in ros2 branch (#116)

add ign pose_v to ros tf2_message bridge

add tf2 msgs dependency

I'll fix the test tomorrow. Not too sure why the tf2 test doesn't pass as ignition correctly register and echo the topic fine in terminal.

I updated the Readme too because the list was not reflecting the correct node name. If it should be in a separate issue/PR tell me and I'll revert it


Colored Name Tags and Tablist Colors?

I was using the scoreboard to have colors in my displayname floating above my head, and in the tablist, but since I am using scoreboardstats I dont have the colors anymore?
Is this an error or do you have any way to repair this?
I did already try to recreate the teams and reset the colors. No results. Still white names

Activate compatibility mode and install ProtocolLib if you don't have it. It's actually a minecraft issue, but I worked around this.

Installed and activated. Restarted server. Fixed it! Thanks alot!

no problem


mysql-async high tick

running mysql-async 3.2.0

Having the same problem, also running gcphone, I saw in the server logs that it causing high sql ms.
Tell me if you got anything

Same problem

Are you running OneSync 64/128 slots ?
@ArmoredSoldiers @MohamedAmrMahdy

Are you running OneSync 64/128 slots ?
@ArmoredSoldiers @MohamedAmrMahdy
yes this issue happens when players get over 45 players online

Me too [But only when 50+], have you found any solution or something to help it ?

Have you tried to disable the gcphone ?
@MohamedAmrMahdy

Have you tried to disable the gcphone ?
@MohamedAmrMahdy

no but i think it is not the main reason because others recourse queries get same lag

I debugged the mysql, I saw that the gcphone has slow query [high ms], I've checked myself and with some of my programmers [in my server] and we saw that the phone itself built all on mysql [always query the sql and not saving data on the server/client script]

I'm gonna make some tests to see if it does the gcphone who is causing the problem, I'll let you know.
@MohamedAmrMahdy

I've noticed to this thing in my console [on server startup]:
[mysql-async] Database server connection established.

Authenticating with Nucleus...

server thread hitch warning: timer interval of 3040 milliseconds

Btw: I've tried to disable the gcphone and there's still high mysql tick that is causing a delay.

Samuray, yes, i running 75 slot with 256 player loops, and high tick up to 40-45 player up... i using OneSync plus, and use gcphone.

Currently I'm working on finding the problem in my server.
I've updated some resources and removed ones I don't need.
I'll update if there's any change.

Same here. Tried everything and disabling resources.

Still no solution?

running mysql-async 3.2.0

Hello, I want to know what is this analyzing tool?

Still problem :) Nothing fixed yet

Recurring issue for us from time to time aswell, not exactly sure.

After more research, some of the lag can be fended off by improving the MySQL variables, but at around ~64 people the database usually has over 1000ms sometimes when there is too much it racks up to 100k+ ms (until all queries are caught up). Most of our issues during lower pop (~50) was fixed by experimenting with variables.
All our tables are properly indexed as per needed I wonder if GHMatti can offer a solution or provide tips to look at to investigate it

@CruelAlpha how many queries per second are you running, which ones are slow?
You can contact me on Discord Matti#4268

where im putting this code?
for _, player in ipairs(GetActivePlayers()) do
local ped = GetPlayerPed(player)
-- do stuff
end

Hi, its because you have an server loop like this:
for i=1, #players, 1 do
-- MySQL.Async - Stuff
end
My solution to remove the high hitch time was this:
for i=1, #players, 1 do
doMySQLStuff(players[i])
end
function doMySQLStuff(player)
-- your MySQL.Async function stuff here
Citizen.Wait(50)
end
When you put the Wait inside an for loop the server send an error
Try it and pls send feetback ^^
I hope it works on your servers to

@Antontonov , you mean something like  this ?
Before :
`ESX.RegisterServerCallback('carlock:isVehicleOwner', function(source, cb, plate)
local identifier = GetPlayerIdentifier(source, 0)
MySQL.Async.fetchAll('SELECT owner FROM owned_vehicles WHERE owner = @owner AND plate = @plate', {
	['@owner'] = identifier,
	['@plate'] = plate
}, function(result)
	if result[1] then
		cb(result[1].owner == identifier)
	else
		cb(false)
	end
end)

end)`
After :
`ESX.RegisterServerCallback('carlock:isVehicleOwner', function(source, cb, plate)
local identifier = GetPlayerIdentifier(source, 0)
MySQL.Async.fetchAll('SELECT owner FROM owned_vehicles WHERE owner = @owner AND plate = @plate', {
	['@owner'] = identifier,
	['@plate'] = plate
}, function(result)
	if result[1] then
		cb(result[1].owner == identifier)
	else
		cb(false)
		-- test
		Citizen.Wait(50)
	end
end)

end)`

@Antontonov , you mean something like  this ?
Before :
`ESX.RegisterServerCallback('carlock:isVehicleOwner', function(source, cb, plate)
local identifier = GetPlayerIdentifier(source, 0)
MySQL.Async.fetchAll('SELECT owner FROM owned_vehicles WHERE owner = @owner AND plate = @plate', {
	['@owner'] = identifier,
	['@plate'] = plate
}, function(result)
	if result[1] then
		cb(result[1].owner == identifier)
	else
		cb(false)
	end
end)

end)`
After :
`ESX.RegisterServerCallback('carlock:isVehicleOwner', function(source, cb, plate)
local identifier = GetPlayerIdentifier(source, 0)
MySQL.Async.fetchAll('SELECT owner FROM owned_vehicles WHERE owner = @owner AND plate = @plate', {
	['@owner'] = identifier,
	['@plate'] = plate
}, function(result)
	if result[1] then
		cb(result[1].owner == identifier)
	else
		cb(false)
		-- test
		Citizen.Wait(50)
	end
end)

end)`

Hi,
First Citizien.Wait(msec) than cb()
But for only one request you dont need any wait ... i ll do that for my mysql functions inside "for"-Loops
It works fine for me and i haven t any big fat hitch warnings anymore.

Hi,
First Citizien.Wait(msec) than cb()
But for only one request you dont need any wait ... i ll do that for my mysql functions inside "for"-Loops
It works fine for me and i haven t any big fat hitch warnings anymore.

@Antontonov Interesting. I'll try to find out + I make the same thing but in client-side, which also works nice. The idea is simple. When someone uses an function from Ui menu or anywhere, he will have like 2-3 seconds cooldown, so the function will be triggered after that amount of time (the server-side code). This also works good, what you think about it ?

@Antontonov Interesting. I'll try to find out + I make the same thing but in client-side, which also works nice. The idea is simple. When someone uses an function from Ui menu or anywhere, he will have like 2-3 seconds cooldown, so the function will be triggered after that amount of time (the server-side code). This also works good, what you think about it ?

@Antontonov thanks for sharing this, looks interesting! Do you mind explaining, in what way the wait call decreases the hitch time?

@Antontonov thanks for sharing this, looks interesting! Do you mind explaining, in what way the wait call decreases the hitch time?

Hi,
First Citizien.Wait(msec) than cb()
But for only one request you dont need any wait ... i ll do that for my mysql functions inside "for"-Loops
It works fine for me and i haven t any big fat hitch warnings anymore.
Edit: And in your function the poor Citizen have to wait 50 msec longer to store/get his veh. or other stuff ^^

Can you give an example? I think shitty sql queries are crashing my server. My memory goes way up till about 20 gb and crashes the server. Player count, and time running doesn't matter just seems to be random over time.

I know that this is an older thread, but I've had the same issue just a few moments ago and fixed it. Here's some example code that would fetch and print user data every second, but increase the CPU msec with every time it runs:
Citizen.CreateThread(function()
    while true do
        MySQL.Async.fetchAll(
            "SELECT * FROM players WHERE name = @name",
            {
                ["@name"] = "Puntherline"
            },
            function(result)
                print(json.encode(result))
            end
        )
        Citizen.Wait(500)
    end
end)

By moving the MySQL function to it's own function we eliminate the high CPU msec:
Citizen.CreateThread(function()
    while true do
        print(SomeRandomFunctionToGetStuff())
        Citizen.Wait(500)
    end
end)

function SomeRandomFunctionToGetStuff()

    -- Creating the "retval" local so we can set it in just a moment
    local retval = nil

    -- Actually running the SQL code here
    MySQL.Async.fetchAll(
            "SELECT * FROM players WHERE name = @name",
            {
                ["@name"] = "Puntherline"
            },
            function(result)
                retval = json.encode(result)
            end
        )

    -- Waiting for the "retval" local to be set
    while retval == nil do
        Citizen.Wait(10)
    end

    return retval
end

The more SQL related functions you have in your code, the more work this would be, however I'd just start with the ones that are a major cause of high CPU msec and keep fixing it until you're happy with the results.


bug: "Edit it on GitHub" links are broken

https://github.com/meltano/hub/blob/main/_data/meltano/transformers/dbt-bigquery/dbt-labs.yml from https://hub.meltano.com/transformers/dbt-bigquery#looking-for-help does not load for me. If I switch blob to tree it does.

@tayloramurphy Same here, and Dev Tools show a 406 status code:

I don't know if this is related, but DevTools also show that the href attribute has whitespace around the URL, which probably doesn't help.

I'm seeing the error even when not going through the Hub but directly in GitHub:

Navigate to the file using the GitHub web UI
Reload the page - 406 is returned

Ok, sounds like it's a GitHub issue. I'll keep this open but still merge https://github.com/meltano/hub/pull/683/files which is now about changing the whitespace around the link.

Closing as this seems to be sorted.


Cleanup the repo

Add a (basic) Readme
Add an example environment file (env.example) as a starting point for new users
Remove any unnecessary terraform configuration and only configure a very basic set of resources.
(The terraform configuration only manages resources required for getting remote state working now)
Update the license to mention Codeship instead of me.

@ethangj I think the Readme needs more work, if you could take an extra look at it that would be great :)


Telemetry breaks everything if there's no write permissions

Description
As seen on databricks repos, which currently do not have write access, running any kedro command in a directory with no write access will raise an error with kedro-telemetry which then stops kedro from running everything.
This isn't the first time that an exception raised by kedro-telemetry has stopped kedro commands from working rather than just raising a warning and carrying on. I wonder if we should wrap the whole plugin in a try/except to catch any exceptions we don't anticipate. A broken kedro-telemetry shouldn't prevent users from using kedro.
Steps to reproduce

Go to https://gitpod.io/#https://github.com/kedro-org/kedro
pip install kedro-telemetry
chmod a=rx /workspace/project
kedro info

This will give the following exception and not execute the kedro command at all:
PermissionError: [Errno 13] Permission denied: '/workspace/project/.telemetry'

"A broken kedro-telemetry shouldn't prevent users from using kedro." -> No error in kedro-telemetry should prevent a user from running Kedro, so as part of this fix ensure that other errors won't break Kedro either.


generate-changelog in sync-branches is not working well

The changelog is empty.
https://github.com/tier4/autoware.universe/runs/5085507144?check_suite_focus=true

Seeing https://github.com/kenji-miyake/autoware-github-actions/pull/16 is working, it's because the repository is different? :thinking:
https://github.com/kenji-miyake/autoware-github-actions/runs/5085573215?check_suite_focus=true

If I run git-cliff manually, it works as expected.
❯ git cliff -vv origin/tier4/main..HEAD
 WARN  git_cliff > "cliff.toml" is not found, using the default configuration.
 DEBUG git_cliff::changelog > Processing the commits...
 DEBUG git_cliff::changelog > Processing the releases...
 DEBUG git_cliff::changelog > Generating changelog...
# Changelog
All notable changes to this project will be documented in this file.

## [unreleased]

### Bug Fixes

- Point cloud conversion logic (#308)
- Fix detection_area findForwardOffsetSegment (#305)
- Remove rosbridge launch from web_controller launch file (#318)
- Fix virtual_traffic_light singed_arc_length and state (#306)
- Suppress warnings  (#298)
- Suppress warnings  (#296)
- Suppress warnings (#293)
- Suppress warnings  (#295)
- Suppress warnings  (#294)
- Changed pointcloud conversion method (#336)
- Add timestamp (#317)
- Memory leak problem (#333)
- Occlusion spot offset (#290)

### Documentation

- Fix invalid links (#309)
- Add obstacle stop doc (#266)

### Features

- Reset previous acceleration when the car starts moving (#303)
- Add instrument type and id to virtual_traffic_light logger (#328)
- Add parameter for tuning tire radius (#327)
- Add particles param (#330)

### Miscellaneous Tasks

- Lighten detection area debug marker (#314)
- Remove path point with lane id (#316)
- Sync files (#312)
- Sync files (#326)
- Sync automatic-rebase.yaml from autowarefoundation/autoware
- Replace legacy timer (#329)
- Update package.xml (#331)
- Fix sync-files.yaml
- Sync community health files (#334)
- Sync files (#335)
- Sync files (#341)
- Sync docs workflows (#342)
- Sync check-build-depends.yaml with autoware_common

### Styling

- Fix English (#307)

### Ci

- Change build-and-test workflow (#297)
- Add sync-files.yaml (#311)
- Add codecov-action (#292)
- Change option (#323)
- Autoupdate (#124)
- Use containers made in the AWF repository (#337)

<!-- generated by git-cliff -->


In Traditional web application creation, make username as a requested attribute.

Describe the issue:

In Traditional web application creation make username as a requested attribute. However, that should be userID. Verify the other flows related to the attribute mapping. Ex. SPA, SAML, OIDC, etc
<>
Environment information (Please complete the following information; remove  any unnecessary fields) :

Product Version: [e.g., IS 6.0.0]
OS: [e.g.,  Mac]
Database: [e.g., H2]
Userstore: [e.g., DBC]

Optional Fields
Related issues:

Suggested labels:

Related

https://github.com/wso2/product-is/issues/14561

Refering https://github.com/wso2/product-is/issues/14561#issuecomment-1207186653
curl 'https://localhost:9443/api/server/v1/claim-dialects/%7B%7D/claims' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:103.0) Gecko/20100101 Firefox/103.0' -H 'Accept: application/json' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br' -H 'Access-Control-Allow-Origin: https://localhost:9443' -H 'Authorization: Bearer e9cd4d04-c421-3263-8560-e6125eac430b' -H 'Connection: keep-alive' -H 'Cookie: menuPanel=visible; menuPanelType=main; JSESSIONID=F343628DB921B97F22061343B915695D; atbv=492eb4e9-5cf2-4adb-80df-77c81e4f853e; current-breadcrumb=; requestedURI=../../carbon/admin/index.jsp; MSG16596118471050.0706825729849534=true; MSG16596118624330.7537068765946476=true; MSG16596118785040.7749237820961196=true; MSG16596118985490.877019379946138=true; MSG16596119129010.7647916899344912=true; MSG16596119999430.8156992988530211=true; MSG16596138531730.29097706227261433=true; MSG16596138841350.6163266218630801=true; MSG16596143641490.7039235775637004=true; MSG16596144038730.07760969951706365=true; MSG16596180182980.4507268516291716=true; MSG16596180283850.9893186009847007=true; MSG16596635549020.612514011522885=true; commonAuthId=d88ad8d1-ce98-444d-84cb-d62bc5c24cda; opbs=e6d60d55-817c-4a9a-af96-019699ed52a5' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin'

Obtaining 400 for the call : GET | https://localhost:9443/api/server/v1/claim-dialects/{}/claims

As @piraveena suggested, can anyone from @DonOmalVindula @pavinduLakshan @JayaShakthi97 own this?

We need to make userId as the manadatory attribute

No need to explicitly request userId attribute in Application Temaplates wso2/identity-apps#3331

After further discussions, it was decided that there's no need to explicitly request userId since its the fallback. Hence, removed in this PR https://github.com/wso2/identity-apps/pull/3331


Chart API resize() does not sound as is on documentation

Documentation Is:

[ ] Missing or needed
[ ] Confusing
[X] Not Sure?

Please Explain in Detail...
Having a look to the documentation, I see that the resize() API, documented here https://www.chartjs.org/docs/master/developers/api#resize, sounds do not get any argument.
Having a look to the code, it sounds there are 3 arguments:
https://github.com/chartjs/Chart.js/blob/da0764a585db495c18f2f450f8b3cb32a68b374e/src/core/core.controller.js#L353
Your Proposal for Changes
I'm not sure if this is wanted or if it's a bug on the documentation.

Fixed by #8151


Fixed Terminal Error

Run command now has a check for the project configuration
Any Gazelle app and the tests can now run without a terminal

Changes look good! May I ask you to create a feature branch on your fork and open the PR on that?

Sure


Ability to switch between different render strategies

Forward vs deferred vs G-buffer values

Ability to switch available since pr #19 . Now we just need to implement them!


chore(PE-5622): Setup tests and CI

:tada: This PR is included in version 1.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Add perltidy formatter and perl samples

A typo!

This is the first formatter that checks for existing config file, which is a good thing in my opinion!
I think it would be even better if it were done on-the-fly.
This is because during a vim session the existence of config files or the current directory may change.
To this end you would move the logic into a function and call this function from within the formatter definition expression. Would you mind giving that a try?

Apart from what I just said, it seems like a sound definition, so I'm merging it in anyway. Thanks for that!


Issue 43: Fixes the CodeLocationPart in a simple way

This is a simple way of fooling the IDEs I guess.
I would like to get some opinions on this fix. In case it would be agreed I would add same fix for the FieldLocation class as well and thus fixing this issue.
Probably ...[Field: name at com.foo.bar.MyClass(MyClass.java:1)]

It's obviously incomplete for the feature (#43) but it's a start, so I'll merge it.
Are you interested in going further, and fleshing out the feature to include either of these?

the correct line number (for a class, this is the line containing public class Foo)
more types of code location (field/method)

You can do as little or as much as you like. Incremental steps are good, like this one, they don't need to be a complete feature.


module 6 typo

In Module 6 the instructions for uncommenting do no match the code.
The python code is missing one "M" in "comment"
Instructions
UNCOMMENT_BEFORE_3RD_DEPLOYMENT
Code
UNCOMENT_BEFORE_3RD_DEPLOYMENT

Thanks for catching, just merged in the correction. Feel free to submit a PR for something like this if you'd like to in the future!


Update hosts

Changed Line 26's title from <IP_ADDRESS> to "blocked in hosts file" so novice users using a network monitoring tool such as proccess hacker will see "blocked in hosts file" for applications that traffic is set to <IP_ADDRESS> rather than seeing "<IP_ADDRESS>" and wondering why some applications are reporting that IP rather than localhost

I as an end user do not look to build a hosts file; I want the ease of the copy paste from the release; I then the end user may too be confused by a network tool reporting <IP_ADDRESS> instead of my local machine.
Thanks for telling me what line to update.

I'm not a big Windows user but you could then write a script similar to the following and run it instead of running the updater as standalone...
WARNING: NOT TESTED as I'm under Linux and I'm still trying to learn PowerShell for work :smile_cat:  It's just theoretically working ...
function Get-Exit-In-Bool($Command) {
    :: Run command,
    :: mute output  $?
    :: return true if $Command ran successfully, false otherwise.
    & $Command | Out-Null; $?
}

if (Get-Exit-In-Bool \PATH\TO\updateHostsWindows.bat) {
    :: We could run the command successfuly, we replace the line with <IP_ADDRESS>
    ((Get-Content -path %WINDIR%\System32\drivers\etc\hosts -Raw) -replace '<IP_ADDRESS> <IP_ADDRESS>','<IP_ADDRESS> WHATEVER') | Set-Content -Path %WINDIR%\System32\drivers\etc\hosts
} else {
   :: We exit 1, something went wrong
    exit /b 1
}

But yeah to quote @dnmTX (cf:

The lists here is not intended to comply with firewalls or any other programs for that matter.

It's yours Steve @StevenBlack, I'm done with this :smile_cat:

Closing.


To make based.cooking a sharable document

With the simplicity of the syntax that hugo has, a easy script can transform any recipe to the LaTeX (or groff) syntax and then compile it to a PDF document.
With a shell script it can be auto-generated on the server each month with a corn job and the site can provide different versions for each lenguage (when hugo multilingual where actually implemented).
Benefits:

Offline/local read mode: you can read based.cooking recepices without an internet connection.
Less internet trafic: it may help with the bandwith of the server.
Reach more people/normie friendly: at the start of the document can be a tutorial of "How to access the site and the updated recipes" so if your grandma receives the PDF via whatsapp, she can go too and enjoy the benefits of a search bar and the tags (like old magazines that came with a linux-cd did, just that's an URL).

Downsides:

It's bloated (depends on the actual implementation though).
If there's no good publicity on the first page about the URL and the newest recipes, less people will end up accessing the site.

Also, since the webpage is under CC, there's no problem with the license.

If all end up working and the page gain popularity, a well compiled version of the document can be published on lindypress and the earning can be redirected to the maintenance of the server and domain name.
For some reason people love to help buying "merch" so it may work, but if the site shills a lot about the book on front-page, people may end up leaving the site : )

Interesting idea, but that's a long-term goal that I'm less interested in now.
If you can provide some immediately actionable way of converting markdown to tex, we can start there. But even that, I find is somewhat of an issue. There may also be some system for direct md -> pdf conversion. I'm not sure.
Either way, the easiest way to get printable documents is ctrl-p, which works fine now, although you're is welcome to open a PR about CSS for it if you want.

yeah pandoc
It is very interesting. I would say that if you want a pdf, u can easily wget and converted on your end. But it would be very nice to have at the end of some recipe a button/link to click and just download this as a pdf, mainly to share across (since for offline viewing, might as well download the webpage).


Availability Ping Test

https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-metric-create-templates#template-for-an-availability-test-along-with-a-metric-alert
This template is not up to date. Please update these. I have tried creating multiple Application Insights Apps and yet none of them work. I am trying to automate setting up a URL Ping Test automatically after the creation of a few other resources. I have searched everywhere and this seems like the best solution. But I get an error stating
"Message: Resource group 'ResourceGroupofApplicationInsightsComponent' could not be found."
However, I have run az resource list --resource-group  and I see the resource and am pointed at the correct subscription as well. I am also trying to create this via Azure CLI not powershell. Any input on how to resolve this would be greatly appreciated

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

ID: 1f2bd9d0-af11-d684-051b-7ac8e611cca9
Version Independent ID: f83d6e85-4d52-6b7f-a79e-f3ed3f3d0a95
Content: Create a newer metric alert with Azure Resource Manager template - Azure Monitor
Content Source: articles/azure-monitor/platform/alerts-metric-create-templates.md
Service: azure-monitor
Sub-service: alerts
GitHub Login: @harelbr
Microsoft Alias: harelbr

@abhishekhotti Thanks for your comment. We are actively investigating and will get back to you shortly.

@abhishekhotti I tried to reproduce the issue from my end and I was able to deploy the template without any issues.

Can you please elaborate if you have made any changes to the template and also just cross verify whether the application insights exists in the same resource group as you provided in the azure CLI command?

@abhishekhotti Just following up on my previous comment. Kindly revert with requested information.

@abhishekhotti As there are no further documentation changes, we will close the issue for now. If there are further questions or if you are still facing the issue , kindly revert and we will be very glad to assist you.


added Rand() function and PossibleValues string

Needed this function for something I'm working on and it seemed most appropriate to add here rather than in my package, figured id offer it up in case others found it useful.

Sorry that took a while. But for some reason the github page has no setting to send you notifications on pull requests :/
Thanks for the edition. Not strictly a part of the library in other languages but I see the usefulness.


add a portable event corresponding to application startup

CDI doesn't provide an event that would correspond to application startup. A commonly used substitute is the @Initialized(ApplicationScoped.class) Object event, but that is fired "when the application context is initialized" (quoting from the spec).
Traditionally, those two situations occur reasonably close in time, but with CDI Lite, we aim to expand the set of possible CDI implementation strategies to include those that initialize a lot of stuff (including the application context) ahead of time. In such case, the @Initialized(ApplicationScoped.class) Object event has no correlation to application startup. It may happen during application startup, or it may happen arbitrary number of hours before.
Hence, I believe CDI should provide an event type that specifically corresponds to application startup. In some ways, it would be nice to restrict it to only be fired after the application fully starts up and everything is initialized, but that has prohibitive runtime costs; even the @Initialized(ApplicationScoped.class) Object event doesn't guarantee that (and firing the new event at the same time as this "old" event should be a valid implementation strategy for "purely runtime" CDI implementations such as Weld). So I propose to add an event type that is fired synchronously during application startup.
As for the name, I originally thought it could be called AfterStartup, because that is symmetric to existing BeforeShutdown, but that reasoning is invalid. BeforeShutdown is a container lifecycle event that is designed for use with Portable Extensions (the spec directly says "observer methods of these events must belong to extensions"). Also, in previous paragraph, I specifically argue we shouldn't restrict the event to "after startup"; it should be "during startup". However, DuringStartup looks ugly.
There's also zero precedent (in CDI) for using naming conventions such as On[Something] or [Something]Event, so I'd like to avoid those. The common event naming strategy in CDI is to just use a descriptive name.
That would, in this case, be simply Startup. However, I'd like to reserve this name for a potential @Startup annotation which would, similarly to EJB's @Startup, force eager initialization of a bean.
Any suggestions? :-)
For symmetry, we may want to declare a corresponding "during shutdown" event. We already have the @BeforeDestroyed(ApplicationScoped.class) Object and @Destroyed(ApplicationScoped.class) Object events, and it's hard to imagine how these event types could be non-portable, so this is certainly not required. As I said, my main reason for adding such event type would be symmetry with the "during startup" event. Maybe also better discoverability (the application context events are, in my experience, not exactly obvious).

I think that it would also make a lot of sense to specify some SPI (could be even CDI-based) to integrate with other technologies so that it's possible to fire this event when the app is ready, e.g. when the app is ready to accept http requests.

Just a remark - we can do this two ways. It can either be an event of type Object and with qualifiers (just like the @Initialized is used) or we can specify the payload type and have no qualifiers. Personally, I like the latter more and I think that is what you propose here, correct?
As for name, I actually like Startup as event name or maybe StartupEvent.
Other than that, since it is a CDI container status, we could prefix the name with CDI/Cdi to make sure this is understood as CDI status.

That would, in this case, be simply Startup. However, I'd like to reserve this name for a potential @Startup annotation which would, similarly to EJB's @Startup, force eager initialization of a bean.

And as a side note - I wouldn't use Startup as eager init annotation because that would then introduce an issue with two equally named annotations (with same purpose even) which have a reasonable chance to be present on classpath simultaneously.

I think that it would also make a lot of sense to specify some SPI (could be even CDI-based) to integrate with other technologies so that it's possible to fire this event when the app is ready, e.g. when the app is ready to accept http requests.

Not sure what you meant here. If it is just a plain CDI event, then you can fire it from just about anywhere and anytime you know all your libraries/fkws are ready (as an integrator). But maybe I am missing something?

I think that it would also make a lot of sense to specify some SPI (could be even CDI-based) to integrate with other technologies so that it's possible to fire this event when the app is ready, e.g. when the app is ready to accept http requests.

Not sure what you meant here. If it is just a plain CDI event, then you can fire it from just about anywhere and anytime you know all your libraries/fkws are ready (as an integrator). But maybe I am missing something?

My point is that you might need some portable SPI to allow extension authors to participate in the "startup sequence", otherwise they would have to implement some runtime-specific API, e.g. io.quarkus.deployment.builditem.ServiceStartBuildItem in Quarkus.

Just a remark - we can do this two ways. It can either be an event of type Object and with qualifiers (just like the @Initialized is used) or we can specify the payload type and have no qualifiers. Personally, I like the latter more and I think that is what you propose here, correct?

Correct. I wouldn't mind [too much] doing a qualifier with Object payload, but I think a meaningful payload type without qualifiers is a lot more intuitive.

As for name, I actually like Startup as event name or maybe StartupEvent.
Other than that, since it is a CDI container status, we could prefix the name with CDI/Cdi to make sure this is understood as CDI status.

I think I'd prefer if it was defined in terms of application status, not CDI container status (see what happened with @Initialized(ApplicationScoped.class) Object :-) ).

That would, in this case, be simply Startup. However, I'd like to reserve this name for a potential @startup annotation which would, similarly to EJB's @startup, force eager initialization of a bean.

And as a side note - I wouldn't use Startup as eager init annotation because that would then introduce an issue with two equally named annotations (with same purpose even) which have a reasonable chance to be present on classpath simultaneously.

That is a good point. If we called the event Startup, that would also lead to a conflict, but possibly less troublesome, as the event type wouldn't be an annotation.
I'd be fine with that.

Since this event is after startup and before shutdown, I think @AfterStartup and @BeforeShutdown make sense. By the way, these events are only fired at runtime, right?

By the way, these events are only fired at runtime, right?

That's the point of this issue - to have an event that really only happens when the app is actually running.

I think the payload should contain the app name or CDI container name.

CDI container might work but I am not sure it has any value.
App name, not really. I don't think you'd know the app name in many cases.
Either way, the payload can be just an "empty" class, it doesn't really matter. The point of the event is that it gives you a hook into a certain container state.

CDI container might work but I am not sure it has any value.
App name, not really. I don't think you'd know the app name in many cases.
Either way, the payload can be just an "empty" class, it doesn't really matter. The point of the event is that it gives you a hook into a certain container state.

I think it would be nice to find out which CDI container is up especially in Jakarta EE environment (if there is starting up order issue etc)

Since this event is after startup and before shutdown, I think @afterstartup and @BeforeShutdown make sense.

We already have @BeforeShutdown, but it's a lifecycle event that can only be observed by extensions. I'm not sure how much work it would be to generalize that -- it might be simple, or not.
Also, even though I originally wanted to call it @AfterStartup, I'm now against that, because the name implies much stronger lifecycle guarantees that we can currently make. (I believe that aliasing this event to @Initialized(ApplicationScoped.class) Object should be a valid implementation strategy for "purely runtime" implementations. That, however, isn't after startup, that's during startup.)


Would like to have rdf:HTML as a type of literal

Could we extend object RDFNode as follows:
val RDFhtmlStringDatatypeIRI = IRI(rdfSyntax + "HTML")
in:
object RDFNode {
val xsd = "http://www.w3.org/2001/XMLSchema#"
val rdfSyntax = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
val StringDatatypeIRI = IRI(xsd + "string")
val RDFhtmlStringDatatypeIRI = IRI(rdfSyntax + "HTML")
val LangStringDatatypeIRI = IRI(rdfSyntax + "langString")
val BooleanDatatypeIRI = IRI(xsd + "boolean")
val IntegerDatatypeIRI = IRI(xsd + "integer")
val DoubleDatatypeIRI = IRI(xsd + "double")
val DecimalDatatypeIRI = IRI(xsd + "decimal")
val rdftype = IRI(rdfSyntax + "type")
val rdfnil = IRI(rdfSyntax + "nil")
val rdffirst = IRI(rdfSyntax + "first")
val rdfrest = IRI(rdfSyntax + "rest")
...
...
Ralph

I've forked srdf and made a start on supporting rdf:HTML.
This is the branch I have in my fork: https://github.com/ralphtq/srdf/tree/rh-master-rdfhtml
Suspect that the parser needs more work and we may need an updated version of the JENA library.
Ralph

Thanks for the suggestion and the code...in principle it seems it works.
I also added support for rdf:XMLLiteral as well and it has been published as version 0.1.113
I keep the isse open by now until you confirm it is working as expected and we can close the issue.

Further work was needed to overcome this error:
New branch is https://github.com/ralphtq/srdf/tree/rh-master-rdfhtml-inc2
This is the change:
node match {
  case b: BNode =>
    m.createResource(new AnonId(b.id.toString))
  case i: IRI =>
    m.createResource(resolve(i, base))
  case StringLiteral(str) =>
    m.createLiteral(str, false)
  case RDFHTMLLiteral(str) =>    // RH20220820
    m.createLiteral(str, false)  // RH20220820
    ....

Ralph

Changes also needed in shacl-s.
See https://github.com/weso/shacl-s/issues/203


0.8.4

Codecov Report

Merging #184 (fe2b805) into master (48d85f8) will decrease coverage by 0.23%.
The diff coverage is 98.93%.

@@            Coverage Diff             @@
##           master     #184      +/-   ##
==========================================
- Coverage   94.66%   94.43%   -0.24%
==========================================
  Files         427      437      +10
  Lines       15496    15681     +185
==========================================
+ Hits        14670    14809     +139
- Misses        826      872      +46

Impacted Files
Coverage Δ

duckscript/src/lib.rs
100.00% <ø> (ø)

duckscript_sdk/src/lib.rs
100.00% <ø> (ø)

duckscript_sdk/src/test/mod.rs
89.14% <0.00%> (ø)

duckscript_sdk/src/sdk/std/string/camelcase/mod.rs
100.00% <100.00%> (ø)

...cript_sdk/src/sdk/std/string/camelcase/mod_test.rs
100.00% <100.00%> (ø)

duckscript_sdk/src/sdk/std/string/kebabcase/mod.rs
100.00% <100.00%> (ø)

...cript_sdk/src/sdk/std/string/kebabcase/mod_test.rs
100.00% <100.00%> (ø)

duckscript_sdk/src/sdk/std/string/lowercase/mod.rs
100.00% <100.00%> (ø)

...cript_sdk/src/sdk/std/string/lowercase/mod_test.rs
100.00% <100.00%> (ø)

duckscript_sdk/src/sdk/std/string/mod.rs
100.00% <100.00%> (ø)

... and 20 more

Continue to review full report at Codecov.

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


Update README.md

Installing the latest version of fvcore results in the following error: https://github.com/facebookresearch/detectron2/issues/2652
We should specify the solution, which is rolling fvcore to one of the previous versions, in the README file.

Thanks very much!


svelte-add is not recognized as an internal or external command

Microsoft Windows [Version 10.0.19042.1110]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Justin\Documents\svelte test\my-svelte-project3>npx svelte-add@latest tailwindcss
'svelte-add' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code 1
npm ERR! path C:\Users\Justin\Documents\svelte test\my-svelte-project3
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c svelte-add tailwindcss

npm ERR!      C:\Users\Justin\AppData\Local\npm-cache\_logs\2021-08-09T20_55_12_922Z-debug.log

C:\Users\Justin\Documents\svelte test\my-svelte-project3>

OS: Windows
Node version: 14.15.5
npx version: 7.5.4

Cannot confirm.
Potentially related: https://github.com/svelte-add/svelte-add/issues/119
OS: Windows 10
Node: v16.2.0
npx: 7.19.0

@babichjacob Is this still happening for you?

This is a report from someone else that I left open to investigate eventually but never actually did.


Liverpool Street Station (LST) is not returning any departure data

Describe the bug
National Rail, Liverpool Street Station (LST) is not returning any departure data
To Reproduce
Steps to reproduce the behavior:

Go to https://www.leddepartureboard.com/LST
No departures showing

Expected behavior
Page should show departures matching https://www.realtimetrains.co.uk/search/simple/gb-nr:LST
Screenshots

Hi @irishcornelius thanks for finding this issue. I have taken a look and it looks like that station seems to have a weird quirk with it's data. I am fixing this now


append app urls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 67.876%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
262

Relevant Lines:
386

💛  - Coveralls


Testing Secure Boot v2 with virtual efuse (IDFGH-6395)

Environment

Development Kit: ESP32-S2-DevKitM-1
Module or chip used:  ESP32-S2-MINI-1
IDF version v4.4-beta1
Build System: idf.py
Compiler version : xtensa-esp32-elf-gcc (crosstool-NG esp-2021r2) 8.4.0
Operating System: Linux
Using an IDE?: No
Power Supply:  USB

Problem Description
I'm trying to test out Secure boot V2 without bricking my devkit.
For that, I'm using "Virtual eFuse" (with both CONFIG_EFUSE_VIRTUAL and CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH)
I've tried on the unmodfied (apart from config) example peripherals/rmt/led_strip
I have configured Secure Boot v2 from menuconfig, generated pem key file, and flashed the bootloader.
I have added an efuse partition as per the documentation efuse_em, data, efuse,   ,   0x2000,
I do see W (19) boot.esp32s2: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
Expected Behavior
I expect to see some efused burned (virtually) at first boot, and being able to revert them when I want to rollback.
I expect an error when trying to flash a bootloader again.
Actual Behavior
I didn't find any documentation on how to revert efuses, si I don't know how to do it ?
I can't run the command idf.py erase-flash, which is expected I guess ? ("A fatal error occurred: ESP32-S2 ROM does not support function erase_flash").
When I run espefuse.py summary, no eFuse are changed. In particular :
SECURE_BOOT_EN (BLOCK0)                            Enables secure boot                                = False R/W (0b0)
(...)
DIS_FORCE_DOWNLOAD (BLOCK0)                        Disables forcing chip into Download mode           = False R/W (0b0)
DIS_USB_DOWNLOAD_MODE (BLOCK0)                     Disables use of USB in UART download boot mode     = False R/W (0b0)
DIS_DOWNLOAD_MANUAL_ENCRYPT (BLOCK0)               Disables flash encryption when in download boot mo = False R/W (0b0)
DIS_DOWNLOAD_MODE (BLOCK0)                         Disables all Download boot modes                   = False R/W (0b0)
ENABLE_SECURITY_DOWNLOAD (BLOCK0)                  Enables secure UART download mode (read/write flas = False R/W (0b0)

Steps to reproduce
ìdf.py bootloader-flash
Code to reproduce this issue
Here is the configuration :
#
# eFuse Bit Manager
#
# CONFIG_EFUSE_CUSTOM_TABLE is not set
CONFIG_EFUSE_VIRTUAL=y
CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH=y
CONFIG_EFUSE_MAX_BLK_LEN=256
# end of eFuse Bit Manager

#
# Security features
#
CONFIG_SECURE_SIGNED_ON_BOOT=y
CONFIG_SECURE_SIGNED_ON_UPDATE=y
CONFIG_SECURE_SIGNED_APPS=y
CONFIG_SECURE_BOOT_SUPPORTS_RSA=y
CONFIG_SECURE_TARGET_HAS_SECURE_ROM_DL_MODE=y
CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME=y
CONFIG_SECURE_BOOT=y
CONFIG_SECURE_BOOT_V2_ENABLED=y
CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES=y
CONFIG_SECURE_BOOT_SIGNING_KEY="secure_boot_signing_key.pem"
# CONFIG_SECURE_BOOT_ENABLE_AGGRESSIVE_KEY_REVOKE is not set
# CONFIG_SECURE_BOOT_INSECURE is not set
# CONFIG_SECURE_FLASH_ENC_ENABLED is not set
# CONFIG_SECURE_DISABLE_ROM_DL_MODE is not set
CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE=y
# CONFIG_SECURE_INSECURE_ALLOW_DL_MODE is not set
# end of Security features

Hi @QuentinFarizon!

For that, I'm using "Virtual eFuse" (with both CONFIG_EFUSE_VIRTUAL and CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH)

The eFuses are copied to efuse_em partition and all operations are redirected to this flash partition instead of real eFuses.
You can erase this partition to reset virt eFuses there.

I expect to see some efused burned (virtually) at first boot, and being able to revert them when I want to rollback.
I expect an error when trying to flash a bootloader again.

What error did you expect when trying to flash a bootloader again? I do not see why it should be.

I didn't find any documentation on how to revert efuses, si I don't know how to do it ?

Just erase the  efuse_em partition.
To erase flash you can try esptool.py erase_flash.

OK, indeed esptool.py erase_flash works, but not idf.py erase_flash.

My point remains : why don't I see Boot Secure enabled when disaplying eFuse values with espefuse summary ?

@QuentinFarizon

I expect to see some efused burned (virtually) at first boot, and being able to revert them when I want to rollback.

EFuse memory is one-time programmable region. Each eFuse is a one-bit field which can be programmed to 1 after which it cannot be reverted back to 0. Virtual eFuse is something that can help for unit testing scenarios, where all eFuses operations are re-directed to virtual storage like RAM/FLASH. No real eFuses will be programmed on device with this option. Hence, this config can not help to test end-to-end security features as ROM code still relies on actual eFuse contents.

I'm trying to test out Secure boot V2 without bricking my devkit.

For this, you may check our Qemu fork with ESP32 support, please refer to documentation at https://github.com/espressif/qemu/wiki. Please note that you will have to use ESP32 ECO3 revision, as that supports "Secure Boot v2" scheme, more on this at https://github.com/espressif/qemu/wiki#emulating-esp32-eco3
Hope this helps.

I have learned a lot from this issue, and im glad, because i always been scared to start playing with encrypted binaries.
Ive been able to merge 2 esp-idf examples to do some test app:
https://github.com/espressif/esp-idf/tree/master/examples/system/efuse
https://github.com/espressif/esp-idf/tree/master/examples/security/flash_encryption
There is one problem i should mention about, because i didnt find any info about it (or i missed it):

after building and flashing app i have to use separate command to flash bootloader idf.py bootloader-flash -p /dev/ttyUSB or esp32 will boot like with empty flash

Here is output with success test:

first boot which will perform binary encryption and restart

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff00c0,len:15072
load:0x40078000,len:25176
load:0x40080400,len:3808
0x40080400: _init at ??:?

entry 0x40080698
W (91) boot.esp32: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
I (46) boot: ESP-IDF v5.0-dev-676-g5c33570524-dirty 2nd stage bootloader
I (46) boot: compile time 16:14:46
I (47) boot: chip revision: 3
I (51) boot.esp32: SPI Speed      : 40MHz
I (56) boot.esp32: SPI Mode       : DIO
I (60) boot.esp32: SPI Flash Size : 4MB
I (65) boot: Enabling RNG early entropy source...
I (70) boot: Partition Table:
I (74) boot: ## Label            Usage          Type ST Offset   Length
I (81) boot:  0 nvs              WiFi data        01 02 00011000 00006000
I (89) boot:  1 nvs_key          NVS keys         01 04 00017000 00001000
I (96) boot:  2 storage          Unknown data     01 ff 00018000 00001000
I (103) boot:  3 phy_init         RF data          01 01 00019000 00001000
I (111) boot:  4 ota_0            OTA app          00 10 00020000 00100000
I (119) boot:  5 ota_1            OTA app          00 11 00120000 00100000
W (126) efuse: Loading virtual efuse blocks from real efuses
EFUSE_BLKx:
0) 0x00000000 0x1c838ae4 0x00a11052 0x0000a200 0x00001334 0x00100000 0x00000004
1) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

I (185) boot:  6 efuse_em         efuse            01 05 00220000 00002000
I (193) boot: End of partition table
I (198) esp_image: segment 0: paddr=00020020 vaddr=3f400020 size=08e54h ( 36436) map
I (219) esp_image: segment 1: paddr=00028e7c vaddr=3ffb0000 size=02354h (  9044) load
I (223) esp_image: segment 2: paddr=0002b1d8 vaddr=40080000 size=04e40h ( 20032) load
I (233) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=191a4h (102820) map
I (271) esp_image: segment 4: paddr=000491cc vaddr=40084e40 size=068f4h ( 26868) load
I (282) esp_image: segment 5: paddr=0004fac8 vaddr=50000000 size=00010h (    16) load
I (282) esp_image: segment 6: paddr=0004fae0 vaddr=00000000 size=004f0h (  1264)
I (288) esp_image: Verifying image signature...
I (293) secure_boot_v2: Secure boot V2 is not enabled yet and eFuse digest keys are not set
I (302) secure_boot_v2: Verifying with RSA-PSS...
I (311) secure_boot_v2: Signature verified successfully!
I (319) boot: Loaded app from partition at offset 0x20000
I (319) secure_boot_v2: enabling secure boot v2...
I (325) efuse: Batch mode of writing fields is enabled
I (330) esp_image: segment 0: paddr=00001020 vaddr=3fff00c0 size=03ae0h ( 15072)
I (344) esp_image: segment 1: paddr=00004b08 vaddr=40078000 size=06258h ( 25176)
I (356) esp_image: segment 2: paddr=0000ad68 vaddr=40080400 size=00ee0h (  3808)
I (358) esp_image: Verifying image signature...
I (361) secure_boot_v2: Secure boot V2 is not enabled yet and eFuse digest keys are not set
I (370) secure_boot_v2: Verifying with RSA-PSS...
I (379) secure_boot_v2: Signature verified successfully!
I (381) secure_boot_v2: Secure boot digests absent, generating..
I (404) secure_boot_v2: Digests successfully calculated, 1 valid signatures (image offset 0x1000)
I (404) secure_boot_v2: 1 signature block(s) found appended to the bootloader.
I (410) secure_boot_v2: Burning public key hash to eFuse
I (416) efuse: Writing EFUSE_BLK_KEY1 with purpose 3
I (481) secure_boot_v2: Digests successfully calculated, 1 valid signatures (image offset 0x20000)
I (481) secure_boot_v2: 1 signature block(s) found appended to the app.
I (486) secure_boot_v2: Application key(0) matches with bootloader key(0).
I (494) secure_boot_v2: blowing secure boot efuse...
I (500) secure_boot: Disable JTAG...
W (504) secure_boot: Not disabling ROM BASIC fallback - SECURITY COMPROMISED
W (512) secure_boot: UART ROM Download mode kept enabled - SECURITY COMPROMISED
W (520) efuse: Virtual efuses enabled: Not really burning eFuses
I (580) efuse: Batch mode. Prepared fields are committed
I (580) secure_boot_v2: Secure boot permanently enabled
I (581) boot: Checking flash encryption...
I (586) efuse: Batch mode of writing fields is enabled
I (592) flash_encrypt: Generating new flash encryption key...
I (599) efuse: Writing EFUSE_BLK_KEY0 with purpose 2
I (604) flash_encrypt: Setting CRYPT_CONFIG efuse to 0xF
W (610) flash_encrypt: Not disabling UART bootloader encryption
I (616) flash_encrypt: Disable UART bootloader decryption...
I (623) flash_encrypt: Disable UART bootloader MMU cache...
I (629) flash_encrypt: Disable JTAG...
W (633) flash_encrypt: Not disabling ROM BASIC fallback - SECURITY COMPROMISED
W (641) efuse: Virtual efuses enabled: Not really burning eFuses
I (702) efuse: Batch mode. Prepared fields are committed
I (702) esp_image: segment 0: paddr=00001020 vaddr=3fff00c0 size=03ae0h ( 15072)
I (710) esp_image: segment 1: paddr=00004b08 vaddr=40078000 size=06258h ( 25176)
I (722) esp_image: segment 2: paddr=0000ad68 vaddr=40080400 size=00ee0h (  3808)
I (723) esp_image: Verifying image signature...
I (727) secure_boot_v2: Verifying with RSA-PSS...
I (736) secure_boot_v2: Signature verified successfully!
I (1337) flash_encrypt: bootloader encrypted successfully
I (1382) flash_encrypt: partition table encrypted and loaded successfully
I (1382) flash_encrypt: Encrypting partition 0 at offset 0x11000 (length 0x6000)...
I (1510) flash_encrypt: Done encrypting
I (1510) flash_encrypt: Encrypting partition 1 at offset 0x17000 (length 0x1000)...
I (1533) flash_encrypt: Done encrypting
I (1533) flash_encrypt: Encrypting partition 2 at offset 0x18000 (length 0x1000)...
I (1555) flash_encrypt: Done encrypting
I (1555) esp_image: segment 0: paddr=00020020 vaddr=3f400020 size=08e54h ( 36436) map
I (1570) esp_image: segment 1: paddr=00028e7c vaddr=3ffb0000 size=02354h (  9044)
I (1574) esp_image: segment 2: paddr=0002b1d8 vaddr=40080000 size=04e40h ( 20032)
I (1583) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=191a4h (102820) map
I (1621) esp_image: segment 4: paddr=000491cc vaddr=40084e40 size=068f4h ( 26868)
I (1631) esp_image: segment 5: paddr=0004fac8 vaddr=50000000 size=00010h (    16)
I (1632) esp_image: segment 6: paddr=0004fae0 vaddr=00000000 size=004f0h (  1264)
I (1638) esp_image: Verifying image signature...
I (1643) secure_boot_v2: Verifying with RSA-PSS...
I (1652) secure_boot_v2: Signature verified successfully!
I (1654) flash_encrypt: Encrypting partition 4 at offset 0x20000 (length 0x100000)...
I (8345) flash_encrypt: Done encrypting
E (8345) esp_image: image at 0x120000 has invalid magic byte (nothing flashed here?)
W (8347) efuse: Virtual efuses enabled: Not really burning eFuses
I (8407) flash_encrypt: Flash encryption completed
I (8407) boot: Resetting with flash encryption enabled...

after restart:

ets Jul 29 2019 12:21:46

rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff00c0,len:15072
load:0x40078000,len:25176
load:0x40080400,len:3808
0x40080400: _init at ??:?

entry 0x40080698
W (116) boot.esp32: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
I (81) boot: ESP-IDF v5.0-dev-676-g5c33570524-dirty 2nd stage bootloader
I (82) boot: compile time 16:14:46
I (83) boot: chip revision: 3
I (87) boot.esp32: SPI Speed      : 40MHz
I (92) boot.esp32: SPI Mode       : DIO
I (96) boot.esp32: SPI Flash Size : 4MB
I (101) boot: Enabling RNG early entropy source...
I (106) boot: Partition Table:
I (110) boot: ## Label            Usage          Type ST Offset   Length
I (117) boot:  0 nvs              WiFi data        01 02 00011000 00006000
I (125) boot:  1 nvs_key          NVS keys         01 04 00017000 00001000
I (133) boot:  2 storage          Unknown data     01 ff 00018000 00001000
I (140) boot:  3 phy_init         RF data          01 01 00019000 00001000
I (148) boot:  4 ota_0            OTA app          00 10 00020000 00100000
I (155) boot:  5 ota_1            OTA app          00 11 00120000 00100000
W (163) efuse: Loading virtual efuse blocks from flash
EFUSE_BLKx:
0) 0x00110181 0x1c838ae4 0x00a11052 0x0000a200 0x00001334 0xf0100000 0x00000364
1) 0xf253228e 0x49373976 0x060f1a80 0x8e45e368 0x72b06ec2 0x2b3dd133 0x299498fe 0x37dbfc36
2) 0x7c58e7eb 0xa12f7036 0xd0c6c889 0x802c38c1 0x62955d15 0x1eb4eee0 0xd4847c11 0x121af716
3) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

I (201) boot:  6 efuse_em         efuse            01 05 00220000 00002000
I (209) boot: End of partition table
I (213) esp_image: segment 0: paddr=00020020 vaddr=3f400020 size=08e54h ( 36436) map
I (235) esp_image: segment 1: paddr=00028e7c vaddr=3ffb0000 size=02354h (  9044) load
I (239) esp_image: segment 2: paddr=0002b1d8 vaddr=40080000 size=04e40h ( 20032) load
I (249) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=191a4h (102820) map
I (286) esp_image: segment 4: paddr=000491cc vaddr=40084e40 size=068f4h ( 26868) load
I (298) esp_image: segment 5: paddr=0004fac8 vaddr=50000000 size=00010h (    16) load
I (298) esp_image: segment 6: paddr=0004fae0 vaddr=00000000 size=004f0h (  1264)
I (304) esp_image: Verifying image signature...
I (309) secure_boot_v2: Verifying with RSA-PSS...
I (318) secure_boot_v2: Signature verified successfully!
I (326) boot: Loaded app from partition at offset 0x20000
I (326) secure_boot_v2: enabling secure boot v2...
I (331) secure_boot_v2: secure boot v2 is already enabled, continuing..
I (339) boot: Checking flash encryption...
I (343) flash_encrypt: flash encryption is enabled (3 plaintext flashes left)
I (351) boot: Disabling RNG early entropy source...
I (368) cpu_start: Pro cpu up.
I (368) cpu_start: Starting app cpu, entry point is 0x40080fe8
0x40080fe8: call_start_cpu1 at /home/chegewara/esp/master/components/esp_system/port/cpu_start.c:164

I (0) cpu_start: App cpu up.
I (382) cpu_start: Pro cpu start user code
I (382) cpu_start: cpu freq: 160000000 Hz
I (382) cpu_start: Application information:
I (387) cpu_start: Project name:     secure-v2
I (392) cpu_start: App version:      1
I (397) cpu_start: Secure version:   1
I (401) cpu_start: Compile time:     Dec 13 2021 16:14:42
I (407) cpu_start: ELF file SHA256:  659b32f605908fb4...
I (413) cpu_start: ESP-IDF:          v5.0-dev-676-g5c33570524-dirty
I (420) heap_init: Initializing. RAM available for dynamic allocation:
I (427) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (433) heap_init: At 3FFB2CE0 len 0002D320 (180 KiB): DRAM
I (440) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (446) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (452) heap_init: At 4008B734 len 000148CC (82 KiB): IRAM
I (459) spi_flash: detected chip: gd
I (463) spi_flash: flash io: dio
W (467) spi_flash: Detected size(16384k) larger than the size in the binary image header(4096k). Using the size in the binary image header.
W (480) cpu_start: eFuse virtual mode is enabled. If Secure boot or Flash encryption is enabled then it does not provide any security. FOR TESTING ONLY!
W (495) efuse: Loading virtual efuse blocks from flash
EFUSE_BLKx:
0) 0x00110181 0x1c838ae4 0x00a11052 0x0000a200 0x00001334 0xf0100000 0x00000364
1) 0xf253228e 0x49373976 0x060f1a80 0x8e45e368 0x72b06ec2 0x2b3dd133 0x299498fe 0x37dbfc36
2) 0x7c58e7eb 0xa12f7036 0xd0c6c889 0x802c38c1 0x62955d15 0x1eb4eee0 0xd4847c11 0x121af716
3) 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

W (533) flash_encrypt: Flash encryption mode is DEVELOPMENT (not secure)
I (542) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.

Example to check Flash Encryption status
I (555) nvs: NVS key partition empty, generating keys
I (595) nvs: NVS partition "nvs" is encrypted.
This is esp32 chip with 2 CPU core(s), WiFi/BT/BLE, silicon revision 3, 4MB external flash
FLASH_CRYPT_CNT eFuse value is 1
Flash encryption feature is enabled in DEVELOPMENT mode
Erasing partition "storage" (0x1000 bytes)
Writing data with esp_partition_write:
I (625) example: 0x3ffb5ec0   00 01 02 03 04 05 06 07  08 09 0a 0b 0c 0d 0e 0f  |................|
I (625) example: 0x3ffb5ed0   10 11 12 13 14 15 16 17  18 19 1a 1b 1c 1d 1e 1f  |................|
Reading with esp_partition_read:
I (645) example: 0x3ffb5ea0   00 01 02 03 04 05 06 07  08 09 0a 0b 0c 0d 0e 0f  |................|
I (655) example: 0x3ffb5eb0   10 11 12 13 14 15 16 17  18 19 1a 1b 1c 1d 1e 1f  |................|
Reading with spi_flash_read:
I (665) example: 0x3ffb5ea0   00 01 02 03 04 05 06 07  08 09 0a 0b 0c 0d 0e 0f  |................|
I (675) example: 0x3ffb5eb0   10 11 12 13 14 15 16 17  18 19 1a 1b 1c 1d 1e 1f  |................|
I (685) example: read efuse fields
I (685) example: 1. read MAC address: 10:52:1c:83:8a:e4
I (695) example: 2. read secure_version: 0
I (695) example: 3. read ABS_DONE_1 field: 1

So, thank you @QuentinFarizon for raising issue and @mahavirj for support
I also should mention that i had to change few options in menuconfig to make it all works
sdkconfig.txt

@chegewara
Thank you for sharing additional information. It is quite helpful!

after building and flashing app i have to use separate command to flash bootloader idf.py bootloader-flash -p /dev/ttyUSB or esp32 will boot like with empty flash

If secure boot is enabled then bootloader has to be flashed separately. This is documented in note in the section at https://docs.espressif.com/projects/esp-idf/en/latest/esp32/security/secure-boot-v2.html#how-to-enable-secure-boot-v2

Closing. Please feel to re-open if there are any further comments or concerns here.


HK onedriver is too unstable for us

@tgxs002

Thank you for your interest in our work! I will prepare one and tell you when it's ready.

Thank you，We recently want to try HPS V2 to increase the alignment text-to-image model

BTW, maybe you can try clicking the download button in the top left corner?

Yes I can click the download button，but after I clicked it, nothing happen

The checkpoint is now available on HuggingFace. Check it out😄


Google Authentication using Firebase

This feature would allow users to log in quickly and securely using their Google accounts, streamlining the authentication process and improving user experience. It can also enhance security by relying on Google’s authentication infrastructure.
Implementing this feature could include integration with Firebase Authentication and setting up necessary permissions in the Firebase Console. It would also involve handling user sessions and managing user data post-authentication.

@vishanurag could you please assign this issue to me under gssoc-ext and hacktoberfest label

@vishanurag ould you please assign this issue to me under gssoc-ext and hacktoberfest label


请求增加清华大学期刊列表标签

现在很多高校不止看CCF分区，也会看清华大学计算机学科群推荐学术会议和期刊列表（TH-CPL）。主要区别是TH-CPL将ICLR和EMNLP设为了A区等。希望可以增加TH-CPL的分区标签，给予用户更多选择。谢谢！

Please refer to [#499], we are currently estimating the merged workload.

After extensive discussions, we plan to add the Tsinghua ranking standard in the near future. Please stay tuned~

Related features have been added in [#539].

The searching bar may be updated later.

The select bar may be updated later.

Thank you sooooooooooo much for your prompt response!😄


pipes and cisterns calculator

Issue Id you have worked upon -
#365
Briefly explain your program logic -
I took inputs for number of taps, their function (filling/emptying) and the tank capacity to calculate the time for filling/emptying the tank(full/half).
Screenshots(Attach 2 screenshots of your own input and output) -
Attach here

By raising this PR I affirm that -

[x] My code follows the guidelines of this project.

[x] I have performed a self-review of my own code.

[x] I have commented my code.

[x] My code gives the correct output.

[x] I affirm that I strictly follow contributing guidelines and code of conduct.

Congratulations 🎉 @ashishnallana on your contribution.
Thanks for adding value to this repository. 😊
Let's celebrate this fest 😃 by providing more developers 👨💻👩💻 an opportunity to contribute. Help us make this repository reach far and more by sharing this to your friends and colleagues.
Your efforts can make difference.

Hey 👋, may you also encourage us by clicking the star icon on the repository main page. ⭐


Fix string patch

This PR accidentally went to this repo instead of the fork.
However, maybe you want to consider to merge it.
Starting with Ruby version 3.2 roadworker does not work anymore due to parsing errors of the AWS API responses.
The reason for those errors lies in the monkey-patching of the String class.
This PR removes the patching in favor of the colorize gem.

I think that's not relevant anymore since the underlying issue was fixed.