text:
Direct3D9 Specification

Hi!
It'd be really cool if you could add the Direct3D9 spec on here. There's lots of undocumented and confusing behavior in d3d9 -- a sm1-3 specification would also be nice.

Unfortunately we don't have specs for earlier (<= D3D9 era) APIs in a form that could easily be published, so this isn't likely to be something we're ever able to add here.
The regular API documentation for D3D9 (https://docs.microsoft.com/en-us/windows/desktop/direct3d9/dx9-graphics) is the closest thing we have available.
Sorry!

"APIs in a form that could easily be published" Is it under NDA or what? I mean it is old as s***, what is the problem?

Concerning today's leak of all Windows XP, maybe at least add Directx 8?

authors: Joshua-Ashton ValZapod shawnhar

repo: microsoft/DirectX-Specs


text:
Incorrect NuGet Package Information?

Hello, the NuGet package Project URL points to Azure AppConfiguration. I was going to do a PR but I don't know what the icon should be:
https://github.com/microsoft/FeatureManagement-Dotnet/blob/main/src/Microsoft.FeatureManagement.AspNetCore/Microsoft.FeatureManagement.AspNetCore.csproj

A bit more reading and I see why, with the Azure App configuration capability, but it's a bit confusing. Seems feature flags could be standalone without Azure App Configuration and I'd normally expect a package link to direct me to the source repository for that package.

source: gharchive/issue

repo: microsoft/FeatureManagement-Dotnet

license: MIT

license_type: permissive

license_source: github-api


text:
Milan size limits 1

PropertyTree DDS: Summary / Operation Compression
Description
Implementation of new CompressedCommPropertyTree DDS extended from PropertyTree DDS which compresses Summaries and Deltas.
PR Checklist

[ ] I have updated the documentation accordingly.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.
[x] My code follows the code style of this project.
[x] I ran the lint checks which produced no new errors nor warnings for my changes.
[x] I have checked to ensure there aren't other open Pull Requests for the same update/change.

Does this introduce a breaking change?

[ ] Yes
[x] No

Testing
Unit test updated to perform the full test also over the new CompressedCommPropertyTree DDS.
It should be started in
experimental/PropertyDDS/packages/property-dds
by
npm run test

@tylerbutler  @DLehenbauer Since initiated current pull request we are receiving continuously workflow error reports. Please advise.
https://github.com/dstanesc/FluidFramework/actions/runs/2531789440
The workflow is not valid. .github/workflows/merge-commits-to-next-branch.yml (Line: 35, Col: 9): Unexpected symbol: '$COMMIT_INFO'. Located at position 4 within expression: ( ($COMMIT_INFO).label == 'queued' ) .github/workflows/merge-commits-to-next-branch.yml (Line: 47, Col: 9): Unexpected symbol: '$COMMIT_INFO'. Located at position 3 within expression: ( $COMMIT_INFO.label == 'queued' && needs.create-branch.result == 'failure' )

@tylerbutler - Possibly because it's waiting for a maintainer to approve running the workflow?  (I just approved it.)

@tylerbutler @DLehenbauer Since initiated current pull request we are receiving continuously workflow error reports. Please advise.
https://github.com/dstanesc/FluidFramework/actions/runs/2531789440
The workflow is not valid. .github/workflows/merge-commits-to-next-branch.yml (Line: 35, Col: 9): Unexpected symbol: '$COMMIT_INFO'. Located at position 4 within expression: ( ($COMMIT_INFO).label == 'queued' ) .github/workflows/merge-commits-to-next-branch.yml (Line: 47, Col: 9): Unexpected symbol: '$COMMIT_INFO'. Located at position 3 within expression: ( $COMMIT_INFO.label == 'queued' && needs.create-branch.result == 'failure' )

@dstanesc Sorry for the hassle! I think this is related to some in-progress work we're doing to make it easier to manage releases within the repo. There were some syntax errors in early versions of the workflows, so my guess is your PR is based on one of those earlier commits. The best workaround for now is to manually disable the workflows in your fork using the GitHub UI. See the Actions tab. We're making changes so that these workflows won't run on forks in the future.
@DLehenbauer I think this was separate from the ADO workflow permissions, but they are necessary too, so thanks for approving!

Thank you @DLehenbauer @tylerbutler for the super fast reaction. Confirm all workflows disabled in our fork.

I think enabling compression using specific compression algorithm for just one DDS is not ideal.
I'd love to see compression being done in a way where service could do nothing (i.e., service can roundtrip compressed payload and things continue to work as is). But service should also have a chance to decompress / recompress these blobs as it sees fit (i.e. understand they are compressed with specific algorithm). This has the following advantages:

Containers (at least in ODSP, I think same is for FRS) are loaded in small number of requests (one for ODSP, excluding media), and storage does solid gzip compression of whole payload (through built into http compression). Same for actual storage - individual blobs are stored in smaller number of Azure blobs, and compression is done on solid volume. It's more efficient not to do compression of compressed data - storage might want to decompress individual blobs before compressing whole file.
For staging, or maybe forever, we might prefer long term storage to not be impacted by our choices of compression algorithm. I.e. if we learn that we want to switch it half a year from now, we can do so with zero back compat impact. Compression stays part of transport layer (similar to compression in http) - it can be changed later (adding new compression algorithms, deprecating old ones) and it does not impact data at rest.

As for how it's implemented in runtime, I'd love to see one of the following:

It's applied uniformly to all blobs in container. Likely by building an adapter over IDocumentStorageService
It's done similar to how Kafka does it, i.e. giving a choice to customers (per DDS instance) to control what compression algorithm is used, thus customer controls balance of performance vs. extra memory footprint vs. bandwidth.

No matter what choices are made, we need to collect data like

impact on bundle size after tree shaking and minification.
expected impact on CPU and memory, and gain in bandwidth. Both compression & decompression. Using our example payloads.
Find reasonable cut-offs. Usually it does not make sense to compress really tiny payloads.

When it comes to experimentation, I'd start with something that does not necessarily has best compression semantics, but has minimal impact on bundle size, as many of our customers are sensitive to that. And then slowly find a way to add more algorithms in a way that does not impact all users (likely by using bundle chunking, not sure if it means some work on Fluid Framework or fully controlled by consumers).

@vladsud

I think enabling compression using specific compression algorithm for just one DDS is not ideal.

The reason for this implementation is short term support for summaries bigger than 30 MB. At the discussion with @DLehenbauer we were exploring possibilities how to quickly achieve some progress here (beside the long term tasks such as incremental summaries). In our use-cases we are fighting for each additional MB of the summary. The idea behind this is following

offer the PropertyTree DDS like structure which supports as big summary size as possible
keep the original PropertyTree DDS working as before so that the already stored summaries are still functional
lower the risk of regression by placing the implementation outside the existing code as much as possible
keep it simple

I am fully in agreement that the final compression approach should be common to all DDSes.  It is in our plan (we should build the road-map next week when we are in Seattle) and it is considered to be longer term task due to the complexity.

@milanro, as long as it does not affect existing scenarios in production, I think that's fine approach. I believe PropertyDDS is only used for experiments - might be worth confirming with Daniel here.

@milanro - I understand the intent now, thanks.
@rruiter and his team are the other stakeholders in Property DDS, so we'll want their input on how to do this with minimal impact.

@RRuiter and his team are the other stakeholders in Property DDS, so we'll want their input on how to do this with minimal impact.
@RRuiter @ruiterr, we already went through this code together and did the code review on June, 15th

@DLehenbauer @milanro is this PR still relevant? Should we close it?

source: gharchive/pull-request

authors: DLehenbauer dstanesc milanro taylorsw04 tylerbutler vladsud

repo: microsoft/FluidFramework


text:
Container loader deprecations

Description
The following types in the @fluidframework/container-loader package are not used by, or necessary to use our public api, so will be removed from export in the next major release:

IContainerLoadOptions
IContainerConfig
IPendingContainerState
ISerializableBlobContents

@wes-carlson  this is basically what you were trying to do in : https://github.com/microsoft/FluidFramework/pull/13916/


text:
Refactor Azure Client: Replace common-definitions with core-interfaces

This pull request updates the Azure client code by replacing the dependency @fluidframework/common-definitions with @fluidframework/core-interfaces.
investigate into how re-exported APIs affect type tests

This was only supposed to contain the azure client changes


text:
Loader and some driver changes for Limited Data Virtualization

Description

Add interface to represent the snapshot tree with group Ids. This is where the snapshot tree could be partial and missing some of the children.
export interface ISnapshotTree2 extends ISnapshotTree {  groupID?: string;  trees: { [path: string]: ISnapshotTree2 }; }

Add interface to support passing all the snapshot contents from storage service to loader. This represents the partial snapshot. This contains the above snapshot tree.
`export interface IPartialSnapshotWithContents {
snapshotTree: ISnapshotTree2;
blobsContents: Map<string, ArrayBuffer>;
ops: ISequencedDocumentMessage[];
/**

Sequence number of the snapshot
/
sequenceNumber: number | undefined;
/*
Sequence number for the latest op/snapshot for the file.
*/
latestSequenceNumber: number | undefined;
couldBePartialSnapshot: true;
}`

3.) Add some APIS to differentiate between the full and partial snapshot contents.
4.) Changes in ODSP driver to support with both full and partial snapshot. Cache the blobs and root tree only in case of where there is full snapshot.
5.) Changes in Loader to support with both full and partial snapshot and fetch it from storage and pass it to the runtime layer.

i would really like a design here. Specifically, we already have a number of snapshot formats, so it would be good to understand what they all are, and how this fits in. I'd also like to know more about things like groupId, how it is set, can it be changed, etc. Lastly, the current proposal doesn't appear to be serializable, and i don't think we want a new snapshot format that cannot be serialized.

authors: anthony-murphy jatgarg


text:
[Sample classification task] azure_dataset_id definition conflict between GlaucomaPublicExt.py and GlaucomaPublic.py

When following the sample classification task instructions to create the classification model configuration, we are instructed to specify azure_dataset_id in the constructor.
In the definition of GlaucomaPublic, though, these lines:
https://github.com/microsoft/InnerEye-DeepLearning/blob/eb5f931f200c253f8a3336fcb01cdaa58c6207be/InnerEye/ML/configs/classification/GlaucomaPublic.py#L12-L13
https://github.com/microsoft/InnerEye-DeepLearning/blob/eb5f931f200c253f8a3336fcb01cdaa58c6207be/InnerEye/ML/configs/classification/GlaucomaPublic.py#L23-L39
override the parameter, causing the experiment to fail if the user has not defined a dataset called glaucoma_public_dataset.
Expected behavior(s):

