After setting AppWindowTitleBar.ExtendsContentIntoTitleBar on Windows 10, the title bar cannot drag (v1.2-preview1)

Describe the bug
This is a bug in WindowsAppSDK v1.2 preview1, when I set AppWindowTitleBar.ExtendsContentIntoTitleBar, the title bar can't be dragged. In fact, this problem also happens when not using SetDragRectangles.
titleBar = appWindow.TitleBar;
titleBar.ExtendsContentIntoTitleBar = true;
titleBar.SetDragRectangles(new RectInt32[] { new RectInt32(0, 0, 10000, 48) });

https://user-images.githubusercontent.com/61003590/190835485-207620f4-b75c-45e2-a896-768e7cf28276.mp4
Steps to reproduce the bug

Create new project
Update package
Write some code
Run

Expected behavior
The title bar can be dragged.
Screenshots
No response
NuGet package version
1.2.220902.1-preview1
Packaging type
Packaged (MSIX)
Windows version
Windows 10 version 21H2 (19044, November 2021 Update)
IDE
Visual Studio 2022-preview
Additional context
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.2.220902.1-preview1" />

Did you add a Manifest  ?
(maybe similar to #7292)

Did you add a Manifest ? (maybe similar to #7292)

Yes, app.manfest is the default manifest file when creating a packaged project.
Compared to that issue, this demo was deployed by MSIX package and the caption button is clickable.
https://user-images.githubusercontent.com/61003590/190846612-6783d976-571d-419a-875f-d5506ae98d74.mp4

Did you add a Manifest ? (maybe similar to #7292)

Yes, app.manfest is the default manifest file when creating a packaged project.

With the lines for OS >=Windows 8 ? (for latered child windows), like in the sampel I had posted : app.manifest

With the lines for OS >=Windows 8 ? (for layered child windows), like in the sample I had posted : app.manifest

I changed the manifest content to be the same as yours, but it still doesn't work.

With the lines for OS >=Windows 8 ? (for layered child windows), like in the sample I had posted : app.manifest

I changed the manifest content to be the same as yours, but it still doesn't work.

Does the same problem appear if you compile my sample ?
(I had only tested with Windows app SDK 1.1.0)

Does the same problem appear if you compile my sample ?
(I had only tested with Windows app SDK 1.1.0)

Your project ran successfully on Windows 10, but it uses Window.ExtendsContentIntoTitleBar that is not I want.
I'm testing AppWindowTitleBar in SDK 1.2 preview 1, however it doesn't work well.

One suggestion is to make the drag rectangle actually fit within the bounds of the window.
The way I normally do it which works with Windows 11 is:
void MainWindow::set_drag_region()
    {
        auto title_bar = m_app_window.TitleBar();

        Windows::Graphics::RectInt32 drag_rect{};
        drag_rect.X = static_cast<int32_t>(title_bar.LeftInset());
        drag_rect.Y = 0;
        drag_rect.Height = static_cast<int32_t>(title_bar.Height());
        drag_rect.Width = static_cast<int32_t>(m_app_window.Size().Width - title_bar.RightInset());

        std::array<Windows::Graphics::RectInt32, 1> drag_rects{};
        drag_rects[0] = drag_rect;
        title_bar.SetDragRectangles(drag_rects);
    }

https://user-images.githubusercontent.com/52577874/190876460-00b7ee4c-7d6b-40d3-a57e-30c78a839bef.mp4
App2.zip
This works normally on Windows 11.

Your project ran successfully on Windows 10, but it uses Window.ExtendsContentIntoTitleBar that is not I want. I'm testing AppWindowTitleBar in SDK 1.2 preview 1, however it doesn't work well.

But MSDN says :
Title bar customization APIs are currently supported on Windows 11 only. You should check AppWindowTitleBar.IsCustomizationSupported in your code before you call these APIs to ensure your app doesn't crash on other versions of Windows. See Title bar customization for more info.

@castorix
The release notes for 1.2 preview 1 states that full customisation is available on Windows 10.

@castorix The release notes for 1.2 preview 1 states that full customisation is available on Windows 10.

Ah thanks, I'm still at 1.1.0...

I see that we can set drag area on Window 11.
However, it can not handle double click action of titlebar:

Double click to maximized/restore

I see that we can set drag area on Window 11. However, it can not handle double click action of titlebar:

Double click to maximized/restore

Double click is available in the original title bar area (the top 32 px of window, 100% scale) not the custom draggable area.

@tranhuynhthaitrung
AppWindowTitleBar.PreferredHeightOption allows you to extend it. But to be honest, the Windows design guidelines state that title bars should either be 32 or 48 pixels. This class seems to conform to that. If you are looking for a general purpose API, your best option is still using DWM.

@tranhuynhthaitrung AppWindowTitleBar.PreferredHeightOption allows you to extend it. But to be honest, the Windows design guidelines state that title bars should either be 32 or 48 pixels. This class seems to conform to that. If you are looking for a general purpose API, your best option is still using DWM.

@DarranRowe I also try to receive native event of window to handle caption area. Is it same DWM of your mean ?
Could you provide more advance suggestion :D

I believe the issue you are having is because you have not called SetTitleBar after ExtendsContentIntoTitleBar.
I have created a minimal example that you can find here: https://github.com/onslauth/TitleBarTestApp
If you run the application as is, you will see the title bar is discoloured:

You can fix that by commenting out the following code. But you will notice that the control added to 'GridTitleBar' is no longer visible in the top left:
App.xaml:
<!-- <SolidColorBrush x:Key="WindowCaptionBackground">Orange</SolidColorBrush> -->

You can solve that problem, by setting the WindowCaptionBackground colour to Transparent as follows:
<SolidColorBrush x:Key="WindowCaptionBackground">Transparent</SolidColorBrush>

Now the controls in GridTitleBar are visible and the title bar has the same colour as the rest of the application.

At this point you can customise the title bar by adding controls to GridTitleBar in MainWindow.xaml.
Here is a Youtube video that provides a good example: https://www.youtube.com/watch?v=rhYdNuBkqtE
After this, you might run into some issues that I am experiencing and for which I have opened a ticket: https://github.com/microsoft/WindowsAppSDK/issues/2987
Hope that helps.

@onslauth
This is why the various colour properties exists for AppWindowTitleBar. You can set these to transparent and you don't have to use the Xaml SetTitleBar. But that also doesn't affect the max/restore double click.
@tranhuynhthaitrung
Again, that all depends on what you want/need.
https://user-images.githubusercontent.com/52577874/191871459-217ccdee-6faa-42a7-88ae-65d760bc7c77.mp4
https://user-images.githubusercontent.com/52577874/191871480-9441efeb-1fc7-4128-a5f5-2c3643d34aa5.mp4
If all you want is the regular sized title bars, then you don't need to do anything. The region which it accepts the double click is the width of the title bar between AppWindowTitleBar.LeftInsert and AppWindowTitleBar.RightInsert and the height of the title bar up to AppWindowTitleBar.Height.
If you want much more control over this, the old Custom Window Frame Using DWM is still what you need to base your code on to fully customise the title bar.

@DarranRowe ok I see. However, we can not hide miximized/maximized button when we use ExtendsContentIntoTitleBar
I see that it is different issue and updated in preview version :D

@tranhuynhthaitrung
That is controlled by the window style.
Using the raw Windows API to create the window.
https://user-images.githubusercontent.com/52577874/191891259-69f3ceec-7061-4119-86bd-b1c3f839a473.mp4
https://user-images.githubusercontent.com/52577874/191891277-bf3538f5-0a20-4ec8-87b2-f82e1bd871e0.mp4
WS_OVERLAPPEDWINDOW is defined in WinUser.h as
#define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED     | \
                             WS_CAPTION        | \
                             WS_SYSMENU        | \
                             WS_THICKFRAME     | \
                             WS_MINIMIZEBOX    | \
                             WS_MAXIMIZEBOX)

As you can see, if you exclude those styles then the minimize and maximize buttons also go away.
If you want to do this exclusively with the Windows App SDK, I suggest you look at the presenter. The overlapped presenter has the IsMinimizable and IsMaximizable properties.

@onslauth
Thanks for your answer, but that's not what I want.
I'm testing AppWindowTitleBar on Windows 10, this api was mentioned in v1.2 preview 1 release notes but it still doesn't work.

Well, I finally got around to testing a sample on Windows 10. It drags properly and double clicking on the title bar causes it to maximise and restore properly.

This issue still exists in WAS version 1.2.220930.4-preview2.
Only Min/Max/Restore/Close buttons work, the preserved area left to the min button can't be dragged.
Double click doesn't work too.

I wish you would actually provide information besides going "it doesn't work".
https://user-images.githubusercontent.com/52577874/194714446-1f0c1677-917a-4b14-a59a-c86049436e0d.mp4
As I have said, it works under Windows 10.

@DarranRowe your c++ code works, but my c# code doesn't.
Probably the  WinRT projection issue.

@Lightczx
No, it isn't a projection issue.
Admittedly, I have been trying to nudge the original poster towards re-evaluating assumptions for a little while. As such, I did hold back a little bit of information in that last post. You see, the simple fact that a video and three lines of code was given is just terrible for a bug report. The assumption that "Windows App SDK" implies a certain feature set is bad. What's more, actually providing full information allows the developers to properly evaluate and fix any bugs.
So, let's go a bit further in depth as to the nature of the bug.
The sample that I was showing was the custom title bar in its purest form. It was a Windows API application that uses the AppWindow and AppWindowTitleBar classes to enable the use of a custom title bar. Importantly, this sample was not created using the WinUI 3 application template. In this case, I have not seen any problems using ExtendsContentIntoTitleBar and SetDragRectangles.
My testing of this is incomplete though. I don't really have proper developer access to a Windows 10 system right now. This is why my initial testing went towards the simplest application, a Windows API application using the AppWindow class to customise the title bar first. This does test the title bar code without interference from anything else though.
I did, however, see this problem when the ExtendsContentIntoTitleBar was used in a WinUI 3 application. This is the bit of information I held back for a bit. The sample that I did see this issue on didn't call SetTitleBar, so I'm not sure if that makes any difference. This was something that I was only able to test very recently, since I don't have proper access to a Windows 10 system right now. This information is actually important because this could mean that it is a WinUI 3 bug, but at the very least, knowing that it is the interaction between the two helps narrow down where the problem is.
This is actually why providing a sample that reproduces the problem is very useful. One big step towards fixing an issue is actually reproducing the issue. A sample that reproduces the problem adds context to the bug. You cannot assume that a developer is going to be able to reproduce the issue, and if the issue is not reproducible then it can't be fixed. This is especially true in cases where you assume certain conditions, but those conditions don't necessarily have to be true. This is one of those cases, the assumption that "Windows App SDK" implies "WinUI 3" is a bad assumption, since as I have demonstrated, it is possible to use the AppWindow/AppWindowTitleBar classes independently of WinUI 3, and the issue doesn't appear if it is used independently of WinUI 3.
This has ended up as bit of a lecture and a rant, so I'm just going to leave it here for now.
PackagedCTitleBar.zip
This is a project that I did see the issue in though.

AppWindowTitleBar.PreferredHeightOption allows you to extend it. But to be honest, the Windows design guidelines state that title bars should either be 32 or 48 pixels. This class seems to conform to that. If you are looking for a general purpose API, your best option is still using DWM.

SetDragRectangles allows you to manually define the height of the drag regions.

I have the same problem in version 1.2.220930.4-preview2. I did not set up a custom drag and drop area, but simply added the code: AppWindowTitleBar.ExtendsContentIntoTitleBar = true.
On Windows 11, it behaves all right. On Windows 10, I have to click the "maximize" button twice before I can drag the window properly.

I also had the same proble in 1.2.220930 preview 2 in a WinUI 3 application. I followed instructions for Windows App SDK from documentation. It worked well for Windows 11. But above mentioned issue appeared in Windows 10 while all other parts of my customized title bar worked fine.
AppWindowTitleBar.IsCustomizationSupported() did return true for Windows 10 (I had 19044) as documentation stated and ExtendsContentIntoTitleBar was set to true. I did not explicitly "SetTitleBar" which is another way of customizing WinUI 3 title bars according to the "WinUI3 part" from documentation. This is because the "WinUI3 part" does not allow customized drag rectangles for interactive controls.
However, I found a work around mentioned by @himesamanoyume in https://github.com/DGP-Studio/Snap.Hutao/issues/124#issuecomment-1297820058 where you could manually adjust the window's height, then you would be able to drag the window. But, the issue persists if title bar's size is changed (i.e. when the window's width is changed, AppTitleBar_SizeChanged is fired to call SetDragRegionForCustomTitleBar and re-set drag rectangles again)

@Glitterinn I tested your workaround and it works fine.
For others who don’t want read too much:
Simply add
// add this to set the same window size after every time drag rectangles are set
appWindow.ResizeClient(appWindow.ClientSize);

after your appWindow.TitleBar.SetDragRectangles

@Glitterinn After more test，I found the client area bottom part can glich.
Bottom part will extend 32px when resizing,and recover after mouse released.

this should be fixed now with 1.3 and 1.4.
The comments above are also pointing to multiple right solutions.
If it is an app which has been ported to newer winappsdk, it requires a app.manifest with compatibility check. You can refer to a new hello world winui3 app created by Visual Studio for the compatibility code, which can be copy pasted.
Second, AppWindowTitleBar.ExtendsContentIntoTitleBar  provides a default custom titlebar which extends for entire width of the window (even without calling SetDragRectangle) .
Third, it is easy to get dimensions wrong. SetDragRectangle uses a non-dpi client coordinate.
I hope these points help. Given so much discussion has already happened on this issue and many of the things are stale, no longer applicable with new winappsdk release, I will close this issue. I encourage you to create a fresh issue if it continues to cause same issue, reference this issue but provide fresh response, post upgrade.


CPC Campaign Attribution Fix

Description & motivation
When a google / cpc visit arrives at a site, the first_visit and session_start events fire with a campaign set to '(cpc)' even when a utm_campaign is set to another value.  All other observed events use the utm_campaign value as desired.
The stg_ga4__sessions_traffic_sources model gets the first campaign value by timestamp that is not 'null' or '(direct)'. This results in a campaign value of '(cpc)' rather than the expected utm_campaign value.
Previous testing has not shown any issues with attribution when excluding first_visit and session_start events so I chose to exclude first_visit and session_start events from the stg_ga4__sessions_traffic_sources lookup.
This may also fix attribution outside of google / cpc campaigns, however these were not observed in the client dataset.
Checklist

[y ] I have verified that these changes work locally
[n/a ] I have updated the README.md (if applicable)
[ n/a] I have added tests & descriptions to my models (and macros if applicable)
[ y] I have run dbt test and python -m pytest . to validate existing tests

My Python is showing.


Spacing tests layouts

CONTEXTUAL - new composition type to typetools, long-time type design composition. Uses a predefined glyph menu list for input.
Glyph Pad Option t
HH?HH, a default Instance pad
HH?HH, nn?nn, 00?00,glyph-group-specific pad1
HH?HOHO?OO, nn?nono?oo, 00?0101?11, glyph-group
Done
Next
HO?*?OLA, kern pad uppercase, extended
?=glyphs in glyphgroup with, * = each glyph in glyph group, extended group
*?nnoy, kern pad mixed, extended
=all u.c. Glyphs, ?=all,lowercase glyphs
no??ony, kern psd l.c., extended
*=each l.c. Glyph, extended, ?=all lowercase glyphs
  Run at default vf instance NOT fit to size of window
  Current color picker for type and background (b&w)
  Default designspace rap
  Video controls
  Keyframe picker

PREWRITTEN tests
The user has a choice of two formats, one for large and one for small type test.
1.Prewritten small, T4 = 1.66em 24 word pull quote, T1 = 1em 600 words of pangrams, T2 = 1em 600 words of narrative text, T3 = .75em 60 words of typical caption,
Each text element, a block of text responsive to the portal,  is a separate video, touring appropriate weights and widths for text use.
2.Prewritten Latin, English, large, H1 = 12 em uppercase 3 word head, H2 = 10 em mixcase 8 word head, H3 = 7em uppercase 16 word , H3 = 7 em mixed case, 20 word head,
Each text element, a line or two of text responsive to the portal,  is a separate video, touring appropriate weights and widths for display use.

HO?*?OLA, kern pad uppercase, extended
?=glyphs in glyphgroup with, * = each glyph in glyph group, extended group
*?nnoy, kern pad mixed, extended
=all u.c. Glyphs, ?=all,lowercase glyphs
no??ony, kern psd l.c., extended
*=each l.c. Glyph, extended, ?=all lowercase glyphs

I could use an abbreviated example of each of these :)

HO?*?OLA, kern pad uppercase, extended
?=glyphs in glyphgroup with, * = each glyph in glyph group, extended group, e.g
HOAAAOLA HOABAOLA HOACAOLA... to HOZAZOLA
HOBABOLA HOBBBOLA HOBCBOLA... to HOBZBOLA
If extended add glyphs to *, but not to ?
*?nnoy, kern pad mixed, extended
=all u.c. Glyphs, ?=all,lowercase glyphs e.g.
Aannoy Abnnoy Acnnoy Adnnoy... Aznnoy
Bannoy Bbnnoy Bcnnoy Bdnnoy...Bznnoy
If extended add glyphs to ? Not *
no?*?ony, kern psd l.c., extended
noaaaony noabaony noacaony...noazaony
nobabony nobbbony nobcbony...nobzbony
*=each l.c. Glyph, extended, ?=all lowercase glyphs
If extended add glyphs to * Not ?

Perfect, thank you.

Kern pads are in.

First draft of prewritten compositions are in

This is a big change from the other type tests as columns, sizes and text
become more complex, justification hyphenation and use of opsz are
required.
I've sketched up a mock enclosed with rules and visualization...
On Sat, Aug 31, 2019 at 4:45 PM Chris Lewis<EMAIL_ADDRESS>wrote:

First draft of prewritten compositions are in
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/TypeNetwork/videoproof/issues/15?email_source=notifications&email_token=AAO5VDXT5P7P725PIC4EJQTQHLJ6VA5CNFSM4IN2YQOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5TU5BY#issuecomment-526864007,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAO5VDUJUE2CJESK532OUK3QHLJ6VANCNFSM4IN2YQOA
.


rubocops/lines: be less strict about OS.{mac,linux}? in taps.

Fixes #12040.

Review period skipped due to critical label.


Experimental stateless JavaScript SDK

Experimental stateless JavaScript SDK for E2B
The stateless version of our SDK allows you to spin up a sandbox from a client without managing the sandbox lifecycle on the client. The sandbox stays stateful though.
Installation
npm i<EMAIL_ADDRESS>
Usage
import * as e2b from 'e2b'

const apiKey = '...'
const lifetime = 60_000 * 5 // 5 minutes

console.log('> Creating sandbox...')
const sandboxID = await e2b.experimental_stateless.create({ apiKey }, {
  keepAliveFor: lifetime,
})
console.log('...sandbox created, sandbox id -', sandboxID)

const cmd = 'echo hello world'
console.log(`\n> Executing command "${cmd}"...`)
// This will stream command's stdout and stderr
await e2b.experimental_stateless.exec({
  apiKey,
  sandboxID
}, {
  cmd,
  onStdout: (data) => {
    console.log(data)
  },
  onStderr: (data) => {
    console.error(data)
  },
})
// Or you can wait and get the full output in the `result` object after the command has finished running:
// const result = await e2b.experimental_stateless.exec(...)
console.log('...command finished')

console.log('\n> Uploading file...')
await e2b.experimental_stateless.uploadFile({
  apiKey,
  sandboxID,
}, {
  path: '/tmp/hello.txt',
  content: new TextEncoder().encode('hello world'),
})
console.log('...file uploaded')

console.log('\n> Downloading file...')
const content = await e2b.experimental_stateless.downloadFile({
  apiKey,
  sandboxID,
}, {
  path: '/tmp/hello.txt'
})
console.log('...downloaded file:\n', content.toString())

console.log(`\n> Killing sandbox "${sandboxID}"...`)
await e2b.experimental_stateless.kill({
  apiKey,
  sandboxID,
})
console.log('...sandbox killed')

There are three methods on stateless module:

create - creates a sandbox for a specified time in ms, returns id of the sandbox, you can specify template or the sandbox will be created with the base template
exec - executes the command in specified sandbox
downloadFile - downloads a file from the sandbox as a byte array
uploadFile - uploads a file to a sandbox
kill - destroys the sandbox immediately

We closed this PR because our new SDK that is in beta incorporates most stateless ideas.


Persist Grafana data across disabling/re-enabling monitoring

What kind of request is this (question/bug/enhancement/feature request):
Enhancement
Steps to reproduce (least amount of steps as possible):

Enable cluster monitoring with persistent storage for Grafana and Prometheus
Sign in to Grafana, create custom dashboard/add users
Disable cluster monitoring and then re-enable

Result:
Custom Grafana dashboards/users are lost, as a new PVC is generated for the fresh Deployment. User would like this to persist/mount existing PVC, as prometheus does, via StatefulSet.
Environment information

Rancher v2.2.8

Could offering an option to backup and restore configurations be a viable solution here?

Struggled this issue today in another project during Monitoring V2 migration. Any idea to save the Gravana PVC? I tried to copy some label from the existing Prometheus PVC without success. I think this PVC is installed from the Prometheus operator and the Grafana PVC from the Helm V2 Chart with Tiller, which get lost if the chart will deleted.
@axeal @Tejeev @bashofmann

Wrote a job to copy the data on a separate PVC, backup additionally all ConfigMaps and Secrets. Not nice, hopefully the customer are happy.


[FIX] Text

Fix text in button Go to (backend or frontend)

LGTM @jat-odoo

Hi @rauferdeveloper,
Just released big update. So, typo is fixed in commit.
BTW, Thanks for your contribution 👍 .


Feature Request: Button interactions to reserve host scheduling dates

User Story
As a host, I want to schedule a date for my operation as immediately and conveniently as possible so I can focus more time on my operation.
Acceptance Criteria.

Add a Reserve button next to every date that, when pressed, adds oneself to that date. This would be equivalent of using the !hostSlot on that date.
Add a unreserve button next to every date that I am reserved for, which would remove me from that date. This would be equivalent of using !removeHostSlot on that date.
Only allow hosts to reserve dates that are free and unreserved dates they have reserved. Hosts should not be able to reserve or unreserved dates from other hosts.
Only allow admins to unreserve dates that are already reserved by other hosts, including other admins.

Is not possible as described, revision needed


Windows Defender on 24H2

Hello,
Thanks for this amazing tool 🙏
I wanted to check if there is any criteria for disabling the Windows Defender on a Windows 11 24H2 release. I installed 24H2 from Bootable USB created by Media Creation tool. And, I checked in the option Disable Windows Defender for unattend.xml generator. Once Windows installed, after the login, I see the MsMpEng.exe is still running and Antivirus not disabled in the Windows Defender Security Center as well. I see a minimised command prompt window before the disk partitioning, do we need to wait for any process to completed. Please advise.
Thank you!

When the installation has finished, the expected result is that MsMpEng.exe is not running and several services are disabled and stopped:
PS C:\> Get-Process -Name MsMpEng;
Get-Process : Cannot find a process with the name "MsMpEng". Verify the process name and call the cmdlet again.

PS C:\> Get-Service -Name Sense, WdBoot, WdFilter, WdNisDrv, WdNisSvc, WinDefend | Format-Table -Property Name, StartType, Status;

Name      StartType  Status
----      ---------  ------
Sense      Disabled Stopped
WdBoot     Disabled Stopped
WdFilter   Disabled Stopped
WdNisDrv   Disabled Stopped
WdNisSvc   Disabled Stopped
WinDefend  Disabled Stopped

This should work on both Windows 10 and 11, including 24H2 – I have successfully installed 24H2 many times with Defender being disabled.
To identify any problems, bring the cscript.exe window to the front (Alt+Tab) and check its output, which should look similar to this:

Thank you for the detailed steps. Sorry for the delay, was just debugging this issue with 23H2/24H2. May be this situation has to do something with my laptop specifically 🤔  My Thinkpad E16 is one of those machines where 24H2 is not officially available yet. May be that incompatibility is causing all these issues!? 🤷♂ Infact, both KB5046617  and KB5048667  failed to install with some error from Windows update, even tried the .msu but no luck. May be I should wait until 24H2 is officially available for my hardware before attempting this again.
I checked the cscript window but the script ran too fast to notice and there were definitely some errors in 24H2 but everything is working flawlessly in 23H2. Does that script leave any log files with the command outputs? Not sure if my machine can handle so many Windows reinstalls(8) 😉 May be I should start debugging this in a VM...

The latest version of DisableDefender.vbs has a WScript.Sleep 5000 call built-in, which should give you enough time to read the output. If your autounattend.xml file does not contain this WScript.Sleep 5000 string, you should refresh it. To do so, import your existing file and download it again.

It seems it's already known: https://answers.microsoft.com/en-us/windows/forum/all/i-tried-to-install-the-version-24h2-kb5048667-but/bb656461-8967-46fc-8b45-150128ea3e6b
And BTW, following the above solution resulted in BSOD!!!
I can reproduce the 0x80070302 error in a Hyper-V VM fresh 24H2 install with the XML.
And to debug this issue, When I installed 24H2 like a normal way, everything worked fine in the VM with updates. No errors faced.
I don't know which option in the tool/XML would cause the December update to fail(November update failed as well before but I thought it was some Windows issue/bug).
I give up with 24H2 for now 🏳 🏳 🏳  Reinstalled 23H2 back...

The script output looks fine despite the error messages. These errors are expected and handled. The important thing is that the reg.exe LOAD call eventually succeeds. You should also see the output Found and successfully modified SYSTEM registry hive file at 'C:\$Windows.~BT\NewOS\Windows\System32\config\SYSTEM'. This window will now close. before the windows closes.

Got it, thank you. I will retry this when 24H2 is officially available for my laptop model. 23H2 is running like butter smooth without any issues.


UVI Request

--- UVI JSON ---
{
  "vendor_name": "Linux",
  "product_name": "Kernel",
  "product_version": "versions from  to before v5.12.10",
  "vulnerability_type": "unspecified",
  "affected_component": "unspecified",
  "attack_vector": "unspecified",
  "impact": "unspecified",
  "credit": "",
  "references": [
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d1629b5b925de9b27979e929dae7fcb766daf6b6"
  ],
  "extended_references": [
    {
      "type": "commit",
      "value": "d1629b5b925de9b27979e929dae7fcb766daf6b6",
      "note": "fixed"
    }
  ],
  "reporter": "joshbressers",
  "reporter_id": 1692786,
  "notes": "",
  "description": "x86/kvm: Teardown PV features on boot CPU as well\n\nThis is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven.\nThis ID is fixed in Linux Kernel version v5.12.10 by commit d1629b5b925de9b27979e929dae7fcb766daf6b6, it was introduced in version  by commit . For more details please see the references link."
}
--- UVI JSON ---

This issue has been assigned UVI-2021-1000821


Prefer more recent patch versions in interpreter discovery.

Currently, our naive min() means that Pex will choose 3.6.3 instead of 3.6.8, for example. This is not ideal because the newer patch will have important bug fixes, and should still be backward compatible.
For macOS users, there's an added benefit of this PR that the problematic system Pythons usually use older patch versions. A user is likely to have installed a more modern patch with both Homebrew and Pyenv; this PR means that Pex will correctly prefer those over the broken system Python.
This does not solve https://github.com/pantsbuild/pex/issues/430; we will still always prefer the minimum major/minor version, i.e. 3.6.1 < 3.6.0 < 3.7.*.

So is this change just changing the semantic to latest compatible for general sanity sake

Primarily I believe this is better behavior, regardless of macOS. I can't think of a reason we would not want to prefer the bug fixes in more recent patch releases.

actually papering over bugs with macOS interpreter selection

The bugs we know about are things like PermissionDenied when installing certain dependencies. Iiuc, we haven't considered banning the macOS system interpreters, so they can always be a problem. But this hopefully reduces the frequency. Outside of an outright ban, I don't believe there's much we can do to fix these bugs, hence the --pex-python approach for the user to be able to avoid them.


Update calculate compound interest docs.

Issue: N/A
Description
Fixed a minor error.

📝 Changed routes:

…late-compound-interest

(view full size)

Commit 34aa218092f291deb8cd5425469b3a6f368b4f90 (https://javaistic-bspnchi7m-javaistic.vercel.app).


Adding automatic formatting of Java and Scala code

This adds automatic formatting of Scala and Java-files to the project.
I find it nice to not have to worry about a gradual inconsistency growing in the codebase, LMKWYT.

@viktorklang I didn't see if you added checking that the code is formatted to travis, if not, could you create another build to do that?

Also, we should add this for all the JavaScript code: https://github.com/eslint/eslint


Change links to point to 2.0 API ref when available

[ ] update the link on the ASP.NET Core hub page
[x] redirect the old API ref docs for 1.1 and 1.0 to the new pages at https://docs.microsoft.com/en-us/dotnet/api/?view=aspnetcore-1.1 and https://docs.microsoft.com/en-us/dotnet/api/?view=aspnetcore-1.0.

--- original issue ---
The servers docs (Kestrel, HttpSys) link to source code for details about options and other API because 2.0 API Ref isn't available yet.  When it is available, convert those source code links to the equivalent API ref links.
Docs:
Servers
Kestrel
HttpSys
WebListener

@Rick-Anderson The 2.0 docs are now available at https://docs.microsoft.com/en-us/dotnet/api/?view=aspnetcore-2.0. We need to update the link on the ASP.NET hub page and redirect the old API ref docs for 1.1 and 1.0 to the new pages at https://docs.microsoft.com/en-us/dotnet/api/?view=aspnetcore-1.1 and https://docs.microsoft.com/en-us/dotnet/api/?view=aspnetcore-1.0.

[ ] update the link on the ASP.NET Core hub page
[ ] redirect the old API ref docs for 1.1 and 1.0 to the new pages at https://docs.microsoft.com/en-us/dotnet/api/?view=aspnetcore-1.1 and https://docs.microsoft.com/en-us/dotnet/api/?view=aspnetcore-1.0.

@v-savila  this is the issue tracking update the link on the ASP.NET Core hub page
Your PR #4457 was to the wrong file.

@Rick-Anderson I've reverted that page (aspnet\aspnet\index.md) to the original file with the redirect and updated the correct file (aspnet\index.md).

@v-savila  where is the PR?

@Rick-Anderson https://github.com/aspnet/Docs/pull/4478


Pickpocketing updates

What has been done?

Add support for gloves of silence
Add correct messages upon being caught
Add HAM-euqipment functionality
Add teleporting upon failing to pickpocket a HAM member

Please resolve conflicts :)


Add more detailed oauth scopes

When running in production we may want to give certain users access to specific endpoints, e.g. create prompts for a specific target and similar

Closed via #60


batch_generator doesn't have next()

Hello,
I am running DANN but there's a problem like this:
AttributeError: 'generator' object has no attribute 'next'
(more specifically, batch_generator in util.py)
If I am doing something wrong, let me know :)