The parameter is not overridden.
or
Documentation specifies to call the dataset glaucoma_public_dataset.

Good catch, thanks for reporting! Update coming soon.

repo: microsoft/InnerEye-DeepLearning


text:
Update-mgdevicemanagementmanageddevice -devicecategory

Does the cmdlet work ?
because can't make work with -bodyparameter or -devicecategory, eveytime he result with an error
$Params = @{     DeviceCategory = @{     "DisplayName" = "$NewCategory"} } | ConvertTo-Json try {     # Changer la category Update-MgDeviceManagementManagedDevice -ManagedDeviceId $Device -BodyParameter $Params

I cannot make it work either with the built-in cmdlets.
`Update-MgBetaDeviceManagementManagedDevice -ManagedDeviceId $myIntuneDevice.Id -DeviceCategory $category
Update-MgBetaDeviceManagementManagedDevice : Cannot apply PATCH to navigation property 'deviceCategory' on entity type 'microsoft.management.services.api.managedDevice'.
Status: 400 (BadRequest)
ErrorCode: ModelValidationFailure
Date: 2023-10-03T17:24:51
Update-MgBetaDeviceManagementManagedDeviceCategory -ManagedDeviceId $myIntuneDevice.Id -Id $category.Id
Update-MgBetaDeviceManagementManagedDeviceCategory :
Status: 404 (NotFound)
ErrorCode: UnknownError
Date: 2023-10-03T17:03:16
`
The only way to make it work is like this:
 $body = @{ '@odata.id' = "https://graph.microsoft.com/beta/deviceManagement/deviceCategories/$($category.Id)" } Invoke-MgGraphRequest -Method PUT -Uri "beta/deviceManagement/managedDevices/$(myIntuneDevice.Id)/deviceCategory/$ref" -Body $body
`

I cannot make it work either with the built-in cmdlets.
Update-MgBetaDeviceManagementManagedDevice -ManagedDeviceId $myIntuneDevice.Id -DeviceCategory $category
Update-MgBetaDeviceManagementManagedDevice : Cannot apply PATCH to navigation property 'deviceCategory' on entity type 'microsoft.management.services.api.managedDevice'.
Status: 400 (BadRequest)
ErrorCode: ModelValidationFailure
Date: 2023-10-03T17:24:51

Update-MgBetaDeviceManagementManagedDeviceCategory -ManagedDeviceId $myIntuneDevice.Id -Id $category.Id
Update-MgBetaDeviceManagementManagedDeviceCategory :
Status: 404 (NotFound)
ErrorCode: UnknownError
Date: 2023-10-03T17:03:16

The only way to make it work is like this:
$body = @{ '@odata.id' = "https://graph.microsoft.com/beta/deviceManagement/deviceCategories/$($category.Id)" }
Invoke-MgGraphRequest -Method PUT -Uri "beta/deviceManagement/managedDevices/$(myIntuneDevice.Id)/deviceCategory/`$ref" -Body $body

This one work for me :
Update-MgBetaDeviceManagementManagedDeviceCategory -ManagedDeviceId $Device -BodyParameter $BodyParams
With the new category in the body parameter

authors: SamSepiolWarden clienart-bmx geoced

repo: microsoft/Intune-PowerShell-SDK


text:
Adding MacOS 10.14 jobs to the azure-pipelines.yml file

This also fixes the build scripts to properly opt out of the first time experience.

macOS looks to currently hit an assert: The active test run was aborted. Reason: Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /tmp/llvm-5.0.0.src/include/llvm/Support/Casting.h, line 255.

repo: microsoft/LLVMSharp


text:
[fix] Locale independent model load/save

Hello,
Issue
With the revert of its PR, this issue became again a concern in Java: https://github.com/microsoft/LightGBM/issues/2890.
At the moment LightGBM uses strtod() and C++ streams to read/write floating point the model file numbers.
The issue is that Java breaks the initialization to the standard "C" locale (see https://github.com/microsoft/LightGBM/pull/2891). Current evidence shows this is true for Java providers that use the C API through SWIG (I suspect MMLSpark's LightGBM might be affected by this too), and even for users of the LightGBM Python API that have their code wrapped by JEP.
For production scenarios ensuring the correctness of scores is of paramount importance and right now there are none for LGBM providers that use Java (see issue above).
Request for Change
After assessing alternatives, and seeing that the last fix was reverted, the robust solution would be to change the model read/write of floating numbers through use of process-locale-independent methods.
Implementation proposal
Replace floating point read/writes in model save/load with calls to C++ streams (we already use them anyway for some parameters). We imbue such streams with the "C" locale, to force the same locale for reads and writes. This fixes our bug.
It might be slightly slower to read/write the model but it will be correct everytime independently of process locale settings.
According to the benchmark https://tinodidriksen.com/2011/05/cpp-convert-string-to-double-speed/ it would result in a ~3x slower floating-point conversion (reusing streams). I doubt it's actually 3x slower (see tricks to make it faster http://cplusplus.bordoon.com/speeding_up_string_conversions.html). Besides, we're already using streams for some numbers, thus the model read/write slowdown wouldn't reach that value.
Is that an issue?
Can I get your thoughts on this? Good, bad? Secondary effects I might be missing? Would such PR be welcome? @guolinke @StrikerRUS @imatiach-msft  et al.
Thank you!
Not enough? Future - Alternative libraries
In the future, if needed we can upgrade to use different libraries like Boost.Spirit or David M. Gay's library which is more accurate than glibc (current implementation). If we do so, we can have rounding differences (that in principle are small).
Side note on floating-point conversion precision and David Gay's library
GCC uses glibc to compile LightGBM, and according to these links:

https://www.exploringbinary.com/how-glibc-strtod-works/
https://www.exploringbinary.com/how-strtod-works-and-sometimes-doesnt/

Converting decimal strings to doubles correctly and efficiently is a surprisingly complex task; fortunately, David M. Gay did this for us when he wrote this paper and released this code over 20 years ago. (He maintains this reference copy of strtod() to this day.) His code appears in many places, including in the Python, PHP, and Java programming languages, and in the Firefox, Chrome, and Safari Web browsers.

Many programming environments implement their string to double conversions with David Gay’s strtod(); glibc, the GNU C Library, does not.

David Gay's implementation https://www.ampl.com/netlib/fp/dtoa.c of to/from string/floating point conversion is even more accurate than we're using now. It is a single file that can be compiled and configured through preprocessor flags, in our case to ignore locale processing altogether (resulting in the "C" locale behaviour for reads and writes).

Speaking about float2str conversion in saving models, XGBoost recently adopted Ryū algorithm (https://github.com/dmlc/xgboost/pull/5772) and numpy uses Dragon4 algorithm (https://github.com/numpy/numpy/pull/9941).

Before I commit to working on this, can someone help me direct me to the files where load/save model files code is found?
Searching for the code... (read only if at a loss)
The fix we had posted in the past https://github.com/microsoft/LightGBM/pull/2891/files required changes in: LGBM_BoosterCreateFromModelfile, LGBM_BoosterSaveModel, LGBM_BoosterSaveModelToString and LGBM_BoosterDumpModel in the C API.
This new implementations will need to change the core code, which means fixes must be done in the functions called therein, namely, Booster::Booster (constructor), Booster::SaveModelToFile, Booster::SaveModelToString and Booster::DumpModel.
Reading model files seems to be implemented in:
boosting_->LoadModelFromString(model_str, len) which leads me to GBDT::LoadModelFromString in gbdt_model_text.cpp.
In turn, that uses both ArrayToString and ArrayToStringFast (don't know why we have and use both to save the model - legacy?). In turn Common::DoubleToStr, which uses snprintf (which is not locale-independent) is used.
Conclusion and questions
I got lost on the virtual function pointers, though, I was expecting to see DART and others implement model read/write.
Can I thus assume model text file read/writes are implemented in gbdt_model_text.cpp's:

methods alone?

If I change that file and the required methods in Common like DoubleToStr, everything should work?
If I touch DoubleToStr will this impact other code? (I can always leave it alone and make a new method)
What about DART, and other boosting modes, all of them still use gbdt_model_text.cpp to implement read and writes?

Thank you so much :)

Gently ping @guolinke for two questions above about the code location.

sorry for missing this thread...
@AlbertoEAF

I remember ArrayToStringFast is only for integer. So for model_to_string, changing DoubleToStr should be enough. For for the string_to_model, there are several functions. like https://github.com/microsoft/LightGBM/blob/adfc9f5c61ad3d11b9768ed0b9104297434ce822/include/LightGBM/utils/common.h#L513-L518 and https://github.com/microsoft/LightGBM/blob/adfc9f5c61ad3d11b9768ed0b9104297434ce822/include/LightGBM/utils/common.h#L566-L574

yeah, all models share the same model input/output codes.

Thanks so much! I will start working on it ;)

By the way @StrikerRUS , regarding such libraries, I think I'll go with Ryü, I've been reading up a bit on it. Both came up after David Gay's implementations and Ryü came after Dragon4. Dragon4 has a fallback algorithm for some numbers which is slower.
I also saw even faster implementations but I don't want to get too close to the edge as this is supposed to be stable.
I was thinking of using this C++ implementation of Ryü https://github.com/expnkx/fast_io as it provides a single-header to include but it requires C++20 when LGBM is only C++11.
This leaves only the original implementation with C interface: https://github.com/ulfjack/ryu. I hope it's easy to add to our build chain, still will have to figure that one out.

@AlbertoEAF BTW, is that possible to have the two-stage solution? like, have a script to locale/de-locale the model?
LightGBM itself could read/write always by current format.
But when users want to read the content of model file, we can locale it.

Hello @guolinke , I'm not sure what you mean. Why would we want to transform the model content to different locales?
It's cleaner to have it store and load always with the same format, we don't need models in different locales.
Also, I believe it would be even trickier as you would have to know precisely the locale with which the model was written to read it correctly, which can be tricky to know in some corner cases.
Finally, as LightGBM itself does not allow "changing locale" during its execution, we would have to create an external tool, and that tool would need to parse the model file structure to read it and then rewrite it with exactly the same structure - lots of code duplication and complexity.

@AlbertoEAF I misunderstood the locale problem.
you are right, the model should be locale-independent.

By the way, maybe there were changes meanwhile because in the v3.0.0 code ArrayToStringFast and ArrayToString both operate on doubles. ArrayToString only operates on doubles, but ArrayToStringFast is a template that processes arrays of any type. I believe there's no reason to have both anymore.
Second point, instead of using Ryu, I was thinking of using fmt https://fmt.dev/latest/index.html, for its integration is much easier, and still 10x faster than the standard libraries (current state). Besides being the foundation to C++20's new format standard library, it is also very well maintained, uses only C++11 features and it has explicit support for gcc 4.8  (https://fmt.dev/latest/index.html). What do you think? Also it seems much easier to use than Ryu.
If I'm mistaken please correct me! :)

Wow, I replaced threshold, leaf_value and leaf_weight's ArrayToString calls by ArrayToStringFast in src/io/tree.cpp's Tree::ToString() and had surprising results. To test I read a reference model file and wrote it back (left=v3.0.0 code, right=modified code):

Whilst ArrayToStringFast produces numbers with less precision which saves space, the tree sizes also changed. Why is that?!

@AlbertoEAF I'm totally OK with using fmt library! It looks quite popular based on number of GitHub stars and we can use it as a git submodule (like boosts' compute).

Hah, just noticed that treelite project is using fmt library. And treelite in turn is used in rapidsai's project for tree models:
https://github.com/dmlc/treelite/blob/1c495c52a6dff8413f1b66f2f0ecc4e390473c5e/cmake/ExternalLibs.cmake#L10-L14
https://github.com/rapidsai/cuml

Yeah @StrikerRUS , even integer to string conversions might benefit from it, not only floating point conversions with shortest representation. LightGBM already has a custom Atoi function built to improve performance I believe, but it seems not even that will beat this:

http://www.zverovich.net/2020/06/13/fast-int-to-string-revisited.html

@guolinke @StrikerRUS I've hit some issue with the LightGBM model (same as the one above with the image) which I don't understand and really need your help. Any ideas of what might be causing this are greatly appreciated!
Issue
When I switch the call that turns floating point parameters to strings in the model write, I get numbers which have sometimes a redundant trailing 0 in the scientific notation which shouldn't matter - just posted a bug at fmtlib: https://github.com/fmtlib/fmt/issues/1873. See it to understand what I mean.
The big issue though is that for each of the two trees where one parameter changed, that tree_size in the model grew by +1 as well! Any ideas?!
Diffs in the output models files produced by LightGBM. Each image reports the line difference with the "unpatched"/normal LightGBM code (in red) and with the patch (in green), followed by the differences in items from such lines also in red/green:

In this case the model written with the patched code results in two trees where one parameter as a trailing 0, which results in this tree size changes:

and that's what I don't understand. Why do the tree sizes change because of the written floating point parameters?
Source code references
If you want to take a look at the difference in the code that led to this issue reported here and in  https://github.com/fmtlib/fmt/issues/1873, the code change is this one: https://github.com/feedzai/LightGBM/pull/2/commits/da3d8f2397d87fcb784c854564a830763a24048d.
The images above were generated with the two commits:

red: The "base" code which works exactly like LightGBM v3.0.0 - https://github.com/feedzai/LightGBM/pull/2/commits/f65512fa9753172cc9e0728c4be67dda8a4f2fa8
green: The patched code - https://github.com/feedzai/LightGBM/pull/2/commits/da3d8f2397d87fcb784c854564a830763a24048d

PR's in progress (still in very early development):

LightGBM PR: https://github.com/feedzai/LightGBM/pull/2
Provider which uses LightGBM and where I have all test resources and functional and integration test code: https://github.com/feedzai/feedzai-openml-java/pull/53

@guolinke The issue described above can be the root cause of our previous issue when maintainers of Julia package had to remove tree_sizes field to load a model created on another machine: #3137.

To further reinforce the "bug" origin, I added code to strip away trailing 0's in the decimal digits of numbers, and it already works properly - i.e., there are no differences in the output models! (This is the temporary hack I proposed on the https://github.com/fmtlib/fmt/issues/1873).
This commit https://github.com/feedzai/LightGBM/pull/2/commits/c34c43da599b1bf60884d3576970103c26cc6204 adds that code (which is not a permanent solution as it's a hack which reduces speed and is not 'pretty').

I was already able to replace all write calls except DoubleToStr again due to divergences in fmt and snprintf. However there's a hack to fix it too until they fix it in the library: truncating the output string to the maximum number of significant digits: https://github.com/fmtlib/fmt/issues/1875

@AlbertoEAF the tree-size is the string size of tree model content. We use it for the multi-threading loading tree models.

Ah! So it's no bug! I get it now, shouldn't be a problem then, thanks!

Hello @guolinke @StrikerRUS I have good news, I've completed the code changes and it's passing all the tests!
Instead of relying on Ryu, actually I used fmt to write values to strings as it provides similar performance and its API is much more inline with the rest of the LightGBM codebase. To do string->double parsing I am using this library: https://github.com/lemire/fast_double_parser which provides maximal floating-point string parsing resolution and matches the standard library parsing outputs bit by bit.
Hence, transforming data to strings and string arrays should now be faster. Parsing strings to doubles with StringToArray should now be significantly faster at parsing doubles.
I'd like to streamline the code more by merging Common's __StringToTHelperFast and __StringToTHelper, however, Common::Atof seems to diverge from standard library's stringstreams and fast_double_parser's resolutions. Those two are equivalent and provide the maximal parsing resolution.
Common::Atof string->double parsing diverges around the 2 last decimal places. See some examples:

And seems to have less resolution:

As such I had to leave both __StringToTHelperFast and __StringToTHelper separate to maintain the current LightGBM behaviour without affecting read/write floating-point resolution.

Common::Atof string->double parsing diverges around the 2 last decimal places. See some examples:

Looks like the difference is in the 18th+ digit in all examples. And according to IEEE 754, double gives only 15-17 first significant digits. So, I believe it is OK to have inconsistent digits after 17th place.

Hmm that's interesting, in that case we could replace Atof and further simplify the codebase :)
Thanks Nikita! I'll run some tests tomorrow and see if the scores don't change.

I remember that atof is used for the precision non-sensitive conversion (it will be faster), like the split_gain.
If the new solution is faster and more precisious, we can switch to it.

Fixed via #3405.
Thanks a lot @AlbertoEAF !

Thanks a lot for all the help @StrikerRUS @jameslamb  ;)