It sounds like you might be using Python 3.0. I have only tested this repo with 2.7. I think it should be relatively easy to make it run in 3.0, but I'm not sure.
I should also note that this repo was written with TF 0.9 and I haven't gotten around to updating it for newer versions, so think may not work as expected... hopefully I'll have time soon.

Thanks for quick reply!
Yes. As you said, TF got some updates and I had to modify a little bit on your codes as some of the attributes and things changed. I wasn't aware that this kind of issue could happen because of Python 3.5 (I'm using). Currently I am adding a couple of lines to get the next() work.

I also have the same problem with @youngzokim . I tried to fix this by changing from S_batches.next() to next(S_batches) but this did not work. Could you please let me know if you fix this problem??

Changing from S_batches.next() to next(S_batches) DID WORK, but the problem was not the only one. It seems like there are some internal problem with the latest TensorFlow version for Win 10. After amending the "next()" error, you will find another error related with this link. The last answer rings the bell for my case. But for now I could not find how to avoid using "one-hot-function" in this DANN implementation.

I succeeded to run the code in Python3 but encountered the other issue. I have opened another issue here.

A.next() only works in Python 2.x.
For Python 3.x, use A.__next__().
That's all.

For Python 3.x, next(A) is more canonical.


Flutter users will need a way to generate symbols for AOT Dart code