authors: AlbertoEAF StrikerRUS guolinke

repo: microsoft/LightGBM

license: mit

license_source: bigquery


text:
智能助手 运动计步

**_
_**

@kant @jameslamb _
_

We're reporting this, please stop.


text:
[python-package] Accept numpy generators as random_state

This PR adds support for numpy  generators as possible inputs for random_state. Generators are the recommended way of drawing random numbers from numpy, while RandomState is deprecated. Lots of other software such as SciPy have moved towards Generator and/or allow both (example: scipy.sparse.random).

Added a compat entry and quoted type hints for running with older numpy.

I'm not sure why the linter is complaining about seemingly unrelated files. This is what I found in the logs:
python-package/lightgbm/basic.py:805: error: Incompatible return value type (got "tuple[Any, list[str], list[str] | list[int], list[list[Any]]]", expected "tuple[Any, list[str], list[str], list[list[Any]]]")  [return-value]
python-package/lightgbm/basic.py:2939: error: Array constructor argument 1 of type "map[int]" is not convertible to the array element type "Iterable[c_char_p]"  [misc]
python-package/lightgbm/basic.py:2953: error: Array constructor argument 1 of type "map[int]" is not convertible to the array element type "Iterable[c_char_p]"  [misc]
python-package/lightgbm/basic.py:4619: error: Array constructor argument 1 of type "map[int]" is not convertible to the array element type "Iterable[c_char_p]"  [misc]
python-package/lightgbm/basic.py:4633: error: Array constructor argument 1 of type "map[int]" is not convertible to the array element type "Iterable[c_char_p]"  [misc]
python-package/lightgbm/basic.py:4843: error: Array constructor argument 1 of type "map[int]" is not convertible to the array element type "Iterable[c_char_p]"  [misc]
python-package/lightgbm/basic.py:4859: error: Array constructor argument 1 of type "map[int]" is not convertible to the array element type "Iterable[c_char_p]"  [misc]
python-package/lightgbm/engine.py:294: error: Incompatible types in assignment (expression has type "list[tuple[str, str, float, bool]] | list[tuple[str, str, float, bool, float]]", variable has type "list[tuple[str, str, float, bool]]")  [assignment]
Found 8 errors in 2 files (checked 9 source files)

None of those files are being modified here.

Those mypy errors don't actually cause the lint CI job to fail:
https://github.com/microsoft/LightGBM/blob/aeafccfbfb5c223d33b61ebe0f1e8b5592249151/.ci/lint-python.sh#L19-L22
That job is failing on this PR for reasons unrelated to this PR, caused by the latest release of {lintr}, which will be fixed once we merge #6180.

authors: david-cortes jameslamb


text:
Improved Solution File Handling