In order to support understanding (rare, but possible) SEGFAULT, OOM, etc, in AOT Dart code we will likely to want to support symbol generation for gen_snapshot, etc.
I don't know what the contract is for AOT dart code (is it supposed to be able to crash this way?) but it seems like this may be useful?
@a-siva may already have a bug on file for this, but I didn't find it in a quick search so here is one.

Is this is a duplicate of https://github.com/flutter/flutter/issues/7108 and has been addressed by the CLs that landed for https://github.com/dart-lang/sdk/issues/28785 ? Can it be closed.

Are we currently outputting the symbols anywhere during release builds?

When AOT buildS as assembly instead of blobs (currently iOS and Fuchsia but not Android), we include symbols on each Dart function and DWARF debug information. The program would still work if these symbols are stripped, so you can safely do so and save them somewhere for offline symbolization.  (Cf. Issue #4287)

rmacnak@ can this issue be closed or are you keeping this open to track migration of android AOT builds to use assembly?

The VM side changes are done, but there's work needed in the flutter tool.

Superseded by work on dwarf-stack-traces/debug info and tracked in https://github.com/flutter/flutter/issues/50206


Videos not launching

And coming up with an error message
ETERNAL BAD

The exception error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT does not depend on my code. There's nothing I can do to solve this issue.
The video URL retrieved from the provider is encrypted. The only way to decrypt the URL is to use a secret key available on another GitHub user's repository. To ensure that the key is always valid, it is refreshed regularly.
If the key isn't valid when the video is launched and this error message appears, then there is nothing I can do, you just have to wait for the key to be refreshed.


554 Transaction failed: Missing start boundary with AWS mail

Having an issue sending a simple email with text and html (text only is Ok with 6.0.3)
With debug on I get (with emails and accounts changed):
250 Ok
RCPT<EMAIL_ADDRESS>250 Ok
DEBUG SMTP: Verified Addresses
DEBUG SMTP<EMAIL_ADDRESS><EMAIL_ADDRESS>DATA
354 End data with <CR><LF>.<CR><LF>
Date: Wed, 22 Apr 2020 13:44:45 -0400 (EDT)
From<EMAIL_ADDRESS><EMAIL_ADDRESS>To<EMAIL_ADDRESS><EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>Subject: Test Email
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_Part_1_2129897145.1587577485940"

.
554 Transaction failed: Missing start boundary
DEBUG SMTP: got response code 554, with response: 554 Transaction failed: Missing start boundary

RSET
250 Ok
DEBUG SMTP: MessagingException while sending, THROW:
com.sun.mail.smtp.SMTPSendFailedException: 554 Transaction failed: Missing start boundary

	at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2334)
	at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:2086)
	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1292)
	at org.simplejavamail.mailer.internal.util.TransportRunner$1.run(TransportRunner.java:52)
	at org.simplejavamail.mailer.internal.util.TransportRunner.runOnSessionTransport(TransportRunner.java:76)
	at org.simplejavamail.mailer.internal.util.TransportRunner.sendMessage(TransportRunner.java:48)
	at org.simplejavamail.mailer.internal.SendMailClosure.executeClosure(SendMailClosure.java:78)
	at org.simplejavamail.mailer.internal.AbstractProxyServerSyncingClosure.run(AbstractProxyServerSyncingClosure.java:56)
	at org.simplejavamail.mailer.internal.MailerImpl.sendMail(MailerImpl.java:330)
	at org.simplejavamail.mailer.internal.MailerImpl.sendMail(MailerImpl.java:316)
	at com.castortech.util.mail.EmailUtils.sendMail(EmailUtils.java:90)
	...
QUIT
221 Bye
13:44:47.315 [] ERROR o.s.m.i.AbstractProxyServerSyncingClosure - Failed to send email:
Email{
<EMAIL_ADDRESS>	sentDate=null
<EMAIL_ADDRESS><EMAIL_ADDRESS>type=null},
	replyToRecipient=null,
	bounceToRecipient=null,
	text='This is a test email',
	textHTML='
This is a test email
',
	textCalendar='null (method: null)',
	subject='Test Email',
<EMAIL_ADDRESS><EMAIL_ADDRESS>type=To}]
}

I have no clue, seems like an issue with the server itself. Have you looked around what might cause this?

Googled quite a bit and most of the time it's related to AWS mail.
But what I'm not sure I understand from the debug log, is that we see the boundary as "----= but never see the message parts, like this example here:
Content-Type: multipart/mixed;
 boundary="--==_mimepart_5114d2f18f621_7028125080411632";
 charset=UTF-8
Content-Transfer-Encoding: 7bit

----==_mimepart_5114d2f18f621_7028125080411632
Date: Fri, 08 Feb 2013 10:26:57 +0000
Mime-Version: 1.0
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename=foo.txt
filename: foo.txt
Content-ID<EMAIL_ADDRESS>
Hallo

----==_mimepart_5114d2f18f621_7028125080411632
Date: Fri, 08 Feb 2013 10:26:57 +0000
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-ID<EMAIL_ADDRESS>