This change makes a lot of improvements to how MSB4U solution file is generated, and more importantly what information it tries to bring forward when overwriting this file. This means, you can now modify and add items to the solution file, and have MSB4U preserve those.
This change addresses:
#86

    {

nit: consider moving these variables into a wrapper struct/class to decrease the number of arguments in this function call

Refers to: Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Exporters/TemplatedProjectExporter.cs:56 in 283a6d5. [](commit_id = 283a6d5076e3efe7c048247ed942130277a3ff1d, deletion_comment = False)

authors: andreiborodin chrisfromwork

repo: microsoft/MSBuildForUnity


text:
Traversal SDK net6 support

Hi!
In dotnet-affected, we create MSBuild Traversal SDK projects using this code:
var projectRootElement = @"<Project Sdk=""Microsoft.Build.Traversal/3.0.3""></Project>";
var stringReader = new StringReader(projectRootElement);
var xmlReader = new XmlTextReader(stringReader);
var root = ProjectRootElement.Create(xmlReader);

var project = new Project(root);

This code works fine in net5 but it's failing on net6. I suspect it may be because Microsoft.Build.Traversal needs to support net 6?
The stacktrace looks like this:
 Microsoft.Build.Exceptions.InvalidProjectFileException : SDK Resolver Failure: "The SDK resolver "NuGetSdkResolver" failed while attempting to resolve the SDK "Microsoft.NET.Sdk". Exception: "System.ArgumentNullException: Value cannot be null. (Parameter 'path')
   at System.IO.Directory.GetParent(String path)
   at Microsoft.Build.NuGetSdkResolver.GlobalJsonReader.GetMSBuildSdkVersions(SdkResolverContext context)
   at Microsoft.Build.NuGetSdkResolver.NuGetSdkResolver.TryGetNuGetVersionForSdk(String id, String version, SdkResolverContext context, Object& parsedVersion)
   at Microsoft.Build.NuGetSdkResolver.NuGetSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory)
   at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.ResolveSdk(Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio)""  /home/runner/.nuget/packages/microsoft.build.traversal/3.0.3/Sdk/Sdk.props
  Stack Trace:
     at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)
   at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1](IElementLocation elementLocation, String resourceName, T1 arg0)
   at Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImportsFromUnescapedImportExpressionConditioned(String directoryOfImportingFile, ProjectImportElement importElement, List`1& projects, SdkResult& sdkResult, Boolean throwOnFileNotExistsError)
   at Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImports(String directoryOfImportingFile, ProjectImportElement importElement, SdkResult& sdkResult)
   at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement)
   at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
   at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement)
   at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
   at Microsoft.Build.Evaluation.Evaluator`4.Evaluate()
   at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(IEvaluatorData`4 data, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary`1 environmentProperties, ILoggingService loggingService, IItemFactory`2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCacheBase projectRootElementCache, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, Int32 submissionId, EvaluationContext evaluationContext, Boolean interactive)
   at Microsoft.Build.Evaluation.Project.ProjectImpl.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.Project.ProjectImpl.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.Project..ctor(ProjectRootElement xml, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.Project..ctor(ProjectRootElement xml)
   at Affected.Cli.Formatters.TraversalProjectOutputFormatter.Format(IEnumerable`1 projects) in /home/runner/work/dotnet-affected/dotnet-affected/src/dotnet-affected/Infrastructure/Formatters/TraversalProjectOutputFormatter.cs:line 23
   at Affected.Cli.Tests.Formatters.TraversalFormatterTests.Using_single_project_should_contain_project() in /home/runner/work/dotnet-affected/dotnet-affected/src/dotnet-affected.Tests/Formatters/TraversalFormatterTests.cs:line 25
--- End of stack trace from previous location ---

Full logs can be found here
Link to source code
dotnet info
.NET SDK (reflecting any global.json):
 Version:   6.0.100
 Commit:    9e8b04bbff

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  20.04
 OS Platform: Linux
 RID:         ubuntu.20.04-x64
 Base Path:   /home/runner/work/dotnet-affected/dotnet-affected/eng/.dotnet/sdk/6.0.100/

Host (useful for support):
  Version: 6.0.0
  Commit:  4822e3c3aa

.NET SDKs installed:
  3.1.415 [/home/runner/work/dotnet-affected/dotnet-affected/eng/.dotnet/sdk]
  5.0.403 [/home/runner/work/dotnet-affected/dotnet-affected/eng/.dotnet/sdk]
  6.0.100 [/home/runner/work/dotnet-affected/dotnet-affected/eng/.dotnet/sdk]

Any guidance is appreciated!
Thanks!
Leo.

Looks like an MSBuild bug reported here: https://github.com/dotnet/msbuild/issues/7035

Looks like the same issue.
I've tried updating MSBuild to v17 which targets net6, just in case, but same error.

Based on the stack trace, I suspect if you save the project to disk first it might work.  It seems like the path to project is null which is causing an exception later on.

I'm going to close this in favor of https://github.com/NuGet/Home/issues/11376

Hi @jeffkl , sorry for the dumb question, but has this been released yet?
Not sure what I need to update to get this changes, is this included in .NET 6.0.1?

@leonardochaia the bug was fixed in the next release which will be in Visual Studio 17.1 and .NET 6.0.200 which should be available in early February.  You can also use preview versions if you need the functionality right away.  https://github.com/dotnet/installer#installers-and-binaries

authors: jeffkl leonardochaia

repo: microsoft/MSBuildSdks


text:
[Bug - Partner Center] Certification fails for MV3 extension having both background.service_worker and background.script defined in manifest

The issue
Google/Chrome, Mozilla/Firefox and Apple/Safari all allow MV3 webextensions defining both background.service_worker and background.script in the manifest. In such cases browser will use only one of them and prefer the service_worker if the browser supports it. As documented here: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/background#browser_support
While making the latest version of my Flickr Fixr webextension, I didn't even consider there could be a problem when uploading to MS Partner Center. I have tested the extension by manually installing in Edge, and it works perfect.
However when I upload to Partner Center, I get "package failed certification" error:

The following checks failed:
Package acceptance validation error: The background.scripts field cannot be used with manifest version 3. Use the background.service_worker field instead. Error code: background: { "scripts": [ "background/flickr_fixr.js" ], "service_worker": "background/flickr_fixr.js", "type": "module" } Line: 38 Column: 17

To Reproduce
I'm guessing issue can be reproduced by uploading any MV3 webextension having both background.service_worker and background.script defined in the manifest. But you could do it with mine:
Steps to reproduce the behavior:

Download version 2.5.0 of Flickr Fixr from https://github.com/StigNygaard/Stigs_Flickr_Fixr/releases/tag/2.5.0 (FlickrFixr250.zip)
Upload FlickrFixr250.zip as a webextension in Partner Center

Expected behavior
I had hoped/assumed it would accept the extension. Maybe with a warning, but not an error stopping me from publishing it.
Screenshots

Desktop
Probably not relevant, but I logged into Partner Center using Firefox 128 on Windows 11.
Additional context
https://discourse.mozilla.org/t/mv3-background-scripts-vs-serviceworkers-ms-edge-didnt-get-the-memo/133613
https://blog.mozilla.org/addons/2024/03/13/manifest-v3-manifest-v2-march-2024-update/
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/background#browser_support
https://github.com/StigNygaard/Stigs_Flickr_Fixr
https://github.com/StigNygaard/Stigs_Flickr_Fixr/blob/master/WebExtension/manifest.json
Current Flickr Fixr available for Edge: https://microsoftedge.microsoft.com/addons/detail/ieinimkepkfmmpeakdgnoikimokffneh

Okay, I see I'm not the first one reporting this:
https://github.com/microsoft/MicrosoftEdge-Extensions/issues/136
https://github.com/microsoft/MicrosoftEdge-Extensions/issues/165

Hi @StigNygaard, we want to express our gratitude for your understanding and patience. Please be assured that the similar feedback has already been forwarded to our engineering team, and they are diligently working on it. Your patience during this process is greatly appreciated.
We understand the importance of this issue and once we have an update or need further information, we will get back to you promptly. We appreciate your contribution to improving the platform.

Bonus question/comment. A bit off-topic. But only a bit, it is still about cross-browser flexibility in manifest file and what Partner Center will allow me to upload...
I have another extension which requests the two related permissions "menus" and "contextMenus". Safari recognize "menus" as an alias for "contextMenus" and in Firefox "menus" represents a superset of "contextMenus" adding support for finding the exact DOM-element a context-menu was opened from. Chromium browsers does not recognize the "menus" permission.
My extension takes advantage of the extra feature (in Firefox) of "menus" when available, but also works without the extra feature. I use it by eventually redefining contextMenus like this:
globalThis.browser ??= chrome;
if (browser.menus?.getTargetElement) {
  browser.contextMenus = browser.menus;
}

So the question is, would Partner Center accept a manifest defining permissions something like this (with both "menus" and "contextMenus"):
  "permissions": [
    "scripting",
    "contextMenus",
    "menus",
    "storage"
  ],

I can install the extension manually in Edge. It works fine.

Hey @StigNygaard, thank you for providing additional information. We will respond with an update once we hear back from our team. We appreciate your patience in the meantime.

It sounds like Microsoft plans to fix this. But are there any "ETA"?

Hey @StigNygaard, we wanted to inform you that the feature you inquired about is currently on our backlog. We will update you once we have an update on this feature.
We appreciate your understanding and patience.

authors: ManikanthMSFT StigNygaard

repo: microsoft/MicrosoftEdge-Extensions


text:
Enable publishing of upm packages in release pipelines

This change reads the registry path from the pipeline run and publishes the artifacts. This completes the UPM publishing work!

/azp run

repo: microsoft/MixedRealityToolkit-Unity


text:
Remove TimedScopeGen since we defining them manually

We've switched to creating TimedScopeDefinitions manually so TimedScopeGen could be deprecated now

Will this break any project that uses the timedscopeGen?

Will this break any project that uses the timedscopeGen?

No projects using this one, current project using TimedScopeGen from Omex repo
An alternative to deleting this one would be switching all projects to this one and delete the one in Omex. @vlad-ion how complicated do you think it will be?

If we are moving away from using a generator anyway then removing is fine. Updating the projects in the Omex repo is not worth it. If no projects that we port out of that repo will use a generator then we don't need this one and when everything is out of the Omex repo then we don't need that one anymore either.

authors: AndreyTretyak gijskoning vlad-ion

repo: microsoft/Omex


text:
PTVS needs to give a reasonable error for unrecognized python versions

https://github.com/Microsoft/PTVS/issues/4842 describes a cryptic error message when PTVS didn't recognize python because the python version was too new.
Please make sure that the current version of PTVS will give a descriptive error when encountering future versions of python (e.g. Python 3.26.1, released in 2046).

@greazer , was this closed because it was fixed, or for another reason?

repo: microsoft/PTVS


text:
PackageId:CPython39.Exe.x64;PackageAction:Repair;ReturnCode:1638;

This issue has been moved from a ticket on Developer Community.

Describe your issue here
===DO NOT EDIT BELOW THIS LINE===
PackageId:CPython39.Exe.x64;PackageAction:Repair;ReturnCode:1638;

Original Comments
Feedback Bot on 9/25/2022, 07:44 PM:
(private comment, text removed)

Original Solutions
(no solutions)

Hi there, we could use more detailed logs to see what's really going on. Can you please collect more logs by running http://aka.ms/vscollect.exe and uploading %temp%\vslogs.zip ? Thank you!

Going to close this out. If the issue still persists, please reopen with the information requested. Thanks.😊


text:
PackageId:CPython39.Exe.x64;PackageAction:Install;ReturnCode:1603;

This issue has been moved from a ticket on Developer Community.

Describe your issue here
===DO NOT EDIT BELOW THIS LINE===
PackageId:CPython39.Exe.x64; PackageAction:Install; ReturnCode:1603;

Original Comments
Feedback Bot on 1/19/2023, 07:19 PM:
(private comment, text removed)

Original Solutions
(no solutions)

Hi there, please see https://learn.microsoft.com/en-us/visualstudio/python/installing-python-support-in-visual-studio?view=vs-2022#troubleshooting.
If that doesn't solve your issue, we could use more detailed logs to see what's really going on. Can you please collect more logs by running http://aka.ms/vscollect.exe and uploading %temp%\vslogs.zip and reopen the ticket if it persists? Thank you!


text:
error

[Window Title]
devenv.exe
[Main Instruction]
An unexpected error occurred
[Content]
Please press Ctrl+C to copy the contents of this dialog and report this error to our issue tracker.
[V] Show details  [Close]
[Expanded Information]
Build: 17.0.24064.1

System.ObjectDisposedException: Cannot access a disposed object.
   at Microsoft.VisualStudioTools.Project.ProjectNode.GetMsBuildProperty(String propertyName, Boolean resetCache)
   at Microsoft.VisualStudioTools.Project.ProjectNode.GetProjectProperty(String propertyName, Boolean resetCache)
   at Microsoft.PythonTools.Project.CondaEnvCreateProjectInfoBar.<CheckAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PythonTools.Infrastructure.VSTaskExtensions.<HandleAllExceptions>d__5.MoveNext()

Thanks for reporting the issue. Is your code in a public repo or could you provide code samples that help us repro this issue? Does this repro constantly for you? Could you also share more detailed repro steps? Thanks!

Thanks for the report. Unfortunately, this is not enough information for us to investigate this issue.
If this continues to be a problem, would you please reopen the issue and add detailed repro steps as outlined above?

Thanks for the report. Unfortunately, this is not enough information for us to investigate this issue.
If this continues to be a problem, would you please reopen the issue and add detailed repro steps as outlined above?


text:
Getting the below issue when running - Install-Module -Name PartnerCenter -AllowClobber -Scope CurrentUser

Steps to reproduce
I run powershell ISE as adminstrator and run the below script.
Install-Module -Name PartnerCenter -AllowClobber -Scope CurrentUser
I got the below issue when the running the above script.
WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'.
PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'PartnerCenter'. Try
Get-PSRepository to see all available registered module repositories.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21

...          $null = PackageManagement\Install-Package @PSBoundParameters

                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

What steps can reproduce the defect?

Please share the setup, commandline for vstest.console, sample project, target
framework etc.

Expected behavior
It is supposed to Installl

Share the expected output

Actual behavior

What is the behavior observed?

Diagnostic logs

Please share test platform diagnostics logs.
The logs may contain test assembly paths, kindly review and mask those before sharing.

Environment

Please share additional details about your environment.
Version

@balarjrao the appropriate changes to correct this issue have been made. Later today version 3.0.9 will be released which includes this hotfix.

authors: balarjrao isaiahwilliams

repo: microsoft/Partner-Center-PowerShell


text:
Add Census Data Notebook

This pull request adds the Census Data Notebook.
Currently, it includes everything except for Census Blocks, this notebook will be updated in the next few days to included Census Blocks with processed population data.

[x] Merge adjacent cells (e.g. titles and markdown text)
[x] Confirm that CRS is set correctly in the parquet metadata
[x] Consolidate contextily imports
[x] Consolidate read_parquets
[x] Remove .DS_STORE files (and ensure they aren't uploaded)
[x] use .parquet extension instead of .parq
[x] Optimize dtypes

[x] STATEFP -> category
[x] COUNTYFP -> category (?)
[x] BLKGRPCE -> int (int16, int32, int64?)
[x] NAME -> int
[x] NAMELSAD -> category (?)
[x] ALAND -> int
[x] AWATER -> int
[x] all object -> string
[x] PARTFLG -> category

[x] Census block specific

[x] Write a single partitioned datsaet for all the state
[x] Drop SUFFIX
[x] INTPTLAT, INTPTLON -> int
[x] STUSAB -> category?
[x] GEOID as index?

FYI @nodell111, https://github.com/microsoft/PlanetaryComputerExamples/blob/main/CONTRIBUTING.md#linting walks through setting up pre-commit to automatically run the linting checks before pushing.

I updated the original post with some TODOs that are hopefully complete.

FYI, I've done some work on the STAC side to handle getting tokens. You should be able to use this to access the data from the private container.
r = requests.get("https://planetarycomputer.microsoft.com/api/sas/v1/token/ai4edataeuwest/us-census")

storage_options = {
    "account_name": "ai4edataeuwest",
    "credential": r.json()["token"],
}

It looks like the dtype change broken some plot examples. For example, the "Congressional Districts: 116th Congress (CD116)" plot is broken now
ax = ddf[ddf.GEOID == "2402"].compute().plot(figsize=(10, 10), alpha=0.5, edgecolor="k")

should be (no quotes around 2402)
ax = ddf[ddf.GEOID == 2402].compute().plot(figsize=(10, 10), alpha=0.5, edgecolor="k")

Thanks all, merging!

repo: microsoft/PlanetaryComputerExamples


text:
Cleanup contact2 (that was created via account2)

The sample did not cleanup all of the data it added.

@millarde-equinor Thanks for catching that.

authors: millarde-equinor phecke

repo: microsoft/PowerApps-Samples


text:
The HTTP request was forbidden with client authentication scheme 'Anonymous'

Hello,
the CdsServiceClient throws an exception when trying to use the ClientSecret authentication and you have not registered the application in the dynamics instance yet. The stack trace is the following:
Microsoft.Powerplatform.Cds.Client.Utils.CdsConnectionException
  HResult=0x80131500
  Message=Failed to connect to Common Data Service
  Source=Microsoft.Powerplatform.Cds.Client
  StackTrace:
   at Microsoft.Powerplatform.Cds.Client.CdsServiceClient.CreateCdsServiceConnection(Object externalOrgServiceProxy, AuthenticationType requestedAuthType, String hostName, String port, String orgName, NetworkCredential credential, String userId, SecureString password, String domain, String Geo, String claimsHomeRealm, Boolean useSsl, Boolean useUniqueInstance, OrganizationDetail orgDetail, UserIdentifier user, String clientId, Uri redirectUri, PromptBehavior promptBehavior, String tokenCachePath, OrganizationWebProxyClient externalOrgWebProxyClient, String certificateThumbPrint, StoreName certificateStoreName, X509Certificate2 certificate, Uri instanceUrl, Boolean isCloned, Boolean useDefaultCreds)
   at Microsoft.Powerplatform.Cds.Client.CdsServiceClient..ctor(Uri instanceUrl, String clientId, String clientSecret, Boolean useUniqueInstance, String tokenCachePath)
   at CDS.Core_Test.Program.Main(String[] args) in C:\Demo\CDS.Core Test\CDS.Core Test\Program.cs:line 17

  This exception was originally thrown at this call stack:
    Microsoft.Powerplatform.Cds.Client.CdsConnectionService.InitCdsService()
    Microsoft.Powerplatform.Cds.Client.CdsConnectionService.GetCachedCDSService(out Microsoft.Powerplatform.Cds.Client.CdsConnectionService)
    Microsoft.Powerplatform.Cds.Client.CdsConnectionService.IntilizeService(out Microsoft.Powerplatform.Cds.Client.CdsConnectionService)
    Microsoft.Powerplatform.Cds.Client.CdsConnectionService.DoLogin(out Microsoft.Powerplatform.Cds.Client.CdsConnectionService)
    Microsoft.Powerplatform.Cds.Client.CdsServiceClient.CreateCdsServiceConnection(object, Microsoft.Powerplatform.Cds.Client.AuthenticationType, string, string, string, System.Net.NetworkCredential, string, System.Security.SecureString, string, string, string, bool, bool, Microsoft.Xrm.Sdk.Discovery.OrganizationDetail, Microsoft.IdentityModel.Clients.ActiveDirectory.UserIdentifier, string, System.Uri, Microsoft.IdentityModel.Clients.ActiveDirectory.PromptBehavior, string, Microsoft.Xrm.Sdk.WebServiceClient.OrganizationWebProxyClient, string, System.Security.Cryptography.X509Certificates.StoreName, System.Security.Cryptography.X509Certificates.X509Certificate2, System.Uri, bool, bool)

Inner Exception 1:
MessageSecurityException: The HTTP request was forbidden with client authentication scheme 'Anonymous'.

You can use the following code to replicate the problem:
using Microsoft.Extensions.Configuration;
using Microsoft.Powerplatform.Cds.Client;
using System;
using System.IO;

namespace CDS.Core_Test
{
    class Program
    {
        static void Main(string[] args)
        {
            IConfiguration config = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory())
                                            .AddJsonFile("appsettings.json", true, true)
                                            .Build();
            var cdsClientConfig = config.GetSection("CdsClient");

            var cdsClient = new CdsServiceClient(new Uri(cdsClientConfig["Uri"]), cdsClientConfig["ClientId"], cdsClientConfig["ClientSecret"], true, cdsClientConfig["TokenCache"]);
            if (cdsClient.IsReady)
            {
                Console.WriteLine("Hello, connected to CDS using .NET Core");
            }
            else
            {
                // Never reaches this line of code because the constructor throws an exception
                Console.WriteLine("Failed to connect to CDS using .NET Core :(");
            }

            Console.ReadKey();
        }
    }
}

I replicated the same situation using CrmServiceConnection from Microsoft.Xrm.Tooling.Connector and it does not throw an exception, instead, it handles the exception and stores it in the CrmServiceClient.LastCrmException property. You can use the following code to replicate it using .Net Framewrork
using Microsoft.Xrm.Tooling.Connector;
using System;
using System.Configuration;

namespace CrmServiceClient_Test
{
    class Program
    {
        static void Main(string[] args)
        {
            var appSettings = ConfigurationManager.AppSettings;
            var crmClient = new CrmServiceClient(new Uri(appSettings["Uri"]), appSettings["ClientId"], appSettings["ClientSecret"], true, appSettings["TokenCache"]);
            if (crmClient.IsReady)
            {
                Console.WriteLine("Hello, connected to Dynamics using .NET Framework");
            }
            else
            {
                Console.WriteLine("Failed to connect to Dynamics using .NET Framework :(");
                //this works without an exception
            }

            Console.ReadKey();
        }
    }
}

Actually CrmServiceClient.LastCrmException does not have an InnerException and contains no Trace information and the most meaningfull information I got from this (by configuring Visual Studio to break on thrown exceptions) is the following:
Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.HttpRequestWrapperException
  HResult=0x80131500
  Message=
  Source=Microsoft.IdentityModel.Clients.ActiveDirectory
  StackTrace:
   at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Http.HttpClientWrapper.<GetResponseAsync>d__31.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

Inner Exception 1:
HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).