----==_mimepart_5114d2f18f621_7028125080411632--

which is why I was suspecting something possibly below my interaction level.
Thanks
Alain

Is it possible for you to share the email with me? You can use the EmailConverter to convert an Email object to EML string.

Here in between with another log statement after:
14:28:04.346 [] INFO  c.c.u.m.EmailUtils - EML:Date: Thu, 23 Apr 2020 14:28:04 -0400 (EDT)
From<EMAIL_ADDRESS><EMAIL_ADDRESS>To<EMAIL_ADDRESS><EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>Subject: Test Email
MIME-Version: 1.0
Content-Type: multipart/alternative;
 	boundary="----=_Part_4_792693233.1587666484261"

14:28:04.360 [] INFO  c.c.u.m.EmailUtils - end

and the expected message is:
Email{
<EMAIL_ADDRESS>	sentDate=null
<EMAIL_ADDRESS><EMAIL_ADDRESS>type=null},
	replyToRecipient=null,
	bounceToRecipient=null,
	text='This is a test email',
	textHTML='
This is a test email
',
	textCalendar='null (method: null)',
	subject='Test Email',
<EMAIL_ADDRESS><EMAIL_ADDRESS>type=To}]
}

That's the full EML output of the conversion??

Yes, that felt strange to me as well.

Well your last comment made me realize that this was very similar to issue #147 that I had reported and now that I upgraded I lost my changes. So had to rebuild a custom version. Sorry for this.


SCPI commands list in flash (PROGMEM) on AVR

How much of trouble is to support SCPI commands list in PROGMEM on AVR? Usually, there is not much SRAM on these microcontrollers (in my case 8K) and my SCPI commands list is taking a lots of it and soon it will became unsustainable :(
BTW We are using your SCPI parser on this hobby project:
http://www.eevblog.com/forum/projects/diy-programmable-dual-channel-bench-psu-0-50v3a/
Once more, thanks for your excellent parser!

I know this limitation, but I don't know, how to handle this in pure c.
It is possible to have full table in PROGMEM and have RAM buffer for one item. Then while iterating over commad list, every command list item is coppied to RAM buffer and evaluated as usual. This can save some space, but I'm not able to do this.
If you can produce some working modification and way how to compile it and verify it (toolchain/ide/project), I will be happy.
I can then add some ifdefs and merge it with main line.
I can also add ifdef to int32_t tag; in struct _scpi_command_t  in types.h, so it will save some more space, if you don't use it.

Here are some more hints:
So findCommandHeader will not do just
cmd = &context->cmdlist[i];
but some "deep copy" of cmdlist item.
deep_copy_from_progmem(context->param_list.cmd, &context->cmdlist[i]);
context->param_list.cmd.pattern must be preallocated with RAM buffer
Type of context->param_list.cmd must be some new type to hold non constant pattern buffer.
Redefine some variables and fields to be in PROGMEM (struct _scpi_command_t.pattern, struct _scpi_t.cmdlist, and scpi_commands[] array itself)
I can't simulate it, so I will not do it blindfolded. If you give me some more hints, options for AVR-GCC, or so, I can do more.

You can now change USE_COMMAND_TAGS to 0 to save some space, if you are not using tags in command list.

Thanks. I will try to do the rest by myself using your tips. I will post here about the progress.

I forked your project and created avr_progmem branch. By now, I created two commits:

support for 64K progmem

https://github.com/mvladic/scpi-parser/commit/d6ef5b156f39c9896bc46d21bba1bf6f9799308b

arduino example for 64K progmem

https://github.com/mvladic/scpi-parser/commit/dfebea1e8296ebcd185fe25847f06b1c2b352e90
It is slightly different to support only first 64K of program memory compared to the support of all memory (for example, AVR Mega 2560 has 256K of program memory). This is because AVR is using 16-bit pointers. Also, there is some overhead when you work with the full memory. So, my idea is first to add support only for 64K progmem, and I did it with these commits.
To use first 64K of progmem for command list you must set USE_64K_PROGMEM_FOR_CMD_LIST to 1.
BTW I found and fixed small bug with SCPI_CMD_LIST_END definition that is introduced with USE_COMMAND_TAGS (check my first commit).
I tested the code on Arduino platform. You can download Arduino IDE and compile test-arduino example for yourself, but to be able to test it you will need one of the Arduino boards (I tested on Arduino Mega 2560).
To compile test-arduino under Arduino IDE you need to execute build-arduino-library.py first (more about this script below) than open test-arduino.ino sketch in Arduino IDE and press Verify button.
Unfortunately, there are some general quirks when you compile the code under Arduino IDE, especially when you use external libraries like scpi-parser. Because of that, I wrote the script called build-arduino-library.py to build Arduino compatible library from scpi-parser source code. It will build arduino library and copy it to the standard place for the arduino libraries (for example, on my Windows machine it is in C:\Users\Martin\Documents\Arduino\libraries) so Arduino sketches can use it. I'm running this script every time I change something in scpi-parser and in scpi_user_config.h located in test-arduino. There is no way you can set define variables in Arduino IDE so I need to place my define's in scpi_user_config.h and include it with the library. I also modify config.h on the fly when creating library for Arduino so that scpi_user_config.h is always included.
Here is screenshot of running the test-arduino with USE_64K_PROGMEM_FOR_CMD_LIST set to 1:

It is using 2164 bytes of dynamic memory.
And here is when USE_64K_PROGMEM_FOR_CMD_LIST is 0:

It is using 2706 bytes.

Nice!
I will check it and play with it little bit.

I added support for the full program memory, here is the commit:
https://github.com/mvladic/scpi-parser/commit/533299d7f1b23bb9ade0e220be893bde342287d1
To support, not only first 64K, but full program memory there are some (minor) complications.
Let me try to explain everything from the beginning.
TLDR; there is a question at the end :)
This is how SCPI commands are normally defined:
static const scpi_command_t scpi_commands[] = {
    {"MEASure:VOLTage:DC?", DMM_MeasureVoltageDcQ, 0},
	{"CONFigure:VOLTage:DC", DMM_ConfigureVoltageDc, 0},
	// ...
};

scpi_t scpi_context = {
	scpi_commands,
	// ...
};

If we want scpi_commands array to be inside program memory, we can just add PROGMEM in scpi_commands declaration:
static const scpi_command_t scpi_commands[] PROGMEM = {
    {"MEASure:VOLTage:DC?", DMM_MeasureVoltageDcQ, 0},
	{"CONFigure:VOLTage:DC", DMM_ConfigureVoltageDc, 0},
	// ...
};

scpi_t scpi_context = {
	scpi_commands,
	// ...
};

And this is how findCommandHeader() could be implemented:
static scpi_bool_t findCommandHeader(scpi_t * context, const char * header, int len) {
	int32_t i;
	const char * pattern;

	for (i = 0; (pattern = (const char *)pgm_read_word(&context->cmdlist[i].pattern)) != 0; ++i) {
    	if (matchCommand(pattern, header, len, NULL, 0, 0)) {
        	context->param_list.cmd_s.pattern = pattern;
        	context->param_list.cmd_s.callback = (scpi_command_callback_t)pgm_read_word(&context->cmdlist[i].callback);
        	context->param_list.cmd_s.tag = (int32_t)pgm_read_dword(&context->cmdlist[i].tag);
        	return TRUE;
    	}
	}
	return FALSE;
}

(Field context->param_list.cmd_s is added as temporary storage in dynamic memory for the found command.)
But, command pattern strings ("MEASure:VOLTage:DC?" and "CONFigure:VOLTage:DC") will not be stored in PROGMEM. To store pattern strings in program memory we must add PROGMEM specification for those strings too:
static const char DMM_MeasureVoltageDcQ_pattern[] PROGMEM = "MEASure:VOLTage:DC?";
static const char DMM_ConfigureVoltageDc_pattern[] PROGMEM = "CONFigure:VOLTage:DC";

static const scpi_command_t scpi_commands[] PROGMEM = {
    {DMM_MeasureVoltageDcQ_pattern, DMM_MeasureVoltageDcQ, 0},
	{DMM_MeasureVoltageDcQ_pattern, DMM_ConfigureVoltageDc, 0},
	// ...
};

scpi_t scpi_context = {
	scpi_commands,
	// ...
};

And here is how findCommandHeader() is implemented for this case:
static scpi_bool_t findCommandHeader(scpi_t * context, const char * header, int len) {
	int32_t i;
	PGM_P pattern;

	for (i = 0; (pattern = (PGM_P)pgm_read_word(&context->cmdlist[i].pattern)) != 0; ++i) {
		strncpy_P(context->param_list.cmd_pattern_s, pattern, SCPI_MAX_CMD_PATTERN_SIZE);
		context->param_list.cmd_pattern_s[SCPI_MAX_CMD_PATTERN_SIZE] = '\0';

		if (matchCommand(context->param_list.cmd_pattern_s, header, len, NULL, 0, 0)) {
			context->param_list.cmd_s.callback = (scpi_command_callback_t)pgm_read_word(&context->cmdlist[i].callback);
			context->param_list.cmd_s.tag = (int32_t)pgm_read_dword(&context->cmdlist[i].tag);
			return TRUE;
		}
	}
	return FALSE;
}

(Field context->param_list.cmd_pattern_s is added as temporary storage in dynamic memory for the found command pattern.)
Now, both scpi_commands array and all the patterns strings are stored in progmem. But, pointers are 16-bit so you can only address first 64K.
There is a way to get 32-bit (actually 24-bit) address of variable stored in program memory by using function pgm_get_far_address(). But, this function can only be called in runtime, not in compile time, so it is not possible to build scpi_commands like above.
We can have a partial solution where scpi_commands array can be anywhere in the program memory, but pattern strings can only be inside first 64K (please read the code comments for the explanations):
// we need to change cmdlist field declaration in scpi_t
struct _scpi_t {
#if USE_FULL_PROGMEM_FOR_CMD_LIST
    uint_farptr_t cmdlist;
#else
    const scpi_command_t * cmdlist;
#endif
	// ...
};

static const char DMM_MeasureVoltageDcQ_pattern[] PROGMEM = "MEASure:VOLTage:DC?";
static const char DMM_ConfigureVoltageDc_pattern[] PROGMEM = "CONFigure:VOLTage:DC";

static const scpi_command_t scpi_commands[] PROGMEM = {
    {DMM_MeasureVoltageDcQ_pattern, DMM_MeasureVoltageDcQ, 0},
	{DMM_MeasureVoltageDcQ_pattern, DMM_ConfigureVoltageDc, 0},
	// ...
};

scpi_t scpi_context = {
	0, // we can't get 24-bit address of scpi_commands during compilation
	// ...
};

int main() {
	// ...

	// we can call pgm_get_far_address only in the runtime inside same function,
	// here is called inside main function
	scpi_context.cmdlist = pgm_get_far_address(scpi_commands);

	// ...
}

And here is how findCommandHeader() could be implemented for this case:
static scpi_bool_t findCommandHeader(scpi_t * context, const char * header, int len) {
	int32_t i;
	uint_farptr_t p_cmd = context->cmdlist;
	PGM_P pattern;

	for (i = 0;
	     (pattern = (PGM_P)pgm_read_word_far(p_cmd + offsetof(scpi_command_t, pattern))) != 0;
		 ++i, p_cmd += sizeof(scpi_command_t))
	{
		strncpy_P(context->param_list.cmd_pattern_s, pattern, SCPI_MAX_CMD_PATTERN_SIZE);
		context->param_list.cmd_pattern_s[SCPI_MAX_CMD_PATTERN_SIZE] = '\0';

		if (matchCommand(context->param_list.cmd_pattern_s, header, len, NULL, 0, 0)) {
			context->param_list.cmd_s.callback = (scpi_command_callback_t)pgm_read_word_far(p_cmd + offsetof(scpi_command_t, callback));
			context->param_list.cmd_s.tag = (int32_t)pgm_read_dword_far(p_cmd + offsetof(scpi_command_t, tag));
			return TRUE;
		}
	}
	return FALSE;
}

To put everything anywhere in program memory space we need to do something like this (again, please read the code comments for the explanations):
// we need to add a new field in scpi_t
struct _scpi_t {
#if USE_FULL_PROGMEM_FOR_CMD_LIST
    uint_farptr_t cmdlist;
	uint_farptr_t cmdpatterns;
#else
    const scpi_command_t * cmdlist;
#endif
	// ...
};

// define all command pattern strings as single string like this:
static const char scpi_command_patterns[] PROGMEM =
	"MEASure:VOLTage:DC?"
	"CONFigure:VOLTage:DC";

// in scpi_commands array, pattern field of scpi_command_t is used to store
// not the pattern itself but the size of pattern string
static const scpi_command_t scpi_commands[] PROGMEM = {
	{(const char *)(sizeof("MEASure:VOLTage:DC?") - 1), DMM_MeasureVoltageDcQ},
	{(const char *)(sizeof("CONFigure:VOLTage:DC") - 1), DMM_ConfigureVoltageDc},
	// ...
	SCPI_CMD_LIST_END
};

scpi_t scpi_context = {
	0, // we can't get 24-bit address of scpi_commands during compilation
	// ...
};

int main() {
	// ...

	// in runtime we can set cmdlist and cmdpatterns far addresses:
	scpi_context.cmdlist = pgm_get_far_address(scpi_commands);
	scpi_context.cmdpatterns = pgm_get_far_address(scpi_command_patterns);

	// ...
}

And here is the implementation findCommandHeader() for this case:
static scpi_bool_t findCommandHeader(scpi_t * context, const char * header, int len) {
	int32_t i;

	uint_farptr_t p_cmd = context->cmdlist;
	uint_farptr_t p_pattern = context->cmdpatterns;
	uint16_t pattern_length;

	for (i = 0;
		(pattern_length = pgm_read_word_far(p_cmd + offsetof(scpi_command_t, pattern))) != 0;
		++i, p_cmd += sizeof(scpi_command_t), p_pattern += pattern_length)
	{
		strncpy_PF(context->param_list.cmd_pattern_s, p_pattern, pattern_length);
		context->param_list.cmd_pattern_s[pattern_length] = '\0';

		if (matchCommand(context->param_list.cmd_pattern_s, header, len, NULL, 0, 0)) {
			context->param_list.cmd_s.callback = (scpi_command_callback_t)pgm_read_word_far(p_cmd + offsetof(scpi_command_t, callback));
			context->param_list.cmd_s.tag = (int32_t)pgm_read_dword_far(p_cmd + offsetof(scpi_command_t, tag));
			return TRUE;
		}
	}
	return FALSE;
}

Now, the question is do you want to add all these changes in the scpi parser? I want blame you if you find it too specific (or even ugly) to add it.
Another possible solution, which will solve my problem, is to give a user of the library a way to implemenent his own version of findCommandHeader() function. This could be done like this:
struct _scpi_interface_t {
	// ...
	scpi_bool_t (*findCommandHeader)(scpi_t * context, const char * header, int len);
};

static scpi_bool_t findCommandHeader(scpi_t * context, const char * header, int len) {
	if (context->interface->findCommandHeader) {
		return context->interface->findCommandHeader(context, header, len);
	}
	// ...
}

Of course, matchCommand() function must be part of documented API, so user implementation of findCommandHeader() can use it.
With this solution, you could still include test-arduino in the scpi parser examples with the custom implementation of findCommandHeader() which works with command list stored in program memory.

Wow, it is very interesting, but I have currently not much time to incorporate so big change. I have just few things.
Are there any drawbacks to leave it under 64k? Or the linker is not intelligent much and can place progmem section over this boundary?
Is it possible to add PROGMEM keyword to type deffinition? So you can do somethink like this?
    struct _scpi_command_progmem_t {
        const PROGMEM char * pattern;
        scpi_command_callback_t callback;
#if USE_COMMAND_TAGS
        int32_t tag;
#endif /* USE_COMMAND_TAGS */
    };
    typedef struct _scpi_command_progmem_t PROGMEM  scpi_command_progmem_t;

So you can leave command list as it was in original source but with scpi_command_progmem_t type?
I don't like dividing command list to two more arrays, because this will cause big problems. If this is really needed, you can read somethink about x-macro https://en.wikipedia.org/wiki/X_Macro and automate generation of all lists so it is not possible to make a mistake.
I'm using X-macro in this file libscpi/inc/scpi/error.h, after that, enum is generated using one macro and SCPI_ErrorTranslate is generated using second macro in error.c, but there is only one LIST_OF_ERRORS.

Are there any drawbacks to leave it under 64k? Or the linker is not intelligent much and can place progmem section over this boundary?