Inner Exception 2:
AdalException: : Unknown error

System.ServiceModel.Security.MessageSecurityException
  HResult=0x80131501
  Message=The HTTP request was forbidden with client authentication scheme 'Anonymous'.
  Source=System.ServiceModel
  StackTrace:
   at System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response, WebException responseException, HttpChannelFactory`1 factory)

  This exception was originally thrown at this call stack:
    System.Net.HttpWebRequest.GetResponse()
    System.ServiceModel.Channels.HttpChannelFactory<TChannel>.HttpRequestChannel.HttpChannelRequest.WaitForReply(System.TimeSpan)

Inner Exception 1:
WebException: The remote server returned an error: (403) Forbidden.

Thanks for the report,   This is actually the behavior of the API endpoint in CDS coming though.. as the identity your trying to access with does not exist, it does not know what the do with it and throws a 403,   We are looking at ways to make that message better from the API itself.  More similar to the "user does not exist in this instance" error we used to throw when trying to access an instance where your user identity was blocked by security or policy.

One thing I did not specify clearly is that the CdsServiceClient constructor throws exceptions and instead the CrmServiceClient constructor catches the exception and puts it in the CrmServiceClient.LastCrmError property.

Yes, this is intentional..   CrmServiceClient follows a C++ pattern for exception management from when it was originally designed many years ago.   We wanted to move over to the more common "throw breaking exception on connect fail" but could not without breaking a lot of existing clients.   Adding a Option to the constructor or a static setting didn't make sense either so we lived with it.
also: re the exception stack trimming things,  we did a fix for that recently that will now include the full stack though all levels,  if you patch to current nuget's you will get that behavior.
With CdsServiceClient we moved to using Exceptions on connect.  Its noted in the nuget release notes.   We have not yet decided if we are going to do away with the LastException pattern completely yet.. but for now it will always throw exceptions on connect, which is the more accepted pattern today.
Feedback is welcome on that.

I am so excited that finally there will be client library that we can use from .NET Core applications when interacting with Dynamics CRM. Thank You!!
Is there a resolution to this issue? I am getting the same error message when using Client ID and Client Secret connecting to Dynamic 365 CRM Online. Thanks again

Hello @twiga2013,
you have to register your application user in dynamics, the issue has been opened because the error message is misleading.
I have written a LinkedIn Article on how to build an MVP for this.
Best regards,
Betim.

Hi Betim,
I have created the App Registration under the same Azure Active Directory that CRM Dynamics is using but when I got to add Application user all the fields are locked and I am logged in Dynamics as System Administrator.

@twiga2013 , Change the user view from "user" to "Application User"

I did switch to Application User form everything is locked. I did try it out from a complete different tenant and Application User forms fields are not locked.
I will need to contact Microsoft support to find out why the application user form fields are all locked.

I am going to close this for now,  the API team has a repro of this working now and is working though providing a better error experience.
thanks all for your feedback here.

authors: BetimBeja MattB-msft twiga2013


text:
[SERVICE TEAM SUPPORT REQUEST] LogicApp custom connector test

Description of Feature or Work Requested
How can I check my LogicApp custom connector before publishing?
I am seeing support only for Power Platform (Power Apps) but I want to check it in LogicApp env as this is how I initially created my custom connector.
Using paconn utility.
Also LogicApp custom connector only have one (json) file available for downloading,
And it doesn't seem in the format of PowerPlatformConnectors.
Which has 2 json files.
Finally I've created the artifacts manually and created a PR.
(I've verified things are working in azure LogicApps env)
Full guide:
https://docs.microsoft.com/en-us/connectors/custom-connectors/certification-submission#step-3d-validate-your-custom-connector-files
Any support/lead how to validate my connector will be highly appriciated.
Target Date
20/01/2022

Hi @DavidMeu thank you for your feedback. Please add this feature request into the Power Automate forum. We will discuss this internally in the meantime.

authors: DavidMeu natalie-pienkowska

repo: microsoft/PowerPlatformConnectors


text:
System Crash: ColorPickerUI.exe

ℹ Computer information

PowerToys version: 0.33.1.0
PowerToy Utility: ColorPickerUI.exe
Running PowerToys as Admin: Yes
Windows build number: 20H2 19042.868

📝 Provide detailed reproduction steps (if any)

PowerToys set to start with Windows
Not using PowerToys, but its running in system tray
Using PC usually, VS Code, Edge (40+ tabs in multiple windows) etc.

✔ Expected result
Windows should continue to work as usual, no lockups.
❌ Actual result
Windows just locks up, no mouse movement, no KB response, any movements on screen is stopped. Had to hard reset to get it back in normal state.
Event Viewer shows that it was ColorPickerUI.exe which made fault in KERNELBASE.dll
📷 Screenshots

@chall3ng3r
Right-click on PowerToys icon in the tray menu and select Report Bug.

Drag and drop the report into a Github comment.

Here's the report which I made right after system start after crash.
PowerToysReport_2021-03-20-02-26-33.zip

@chall3ng3r
Can you upload %appdata%\ColorPicker folder as well?

Here you go,
ColorPicker.zip

Object reference not set to an instance of an object.
Inner exception:

Stack trace:
   at ColorPicker.Keyboard.KeyboardMonitor.Hook_KeyboardPressed(Object sender, GlobalKeyboardHookEventArgs e)
   at ColorPicker.Keyboard.GlobalKeyboardHook.LowLevelKeyboardProc(Int32 nCode, IntPtr wParam, IntPtr lParam)

@enricogior
It looks like #9573 and should be resolved at 0.35 release.

authors: chall3ng3r enricogior mykhailopylyp

repo: microsoft/PowerToys


text:
FancyZones reverts to defaults when docking and undocking Surface Pro 7 using Surface Dock 2

Microsoft PowerToys version
0.47.1
Running as admin

[X] Yes

Area(s) with issue?
FancyZones
Steps to reproduce

Surface Pro docked with 2 external monitors. Dock is Surface Dock 2. Video connectors are 2x USB-C to DisplayPort; Surface Pro device has screen turned off. On startup (while docked) FancyZones loads custom zones as expected.
Undocking the Surface Pro --> FancyZones reverts to default zones on device (custom zones discarded). Toggling FancyZones returns custom zones setup.

OR

Surface Pro device undocked. Upon startup, FancyZones custom zones load correctly.
Docking as described above. Surface Pro's screen is turned off in this configuration (keyboard cover closed). --> FancyZones reverts to default zones for dual external screens. Toggling FancyZones returns custom zones.

✔ Expected Behavior
Custom zones should be maintained.
❌ Actual Behavior
Zones revert to defaults. Toggling FancyZones is required to return to custom zones.
Other Software
No response

does this issue still happen with v0.73.0? /needinfo

Hello,
Thanks for following up with this issue.
I can no longer reproduce the issue with v0.73.0. I believe it hasn't been an issue for me for a while. Thank you for those who helped fix it and apologies for not updating everyone here.
Andrew

authors: AndrewGarib TheJoeFin


text:
Always On Top

Description of the new feature / enhancement
The ability to show an application on top of others.
Scenario when this would be used?
Working away on my study in a Word Document and I wanted to watch a movie at the same time in VLC Player.
I would like to Pin VLC Player to always be placed on top of other applications.
Supporting information
No response

Issue is a duplicate
Thank you for your issue! We've linked your report against another issue #13
Thanks for helping us to make PowerToys a better piece of software.

Duplicate of #13

This is in progress too :D
Hope we can ship this soon.

This is a necessity!! Can't stress the importance of this feature enough in saving lots of unnecessary clicks especially now that Taskbar drag and drop file support is gone.

goal is Dec release

authors: Aaron-Junker AgrMayank HelixCreations crutkas franky920920


text:
powertoys sets

the function sets in powertoys as a function

Sorry but we're a bit uncertain what this means, sorry.  Happy to reopen the issue once we have more detail.

authors: banaantjes crutkas


text:
PowerToys Run lags when searching for an application

Microsoft PowerToys version
0.53.1
Running as admin

[X] Yes

Area(s) with issue?
PowerToys Run
Steps to reproduce
Activate the shortcut for PowertToys Run and enter a application's name
✔ Expected Behavior
The text to appear on the textbox immediately
❌ Actual Behavior
There's a lag between pressing the key on the keyboard and the name appearing on the text box, It's more significant when the typing is fast
Other Software
No response

Looks like a duplicate of https://github.com/microsoft/PowerToys/issues/15364.
Makes sense to you @wildman9x ?
Could you please try the debug build provided there to see if it fixes for you?

Looks like a duplicate of #15364. Makes sense to you @wildman9x ? Could you please try the debug build provided there to see if it fixes for you?

Yeah it fixed the lagging issue for me, thanks man


text:
Unable to turn of "Always run as administrator

Microsoft PowerToys version
0.61.1
Running as admin

[X] Yes

Area(s) with issue?
General
Steps to reproduce
Turning off "Always Run as Administrator" doesn't work.  Requires admin login at every startup.
✔ Expected Behavior
Unchecking "Always Run as administrator" would save the setting.  Restart of PowerToys would not require an admin login.
❌ Actual Behavior
PowerToys asks for admin login during next restart.  "Always run as administrator" is checked on again.
Other Software
No response

/bugreport

Not OP but I have the same problem. In my case, the likely culprit is that PowerToys is started using UAC with another account that the session actually open. Had to go to the desktop folder of that user to get the diagnostic zip
PowerToysReport_2022-08-16-13-55-19.zip
.

Very likely the cause.  Company policy now requires me to use a new
administrator account separate from my main user account which I used to
install initially.  Uninstall and reinstall seems to keep everything linked
to the original user account.
On Tue, Aug 16, 2022, 6:58 AM bendem @.***> wrote:

Not OP but I have the same problem. In my case, the likely culprit is that
PowerToys is started using UAC with another account that the session
actually open. Had to go to the desktop folder of that user to get the
diagnostic zip
PowerToysReport_2022-08-16-13-55-19.zip
https://github.com/microsoft/PowerToys/files/9350671/PowerToysReport_2022-08-16-13-55-19.zip
.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/PowerToys/issues/19745#issuecomment-1216538506,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ASFCL3V5ZSAZRXG5XAFX2DLVZN66JANCNFSM55OVRCWA
.
You are receiving this because you authored the thread.Message ID:
@.***>

PowerToysReport_2022-08-25-16-18-58.zip
Here is the Bug Report as requested.

Don't know if this helps anyone, but if you navigate to 'C:\Users%username%\AppData\Local\Microsoft\PowerToys' and open the settings.json in a text editor there is a "run_elevated" option. I changed that to 'false' and relaunched the app and it fixed my issue.

Don't know if this helps anyone, but if you navigate to 'C:\Users%username%\AppData\Local\Microsoft\PowerToys' and open the settings.json in a text editor there is a "run_elevated" option. I changed that to 'false' and relaunched the app and it fixed my issue.

Ah right, it reads the config from the launching user's config but saves it to the configuration of the elevated user. Makes sense.

authors: Dreistul-dev bendem jaimecbernardo neddntd


text:
Customizing Windows Exporer with background colors according to folder

Description of the new feature / enhancement
This feature would allow to easily change the background color of windows explorer for different folder.
Additionaly, it would change the all folder icons in a given folder.
Scenario when this would be used?
This would be useful when you work for instance with different drives / servers and you need to easily identifiy where you are. I word the two networks that have the same folder structure, making it bit hard to know in which network you are
Supporting information
No response

/dup #6157

authors: Yay-Ou crutkas


text:
Launch a PowerToys feature from PowerToys Run

Description of the new feature / enhancement
I would like to be able to launch a PowerToys feature from the PowerToys Run, such as Colorpicker or Awake

Scenario when this would be used?
Since there are a lot of shortcuts for each PowerToys features, if you don't use one very often you forget the associated shortcut and lose time to open PowerToys, search for the feature in the menu and launch it from there or find the shortcut
Supporting information
No response

Thanks for your message. This is a Duplicate of an other issue. Additional comments may be added there. /dup #17351

authors: Jay-o-Way amauryblin


text:
Convert text from lowcase to uppercase and viceversa

Description of the new feature / enhancement
Convert text between different keyboard layouts by selecting the incorrect text fragment and press a keyboard shortcut to fix your text immediately.
e.g. hELLO wORLD -> CTRL + ALT + Space bar -> Hello World
Scenario when this would be used?
Whenever I need it.
Supporting information
No response

Duplicate of 907

/dup #907

authors: An-NahL-Am crutkas technobulb


text:
PowerRename cannot rename ß to ss

Microsoft PowerToys version
0.73.0
Installation method
WinGet
Running as admin
No
Area(s) with issue?
PowerRename
Steps to reproduce
Create some files that use the ß character example:
Daliah Lavi - Weißt du, was du für mich bist？.mp3
In the PowerRename utility, enter the character to search ß and the character to replace with ss.
✔ Expected Behavior
The renaming window should show the result as:
Daliah Lavi - Weisst du, was du für mich bist？.mp3
With the option to apply the rename.
❌ Actual Behavior
No renaming result is shown and the action to apply does not become available.
Using some other combination of characters to replace with seems to work.
Other Software
No response

I can reproduce this

Renaming preview:
ß to ss (not working):

ß to s (working):

authors: Aaron-Junker lkraider


text:
Screen ruler utility is broken in v0.76.2

Microsoft PowerToys version
0.76.2
Installation method
Microsoft Store
Running as admin
Yes
Area(s) with issue?
Screen ruler
Steps to reproduce

Open screen ruler, selecting in on Powertoys menú or with shortcut.
Try to realize a measurement.
The rule utility crashes.

✔ Expected Behavior
The utility does not crash and can perform measurements as usual.
❌ Actual Behavior
The rule utility crashes.
Other Software
Using with 2 monitors connected to one laptop with Windows 10 Enterprise 21H2.

/bugreport

Hi! Sure, I attached the file. Thanks!
PowerToysReport_2023-12-15-09-51-36.zip

It seems the problem fixes itself, maybe something was wrong with my laptop. Thank you!


text:
PreviewPane Porting .NET Core 3.1

Porting of the following projects to .NET Core 3.1

MarkdownPreviewHandler
PreviewHandlerCommon
SvgPreviewHandler
SVGThumbnailProvider
PreviewPaneUnitTests
UnitTests-PreviewHandlerCommon
UnitTests-SvgPreviewHandler
UnitTests-SvgThumbnailProvider

Related to #776
Please assign this to me 😃

Fixed with 0.29, released today.  https://github.com/microsoft/PowerToys/releases/tag/v0.29.0

authors: crutkas davidegiacometti


text:
Build an ISO image

@mayurjansari please follow the new feature request template.  We request both the what and the 'why'.  scenarios are critical.  This is too vague as is.

@mayurjansari please follow the new feature request template.  We request both the what and the 'why'.  scenarios are critical.  This is too vague as is.

namely:
What is the expected behavior of the proposed feature?  What is the scenario this would be used?

namely:
What is the expected behavior of the proposed feature?  What is the scenario this would be used?

Now days ISO is very good to keep file safe as it is. Probably it will not change any file in ISO file. I am using ISO file instead of archive file because u need to extract then you can use but in ISO file it will mount file and run your setup etc. also fast file transferring. Now some software like ventoy use direct ISO file for boot system.
Right Click on folder it show -> Build an ISO -> show dialog box.
in dialog box
File Name of ISO -> default as folder name
ISO label -> default as folder name
icon if possible
now some ISO support compress

Now days ISO is very good to keep file safe as it is. Probably it will not change any file in ISO file. I am using ISO file instead of archive file because u need to extract then you can use but in ISO file it will mount file and run your setup etc. also fast file transferring. Now some software like ventoy use direct ISO file for boot system.
Right Click on folder it show -> Build an ISO -> show dialog box.
in dialog box
File Name of ISO -> default as folder name
ISO label -> default as folder name
icon if possible
now some ISO support compress

can we go more into "keeping a file safe"?  Is the big thing here making sure a file isn't tampered with / is read only?

can we go more into "keeping a file safe"?  Is the big thing here making sure a file isn't tampered with / is read only?

No. Not tampered or read only. Mainly useful keep as provider gave them. In my case antivirus is headache when use confuserEx on program.

No. Not tampered or read only. Mainly useful keep as provider gave them. In my case antivirus is headache when use confuserEx on program.

i'm not totally sure i understanding your use-case here still.  Are you obfusicating a program you didn't create?

Yes all program i build secure with confuser to stop reverse engineering. It not totally stop but it is deficult to read and understand code.

@mayurjansari your statement sounds like it is about programs you built, my question was about all programs.  An example scenario would be would you run confuserEx against the signed PowerToy DLLs and then put them in the ISO?

I'm still trying to understand the use-case(s) for how this tool would be used.  Right now, i bet you'd still hit the same issue as an OS would view this as a USB/DVD loading and i'm betting the anti-virus would still run against the files there

@mayurjansari your statement sounds like it is about programs you built, my question was about all programs. An example scenario would be would you run confuserEx against the signed PowerToy DLLs and then put them in the ISO?

applied only on created by me

I'm still trying to understand the use-case(s) for how this tool would be used. Right now, i bet you'd still hit the same issue as an OS would view this as a USB/DVD loading and i'm betting the anti-virus would still run against the files there

anti-virus scan the file but in ISO it can not delete file. some good anti-virus not detect confuserEx file as infected file

This is a pretty unique use case.  Honestly, something is wrong if anti-virus is flagging the file.  I'd also imagine the anti-virus would quarantine the ISO at that point.

Most of leading anti-virus quarantine file some of them also delete file. I checked most of anti-virus they quarantine file not ISO. they show notification file when ISO file open but not quarantine file.

authors: crutkas mayurjansari


text:
[Keyboard Manager] Fix Remap buttons stop working

Summary of the Pull Request
I got it to stop crashing by bypassing XamlBridge Window focus handling.

PR Checklist

[x] Applies to #2321
[x] CLA signed. If not, go over here and sign the CLA

Detailed Description of the Pull Request / Additional comments

Xaml Bridge seems to not handle focus events properly, so this fix just bypasses it by handling the WM_SETFOCUS event directly.
This also solves another not documented crash that involved minimizing the window, then closing by pressing the X button without interacting with the window content itself.

Validation Steps Performed

Click on the Remap a key button with no key remappings.
Close the window by pressing the X button.
It shouldn't crash.
Repeat for Redefine a shortcut.

Another crashing scenario.

Click on the Remap a key button.
Minimize the Window.
Click on the taskbar to show the window again.
Close the window by pressing the X button.
It shouldn't crash.

Also could you find any explanation for why it happens only when there are no key remaps?

And also if you minimize it and right click close it.

Good catch, this causes a crash.

Since I can't repro the error, can you verify that if you open it, click away to another window and then close it (while it's not in focus), will it still not crash?

This doesn't cause a crash, on the other hand.

This is to confirm that the crash happens because the window requires focus atleast once before closing, rather than the window needing focus whenever it is closed.

Maybe just calling SetFocus before closing the window does the trick? I'll try that out.

I actually was able to the minimize thing. I think its unrelated to the focus problem, cause I got it as well. It doesn't actually crash the runner in my case, but the buttons stop working. I think there is probably something going wrong with the mutex in that case. Sak is making a separate issue for it.

I actually was able to repro the minimize thing. I think its unrelated to the focus problem, cause I got it as well. It doesn't actually crash the runner in my case, but the buttons stop working. I think there is probably something going wrong with the button mutex in that case. Sak is making a separate issue for it. I can look into that, since I think it might be unrelated to the PR. I'm not sure if it would also crash the runner in your case, but it isnt happening now because of some other issue.

It looks like in case of minimize the code after the message loop where EditKeyboardNativeHandle is set to null does not take place, and since that remains non-null, when the button is pressed after that since it is not null, the runner thinks the window is still open, so it tries to bring that to the foreground even though it doesn't exist. I'm not entirely sure why it doesn't close though, maybe WM_DESTROY does not get executed on closing from the right-click menu after minimize.

Actually, it looks like it applies even if you don't minimize and you just right-click at the bottom and exit it. Seems unrelated to this issue though, so I'll see if I can come up with a fix and then you can verify that it doesn't have the focus interaction in addition to it

Actually, it looks like it applies even if you don't minimize and you just right-click at the bottom and exit it. Seems unrelated to this issue though, so I'll see if I can come up with a fix and then you can verify that it doesn't have the focus interaction in addition to it. This PR #2566 fixes the the issue. Maybe you can check if it works in your case as well since the focus could also be another problem to add to it

#2566 does seem to fix the issue, however as you said it now causes a crash on insiders builds since the window doesn't have focus when its closed. I'll try SetFocus when receiving a WM_SYSCOMMAND message to close the window.

authors: arjunbalgovind traies


text:
[Draft] New pre-built image for Katas to improve startup

This PR adds a new Dockerfile to create a fully baked Katas image that removes online Nuget sources to improve Package loading times (and therefore the first cell execution of all katas).

After @tcNickolas comments, I think it's best to abandon this PR and only have the #335 PR in a special MyBinder branch as @cgranade did for Samples.

Are there any fragments of this change that can be applied to the master Dockerfile, to improve the experience people have running from it? I agree that option 2 you described is better (thank you for writing it up in such level of detail!), but it will involve updating all our links to Binder to use that special branch. I can imagine some missed or non-updatable links (such as in tweets), so it would be nice to have a reasonable experience when running Binder from master. It seems that disabling the online NuGet sources after prebuilding them will still yield the speedup on %package commands?

Yes, we can disable the online Nuget sources on the current Dockerfile.
Can you check/approve PR #336? After that I'll do another small PR to combine all the RUN commands into one (slightly reduce image size by creating just one layer instead of a dozen) and disable the Nuget online sources.
Regarding updating links, we should stick to using aka.ms for that so we can update it any time. Do we have one for Katas already?

Created new PR #337 that transfer optimizations from this PR without doing a breaking change in MyBinder behavior that this PR would do

authors: tcNickolas vxfield

repo: microsoft/QuantumKatas


text:
How to operate the Plaintext

Hello SEAL team!
I found the method to evaluate between two ciphertexts or plaintext and ciphertexts in the Evaluator class. But hwo can I get the sum or product between two plaintexts of polynomial rings.
Can I get the multiply depth through encryption parameters?

SEAL does not offer APIs for plaintext-plaintext operations. You can sum/multiply messages first then encode them into a new plaintext.
Check this example

repo: microsoft/SEAL


text:
AttributeError: 'lxml.etree._Element' object has no attribute 'fldCharType'

when I open my .docx file , which is saved from a .doc file use python-docx,  it cames out this Error,
C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\iterators\generic.py:194: UnexpectedElementWarning: Skipping unexpected tag: {http://schemas.openxmlformats.org/wordprocessingml/2006/main}background   UnexpectedElementWarning) C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\iterators\generic.py:194: UnexpectedElementWarning: Skipping unexpected tag: {http://schemas.openxmlformats.org/wordprocessingml/2006/main}pict   UnexpectedElementWarning) Traceback (most recent call last):   File "E:/_master/硕士论文/data/data_preprocess/temp.py", line 27, in <module>     db_json = simplify(db)   File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\__init__.py", line 33, in simplify     out = document(doc.element).to_json(doc, _options)   File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\base.py", line 106, in to_json     "VALUE": [ elt.to_json(doc, options) for elt in self],   File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\base.py", line 106, in <listcomp>     "VALUE": [ elt.to_json(doc, options) for elt in self],   File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\body.py", line 25, in to_json     JSON = elt.to_json(doc, options, iter_me)   File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\paragraph.py", line 142, in to_json     out: Dict[str, Any] = super(paragraph, self).to_json(doc, options, super_iter)   File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\paragraph.py", line 27, in to_json     for elt in run_iterator:   File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\base.py", line 62, in __iter__     self.__iter_name__ if self.__iter_name__ else self.__type__):   File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\iterators\generic.py", line 167, in xml_iter     for elt in xml_iter(current, handlers.TAGS_TO_NEST[current.tag], _msg):   File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\iterators\generic.py", line 156, in xml_iter     yield handlers.TAGS_TO_YIELD[current.tag](current)   File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\form.py", line 106, in __init__     super(fldChar, self).__init__(x)   File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\base.py", line 36, in __init__     self.props[prop] = getattr(x, prop) AttributeError: 'lxml.etree._Element' object has no attribute 'fldCharType'
what should I do to solve it?

Thank you for your question!   This error indicates that the .docx file was not valid.  Specifically, the fldCharType attribute is required on fldChar elements, by the open office specification, and the error indicates that this required attribute is missing.
Since you saved this file with python-docx (from the original .doc file), you might want to raise an issue with python-docx.

I had the same error with some tables in the docx. Is there any docx format for simplify_docx? In other words, what attribute in docx files that simplify_docx can't deal with?
Thanks.

when I open my .docx file , which is saved from a .doc file use python-docx, it cames out this Error,
C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\iterators\generic.py:194: UnexpectedElementWarning: Skipping unexpected tag: {http://schemas.openxmlformats.org/wordprocessingml/2006/main}background UnexpectedElementWarning) C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\iterators\generic.py:194: UnexpectedElementWarning: Skipping unexpected tag: {http://schemas.openxmlformats.org/wordprocessingml/2006/main}pict UnexpectedElementWarning) Traceback (most recent call last): File "E:/_master/硕士论文/data/data_preprocess/temp.py", line 27, in <module> db_json = simplify(db) File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\__init__.py", line 33, in simplify out = document(doc.element).to_json(doc, _options) File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\base.py", line 106, in to_json "VALUE": [ elt.to_json(doc, options) for elt in self], File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\base.py", line 106, in <listcomp> "VALUE": [ elt.to_json(doc, options) for elt in self], File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\body.py", line 25, in to_json JSON = elt.to_json(doc, options, iter_me) File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\paragraph.py", line 142, in to_json out: Dict[str, Any] = super(paragraph, self).to_json(doc, options, super_iter) File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\paragraph.py", line 27, in to_json for elt in run_iterator: File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\base.py", line 62, in __iter__ self.__iter_name__ if self.__iter_name__ else self.__type__): File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\iterators\generic.py", line 167, in xml_iter for elt in xml_iter(current, handlers.TAGS_TO_NEST[current.tag], _msg): File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\iterators\generic.py", line 156, in xml_iter yield handlers.TAGS_TO_YIELD[current.tag](current) File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\form.py", line 106, in __init__ super(fldChar, self).__init__(x) File "C:\Users\Luke\Anaconda3\lib\site-packages\simplify_docx\elements\base.py", line 36, in __init__ self.props[prop] = getattr(x, prop) AttributeError: 'lxml.etree._Element' object has no attribute 'fldCharType'
what should I do to solve it?

请问，这个问题解决了吗？

according to the README

This project relies on the python-docx package which can be installed via
pip install python-docx. However, as of this writing, if you wish to
scrape documents which contain (A) form fields such as drop down lists,
checkboxes and text inputs or (B) nested documents (subdocs, altChunks,
etc.), you'll need to clone this fork of the python-docx package

You need a modified version of python-docx to support parsing forms, otherwise python-docx will not parse fldChar and cause this issue.

I created a new fork moving over the changes made in this (stale) python-docx fork to the latest python-docx repo and this error was resolved.
You can install the new fork:
pip install git+https://github.com/dalmia/python-docx.git

Hope this helps!

authors: Ledenel LukeALee Orangeices dalmia jdthorpe yellowishee

repo: microsoft/Simplify-Docx


text:
Building nft chinese learning with awards

I'm finding ITs who can work with me in nft Chinese learning program. Dm me if you feel excited.

Spam or suspicious activity. Closing.

repo: microsoft/TinyTroupe


text:
Resolve large font size in handbook documentation

In reference to #1061
The following address is showing a large font for import resolutions:
https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping
Instead of using an ordered list within a bullet point, bring the subject line to the parent level and then use an ordered list.
Screenshot below for reference:

As we can see, the font is much larger than the rest of the documentation.

We got a PR fixing this I believe 👍

authors: justinpage orta

repo: microsoft/TypeScript-Handbook


text:
No "Code ran. Check the console" if code throws an exception

http://www.typescriptlang.org/play/index.html?target=1&ts=3.8.0-dev.20191105&ssl=7&ssc=1&pln=8&pc=1#code/JYOwLgpgTgZghgYwgAgPICMBWyDeBYAKGWOTgH4AuXQk25dS5AZzClAHMaSBfQ3gwgBsIYZAHssVDNgC81IiThV8CuvSoAiOOgQauxfv0IIxIJmOEA6QWPYAKCZkvlL6AISWmAB0HAwdjXQNAEpgoA
interface Obj {
    a?: {
        b?: string
    }
}

let obj: Obj = {
    a: {
        b: "abc"
    }
}

console.log(obj.a?.b!.split("b"))
``

This is fixed in v3

authors: DanielRosenwasser orta

repo: microsoft/TypeScript-Website


text:
added a warning against object literal shap-matching

added a warning against object literal shap-matching and provided code example, and error code.

Thanks for the PR. This is a bit different (it's called excess property checking) and I think it's OK for it to be explained later in the handbook 👍🏻

authors: eugland orta


text:
Extended Numeric Literals

Search Terms

extended-numeric-literals
extended numeric literals

Suggestion
Support tc39/proposal-extended-numeric-literals (Stage 1)
Use Cases
For represent lengths in pixels, inches, degrees, radians, seconds and other units without calling specifically conversion methods in runtime (if this possible).
const time = 100s // transforms to `100,000` ms
const angle = 180° // transforms to `3.1415926536` radians

Examples
function deg(value: number): number {
   return value * (Math.PI / 180);
}

function °(value: number): number {
   return deg(value);
}

function _f32(value: number): number {
  return Math.fround(value);
}

function _u32(value: number): number {
  return value >>> 0;
}

function px(value: number): string {
  return `${ value }px`;
}

var angle = 30deg; // transforms to `0.5235987756`
const angle2 = 180°; // transforms to `pi` (`3.1415926536`)
let count = 1_000_000_u32;
var float32 = 1.0_f32;
canvas.style.width = 512px; // transforms to "512px" string

Also related to #15096

I think that would be a great feature, but also that it could cause confusion for newbies who would read code from teammates

I don't think this will reach stage-3 in the near future (3-5 years)
~and it is ugliness~

This is already used with the arrival of BigInt. And with success has taken hold in such modern languages as like Rust, Ruby, Swift

@MaxGraey So I think that this feature is related to Javascript, not Typescript

If this will land in JavaScript it should support by Typescript as well, isn't it? String templating has been pretty useful feature. Extended numeric literals just like templating but for numbers

If this will land in JavaScript it should support by Typescript as well, isn't it?

@MaxGraey Yes it is

Closing since there's nothing for us to do but wait for TC39

authors: Kingwl MaxGraey RyanCavanaugh Shinigami92

repo: microsoft/TypeScript