Linker will use program memory under 64k until we full this region. If our static data is bigger than 64K then it will use the memory above 64K (and pointers will overflow without warning). In my case, I need to store lots of static data like fonts, bitmaps, etc... so it is possible that at the end I will need more than 64K. Maybe I could put SCPI commands definition under 64K and other data above (still, I need to learn how to do that).

Is it possible to add PROGMEM keyword to type deffinition?

No, this is not possible. You can only place global const variables in PROGMEM section and you need to initialize those variables at the compile time.

I don't like dividing command list to two more arrays, because this will cause big problems. If this is really needed, you can read somethink about x-macro https://en.wikipedia.org/wiki/X_Macro and automate generation of all lists so it is not possible to make a mistake.

Actually, in my example test-arduino I was using something like x-macro (although I didn't know it is called x-macro). If you take a look on this file:
https://github.com/mvladic/scpi-parser/blob/avr_progmem/examples/test-arduino/scpi-def.cpp.
you will find the following (for the sake of brevity I removed some parts):
#define SCPI_COMMANDS \
    SCPI_COMMAND("*CLS", SCPI_CoreCls) \
    SCPI_COMMAND("*ESE", SCPI_CoreEse) \
    SCPI_COMMAND("*ESE?", SCPI_CoreEseQ) \
    SCPI_COMMAND("*ESR?", SCPI_CoreEsrQ) \
    ...

#define SCPI_COMMAND(P, C) static const char C ## _pattern[] PROGMEM = P;
SCPI_COMMANDS
#define SCPI_COMMAND(P, C) {C ## _pattern, C},
static const scpi_command_t scpi_commands[] PROGMEM = {
    SCPI_COMMANDS
    SCPI_CMD_LIST_END
};

So, you only need to define one array. (I forgot to #undef after first SCPI_COMMAND definition so you will get a warning).
I just learned that you actually don't need this trick. You can declare commands array like before by using PSTR macro:
static const scpi_command_t scpi_commands[] PROGMEM = {
    {PSTR("MEASure:VOLTage:DC?"), DMM_MeasureVoltageDcQ, 0},
    {PSTR("CONFigure:VOLTage:DC"), DMM_ConfigureVoltageDc, 0},
    // ...
};

Now, both scpi_commands array and command patterns will be stored in program memory.
Still, for the full memory access we will need x-macro.

I'm using X-macro in this file libscpi/inc/scpi/error.h, after that, enum is generated using one macro and SCPI_ErrorTranslate is generated using second macro in error.c, but there is only one LIST_OF_ERRORS.

BTW I would like to store error messages in program memory also ;) What do you think of idea that user could provide implementation of SCPI_ErrorTranslate() using scpi_interface_t like I proposed for findCommandHeader() in previous post?

Sorry, I didn't look into the source. I just read the comment. So it is much nicer with this.
I have played little bit with Arduino IDE and it seems, that your previous solution is the only one saving some RAM.
SCPI_ErrorTranslate should be much easier to convert but still needs intermediate RAM buffer for one string.
So I will think about some API for ErrorTranslate and findCommandHeader so we can put them into separate file specific for AVR and keep rest of sources clean.


run() fails when the venv path is too long

Currently, run() directly exec's the setuptools-generated entrypoint script, which in turn finds the correct python by including the full path to the {env_dir}/bin/python executable as a shebang line.
Shebang lines are limited to 127 characters, which is very easy to exceed with appenv, since the venv hash already takes up 64.
I propose to specify the python executable in appenv itself, instead of relying on the shebang line, like this:
diff --git a/batou b/batou
index 8f03df7..455def7 100755
--- a/batou
+++ b/batou
@@ -200,7 +200,10 @@ def run(argv, meta_args):
     env_dir = _prepare(meta_args)
     # Allow called programs to find out where the wrapper lives
     os.environ['APPENV_BASEDIR'] = meta_args.base
-    os.execv(os.path.join(env_dir, 'bin', meta_args.appname), argv)
+    interpreter = os.path.join(env_dir, 'bin', 'python')
+    entrypoint = os.path.join(env_dir, 'bin', meta_args.appname)
+    argv[0] = interpreter
+    argv.insert(1, entrypoint)
+    os.execv(interpreter, argv)

This works fine with batou, but argv[0] is not preserved (since at least under Debian we must set argv[0] to the venv/bin/python, otherwise the venv is not recognized and the spawned python runs with the system site-packages), so programs that are interested in that will have trouble. Not sure if that's something we have to worry about, though.

Ok, so one thing I'm up for is to to actually reduce the venv hash to 8 characters, similar to git's short hash. This should still be reliable enough according to 'the internet' and 'stackoverflow'. I'm with that. It's not cryptographically secure but I don't think that matters here as we're basically using it for content addressing.
Did you try the most current version of appenv? I'm running batou on debian machines and think I have fixed the site-packages issue already through a pth hack... or does that fail for you?

This occurs with dc208ac, which is the current master, I'm afraid. Here's a reproduction recipe:
mkdir -p /tmp/appenv/work/workspace/somewhat-long-jenkins-job
cd /tmp/appenv/work/workspace/somewhat-long-jenkins-job
curl -o batou https://raw.githubusercontent.com/flyingcircusio/appenv/dc208ac9df334962b013001c60cd93fb88949c98/src/appenv.py
chmod +x batou
echo 'batou==2.0b11' > requirements.txt
./batou appenv-update-lockfile
./batou --help

which then yields
Creating venv ...
Ensuring pip ...
Installing batou ...
Traceback (most recent call last):
  File "./batou", line 312, in <module>
    main()
  File "./batou", line 308, in main
    meta_args.func(argv, meta_args)
  File "./batou", line 203, in run
    os.execv(os.path.join(env_dir, 'bin', meta_args.appname), argv)
OSError: [Errno 8] Exec format error


Remove IE11 support wording from support page

Alaska Airlines Pull Request
Fixes: #39
Summary:
This PR updates the browser matrix page that removes language that speaks to Auro's support of the now deprecated IE 11 browser.
Type of change:
Please delete options that are not relevant.

[ ] New capability
[ ] Revision of an existing capability
[ ] Infrastructure change (automation, etc.)
[x] Other (docs)

Checklist:

[x] My update follows the CONTRIBUTING guidelines of this project
[x] I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.
Thank you for your submission!
-- Auro Design System Team

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[bug]: react-day-picker 9.0.0 release screws up Calendar component

Describe the bug

Currently, the component looks like this.
Fix:
You can currently fix this by downgrading react-day-picker to version 8.^
Affected component/components
Calendar, Date Picker, ...
How to reproduce

Install Calendar component

Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Browsers

Before submitting

[X] I've made research efforts and searched the documentation
[X] I've searched for existing issues

Easiest solution right now is to downgrade to 8.10.1.
The react-day-picker team has already been notified of this issue in the v9.0.0 release announcement

Here are my adjusted styles for the Calendar component:
https://github.com/grzegorzpokorski/calendar-shadcnnui/blob/main/src/components/ui/calendar.tsx.
Maybe someone will have more time to review them and improve.

OK, I'm using your code. When making adjustments to my code and not finding another solution for positioning the navigation buttons, I used the z-index

Here are my adjusted styles for the Calendar component: https://github.com/grzegorzpokorski/calendar-shadcnnui/blob/main/src/components/ui/calendar.tsx. Maybe someone will have more time to review them and improve.
The most intriguing aspect is the change in the structure of this component, particularly the navigation between months. I am not sure if the current design is appropriate (playing with z-index).

OK, I'm using your code. When making adjustments to my code and not finding another solution for positioning the navigation buttons, I used the z-index

Easiest solution right now is to downgrade to 8.10.1. The react-day-picker team has already been notified of this issue in the v9.0.0 release announcement

I still have same error after downgrading

same bug ((

Easiest solution right now is to downgrade to 8.10.1. The react-day-picker team has already been notified of this issue in the v9.0.0 release announcement

npx<EMAIL_ADDRESS>add calendar
gives error, no such version matching

Easiest solution right now is to downgrade to 8.10.1. The react-day-picker team has already been notified of this issue in the v9.0.0 release announcement

npx<EMAIL_ADDRESS>add calendar gives error, no such version matching

The dependency is on react-day-picker. Go to your package.json and set the 8.10.1 there and then run npm install

fixed here https://github.com/shadcn-ui/ui/pull/4421

While waiting for the update, you can try this.
https://shadcn-datetime-picker-xi.vercel.app/
https://github.com/huybuidac/shadcn-datetime-picker

Any update when the latest version of react-day-picker will be supported?


Converting TEI to JSON or PYTHON dictionary

Hi,
I'm using Grobid as web service (dockerized) and make a request from python to it.
I have issues to convert the xml output to a clean format in json to work for example with pandas dataframes or to store it in elasticsearch/MongoDB.
Did somebody has a hint for me how I can easily convert the output in TEI XML to json?
Thanks for your help.

Hello @prof-schacht
In the project https://github.com/anHALytics/anhalytics-core we use JsonML to convert the TEI into JSON. This project also provides mapping for ES 5.* for indexing this JSON. At the time I looked at this, only JsonML was really good to cover so-called mixed content XML (or also called mixed-mode I think).
There are some open source JsonML clients, but afaik not in Python.
Now having said that:

having a Python GROBID client with a dict structure and warm/transparent call to GROBID API would be really cool to have :)
pandas dataframes are for tabular data, but not adapted to hierarchical data and document structures, it would work only for flat representation of small bibliographical extractions

I put the current GROBID python client here as reference. This client returns the same TEI XML, but it could be a nice place to add an alternate Python dictionary structure if someone wants to contribute.
https://github.com/kermitt2/grobid-client-python

Hello,
I am currently working on this issue.
So far, I could not find any good off-the-shell converter (as suggested earlier by @kermitt2).
My current strategy is to design a parsing module designed for Grobid output specifically - although I don't find this option very elegant. What do you think about it @kermitt2 ?
From what I see, empty fields are not returned - so I would need the full structure to make sure I am not forgetting anything. @kermitt2, would it be possible to communicate the full tree structure of a grobid result?
Also, do you have any requirement on the pattern of the output of the conversion? So far, my targets are ease of use with 'glom' (python) and ease of "load" on big query (GCP).
Example so far:

#<analytic>
#<title level="a" type="main"><title>Detection and classification of concealed weapons #using a magnetometer-based portal</title></title>
#<author>
#<persname xmlns="http://www.tei-c.org/ns/1.0"><forename type="first">Dale</forename><forename type="middle">K</forename><surname>Kotter</surname></persname>
#</author>
#<author>
#<persname xmlns="http://www.tei-c.org/ns/1.0"><forename type="first">Lyle</forename><forename type="middle">G</forename><surname>Roybal</surname></persname>
#</author>
#<author>
#<persname xmlns="http://www.tei-c.org/ns/1.0"><forename type="first">Robert</forename><forename type="middle">E</forename><surname>Polk</surname></persname>
#</author>
#<idno type="DOI">10.1117/12.479303</idno>
#</analytic>

asyncio.run(fetch_analytic(analytic_))
>>> {'authors': [{'first': 'Dale', 'last': 'Kotter', 'middle': 'K'},
             {'first': 'Lyle', 'last': 'Roybal', 'middle': 'G'},
             {'first': 'Robert', 'last': 'Polk', 'middle': 'E'}],
 'doi': '10.1117/12.479303',
 'title': '<title>Detection and classification of concealed weapons using a '
          'magnetometer-based portal</title>'}

Also, for the sake of efficiency, I build on asyncio but that might reduce the compatibility of the output to python 3.5+.
Best

Hi @cverluise!
Can you share your converter? it would be very helpful for me if you could

@cverluise,
ditto @Mayar2009!

Hello @Mayar2009 and @jack-rory-staunton ,
sorry @Mayar2009 . Seems that I missed your notification.
This is part of my patcit project, the part of the code you are looking for is in https://github.com/cverluise/PatCit/tree/master/patcit/serialize.
If you have any questions or feedback, feel free open an issue/feature request directly on the patcit repo.
Hope it helps.
Cheers!

awesome thank you @cverluise

hello all,
update, after a bit of refacto, the piece of code you might be interested in is in https://github.com/cverluise/PatCit/blob/master/cli/patcit_serialize_contextual-citations.py and https://github.com/cverluise/PatCit/blob/master/cli/patcit_serialize_citations.py.
Hope it helps,
Best,
Cyril

Hello @gracem97,
hope this finds you well.

I am using a modified version of https://github.com/cverluise/PatCit/blob/master/cli/patcit_serialize_contextual-citations.py that relies on a column in csv file called io.py. The column is npl_publn_id. Where did you get this column?

The npl_publn_id is used as a doc id (the doc the citation was extracted from). So, you could: 1) use it with your own ids, 2)remove it from the code 3) rename the var to better fit your own implementation.
To be clear, the expected input is a csv file with 2 columns as follows

npl_publn_id,citations

Btw, I don't think that calling a csv file io.py is particularly wise. Especially since the io.py is already defined in the package and this could create confusion (if not already).
The error your are reporting is not a proper traceback error. This does not help. Anyway, with a proper input the error should go away.
Good luck.
Cheers,
Cyril


Nodes stay with "uninitialized" taint

After new creations my nodes seem to never change to uniitialized: false

I tried with v1.0.2 and v0.7.0 as well as with several versions of k3s.
As a result I am not able to start any Pod ... even coredns does stay in Pending:

Anything I am missing here ? Or am I too impatient ;-) ... would CPX21 nodes take more than 5 minutes to be "up"

No, nodes should be ready within a minute. Can you share your config file? (remember to remove the token!)

This is my playground yaml
hetzner_token: <...>
cluster_name: sandbox
kubeconfig_path: "./sandbox/kubeconfig"
k3s_version: v1.25.5+k3s1
public_ssh_key_path: "~/.ssh/id_rsa.pub"
private_ssh_key_path: "~/.ssh/id_rsa"
use_ssh_agent: false
ssh_allowed_networks:
  - <IP_ADDRESS>/0
api_allowed_networks:
  - <IP_ADDRESS>/0

schedule_workloads_on_masters: false
masters_pool:
  instance_type: cpx21
  instance_count: 1
  location: nbg1
  # labels:
  #   - key: purpose
  #     value: blah
  # taints:
  #   - key: something
  #     value: value1:NoSchedule
worker_node_pools:
- name: small
  instance_type: cpx21
  instance_count: 2
  location: nbg1
  # labels:
  #   - key: purpose
  #     value: blah
  # taints:
  #   - key: something
  #     value: value1:NoSchedule
#- name: big
#  instance_type: cpx31
#  instance_count: 2
#  location: fsn1
additional_packages:
#- somepackage
post_create_commands:
- apt update
- apt upgrade -y
- apt autoremove -y
- shutdown -r now
enable_encryption: true

# existing_network: <specify if you want to use an existing network, otherwise one will be created for this cluster>
# kube_api_server_args:
# - arg1
# - ...
# kube_scheduler_args:
# - arg1
# - ...
# kube_controller_manager_args:
# - arg1
# - ...
# kube_cloud_controller_manager_args:
# - arg1
# - ...
# kubelet_args:
# - arg1
# - ...
# kube_proxy_args:
# - arg1
# - ...

Do you see any errors, when running the create command, regarding the installation of the cloud controller manager?

nope no other issue visible ...

OMG ... I just found that:
Please ensure kubectl is installed and in your PATH.
Just didn't recognize it as an error... my bad

now all is fine ... sorry to bother you !

No prob. Is everything working now?

... but first I need to fully understand the details of Hetzners CSI for persistent Volumes and how to employ them cleanly... any pointers on that  ?

Yeah -that's what I read also ... just I need to make myself a little familiar with that particular setup... will surely get back to you and your wisdom in couple of days ;-)
Really appreciate your work !

👍


Container list does not show names if terminal width is too narrow

As container names help (a lot) to identify which container I'm working with, not seeing them as they come last and my terminal is too narrow is a problem.
Could it be possible to ;

Show the names before the container id (I never understood why this comes first in docker ps as it has no informational value to me)
Have the left and right arrow keys bound to move the buffer just like ps | less -S would allow

Very nice interface though, like it a lot.

Great that you like the tool :)
I am not sure how to solve this. I would prefer to keep the container list similar to how docker ps shows information, at least for now.
Moving the buffer with left and right arrows is a good idea, but it will take some time to implement.
What if sorting (F1) will also reorder columns so it shows first the one being used to sort?

That would be acceptable, yes. But won't that surprise users to see columns moving around ?

Yes, you are probably right, it might feel strange.
Not sure how to fix the problem. Ideas and contributions are very welcome :)

It might be a little involved, but how about something like htop, where the columns and their order is actually configurable directly in the tool ?

I would recommend move those to a fixed right menu? Set the main window with a scrollable event. I believe this could be easier than try to create an resize event to break down the bottom list?


Generate markdown, not parsing it

Hi,
Sorry for the ignorance here, I did some research by looking at the tests, the related issues and I could not find how to "generate" markdown rather than parsing it and converting it to HTML.
For example, I have some POCOs, like below, and I would like to convert those POCOs to markdown. Is markdig the right tool for purpose?
public class Product
{
    public string Category { get; set; }
    public string Name { get; set; }
    public decimal Price { get; set; }
}

| Category | Name | Price |
| ------------- | ------------- | ------------- |
| Computer | ThinkPad X1 Carbon | 2999.99  |
| Mobile Phone | iPhone 15 Pro Max | 1899.99  |

Thanks,
Wilson

For example, I have some POCOs, like below, and I would like to convert those POCOs to markdown. Is markdig the right tool for purpose?

We don't support such scenario. The intermediate Markdown AST could be built manually to output such thing... but It has never been designed with such a goal and so, it would be very cumbersome to use it as is.


Return targets details in targets Reconcile() function.

This fixes a bug #681 where managed SG was not getting correctly associated to supporting ENI's because the target details were not available..

Coverage increased (+0.03%) to 35.618% when pulling 65a3dba028fb9700e774b42c9445aaffc6dbf6b7 on timmyers:fix-eni-sg-association into 8940e73489cb21fd116259c44436c8d3ed65fece on kubernetes-sigs:master.

CLA test.

/check-cla