fix(cli): initialising in projects using Yarn v3

Please select one of the following

[ ] I am removing an existing difference between facebook/react-native and microsoft/react-native-macos :thumbsup:
[ ] I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos :thumbsup:
[x] I am making a fix / change for the macOS implementation of react-native
[ ] I am making a change required for Microsoft usage of react-native

Summary:
Recently in React Native Community CLI we added bumping Yarn version in every new project created to Yarn v3 (PR for more context). And In Yarn v3 flag -s doesn't exists anymore, so the react-native-macos-init tool won't work.

I've replaced usage of -s with --silent flag. Also this change is backward compatible, since Yarn v1 support --silent flag.

Changelog:
[GENERAL] [FIXED] - Initialising react-native-macos in project using Yarn v3 with react-native-macos-init
Test Plan:

Create new project with npx react-native@latest init and bump Yarn version to 3 (we didn't released changes with bumping version by default yet.
Try running react-native-macos-init

cc @Saadnajmi  @tido64

cc @Saadnajmi  @tido64

I was actually thinking of moving the repo to yarn v4 (I guess 3 for the template project works though). Do either of you see any issue with that?

Do either of you see any issue with that?

Just make sure to properly set nodeLinker value in the Yarn config file, I think that's the most important thing.

So this PR is ready to go, but to release a new version of react-native-macos-init, we use beachball, which works by generating a change file (aka, running yarn change). For some reason, that is not working, so if I merge this as is, we won't get a new package. Bear with me while I sort that out!

@szymonrybczak Could you run yarn change --type patch --message 'fix(cli): initialising in projects using Yarn v3'  in packages/react-native-macos-init to hopefully force a change file to show up and get added as a commit?

hey @Saadnajmi, so the command that you sent is not working with current setup. I checked why, and it's because the root package.json has:
https://github.com/microsoft/react-native-macos/blob/740732e06c6597e20e9a6824d3cca1f9e99d8bed/package.json#L111-L113 and packages/react-native-macos-init has the same value, so: beachball.shouldPublish=false. After tweaking this value in packages/react-native-macos-init/package.json to true the change file is correctly added and generated.
diff --git a/change/react-native-macos-init-cf2af331-a6c9-40dd-a2f2-f599609799bd.json b/change/react-native-macos-init-cf2af331-a6c9-40dd-a2f2-f599609799bd.json
new file mode 100644
index<PHONE_NUMBER>..1ee6fb29f3
--- /dev/null
+++ b/change/react-native-macos-init-cf2af331-a6c9-40dd-a2f2-f599609799bd.json
@@ -0,0 +1,7 @@
+{
+  "type": "patch",
+  "comment": "fix(cli): initialising in projects using Yarn v3",
+  "packageName": "react-native-macos-init",
+  "email"<EMAIL_ADDRESS>+  "dependentChangeType": "patch"
+}

Do you think we can change this value for this package? and should we do it in under this PR or in the separate?

hey @Saadnajmi, so the command that you sent is not working with current setup. I checked why, and it's because the root package.json has:
https://github.com/microsoft/react-native-macos/blob/740732e06c6597e20e9a6824d3cca1f9e99d8bed/package.json#L111-L113
and packages/react-native-macos-init has the same value, so: beachball.shouldPublish=false. After tweaking this value in packages/react-native-macos-init/package.json to true the change file is correctly added and generated.
diff --git a/change/react-native-macos-init-cf2af331-a6c9-40dd-a2f2-f599609799bd.json b/change/react-native-macos-init-cf2af331-a6c9-40dd-a2f2-f599609799bd.json
new file mode 100644
index<PHONE_NUMBER>..1ee6fb29f3
--- /dev/null
+++ b/change/react-native-macos-init-cf2af331-a6c9-40dd-a2f2-f599609799bd.json
@@ -0,0 +1,7 @@
+{
+  "type": "patch",
+  "comment": "fix(cli): initialising in projects using Yarn v3",
+  "packageName": "react-native-macos-init",
+  "email"<EMAIL_ADDRESS>+  "dependentChangeType": "patch"
+}

Do you think we can change this value for this package? and should we do it in under this PR or in the separate?

derp, I missed that in the react-native-macos-init package.json. Yes, please set it to true in this PR and then I'll merge :)

derp, I missed that in the react-native-macos-init package.json.

The thing is that it wasn't specified! I assume that is getting value from the root's package.json 😅

@microsoft-github-policy-service agree company="Callstack"

@microsoft-github-policy-service agree

@szymonrybczak Looks like there are other issues I'll still have to investigate. We haven't had to release a new version of react-native-macos-init since it was created really, so I'm realizing now the CI to publish stuff as issues 😅. I'll try to make that fix and then update back here.

@Saadnajmi ah, okay. I've removed the last commit. Should be good to merge.

@Saadnajmi ah, okay. I've removed the last commit. Should be good to merge.

Sorry, last two commits. Looks like adding the change file is what causes the break

Has the the NPM package been updated for this script?
If not could someone publish an update please 🙏
cc @szymonrybczak @Saadnajmi

@seanstrom I think not, I can look into it


fast feed!

might be usefull to some instead of hitting W a million times
(function() {
var amount = 10;
var duration = 100; //ms
var overwriting = function(evt) {
    if (evt.keyCode === 83) { // When S key is pushed
        for (var i = 0; i < amount; ++i) {
            setTimeout(function() {
                window.onkeydown({keyCode: 87}); // Simulates W key being pushed
                window.onkeyup({keyCode: 87});
            }, i * duration);
        }
    }
};

window.addEventListener('keydown', overwriting);

})();

Thanks, i've seen this in other peoples code but not this feeder. Nice name btw.

when I add this to my scripte   then scripte doesnot load on agar,io


Add walking ghost

Added a walking ghost to the game

Codecov Report
Base: 54.26% // Head: 54.26% // No change to project coverage :thumbsup:

Coverage data is based on head (cdb5832) compared to base (aa2a575).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #133   +/-   ##
=======================================
  Coverage   54.26%   54.26%
=======================================
  Files           8        8
  Lines         164      164
  Branches       13       13
=======================================
  Hits           89       89
  Misses         75       75

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Modified type of argument parent in Instance.new constructor

Changes
I made a simple change to the type of argument 'parent' in Instance.new from Instance to Instance? to accurately reflect that it is not required.
Checks
By submitting your pull request for review, you agree to the following:

[x] This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses.
[x] I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses.
[x] To the best of my knowledge, all proposed changes are accurate.

The PR no one wanted but everyone needed fr.


How to claim based on kakera only

How would i be able to claim, only with the kakera limit being used? When someone else wishes a character, the bot doesnt claim, even though that character is over the "min_kak" limit. Would there be a way for the bot to solely work on the kakera and the name list to avoid that issue?

The bot doesn’t claim because usually when someone else wishes a character they would claim said character. As per the snipe protection check what is the roll sniping setting in your channel data again ?
Sent from my iPhone

On Aug 25, 2021, at 7:37 AM, banana @.***> wrote:

How would i be able to claim, only with the kakera limit being used? When someone else wishes a character, the bot doesnt claim, even though that character is over the "min_kak" limit. Would there be a way for the bot to solely work on the kakera and the name list to avoid that issue?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

And the bot claims using all 3
in the priority of
Wishes > Character > series > kakera (If Kakera Value can be determined)
if a character say
Bob is wished and in my char and series list
it will basically run code of trying to add a emoji 3 times
The "safety" mechanic that is added which I think you bring up is that if Someone Else rolls and claims a character then the BOT will see that this character has already been claim before it can make an attempt so its Skips the attempt because there would be no purpose to add an emoji on a character Mudae has already given to Someone Else


fix: revert nft for failing mint

:clipboard: fixes https://github.com/bobanetwork/boba/issues/405
Overview
Allows Bridges to transfer the original NFT back to the depositor, if mint fails on the other layer.
Changes

updates L1NFTBridge/L2NFTBridge contracts

Testing
yarn test:integration

Codecov Report
Base: 46.12% // Head: 74.61% // Increases project coverage by +28.48% :tada:

Coverage data is based on head (56e2ee3) compared to base (48ce0f6).
Patch has no changes to coverable lines.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #419       +/-   ##
============================================
+ Coverage    46.12%   74.61%   +28.48%
============================================
  Files          102       64       -38
  Lines         3963     1926     -2037
  Branches       790      321      -469
============================================
- Hits          1828     1437      -391
+ Misses        2135      489     -1646

Flag
Coverage Δ

boba-contracts
?

contracts
79.30% <ø> (ø)

core-utils
86.80% <ø> (ø)

data-transport-layer
31.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

...s/boba/contracts/contracts/bridges/L1NFTBridge.sol

...s/boba/contracts/contracts/bridges/L2NFTBridge.sol

...ontracts/DAO/governance/GovernorBravoDelegator.sol

.../boba/contracts/contracts/DiscretionaryExitFee.sol

...cts/contracts/libraries/CrossDomainEnabledFast.sol

...ages/boba/contracts/contracts/BobaFixedSavings.sol

...a/contracts/contracts/standards/L2CustomERC721.sol

.../contracts/contracts/lzTokenBridge/lzApp/LzApp.sol

.../contracts/libraries/Lib_ResolvedDelegateProxy.sol

...acts/contracts/oracle/payment/AccessController.sol

... and 28 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

looks like the flaky problem has to do with only the revert xdomain tx of the deposit L1->L2 bridging. (for xMessage send within a xMessage relay), some of the easier fixes for it did not work as of yet

this should fix the flaky test


Add support getting the pooled memory size for each PooledByteBufAllocator instance

Motivation
Our server has its own implementation to decide whether to provide service for users according to the real-time total free memory of the heap memory and the direct memory (mainly the memory used by io.netty.buffer.PooledByteBufAllocator for our server). If our server detects it's running out of physical memory, it will just respond with the client requests with something like Service Unavailable.
But the problem is: We cannot know the free memory of PooledByteBufAllocator efficiently. For example, we have allocated and cached 8GB chunks in a PooledByteBufAllocator, but there is no property to know: what exactly the free memory is, 1GB or 8GB?
Solution
The PR in 2016 is similar to what we want and it provides a new property pooledBytes to record the free memory of the arena but we want the free memory in the scope of each allocator instance.
And io.netty.maxDirectMemory is similar but isn't what we want because it applies the limit to all buffers while we just want to know the free memory size of a PooledByteBufAllocator instance

For the heap in general, the free memory on the heap is not the same as the amount of memory that could be freed if the GC was to do a run, so we can only realistically do this for direct memory where we have precise accounting of what memory is in use and what is not. But then there's also fragmentation; having X free bytes doesn't necessarily mean there's room for an X-sized allocation.
But to count the free bytes, you can iterate the arenas (pool.arenaMetrics()), and then iterate the chunk lists for each (arena.chunkLists) and then for each chunk in those you can get the freeBytes(). Not super convenient, but if you are up for it you could make a PR to improve that.


Always use trim when TrimPrefType.INDIVIDUAL is requested

Cropping layer bounds leaves transparent pixels around (at least on Mac Os CS6). For what I know, trim function already existed on CS2 and should be the function of choice for this.

Unfortunately I have no way to test this on Mac Os CS6. @skjorn do you have a Mac handy?

trim() can't be used when a background layer is switched on. Cropping works fine in Windows. Added an option to force trim() if preferred

Hi @skjorn, thanks for the update and the new option !


Update PULL_REQUEST_TEMPLATE.md

Updated the existing pull request template with some changes.

Hey @tkuhrt changes made, kindly review this PR.


Resolve compilation errors

A bisect tells me the docs were broken by 1eeceab2ee6e567d863b417c2f7439bc6e880fa7, will take a cloesr look...

green! I couldn't see the microsite locally without changes (non-empty path prefix), but when I commented that part out, it looks fine:


Fix cmd.Context() usage in PowerVS

What this PR does / why we need it:
Fixes https://issues.redhat.com/browse/MULTIARCH-2896
Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #
Checklist

[x] Subject and description added to both, commit and PR.
[ ] Relevant issues have been referenced.
[ ] This change includes docs.
[ ] This change includes unit tests.

/cc @mkumatag

/approve

/retest-required


gh action | fix: concurrent changed in matrix pipeline

If both base images changed (amd, arm), first matrix pipeline commit changes to main and the second pipeline cannot commit (must pull first)

[ ] prevent this behaviour (by rebasing first?)

should be done as matrix has max-parallel: 1


Progress Trackers Manually: Option B

All current trackers require a detection feeder. It can be useful to progress a tracker manually without a detection feeder (see Multi-Sensor Fusion: Covariance Intersection Using Tracks as Measurements example).
All current trackers and start their __next__ function with:
time, detections = next(self.detector_iter)
# Some tracking logic

I've moved this line to the new Tracker  baseclass and added an update_tracker function which takes the time and detections from the detection feeder as an input. With this being a separate function, you can access it directly and bypass the detection feeder which may be easier in instances

See PR #742 for an alternative implementation

I've reviewed this and #742 and I think I prefer this approach. I can't say I've ever used the next method to use a tracker but if others do then would removing them be a (small) breaking change? Is it possible to keep __next__ and update_tracker methods?


Swift 2 (Xcode 7) Bad address on accessing chart view

error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=2, address=0x1a1f14400).
The process has been returned to the state before expression evaluation.

pieChartView is defined according to debugger
(lldb) po pieChartView
<UIView: 0x15820de90; frame = (0 0; 375 667); autoresize = W+H; tintColor = UIDeviceRGBColorSpace 0 0.65098 0.352941 1; layer = <CALayer: 0x1582037d0>>

Controller
//
//  PieChartViewController.swift
//  gradebuildr
//
//  Created by Arin Houck on 11/21/15.
//  Copyright © 2015 Gradebuildr. All rights reserved.
//

import UIKit
import Charts

class PieChartViewController: UIViewController {

    var weights: [String]!

    @IBOutlet weak var pieChartView: PieChartView!

    override func viewDidLoad() {
        super.viewDidLoad()
        weights = ["Assignments", "Homework", "Exam"]
        let percentages = [25.0, 50.0, 25.0]
        setChart(weights, values: percentages)

        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    func setChart(dataPoints: [String], values: [Double]) {
        pieChartView.noDataText = "You need to provide data for the chart."
        pieChartView.centerText = "20%"
        pieChartView.centerTextColor = UIColor.whiteColor()
        pieChartView.descriptionText = ""
        pieChartView.animate(xAxisDuration: 1.5)
        pieChartView.legend.enabled = false
        pieChartView.userInteractionEnabled = false
        pieChartView.backgroundColor = UIColor(red: 51/255.0, green: 51/255.0, blue: 51/255.0, alpha: 1.0)
        pieChartView.holeColor = UIColor(red: 51/255.0, green: 51/255.0, blue: 51/255.0, alpha: 1.0)

        var dataEntries: [ChartDataEntry] = []

        for i in 0..<dataPoints.count {
            let dataEntry = ChartDataEntry(value: values[i], xIndex: i)
            dataEntries.append(dataEntry)
        }

        let pieChartDataSet = PieChartDataSet(yVals: dataEntries, label: "%")
        let pieChartData = PieChartData(xVals: dataPoints, dataSet: pieChartDataSet)
        pieChartView.data = pieChartData
        pieChartView.data?.setValueTextColor(UIColor.clearColor())

        let colors = [UIColor.blackColor(), UIColor(red: 251/255.0, green: 38/255.0, blue: 108/255.0, alpha: 1.0)]
        pieChartDataSet.colors = colors
    }

}

Crashes on this line: pieChartView.noDataText = "You need to provide data for the chart."
However it just crashes on any method or variable accessed through the PieChartView.

Your IBOutlet is probably not set.

Still learning the ropes of Swift. Turned out, I was forcing to the PieChartView on the outlet however I did not actually change the UIView class to PieChartView and the module to Charts


Update gitignore

refs #9441
This cleans up the gitignore, using the template from https://github.com/TryGhost/slimer/blob/1ae82d4325ad5e2541e85c3465934127c00eb34b/packages/generator-slimer/generators/gitroot/templates/gitignore.tpl

I've removed vim specific ignores, because they seem way too specific for this repo? If people re having issues with swap/undo files it is probably better they add smth like this to the vimrc:
" vim folders
set backupdir=~/.vim/backups
set directory=~/.vim/swaps
set undodir=~/.vim/undo

(will need to run mkdir -p ~/.vim/{backups,swaps,undo})


Merge Wall and Map and offer map as an option in the final choice of design.

I have discussed this again with Michael as well. The Item in the navigation bar should stay with the name "Wall", but in the final design tab of the wall, we could change the name to "design & views" or just "views". @aneeshd16 Or do you have better suggestions?

The third tab page contains these options:

Choice of layouts
Choice of header colour
Choice of header position

"Design & views" sounds good, but maybe the text is too big? It would look like this:

How about "Preview"?

Yeah! Preview is probably much better. Thank you!

For the output view of the tweets on the map, something like the following would be nice, where we can actually see a photo and the tweets of people: https://www.campaignmonitor.com/worldview/demo/

Collecting links, that might be relevant (even if they are for Google Maps)
http://www.sitepoint.com/embellishing-your-google-map-with-css3-and-jquery/

Note: This issue is taking with anything that deals with markers, popups animations and whatever the user sees on the map.

Here is a link to a worldmap from a send out of FOSSASIA. There are a number of JS that might be relevant for us. Please compare: https://fossasia.createsend.com/reports/wv/t/F48F8442ED58EDD3


wormhole memory leak

Some context:
Used helm to install grafana + loki etc.
It does not matter in which node grafana ends up, it causes wormhole's memory to go up, it takes less than 24 hours to go up to 1.5GB and eventually will reach a limit and everything in that node starts having trouble
There was an issue in grafana which i solved, so the issue is now gone, but the wormhole pod continues to cause trouble.
I understand that grafana is causing this, but the memory in grafana is fine and performance on grafana is fine. However, wormhole imo should not do this no matter what

Interesting. Can you share more details? Where are you running the wormhole? Is it the latest version? I remember a memory leak that was fixed a long time ago.

It could be that, and the kubernetes cluster that I have is just running an old version .. I am afraid i have no more information than that. In fact, after checking it again once I fixed more issues in grafana, the stopped happening. So the issue is solved, i just wanted to report here, hoping that it would help someone avoid this in the future!


Added URL with the location of the data files used in /recommend

Added URL with the location of the data files used in /recommend/README.md

I had the wrong URL indicator in this version. Need to fix it.


A "MANIFEST.in" file is needed

Add a manifest file (MANIFEST.in) to include (and avoid) some files to the package.

We are working on it. Maybe a manifest file can help us to include useful files on the source code.

It looks fine. I will merge it now.


Item Tracking in the Warehouse

The page referenced below is seemingly in contradiction with the procedures outlined in this blog post. If you enable "Lot Warehouse Tracking" or "SN Warehouse Tracking" you will get lot/serial numbers on your Warehouse Entries, not just your Item Ledger Entries.
However, the article states "reservations and item tracking numbers can be handled only at the location level, not at the bin and zone level" which seems to be inaccurate. I also very well could be misreading the article.
Could someone provide details on what the article is detailing, specifically around capabilities of item tracking in the warehouse?

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

ID: 0a6ed02f-8213-5b88-e4c1-c548917a30e7
Version Independent ID: 16451d77-895b-d23b-0732-800449b83e62
Content: Design Details - Item Tracking in the Warehouse - Business Central
Content Source: business-central/design-details-item-tracking-in-the-warehouse.md
Service: dynamics365-business-central
GitHub Login: @SorenGP
Microsoft Alias: edupont

Hello,
The article is correct. It provides details on how to track serial and lot numbers at warehouse level. The item tracking engine, which is build on top of the reservation engine, does not support tracking at the bin level. For information about that, see Design Details: Item Tracking Design.
Therefore, in addition to the standard item tracking engine, we use an additional engine for warehousing. It's integrated with standard engine in a way that's similar to how warehouse entries integrate with inventory. For more information, see Design Details: Integration with Inventory
However there is no additional reservation engine, which is why there are some nuances when dealing with reservation of specific serial and lot numbers, as well as availability calculations. For descriptions of those nuances, see Design Details: Availability in the Warehouse.


Using static contextTypes is confusing

normally having a class like
class SomeComponent extends Component {
   static contextTypes = {
     router: PropTypes.object.isRequired
   }
   render() {
     return
Something

   }
}

works normally but trying to use @inject and @observable on it will no longer work. I see that instead of contextTypes using SomeComponent.wrappedComponent.contextTypes = { } works but it doesn't seem very good style. Is there no way to pickup the fact that there was a static contextType on the class about to wrapped?

Yeah I think it should be possible to mix in. Feel free to PR. Although
note that in edge cases it can lead to very subtle bugs when not using the
static keyword:
@inject class SomeComponent extends Component {
}
SomeComponent.contextTypes = { somethign } // break inject context types
Op za 4 nov. 2017 om 02:14 schreef Andreas Richter<EMAIL_ADDRESS>
:

normally having a class like
class SomeComponent extends Component {
static contextTypes = {
router: PropTypes.object.isRequired
}
render() {
return Something
}
}
works normally but trying to use @Inject https://github.com/inject and
@observable https://github.com/observable on it will no longer work. I
see that instead of contextTypes using
SomeComponent.wrappedComponent.contextTypes = { } works but it doesn't seem
very good style. Is there no way to pickup the fact that there was a static
contextType on the class about to wrapped?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mobxjs/mobx-react/issues/354, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABvGhI_NW_AELT_0dqiyjIO2QXakZTD0ks5sy7qAgaJpZM4QR1sz
.

Closing, since contextTypes will disappear anyway


Memory leak when transaction.complete() is not awaited

Failure to call await transaction.complete() inside uploadData() results in an endless loop and eventually hangs the browser.
I understand that it's not intended behavior, so I would appreciate it if we could find a way to detect the memory leak and throw an exception instead. It would potentially save many dev hours for those who'll make the same mistake as I just did 😃
PS. Amazing library, I enjoy it quite a lot the past few days!

Thanks for logging this issue. We'll investigate by reproducing on our side.

Hi @byzyk, I tried to reproduce a leak and browser hang on my side by removing this line in our demo.
I did notice that the upload function remains in a non-blocking loop, but I didn't notice indefinite increasing memory usage or a hang. Attached below is the profile of memory usage which did remain stable.

We are still investigating ways to potentially detect if the transaction is not completed and avoid the loop. It would be helpful if you could share some more context on how the hang or leak occurred on your side.

We've added some additional checks in these versions https://github.com/powersync-ja/powersync-js/pull/255 to delay infinite loops if no uploads are performed in the uploadData method of the BackendConnector. This should help a lot with these kinds of issues. Generally an infinite loop could cause large memory spikes depending on what the client code is doing in uploadData. I'm going to close this for now since I could not reproduce a memory leak on my side.

hi @stevensJourney, thanks for the update.
I just wanted to clarify from my side - you are correct, what was happening here was an infinite loop. In my case, I had a memory leak probably due to some additional logic inside uploadData. Thanks for patching this!


Stop recommending wee_alloc

Where in the docs did you come across this?
https://rustwasm.github.io/docs/book/reference/code-size.html#avoid-allocation-or-switch-to-wee_alloc
Describe what about it does not make sense
Switching to wee_alloc is not good advice.
Why does it not make sense?
wee_alloc is unmaintained and has a serious memory leak bug.
See RUSTSEC-2022-0054 and https://github.com/rustwasm/wee_alloc/issues/106
How could we improve it?
Remove references to wee_alloc.
Perhaps replace them with references to lol_alloc which has been suggested as an alternative.
But IMO this paragraph shouldn't speak about allocator-swapping as a mere tradeoff between speed and size.

I'll second this request.  GitHub's dependabot flags it as a critical security issue:
https://github.com/ptdecker/the-rust-programming-language/security/dependabot/1

I'll third this request


resultCode from PaymentSessionFinished should be an enum

The resultCode field of the class PaymentSessionFinished is currently a String. Given that the native object it comes from are enums (e.g. SessionPaymentResultCode in Swift), why not keep it as an enum on the Flutter side?
This can lead to critical bugs in the event of a change in the native implementations... In my opinion, the Flutter wrapper MUST carry the logic of transforming the native enum to an exposed Flutter enum, this is a must have to avoid critical bugs in the future.

Hi @Cteq3132, thank you for suggesting the improvement of replacing the result code String with an enum. The decision for using a String was made to be more flexible, but we agree that the SDK should expose an enum and carry the logic of mapping the result code accordingly. As you outlined, it will be indeed less error prone in case the native implementation changes.
We put the adjustment on our agenda and our plan is to introduce an enum with the first beta release. We would like to keep this thread open for further discussions and we will keep you updated. Thanks again for the idea!


how to update sdk manager

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.17.1, on Microsoft Windows [version 10.0.18362.836], locale fr-TN)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit visit
https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.
[√] Android Studio (version 3.6)
[√] VS Code (version 1.45.0)
[√] Connected device (1 available)
! Doctor found issues in 1 category.

The Github issue tracker is for bugs and features requests for the Flutter SDK. Help and support questions like these are better suited for Q&A sites like StackOverflow or on one of the flutter community sites at https://flutter.dev/community .


Memory limit issue reached

Hey guys, super excited to try out the package.
Looks like I'm getting a memory exhausted error when running the following:
php artisan code:analyse --debug

/Users/luke/code/project/app/Mail/Frontend/Contact/SendContact.php
/Users/luke/code/project/app/Mail/Frontend/Quote/SendCreateQuote.php
/Users/luke/code/project/app/Mail/Frontend/Quote/SendCreateAdminQuote.php
/Users/luke/code/project/app/Mail/Frontend/Quote/SendEstimatorOnTheWay.php
/Users/luke/code/project/app/Mail/Frontend/Quote/SendUpdateQuote.php
/Users/luke/code/project/app/Mail/Frontend/Quote/SendQuoteReminderEmail.php
/Users/luke/code/project/app/Mail/Frontend/Quote/SendAcceptQuote.php
/Users/luke/code/project/app/Mail/Frontend/Job/SendSubJobAssign.php
/Users/luke/code/project/app/Mail/Frontend/Job/SendSubJobStartDayReminder.php
/Users/luke/code/project/app/Mail/Frontend/Report/SendCreateReport.php
/Users/luke/code/project/app/Mail/Frontend/Invoice/SendUpdateStatusInvoice.php
/Users/luke/code/project/app/Mail/Advance/SendUpdateStatusAdvance.php
/Users/luke/code/project/app/Providers/AppServiceProvider.php
/Users/luke/code/project/app/Providers/AuthServiceProvider.php
/Users/luke/code/project/app/Providers/BladeServiceProvider.php
/Users/luke/code/project/app/Providers/RouteServiceProvider.php
PHP Fatal error:  Allowed memory size of<PHONE_NUMBER> bytes exhausted (tried to allocate 20480 bytes) in /Users/luke/code/project/vendor/nunomaduro/larastan/src/Middlewares/Mixins.php on line 97
PHP Fatal error:  Allowed memory size of<PHONE_NUMBER> bytes exhausted (tried to allocate 32768 bytes) in /Users/luke/code/project/vendor/symfony/debug/Exception/FatalErrorException.php on line 1

I also tried upping the memory limit to the same error, the same thing happens when I specify the path too. Is there anything that flags up as something else I can try?
Cheers,

Thanks for reporting that issue. 👍
Please do: php artisan code:analyse --paths="app/Providers/RouteServiceProvider.php". If it breaks, show me the code present in: "app/Providers/RouteServiceProvider.php".

Thanks man looks like the error has gone - not sure why, I just pulled latest version so I guess something was fixed in the meantime 👍

@lukecurtis93  Great news! Thanks for your help! 💪


Add my first file

so far i have created a branch. then i created a file in it and commit it.

Awesome 😀


V0.4 Model Updates

Notable changes:

New API in Model.java that allows displaying entries of different states.
New API in Model.java that allows changing of entries' states, e.g. changeEntryState(), etc. It is also possible to change an entry's state directly by invoking the .setState() method on the entry.
Model's constructor that construct a model with a given EntryBook now copies the reference of the given EntryBook's entries instead of making copies of them.
Duplicate non-active FloatingTask are allowed by Model. This means we can have multiple FloatingTasks with the same name and tags as long as their states are not ACTIVE.
Updating of statements in other components affected by change in API, especially statements that raises compilation error.

Note: I have not finished writing all test cases yet, but we can merge first so that other components and features can start using the API.
Part of #111 and #175

Coverage decreased (-1.08%) to 80.628% when pulling 8b9c574ccd761bd6921e13cb5c16e29277af412e on V0.4_model_implementation into db56b96647b73835b184e20b8dcbe916a35c58ea on V0.4.

Just to double confirm, these are the main changes logic should take note of right?

call updateFilteredListToShowAllActiveEntries instead of previous updateFilteredListToShowAll
instead of model.deleteEntry(entry), do a state change to the entry to bin enum

@kevinLamKB yeah 👍 . Do tell me if I miss out any important API.

Coverage decreased (-1.08%) to 80.628% when pulling 0589331f0592fc6cf4919b42aac83d9e48ddb790 on V0.4_model_implementation into db56b96647b73835b184e20b8dcbe916a35c58ea on V0.4.

If this is ready to merge then let's merge first, and figure out the test cases after that.

@ChuaPingChan the updateEntryState(Entry, State) API is within Entrybook, i cant call it from logic side, need to update it to be available from Model and ModelManager

@kevinLamKB Noted, I'll add the API with the same name t.o Model.java.


Added megaMergeSort tests and removed unused methods/imports

@HendrikHuebner Thanks for your PR 🙏 However, since a few other PR has been merged, your changes have now a conflict. Can you resolve them?
Let me know if you need any help with that.


Exponential Operator

Should be ok to add since it shouldn't cause issues with other stuff unlike other proposals (stage 3 as well).

Nice addition, thank you!


Migrate to aiogram 3 & make role middleware

Migrate bot to aiogram 3
Add role middleware for check user is admin
Changed the bot structure

LGTM, Thanks you! Would be nice if you request some new features or etc, currently Telegram bot is not widely used

Close #2
Close #3


[Request for External] - Table Purchase Line - Function UpdateSalesCost

Describe the request
Could this function be made global?
 local procedure UpdateSalesCost()
    var
        SalesOrderLine: Record "Sales Line";
        IsHandled: Boolean;
    begin
        IsHandled := false;
        OnUpdateSalesCostOnBeforeGetSalesOrderLine(Rec, IsHandled);
        if IsHandled then
            exit;

        case true of
            "Sales Order Line No." <> 0:
                // Drop Shipment
                SalesOrderLine.Get(SalesOrderLine."Document Type"::Order, "Sales Order No.", "Sales Order Line No.");
            "Special Order Sales Line No." <> 0:
                // Special Order
                begin
                    if not
                       SalesOrderLine.Get(SalesOrderLine."Document Type"::Order, "Special Order Sales No.", "Special Order Sales Line No.")
                    then
                        exit;
                end;
            else
                exit;
        end;

        IsHandled := false;
        OnBeforeUpdateSalesCost(Rec, SalesOrderLine, IsHandled);
        if IsHandled then
            exit;

        SalesOrderLine."Unit Cost (LCY)" := "Unit Cost (LCY)" * SalesOrderLine."Qty. per Unit of Measure" / "Qty. per Unit of Measure";
        SalesOrderLine."Unit Cost" := "Unit Cost" * SalesOrderLine."Qty. per Unit of Measure" / "Qty. per Unit of Measure";
        SalesOrderLine.Validate("Unit Cost (LCY)");
        SalesOrderLine.Modify();

        OnAfterUpdateSalesCost(Rec, SalesOrderLine);
    end;

Additional context
I need it so i can call this function
Internal work item: AB#498592

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 15971.


Metallb v0.13.5 docs

Description of changes:
Add documentation for v0.13.5 going out with eksa 0.12.
Available here:
https://docs.dx3ehyyttf163.amplifyapp.com/docs/reference/packagespec/metallb/v0.13.5/
Testing (if applicable):
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/cherrypick release-0.12


Feature tqdm

Removing our custom progress bar in favor of tqdm which is externally maintained... less work on us!

Codecov Report

Merging #394 (793790f) into master (1dfa89b) will increase coverage by 0.20%.
The diff coverage is 74.17%.

@@            Coverage Diff             @@
##           master     #394      +/-   ##
==========================================
+ Coverage   70.62%   70.83%   +0.20%
==========================================
  Files         105      104       -1
  Lines       12709    12501     -208
==========================================
- Hits         8976     8855     -121
+ Misses       3733     3646      -87


Get-FilteredRestoreFile - TLog selection starts too early

Hi,
I found that the list of filtered TLogs produced by Get-FilteredRestoreFile (via Restore-DBADatabase) was including 1 TLog that was too early for our SQL instance to restore.
In the example below (I redacted first portion of LSN for clarity) the filter was including Tlog backups 3, 4 and 5, however SQL can only restore starting with Tlog backup 4.
I fixed this locally by changing filter to specify TLog backup Last LSN must be greater than Full Backup Last LSN. Currently the script specifies TLog backup Last LSN must be greater than Full Backup First LSN.
| First LSN | Last LSN
-- | -- | --
Full Backup | 65,600,001 | 74,400,001
  |   |
Tlog Backup 1 | 46,400,001 | 52,800,001
Tlog Backup 2 | 52,800,001 | 59,200,001
Tlog Backup 3 | 59,200,001 | 65,600,001
Tlog Backup 4 | 65,600,001 | 81,600,001
Tlog Backup 5 | 81,600,001 | 88,000,001

Awesome finding! Thanks so much for providing LSNs along with the bug report - was able to recreate the scenario in no time! Will be using those LSNs in the pester tests to avoid such cases in future releases.

@nvarscar  or @LeeFramp  - was this fixed with the PR and merger?
If so I'll close it down.

Hi Stuart,
Yes, I'm happy this fixed the issue I was having.
Regards,
Lee Frampton
From: Stuart Moore
Sent: Tuesday, 17 October, 07:46
Subject: Re: [sqlcollaborative/dbatools] Get-FilteredRestoreFile - TLog selection starts too early (#2374)
To: sqlcollaborative/dbatools
Cc: LeeFramp, Mention
@nvarscarhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnvarscar&data=02|01|lee%40framp.net|a8b1a75e1b81447dd56c08d5152acac4|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636438195875155778&sdata=wJxvkqypiUG1mlMRuieuhkTvd4r84HOxwd3xXWP1Lls%3D&reserved=0 or @LeeFramphttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fleeframp&data=02|01|lee%40framp.net|a8b1a75e1b81447dd56c08d5152acac4|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636438195875312031&sdata=cmn%2FpE0ajK2txfOD501bw1%2BzpzfkYJFDzgS1zIMAuUw%3D&reserved=0 - was this fixed with the PR and merger?
If so I'll close it down.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsqlcollaborative%2Fdbatools%2Fissues%2F2374%23issuecomment-337134237&data=02|01|lee%40framp.net|a8b1a75e1b81447dd56c08d5152acac4|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636438195875312031&sdata=NHajxTc%2FvNNc8555BkDKEiyDXdUODTetxjR%2Fcau2xcI%3D&reserved=0, or mute the threadhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAX35ZdAMQM91kGzKW53uSXQIxIuRNjFsks5stE0_gaJpZM4Pr6y2&data=02|01|lee%40framp.net|a8b1a75e1b81447dd56c08d5152acac4|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636438195875312031&sdata=6LANJIQL2aD6p2FOUeFdbicDKFOpYg2QxyZsx0UcZxw%3D&reserved=0.


How to get more information about Connect Protocol Error for streaming request?

Describe the bug
I have a streaming request that is failing with the error.
[2024-08-20T22:55:12.555Z] ERROR Runme: Error processing response: ConnectError: [internal] Protocol error; details: ; rawMessage: Protocol error

I also have the trace
[Extension Host] Error in PromiseIterator: ConnectError: [internal] Protocol error
	at ConnectError.from (/home/user/.local/share/code-server/extensions/stateful.runme-3.7.2-jlewi.4/out/extension.js:1303796:20)
	at connectErrorFromNodeReason (/home/user/.local/share/code-server/extensions/stateful.runme-3.7.2-jlewi.4/out/extension.js:1302558:39)
	at Promise.reject (/home/user/.local/share/code-server/extensions/stateful.runme-3.7.2-jlewi.4/out/extension.js:1303074:110)
	at ClientHttp2Stream.h2StreamError (/home/user/.local/share/code-server/extensions/stateful.runme-3.7.2-jlewi.4/out/extension.js:1302963:22)
	at ClientHttp2Stream.emit (node:events:518:28)
	at emitErrorNT (node:internal/streams/destroy:169:8)
	at emitErrorCloseNT (node:internal/streams/destroy:128:3)
	at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Is there anyway to get additional information about what the protocol error is and/or where its coming from?
As far as I can tell the request never reaches the server.
Environment (please complete the following information):

@connectrpc/connect-web version: (for example, 0.1.0)
@connectrpc/connect-node version: (for example, 0.1.0)
"@connectrpc/connect": "^1.4.0",
"@connectrpc/connect-node": "^1.1.2",
Frontend framework and version: (for example<EMAIL_ADDRESS>vscode ^1.72.0
Node.js version: (for example, 18.0.0)
v18.19.0
Browser and version: (for example, Google Chrome 103.0.5060.134)
Version 126.0.6478.183 (Official Build) (arm64)

Additional context
I'm building a vscode extension. That uses a streaming request
https://github.com/stateful/vscode-runme/tree/jlewi/connect
When I run it in vscode everything works fine. I started running it in codeserver and I started getting protocol errors.
The transport gets created here
https://github.com/stateful/vscode-runme/blob/90752806ef995d794f41260f1148c8ea8f9fd85d/src/extension/ai/manager.ts#L76

Hey! You can look at the cause field of ConnectError to get the original error This is not coming from the connect. From the stack trace it looks like it is coming from a node error on the client side. It also looks like an h/2 frame error. Usually h/2 requires TLS because of the protocol negotiation step unless the clients force h2c (HTTP/2 over clear text). That would be my guess.
Closing this for now, feel free to followup if you need anything else.


Documentation: Add labels

Adding a couple labels here so I can reference them in the edgedb-js docs.
@raddevon

Sorry. When we were talking about this, I didn't realize you were linking across repos. This recently-discovered issue will be a blocker: https://github.com/edgedb/edgedb/issues/6803
If you want, to get these in quickly, you can try another PR on the JS side with relative links. Once the bug is fixed, we can revisit these.

@raddevon What would the relative links look like?

I added a suggestion on your other PR.

Blocked by #6803


[Feature Request] Need DB Transactions (begin, commit and rollback) at least.

Hello guys,
We need the transactions control for laravel.
This package https://github.com/salvationarinze/laravel-mongodb-transactions can already do this and works fine. Can you please merge this package into laravel-mongodb ?

This is added in https://github.com/jenssegers/laravel-mongodb/pull/2465 and is available in release v3.9.3
:) :shipit:


Improvements to affinity and error handling

Fixes #19 and #16.
I can split these up into separate PRs if you want, but the commits are already separated fairly readably.
I haven't run the Spanner and Bigtable integration tests, as they'd require authentication for the appropriate GCP project. It might be worth refactoring most of those tests to be tests against a local service instead.

I've added a single  commit to address the review comments. If we're happy to merge the whole PR, that's probably the simplest approach. If you'd like me to work those changes into earlier commits via rebasing, I can do that.


crash every time when quitting

MachineId:FFE9D4CE4D347057434FBAA0D71D517A
EpicAccountId:0a07e675f2fb47b899c2f761b279eac9
Access violation - code c0000005 (first/second chance not available)
PhysX3CommonPROFILE_x64!physx::shdfnd::atomicDecrement() [d:\ori.cohen_g6217_physics\engine\source\thirdparty\physx\physx-3.3\source\foundation\src\windows\pswindowsatomic.cpp:45]
PhysX3PROFILE_x64!physx::NpShape::~NpShape() [d:\ori.cohen_g6217_physics\engine\source\thirdparty\physx\physx-3.3\source\physx\src\npshape.cpp:53]
PhysX3PROFILE_x64!physx::NpShape::`scalar deleting destructor'()
PhysX3PROFILE_x64!physx::NpFactory::releaseShapeToPool() [d:\ori.cohen_g6217_physics\engine\source\thirdparty\physx\physx-3.3\source\physx\src\npfactory.cpp:874]
PhysX3PROFILE_x64!physx::NpDestroy() [d:\ori.cohen_g6217_physics\engine\source\thirdparty\physx\physx-3.3\source\physx\src\npfactory.cpp:1249]
PhysX3PROFILE_x64!physx::Scb::Scene::removephysx::Scb::Body,1() [d:\ori.cohen_g6217_physics\engine\source\thirdparty\physx\physx-3.3\source\physx\src\buffering\scbscene.cpp:411]
PhysX3PROFILE_x64!physx::Scb::Scene::removeRigidBody() [d:\ori.cohen_g6217_physics\engine\source\thirdparty\physx\physx-3.3\source\physx\src\buffering\scbscene.cpp:601]
PhysX3PROFILE_x64!physx::NpRigidDynamic::release() [d:\ori.cohen_g6217_physics\engine\source\thirdparty\physx\physx-3.3\source\physx\src\nprigiddynamic.cpp:66]
UE4Editor_Engine!TermBodyHelper() [d:\build++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\physicsengine\bodyinstance.cpp:1947]
UE4Editor_Engine!FBodyInstance::TermBody() [d:\build++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\physicsengine\bodyinstance.cpp:2000]
UE4Editor_Engine!UPrimitiveComponent::DestroyPhysicsState() [d:\build++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\components\primitivecomponent.cpp:616]
UE4Editor_Engine!UActorComponent::ExecuteUnregisterEvents() [d:\build++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\components\actorcomponent.cpp:1120]
UE4Editor_Engine!UActorComponent::UnregisterComponent() [d:\build++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\components\actorcomponent.cpp:945]
UE4Editor_Engine!AActor::UnregisterAllComponents() [d:\build++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\actor.cpp:3861]
UE4Editor_Engine!ULevel::ClearLevelComponents() [d:\build++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\level.cpp:686]
UE4Editor_Engine!UWorld::ClearWorldComponents() [d:\build++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\world.cpp:1307]
UE4Editor_Engine!UWorld::CleanupWorld() [d:\build++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\world.cpp:3288]
UE4Editor_UnrealEd!UEditorEngine::TeardownPlaySession() [d:\build++ue4+release-4.12+compile\sync\engine\source\editor\unrealed\private\playlevel.cpp:653]
UE4Editor_UnrealEd!UEditorEngine::EndPlayMap() [d:\build++ue4+release-4.12+compile\sync\engine\source\editor\unrealed\private\playlevel.cpp:255]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\build++ue4+release-4.12+compile\sync\engine\source\editor\unrealed\private\editorengine.cpp:1399]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\build++ue4+release-4.12+compile\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:368]
UE4Editor!FEngineLoop::Tick() [d:\build++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2775]
UE4Editor!GuardedMain() [d:\build++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\launch.cpp:148]
UE4Editor!GuardedMainWrapper() [d:\build++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\build++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
kernel32
ntdll

ProceduralMeshComponent won't cause the issue

@sherocyc Would you be willing to share how you're setting up collision with the RMC? Also, are you using the github branch or one of the releases?

I'm making something like Minecraft.The collision is generated by CreateMeshSection(index,positions,triangles,normals,uvs,colors,tangens,collision),the last param true.I'm using the github version.
Sorry about my English ,I hope you can understand :)

@sherocyc  Sorry about not getting back to you, been swamped in classwork for the past 2 weeks.
I can't reproduce that issue locally. Are you able to reproduce it in a new project?

Haven't heard from you in a while, and cannot reproduce this issue so will be closing it. If you still have problems, feel free to reopen the issue.


Video Conf - participants frame freezes periodically

Hi there,
I am testing the video conferencing Demo experiment and noticed that while in conference with 2 parties the remote participant video (connected via internet) freezes after 5 - 10 min but the voice connection works continuously, then video is recovered after 5 - 10 minutes automatically.
May be this is related to bandwidth congestion because on LAN setup it is working OK for longer periods, Is there any way to keep monitoring it and issue a recover command once the video is frozen.
Thanks in Advance
AB

Same problem here. It freezes all the time.

+1


Support deleting multi nested relationship mapping by cascade

Describe the feature
Model A has many Model B, Model B has many Model C
If Model A was deleted, Model B and Model C both should be able to be deleted by cascade
Motivation

Related Issues
#6346, #6344, go-orm/playground PR

FYI.
Here is demo implemented by Spring JPA, which implements the above requirement.

You can achieve this by after delete hook.
type ModelA struct {
	ID         uint
	ModelBList []ModelB
}

type ModelB struct {
	ID         uint
	ModelAID   uint
	ModelCList []ModelC
}

type ModelC struct {
	ID       uint
	ModelBID uint
}

func (m *ModelA) AfterDelete(tx *gorm.DB) (err error) {
	tx.Clauses(clause.Returning{}).Where("model_a_id = ?", m.ID).Delete(&ModelB{})
	return
}

func (m *ModelB) AfterDelete(tx *gorm.DB) (err error) {
	tx.Clauses(clause.Returning{}).Where("model_b_id = ?", m.ID).Delete(&ModelC{})
	return
}

Thanks a lot. :)

If you wanna delete it, not only just removing the reference, you should do the following:

Since the foreign key  constraint, use the BeforeDelete instead of AfterDelete

package model

import "gorm.io/gorm"

type ModelA struct {
	ID         uint
	ModelBList []ModelB
}

type ModelB struct {
	ID         uint
	ModelAID   uint
	ModelCList []ModelC
}

type ModelC struct {
	ID       uint
	ModelBID uint
}

// BeforeDelete for ModelA
func (a *ModelA) BeforeDelete(tx *gorm.DB) (err error) {
	// 1. if ID is 0, return
	if a.ID == 0 {
		return
	}

	// 2. delete its ModelBList
	if err = tx.Model(a).Association("ModelBList").Find(&a.ModelBList); err != nil {
		return
	}
	for _, b := range a.ModelBList {
		if err = tx.Delete(b).Error; err != nil {
			return
		}
	}

	return
}

// BeforeDelete for ModelB
func (b *ModelB) BeforeDelete(tx *gorm.DB) (err error) {
	// 1. if ID is 0, return
	if b.ID == 0 {
		return
	}

	// 2. delete its ModelCList
	if err = tx.Model(b).Association("ModelCList").Find(&b.ModelCList); err != nil {
		return
	}
	for _, c := range b.ModelCList {
		if err = tx.Delete(c).Error; err != nil {
			return
		}
	}

	return
}


[test] copy labels and anotations to pod from tfjob

[x] Implement it in v1alpha2
[ ] Add test for v1alpha1

Are you suggesting that annotations in the TFJob metadata be copied to the pod metadata? Or are you suggesting that metadata inside the TFJob PodTemplateSpec's be copied to the actual pods created.
If the latter then I agree with you. This is necessary to support various extensions/features that rely on annotations (e.g. admission controllers, TPUs).
Bumping to P1 because I'd like this to be fixed in our 0.2 release so that TPUs are well supported.

Ref https://github.com/kubeflow/tf-operator/pull/542
The latter, I think.

We already implemented it in v1alpha2, my mistake.

I set the priority to p2 sine we implemented it and the last work is to add test cases.

Close by https://github.com/kubeflow/tf-operator/pull/658


Multilayer Perceptron

Currently the Neural Network in the library has only one hidden layer.
There is need to update neural network model so that it can have multiple layers like other libraries synaptic and brain.js

Check out my C# version! I have succesfully done a multi-layer library using some for loops. https://github.com/ItsMates/Toy-Neural-Network-CSharp

check out my javascript version, I've dreated multi-layer nn library
https://github.com/notshekhar/neuralnet


DCO Bot blocks other bots

The new DCO signoff bot blocks other bots from merging because they aren't seen as signed commits.

Possibly fixed in #919 ?

This does not appear to be fixed ... at least not as of PR #921.

DCO bot is currently not enabled after the Kuberhealthy org migration...

DCO bot is enabled again...


Tests: net: dumb_http_server_mt - setting different IPv4 address than one assigned by DHCP crashes.

Describe the bug
When running the sample dumb_http_server_mt on ESP32 WROOM I experience a crash occuring upon prompting the server to return data to the client - e.g HTTP request.
I found it only reproduces when I set the CONFIG_NET_CONFIG_MY_IPV4_ADDR to one that is not assigned by DHCP to the new Wi-Fi device upon running wifi connect "<SSID>" <password>. So if that variable in prj.conf is set to e.g. <IP_ADDRESS> and the DHCP server assigns <IP_ADDRESS> then the crash occurs, otherwise if I set it to the same IP that will be assigned by DHCP all is fine.
What is interesting is that all is fine with the single-thread sample - dumb_http_server. The IP indeed changes to the one set in the config and not assigned by DHCP.
To Reproduce
Steps to reproduce the behavior, From the root of zephyr project:

cat CONFIG_NET_L2_WIFI_SHELL=y > samples/net/sockets/dumb_http_server_mt
cat CONFIG_ESP_HEAP_MEM_POOL_REGION_1_SIZE=1024 > samples/net/sockets/dumb_http_server_mt
Enable the wifi in dts - cp samples/net/wifi/boards/esp32_devkitc_wroom.conf samples/net/sockets/dumb_http_server_mt/
west build -p -b esp32_devkitc_wroom samples/net/sockets/dumb_http_server_mt
west flash
west espressif monitor
wifi connect "<SSID>" <password>
See error

Expected behavior
Expected behavior is having no crash and ideally the interface adopting the IP set in the config file with precedence over the one assigned by DHCP.
Impact
Not big impact, apart from confusion - can take steps to debug and solve it once I finish the core task of my project.
Logs and console output
[00:01:17.174,000] <dbg> net_dumb_http_srv_mt_sample: process_tcp: [1] Connection #1 from <IP_ADDRESS>
[00:01:22.604,000] <err> os:  **  PS 0x60320
[00:01:22.604,000] <err> os:  **    (INTLEVEL:0 EXCM: 0 UM:1 RING:0 WOE:1 OWB:3 CALLINC:2)
[00:01:22.604,000] <err> os:  **  A0 0x800e780c  SP 0x3ffe58f0  A2 0xffffffff  A3 0x1
[00:01:22.604,000] <err> os:  **  A4 0x3ffe59c8  A5 0x3ffcd0d0  A6 0x8  A7 0x1
[00:01:22.604,000] <err> os:  **  A8 0x800e863c  A9 0x3ffe58c0 A10 0x400e7bd4 A11 0x3ffcd0d0
0x400e7bd4: sock_ioctl_vmeth at /home/jduchniewicz/Projects/zephyrproject/zephyr/subsys/net/lib/sockets/sockets.c:3465

[00:01:22.604,000] <err> os:  ** A12 0x3f401d34 A13 0x3ffe59b8 A14 0xeec90001 A15 0xd300a8c0
[00:01:22.604,000] <err> os:  ** LBEG 0x4000c2e0 LEND 0x4000c2f6 LCOUNT 0xffffffff
[00:01:22.604,000] <err> os:  ** SAR 0x4

Ba0x40085794:0x30x400e7809:0x30x400e82b1:0x30x40081199:0x30x400d0931:0x30x400d3ad0:0x30x40113095:0x30x401056c2:0x30x40106d95:0x30x40106e76:0x30x400fa3e1:0x30x400eb3d5:0x30x400ef1eb:0x30x00060f1d:0x3 |<-C
0x40085794: z_impl_k_mutex_unlock at /home/jduchniewicz/Projects/zephyrproject/zephyr/kernel/mutex.c:212

0x400e7809: k_mutex_unlock at /home/jduchniewicz/Projects/zephyrproject/zephyr/build/zephyr/include/generated/syscalls/kernel.h:1002

0x400e82b1: z_impl_zsock_accept at /home/jduchniewicz/Projects/zephyrproject/zephyr/subsys/net/lib/sockets/sockets.c:685 (discriminator 5)

0x40081199: malloc_internal_wrapper at /home/jduchniewicz/Projects/zephyrproject/modules/hal/espressif/zephyr/esp32/src/wifi/esp_wifi_adapter.c:432

0x400d0931: esf_buf_alloc_dynamic at ??:?

0x400d3ad0: esf_buf_alloc at ??:?

0x40113095: ic_ebuf_alloc at ??:?

0x401056c2: ieee80211_alloc_tx_buf at ??:?

0x40106d95: ieee80211_output_do at ??:?
0x40106e76: esp_wifi_internal_tx at ??:?

0x400fa3e1: esp32_wifi_send at /home/jduchniewicz/Projects/zephyrproject/zephyr/drivers/wifi/esp32/src/esp_wifi_drv.c:121

0x400eb3d5: net_l2_send at /home/jduchniewicz/Projects/zephyrproject/zephyr/include/zephyr/net/net_l2.h:167
 (inlined by) ethernet_send at /home/jduchniewicz/Projects/zephyrproject/zephyr/subsys/net/l2/ethernet/ethernet.c:719

0x400ef1eb: net_if_tx at /home/jduchniewicz/Projects/zephyrproject/zephyr/subsys/net/ip/net_if.c:258

[00:01:22.605,000] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
[00:01:22.605,000] <err> os: Current thread: 0x3ffcb730 (tcp4_thread_id)
[00:01:22.776,000] <err> os: Halting system

Environment (please complete the following information):
I am running it on:
Linux thinkie 6.6.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 05 Jan 2024 16:20:41 +0000 x86_64 GNU/Linux
With Zephyr v3.5.0, commit: b83b9bede3bdc787615073a99463e6a00932318d
SDK version: zephyr-sdk-0.16.0_linux-x86_64
Running on board:
ESP32 WROOM

I'm afraid this could be something platform-specific - tried to reproduce on my nucleo_h723zg with no success, no issues with HTTP requests when trying with static address (before DHCP kicks in) or with DHCP-assigned one (different than sttaic address). I'm afraid I won't be able to help in this case.

@JDuchniewicz Is CONFIG_ESP32_WIFI_STA_AUTO_DHCPV4=y enabled by default? I mean, if it is, I do think you should disabled it as it forces dhcp connection in driver level. Your application could handles this instead. Let me know.

I just tried reproducing it yet again and did not succeed. Weird because I had a 100% reproducibility rate before. Also yes, the flag CONFIG_ESP32_WIFI_STA_AUTO_DHCPV4=y is enabled in this particular build. Closing for now, if I encounter it again I will reopen. Thanks.


Use the built-in memcache session store

Since Rails 4.0, it's used Dalli internally anyway.
And the one that comes with the Dalli gem isn't compatible with Rails 5.

The key changed from :expires_after to :expire_after..is that correct?

@Fryguy apparently so: https://github.com/petergoldstein/dalli/blob/65a5a8cbf4b6993d298eb9fab8bbd0884c673bef/lib/rack/session/dalli.rb#L57
I didn't actually confirm that it used to be correct as :expires_after, though. Maybe we previously weren't actually setting a real thing, and fixing it is a behaviour change?

@matthewd what would this behavior change look like to a user?  to a developer?
/cc @dclarizio


Use datetime.UTC constant internally for UTC timezone on parsing

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
Hello,
Pydantic V2 parses datetimes in UTC using its internal TzInfo(0) as timezone constant.
Unfortunately, this breaks our test assertions, because when we construct reference models, we use Python standard library, specifically datetime.UTC.
I guess this broke after datetime stuff was offloaded to Rust. There are even some tests codifying the "wrong" behaviour:
https://github.com/pydantic/pydantic-core/blame/33fea1e5ea1c70233dabb44390465cd097a1f8fa/tests/validators/test_datetime.py#L168
I hope that this glitch can be corrected, because otherwise I can only think of wrapping datetimes with some custom type to enforce the tzinfo, which is of course annoying and unpractical.
Thanks!
Example Code
from pydantic import BaseModel
from datetime import UTC, datetime

class DtTest(BaseModel):
    dt: datetime

DtTest.model_construct(dt=datetime(2021, 8, 22, 10, 28, 16, tzinfo=UTC))
DtTest.model_validate({'dt':1629628096000})

# Construct
DtTest(dt=datetime.datetime(2021, 8, 22, 10, 28, 16, tzinfo=datetime.timezone.utc))

# Validate
DtTest(dt=datetime.datetime(2021, 8, 22, 10, 28, 16, tzinfo=TzInfo(UTC)))

Python, Pydantic & OS Version
$ python -c "import pydantic.version; print(pydantic.version.version_info())"
             pydantic version: 2.0.3
        pydantic-core version: 2.3.0 release build profile
                 install path: /home/zaytsev/.cache/pypoetry/virtualenvs/youtrack-sdk-xDu66pto-py3.11/lib/python3.11/site-packages/pydantic
               python version: 3.11.0 | packaged by conda-forge | (main, Jan 14 2023, 12:27:40) [GCC 11.3.0]
                     platform: Linux-5.15.0-76-generic-x86_64-with-glibc2.31
     optional deps. installed: ['typing-extensions']

Selected Assignee: @adriangb

What is actually broken for you? If you compare those models they should compare equal.

In other words, this works:
from datetime import datetime, timezone

from pydantic import BaseModel

class DtTest(BaseModel):
    dt: datetime

m1 = DtTest.model_construct(dt=datetime(2021, 8, 22, 10, 28, 16, tzinfo=timezone.utc))
m2 = DtTest.model_validate({'dt':1629628096000})

assert m1 == m2

Well, I'm getting the following error in my tests:

but I can't reproduce it with the minimal example at the moment:
from datetime import UTC, datetime
from unittest import TestCase

from pydantic import BaseModel

class DtTest(BaseModel):
    dt: datetime

m1 = DtTest.model_construct(dt=datetime(2021, 8, 22, 10, 28, 16, tzinfo=UTC))
m2 = DtTest.model_validate({"dt":<PHONE_NUMBER>000})

class TestDatetime(TestCase):
    def test_datetime(self):
        self.assertEqual(m1, m2)

if __name__ == "__main__":
    assert m1 == m2

I will try to reduce our test to a minimal reproducer.

@adriangb thank you for your patience - I think I've got to the bottom of it. You are right that even though the representation is different, the objects compare equal, so this is not why the unit test is failing.
The real problem is hidden in the rest of the text. We are using annotated validators, and even though they seem to receive the info argument, these objects are apparently corrupted. The repr works correctly, but data member is inaccessible causing an exception.
Here is the minimal reproducer:
from datetime import UTC, datetime
from typing import Annotated

from pydantic import BaseModel, BeforeValidator
from pydantic_core.core_schema import FieldValidationInfo

def validate_datetime(value, info: FieldValidationInfo):
    print(info)
    assert info.data
    return value

ValidatedDatetime = Annotated[datetime, BeforeValidator(validate_datetime)]

class DtTest(BaseModel):
    dt1: datetime
    dt2: ValidatedDatetime

m = DtTest.model_validate(
    {
        "dt1": datetime(2021, 8, 22, 10, 28, 16, tzinfo=UTC),
        "dt2":<PHONE_NUMBER>000,
    },
)

if __name__ == "__main__":
    assert m

The output for me is as follows:
$ python /home/zaytsev/src/youtrack-sdk/pydantic_v2.py
ValidationInfo(config={'title': 'DtTest'}, context=None, data={'dt1': datetime.datetime(2021, 8, 22, 10, 28, 16, tzinfo=datetime.timezone.utc)})
Traceback (most recent call last):
  File "/home/zaytsev/src/youtrack-sdk/pydantic_v2.py", line 22, in <module>
    m = DtTest.model_validate(
        ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zaytsev/.cache/pypoetry/virtualenvs/youtrack-sdk-xDu66pto-py3.11/lib/python3.11/site-packages/pydantic/main.py", line 480, in model_validate
    return cls.__pydantic_validator__.validate_python(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zaytsev/src/youtrack-sdk/pydantic_v2.py", line 10, in validate_datetime
    assert info.data
           ^^^^^^^^^
AttributeError: No attribute named 'data'

Process finished with exit code 1

There is no data on Annotated validators since they are not attached to any specific model. That is encoded into the type hints: https://github.com/pydantic/pydantic/blob/76bf54fc2c1dc9a509a64129676a23919fc7007b/pydantic/functional_validators.py#L77C31-L77C31

There is no data on Annotated validators since they are not attached to any specific model. That is encoded into the type hints.

Your link says
func: core_schema.NoInfoValidatorFunction | core_schema.GeneralValidatorFunction

The definition of core_schema.GeneralValidatorFunction is as follows:
GeneralValidatorFunction = Callable[[Any, ValidationInfo], Any]

This is why I tried it in the first place, so I don't quite understand your statement.
Also observe, that the info is indeed provided to the validator, and is even correct - just the data field is somehow not readable. I can parse repr(info) as string, but nobody seriously wants to do that.
You are right that the annotated validators are not attached to any specific model, but this is exactly why I want to use them.
In these validators I want use supplemental information provided about this specific field, and I want this logic to be bound to this field type, which is used in different models, instead of inheriting models which has nothing to do with each other, other than using some specific field type from a common mixin.

Apologies if I was not being clear. ValidationInfo does not have a data attribute, FieldValidationInfo does: https://github.com/pydantic/pydantic-core/blob/f38bea601a5b81d73ee5a132242b7b97d24772ff/python/pydantic_core/core_schema.py#L148-L185.
We don't support access model data in Annotated validators, at least for now.

@adriangb ah, alright, thanks for the explanation! Now I understand what you meant with the reference to the type hints. It's super-confusing though, the data is there, but I can't access it in any way other that repr.
Is there any special reason, why it's not allowed? Are you against it in principle, or it just needs work to be implemented properly, which you would like first to invest elsewhere?
I want to understand what to do with this issue: either it can be converted into a feature request and I can edit the description if this helps, or it can be rejected.
Also depending on what your plans are, I can either build in a provisionary hack that pulls the information I need out of repr until data is properly accessible in future releases, or I must settle upon something else.
Unfortunately, the only thing that comes to mind is the following rather disappointing solution, which has the disadvantage, that one needs to remember to declare the validators every time a certain type is used, instead of encoding them into the type itself with your genius annotated feature, which is of course prone to errors - too easy to forget, but at least allows for some code reuse:
from datetime import UTC, datetime

from pydantic import BaseModel, field_validator
from pydantic_core.core_schema import FieldValidationInfo

def validate_datetime(value, info: FieldValidationInfo):
    print(info.data)
    return value

class DtTest(BaseModel):
    dt: datetime
    dt_validator = field_validator("dt")(validate_datetime)

m = DtTest.model_validate({"dt": datetime(2021, 8, 22, 10, 28, 16, tzinfo=UTC)})

if __name__ == "__main__":
    assert m

Having it in the repr was a bug. We're removing it.
As for a long term solution, the fundamental problem is that I'm not sure that it's sound to access model data from arbitrarily deep / nested models. If you have field: Annotated[int, BeforeValidator(...)] sure that makes sense. Maybe field: Dict[str, List[Annotated[..., BeforeValidator()]]] makes sense as well. But if you have field: Dict[str, SomeTypedDict[Annotated[...]]] I think it shouldn't get the fields of the outer model but rather of SomeTypedDict. What a "model" means is somewhat ambiguous, TypedDict's in particular weren't really models in v1 but they basically are in v2. Then there's other things like TypeAliasType that have a name but no concept of fields.
Hence the decision was to do the "safe" thing and deferr this functionality until later. But you're not the first one asking for it, and maybe this is a situation in which a 90% working feature that covers some common use cases but has some pitfalls is better than nothing.
@samuelcolvin any thoughts? It would be pretty simple to change this.

Hence the decision was to do the "safe" thing and deferr this functionality until later. But you're not the first one asking for it, and maybe this is a situation in which a 90% working feature that covers some common use cases but has some pitfalls is better than nothing.
@samuelcolvin any thoughts? It would be pretty simple to change this.

Hi @adriangb,
Thanks a lot for the explanation! I think I understand your concerns better now... Our use case is as follows:
class FieldType(BaseModel):
    type: Literal["FieldType"] = Field(alias="$type", default="FieldType")
    id: Optional[str] = None

class CustomField(BaseModel):
    type: Literal["CustomField"] = Field(alias="$type", default="CustomField")
    field_type: Optional[FieldType] = Field(alias="fieldType", default=None)

class ProjectCustomField(BaseModel):
    field: Optional[CustomField] = None

class IssueCustomField(BaseModel):
    id: Optional[str] = None
    name: Optional[str] = None
    project_custom_field: Optional[ProjectCustomFieldType] = Field(alias="projectCustomField", default=None)
    type: Literal["SimpleIssueCustomField"] = Field(alias="$type", default="SimpleIssueCustomField")
    value: Optional[YouTrackDatetime | StrictStr | StrictInt | StrictFloat] = None
    value_validator = field_validator("value")(validate_youtrack_datetime)  # since type-bound validator with `Annotated` can't access model data

In YouTrackDatetime we need to access the information from project_custom_field.field.field_type.id to decide whether this is really a datetime expressed as an int or maybe it's an int.
I guess I get the argument, that type-bound validators could be expected operate only on the data about their own fields and not the entire model, the model bound validators could access model data though... and I'm not sure if there is a nice way to express on type level that this type can only be used if the model has another field of another type, which the validation depends upon.
But in the end, it's depends on how you code the validation. It should just raise RuntimeError exception if the type is used wrongly, and if you allow re-use of bound validator functions, you could also just do it wrongly and attach it to a model, which doesn't fulfill it's usage pre-requisites.
If you ask me, I wouldn't artificially limit stuff for bound validators if you already allow it otherwise, but in the end it's a difficult decision without obvious "right way" for me. For now we will settle on the solution above for re-use.
Thanks for considering!

I think this is implemented now after FieldValidationInfo has been deprecated. At least is seems to be working for us... @adriangb ?

Yes indeed

Thank you!


Core - Plugin - Tracing OpenTelemetry Plugin Readme Issues

Section link:

Reason: Comments have extra spaces.
Suggestion: Remove extra spaces between some and work.

Section link1, link2:

Reason: Link display error.
Suggestion: In the above two places add links: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/eventhubs/azure-messaging-eventhubs/src/samples/java/com/azure/messaging/eventhubs/PublishEventsTracingWithCustomContextSample.java.
@sandeep-sen , @joshfree and @alzimmermsft for notification.

fixed in #39559


How to evaluate a specific option before any other option

I created an abstract command that defines an option --log-file which when specified will write all output to the given log file. When set a java util logging file appender will be configured.
Is it possible that picocli evaluates this option before any other option - no matter the order specified in the command line? This is to ensure that all errors/warnings etc created by other options are also written to the specified logfile. Currently I am using this workaround:
public abstract class AbstractCommand implements Callable<Void> {
   @Option(names = "--log-file", description = "Write console output also to the given log file..")
   private void setLogFile(@SuppressWarnings("unused") final Path path) {
      // nothing to do, already handled in main
   }
}

@Command(name = "mycommand")
public class MyCommandMain extends AbstractCommand {

   public static void main(String[] args) throws Exception {

      // this is a hack, but we need to evaluate this option before
      // any other component starts logging/throwing exceptions
      var logFilePos = 1 + ArrayUtils.indexOf(args, "--log-file");
      if (logFilePos > 0 && logFilePos < args.length) {
         var logFilePath = args[logFilePos];
         JdkLoggingUtils.addFileHandler(logFilePath);
      }

      var handler = new CommandLine(new MyCommandMain());
      handler.setExecutionStrategy(new RunLast());
      // ...
  }

  // ...

}

Hi @sebthom!
Picocli evaluates options in the order that they are specified on the command line. This is not easy to change.
What I recommend for cases like this is a 2-pass parsing approach, similar to what you are already doing in main.
However, instead of parsing the args yourself, and perhaps missing things like --log-file=/some/path, or quoted values, etc, why not use picocli for the first pass as well, by calling CommandLine.parseArgs or CommandLine.populateCommand? Perhaps something like this?
class LogFile {
    @Option(names = "--log-file")
    public Path path;

    @Unmatched List<String> ignored;
}

@Command(name = "mycommand")
public class MyCommandMain extends AbstractCommand {

   public static void main(String[] args) throws Exception {

      LogFile logFile = CommandLine.populateCommand(new LogFile(), args); // terser than parseArgs method
      if (logFile.path != null) {
          JdkLoggingUtils.addFileHandler(logFile.path); // we could even move this to a setter method in LogFile
      }

      var handler = new CommandLine(new MyCommandMain());
      handler.setExecutionStrategy(new RunLast());
      // ...
  }

Hi @sebthom!
Picocli evaluates options in the order that they are specified on the command line. This is not easy to change.
What I recommend for cases like this is a 2-pass parsing approach, similar to what you are already doing in main.
However, instead of parsing the args yourself, and perhaps missing things like --log-file=/some/path, or quoted values, etc, why not use picocli for the first pass as well, by calling CommandLine.parseArgs or CommandLine.populateCommand? Perhaps something like this?
class LogFile {
    @Option(names = "--log-file")
    public Path path;

    @Unmatched List<String> ignored;
}

@Command(name = "mycommand")
public class MyCommandMain extends AbstractCommand {

   public static void main(String[] args) throws Exception {

      LogFile logFile = CommandLine.populateCommand(new LogFile(), args); // terser than parseArgs method
      if (logFile.path != null) {
          JdkLoggingUtils.addFileHandler(logFile.path); // we could even move this to a setter method in LogFile
      }

      var handler = new CommandLine(new MyCommandMain());
      handler.setExecutionStrategy(new RunLast());
      // ...
  }

Thanks, that works perfect!
FYI I am using picocli in this project https://github.com/vegardit/copycat

Thanks, that works perfect!
FYI I am using picocli in this project https://github.com/vegardit/copycat

Copycat looks pretty awesome!
Enjoy!

Copycat looks pretty awesome!
Enjoy!


TypeScript Design Notes for 9/18/2015

Agenda

Process: publish notes on github
Design update on this types for classes and interfaces (#3694)

Notes
Publishing Notes on github

Publish notes on github a la C#

Conclusion: Start publishing this meeting as github issues

Design update on this types for classes and interfaces (#3694)
Overview
This update is only limited to declaring, inferring and propagating this types in classes and interfaces. function declarations will be handled separately. With this in place, fluent APIs can be correctly modeled in TypeScript, e.g.
class Base {
     foo() {
         return this;
     }
}

class Derived extends Base {
     bar() {
         return this;
     }
}

var d = new Derived();
d.foo().bar(); // where the call to foo returns Derived and not Base.

Design overview
Consider every class/interface as a generic type with an implicit this type arguments. The this type parameter is constrained to the type, i.e. A<this extends A<A>>. The type of the value this inside a class or an interface is the generic type parameter this. Every reference to class/interface A outside the class is a type reference to A<this: A>. assignment compatibility flows normally like other generic type parameters, e.g.:
class C {
     doSomething(other: this) {
          var c: C;

         c = other; // OK
         other = c; // Error, other is not guaranteed to be a c
     }
}

Performance concerns
With this type treated as a generic type parameter, every type is generic and every reference to a type is a generic type reference that has to be instantiated. Huge perf and memory cost..
Alternatives

Make this type opt-in and not inferred automatically, pros: no perf penalty for existing code, cons: unintuitive, not clear when you should declare it or not, it is not clear what would be a notation on classes/interfaces to signify they need to capture this type.

Possibly add support for sealed class as a way to opt-out of the new this

Possible optimizations
interfaces: if the interface does not reference this anywhere explicitly in the declaration no need to instantiate. one caviet, base interfaces may reference this
classes: do not try to do this for classes, all classes would have a reference to this in a body of a method, doing the analysis to figure out if the this type "escapes" the class body is not cheep.
do the check on property/method level, e.g. if the property type is a primitive type, number,sting,etc.. no need to instantiate for this

with these optimizations in place, perf penalty can be reduced to 5% for class-heavy code bases.

Conclusion: this types adds new expressiveness to the language and enables for modeling common APIs; the feature provides enough value to offset the perf degradation.

Action item: follow up on plans to offset the perf loses by looking for other optimizations in the system

Discussion
this vs. typeof this
Two options, either use this in a type position to indicate the this type, or use typeof this instead:

typeof this is more consistent with other places where typeof is used, and indicates difference between value and type spaces.
this is shorter to write
in an interface the value this does not exist
in a fluent API, you will be typing typeof this a lot, so saving the 7 additional characters matter
it is easier to restrict a new type this and expand it later to include functions declarations than to restrict the use of typeof this.

Conclusion: use this to indicate type of this, in the future expand typeof to allow this

Where is the type of this allowed

Only in method bodies, property declaration/signature, method declaration/signature within a class or an interface
Not allowed in static properties or methods.

static this
A common pattern is a create method on a class, that returns the type of a subtype instead of of the type. e.g.:
class C {
	static create() {
		return new this();
	}
}

class D extends C {}

D.create(); // expect it to be D

On the other hand, it is confusing to have the same notation to mean two different things, e.g:
class C {
   static x : this; // this is the constructor
   y: this;   // this is the instance this
}

Conclusion: do not allow this in static members

this and intersection types
Intersecting two types there is no effect on the value of this, e.g:
interface A {
	foo();
}
interface B {
	bar(): this;
}

var x: A & B;

x.bar() // returns B and not A&B

The reason is this is a generic parameter of the type that is instantiated by the reference, (which is needed to support property declaration using type this), and not passed at the call site. This does not match the JS call semantics. but can be done along with function declaration this type support.
Function declarations
Function declarations needs to be handled separately. An explicit this type parameter would be specified, and checked for assignment compatibility.  e.g.:
function compare<this extends A>(other: this) {
}

Also, add a new flag --noImplicitThis to make it an error to reference this in function declarations without declaring its type.

:+1: for publishing the notes!  It helps all us needy demanding children understand you keep us in your thoughts.

:+1: also for publishing the notes!

:+1: this is fatantastic, requires :sunny: :cocktail: :tada: and :trophy:


User can become Team leader and Code Submission

PR will be closed since it causes conflicts with admin.py and models.py


Order by Price?

How to get items Ordered by Price?
I found this.
https://www.storeurl.com/wc-api/v3/products?filter[order]=asc&filter[orderby]=meta_value_num&filter[orderby_meta_key]=_regular_price
But not sure how to use filter inside params object:
api.get("products", {
  per_page: 20
})

Thanks

You should check the API Docs for more information. Here
Example Code:
api.get("products", {
  order: "asc", // Order sort attribute ascending
  orderby: "date" // Order by Date
})

If you want a custom order by value. You should create a filter for rest_event_query and just pass the corresponding parameters you have added in the params object.

I have checked API Docs and there is no option for order by price.
Then i found this topic on WordPress.org. https://wordpress.org/support/topic/how-to-sort-products-by-price-in-rest-api-v3/
So i was wondering how to pass those filter[orderby]=meta_value_num & filter[orderby_meta_key]=_regular_price inside that parameters object.
Thanks for the links. I will look into that.

I don't know whether filter is a valid parameter for the REST API. If you really want to pass those value in the param object.
Example code:
api.get('products', {
  "filter[orderby]": "meta_value_num",
  "filter[orderby_meta_key]": "_regular_price"
})

If you want to more about how to pass the param object, you may look at the axios documentation.

Thanks again for the help. I tried this but it's not working. I think filter is not a valid parameter for REST API.
It would be great if there is a way to get it done. Order by Price should be a parameter as it's pretty common way of sorting products on any store site.

CoCart Products API let's you sort products by price @sajjadalis @climba03003


Implement Real Genesis Certificate

This PR implements the Real Genesis Certificate:

[x] Add a Genesis Signer that signs a message with a Genesis Secret Key (only for test purpose)
[x] Add a Genesis Verifier that verifies a Genesis Signature against a Genesis Verification Key
[x] Implement the verify_genesis_certificate of the Certificate Verifier
[x] Make Client load/use the Genesis Verification Key
[x] Make Aggregator load/use the Genesis Verification Key
[x] Make Aggregator verify that the Certificate Chain is valid before trying to produce new Mithril Certificates
[x] Add a sub command to the Aggregator CLI to generate test only Genesis Keys, and boostrap a test only Genesis Certificate
[x] Add a sub command to the Aggregator CLI to export the message that must be signed with Genesis Secret Key into a Genesis Signature
[x] Add a sub command to the Aggregator CLI to import the Genesis Signature and create a Genesis Certificate
[x] Update test lab to bootstrap a Genesis Certificate
[x] Update devnet standalone to bootstrap a Genesis Certificate
[x] Update GCP Aggregator to use the test Genesis Keys
[x] Fix crashes of the end to end tests in CI
[x] Update documentations

Closes #364

Many thanks @Alenar for your large contribution to this PR and for all the help and support you provided :1st_place_medal:


⚠ Bofrost.at has degraded performance

In 40be27e, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 2356 ms

Resolved: Bofrost.at performance has improved in d6ad4bd.


checkpoint files are geneareted by GEOSldas

Don't need the line directing the landpert checkpoint output

We can replace the non-standard "system" call with a standard "excute_command_line" call.  That should not cause problems.

Not sure how much protection is provided by "execute_command_line()"
It looks like it's only a wrapper for the "system()" call, and it may not be available in all compilers.
https://gcc.gnu.org/onlinedocs/gfortran/EXECUTE_005fCOMMAND_005fLINE.html
https://www.pgroup.com/userforum/viewtopic.php?t=6422
We could use it as a temporary solution.
In the long run, shouldn't we handle the files in ana/ just like HISTORY files, i.e., write them into scratch/ and clean up in post-processing?
(Note that the subroutines in "clsm_ensupd_read_obs.F90" that still contained "system()" calls are not currently in use but need to be overhauled before the land analysis can be integrated into the next GMAO reanalysis.)

This intrinsic call is Fortran 2008 standard. So for the long run, it should be fine. But I don't oppose to send data from scratch to the destination. I just need more information to understand the file name format and where to send. The original codes have dealt with all the cases that I may never see in the limited test cases. So it is much easier to change the original codes.


[CBR-345] printing log items compatible with current format

Description
this change preserves the format of the logging output
when we switch to the new logging library katip

this will be compatible with any tools that grep the textual logs

Linked issue
CBR-97 (user story)
CBR-345
Type of change

[~] 🐞 Bug fix (non-breaking change which fixes an issue)
[x] 🛠 New feature (non-breaking change which adds functionality)
[~] ⚠ Breaking change (fix or feature that would cause existing functionality to change)
[~] 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
[~] 🔨 New or improved tests for existing code
[~] ⛑ git-flow chore (backport, hotfix, etc)

Developer checklist

[x] I have read the style guide document, and my code follows the code style of this project.
[~] If my code deals with exceptions, it follows the guidelines.
[~] I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on cardanodocs.com, amending the inline Haddock comments, any relevant README file or one of the document listed in the docs directory.
[~] CHANGELOG entry has been added and is linked to the correct PR on GitHub.

Testing checklist

[~] I have added tests to cover my changes.
[x] All new and existing tests passed.

QA Steps
stack test cardano-sl-util
Screenshots (if available)

trying hard on CI ..

'LogItem a' is only needed when we call a function in 'katip' that takes an 'Item a'

rebased again on develop, so after CI is happy we can merge.

rebased on develop again, with the change of PR #3537 that let's pass tests.walletIntegration


pretty printing

It seems to me that GitBucket is relying on google-code-prettify pretty printer. However, do you always pretty print as if the underlying language were C (hardcoded)? If it is the case, it would be nice to be able to add other languages. Also how would the language be decided: based on file extension?

By way of example, an .sql file is not prettyfied correctly, but gitbucket/src/main/webapp/assets/vendors/google-code-prettify/ do contain the lang-sql.js file. However, it will never be loaded.

I guess the detection by default from google prettyfier is OK. However, I suggest that you additionally allow the user to decide/override language associations by by extension (or even better: regex) on a per repository basis.

Hmm... It seems to be rendered at the repository viewer correctly.

And you can specify language in Markdown as:
```sql
select * from user where user_id = 1
```

Could you show specific examples of the case that does not work?

I believe you're just showing me C-code (or alike) syntax highlighting applied to sql code. I just tried:
-- Fix COLLABORATOR constraints
ALTER TABLE COLLABORATOR DROP CONSTRAINT IDX_COLLABORATOR_FK1 IF EXISTS;
CREATE TABLE WEB_HOOK (
USER_NAME VARCHAR(100) NOT NULL,
REPOSITORY_NAME VARCHAR(100) NOT NULL,
URL VARCHAR(200) NOT NULL
);
ALTER TABLE WEB_HOOK ADD CONSTRAINT IDX_WEB_HOOK_PK PRIMARY KEY (USER_NAME, REPOSITORY_NAME, URL);
ALTER TABLE WEB_HOOK ADD CONSTRAINT IDX_WEB_HOOK_FK0 FOREIGN KEY (USER_NAME, REPOSITORY_NAME) REFERENCES REPOSITORY (USER_NAME, REPOSITORY_NAME);

at the demo site on Heroku and get that:

Compare with the expected:
https://github.com/takezoe/gitbucket/blob/master/src/main/resources/update/1_6.sql

Do you need more info on this issue?

nodamushi solves this issue by plugin. http://nodamushi.hatenablog.com/entry/2018/02/19/020420 (Japanese entry)


build error

On this system with
Ubuntu 18.02 LTS, cmake 3.14,
Cuda compilation tools, release 10.1, V10.1.105
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
NVIDIA-SMI 418.39       Driver Version: 418.39       CUDA Version: 10.1
I entered this:
 git clone https://github.com/soumith/cudnn.torch.git -b R7 && cd cudnn.torch && luarocks make cudnn-scm-1.rockspec
and got this
Cloning into 'cudnn.torch'...
remote: Enumerating objects: 2074, done.
remote: Total 2074 (delta 0), reused 0 (delta 0), pack-reused 2074
Receiving objects: 100% (2074/2074), 801.49 KiB | 12.33 MiB/s, done.
Resolving deltas: 100% (1351/1351), done.

Missing dependencies for cudnn:
cutorch

Using https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec... switching to 'build' mode
Cloning into 'cutorch'...
remote: Enumerating objects: 229, done.
remote: Counting objects: 100% (229/229), done.
remote: Compressing objects: 100% (184/184), done.
remote: Total 229 (delta 62), reused 90 (delta 43), pack-reused 0
Receiving objects: 100% (229/229), 241.83 KiB | 4.17 MiB/s, done.
Resolving deltas: 100% (62/62), done.
Warning: unmatched variable LUALIB

jopts=$(getconf _NPROCESSORS_CONF)

echo "Building on $jopts cores"
cmake -E make_directory build && cd build && cmake .. -DLUALIB= -DLUA_INCDIR=/home/stefan/torch/install/include -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/stefan/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/stefan/torch/install/lib/luarocks/rocks/cutorch/scm-1" && make -j$jopts install

Building on 12 cores
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Torch7 in /home/stefan/torch/install
-- Found CUDA: /usr/local/cuda (found suitable version "10.1", minimum required is "6.5")
-- Removing -DNDEBUG from compile flags
-- TH_LIBRARIES: TH
-- MAGMA not found.
CMake Error at THC_generated_THCTensorScatterGather.cu.o.cmake:267 (message):
  Error generating file
  /tmp/luarocks_cutorch-scm-1-1277/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorScatterGather.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:182: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorScatterGather.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorScatterGather.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/luarocks_cutorch-scm-1-1277/cutorch/lib/THC/THCAtomics.cuh(97): error: cannot overload functions distinguished by return type alone

1 error detected in the compilation of "/tmp/tmpxft_00001631_00000000-4_THCTensorIndex.cpp4.ii".
CMake Error at THC_generated_THCTensorIndex.cu.o.cmake:267 (message):
  Error generating file
  /tmp/luarocks_cutorch-scm-1-1277/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorIndex.cu.o

lib/THC/CMakeFiles/THC.dir/build.make:161: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorIndex.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorIndex.cu.o] Error 1
CMakeFiles/Makefile2:177: recipe for target 'lib/THC/CMakeFiles/THC.dir/all' failed
make[1]: *** [lib/THC/CMakeFiles/THC.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Error: Failed installing dependency: https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec - Build error: Failed building.

help??

in my case it worked with cuda 10.01 and cudnn 7.5 and fresh installation of ubuntu 18.04
Thanks


export ComposeActivationStrategy closes #427

hmmm simply merging this could be quite an issue for existing app. We may not be able to just do this. We can export an extra name though. Can you help change to an additional name instead @avrahamcool ?

hi @bigopon,
all of the previous exports remain untouched. [the ActivationStrategy enum was not exported before]
and I do export it as a deferent name (in order to not have a clash of name with the ActivationStrategy from router).
so how can this break existing apps?
I'm probably missing something here.

@avrahamcool thanks. I thought we were exporting it via * in the aurelia framework package, but it's not the case. This is good. Please ignore my previous comment.

The changes have been released in v 1.15.0
Thanks @avrahamcool


Add attribute support

from: https://github.com/kss-node/kss-node/issues/52
What if my modifiers are not always class names?
E.g. I often use ARIA role attributes as modifiers:
.btn[aria-disabled="true"] { ... }

I did not find any practicable solution to document those.

How about we just use the same notation as in the css attribute selector (https://www.w3schools.com/css/css_attribute_selectors.asp) :
/*
  Component with attributes

  .active - The component when it also has the '.active' class.
  :hover - The hover styling for this component.
  [disabled] - The component with the disabled attribute.
  [disabled]:hover - the component with the disabled attribute when it is hovered.
  [width="500"] - The component with the width attribute that has a value of 500.
  [href^="mailto"] - The component if the href attribute starts with 'mailto'.
*/


Replace irange by plate in docs, examples, tests

Resolves #1465
This replaces irange with plate in all docs, examples, and tests:
- for i in pyro.irange("data", 100):
+ for i in pyro.plate("data", 100):

There is no behavior change, since irange is already implemented via plate.
This PR leaves irange in place for backwards compatibility, but adds a deprecation warning when users use irange.

Ok, hopefully ready to merge if tests pass :smile:


More Examples

Could you create some more examples of how the various components are used. I am new to rust and have been having difficulties working with the static callbacks (menu items) and things not showing up as expected (windows).

Unfortunately, I can't make good examples for most of the SDK because I haven't found a good design for the APIs that is safe, ergonomic, and functional. The menu and graphics APIs are especially incomplete.
If you learn how to use the low-level C bindings, you can make a better design for safe Rust APIs on top of them.


addition

Though this seems redundant as there would only really be python code in the python folder I could see this being more useful to beginners so I will merge.


Only allow sharing own badges andnclude a message when sharing

Fixes https://openedx.atlassian.net/browse/MA-1672

@BenjiLee or @mdinino This can be reviewed

Sure. Will review this afternoon.
On Fri, May 20, 2016 at 12:49 PM, Brian Guertin<EMAIL_ADDRESS>wrote:

@BenjiLee https://github.com/BenjiLee or @mdinino
https://github.com/mdinino This can be reviewed
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/edx/edx-app-android/pull/715#issuecomment-220658659

--
Regards,
Marc DiNino
Android Engineer
EDX

LGTM 👍


feat(linter) eslint-plugin-next no-async-client-component

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

Current dependencies on/for this PR:

main

PR #1931

PR #1932

PR #1933

PR #1934

PR #1935

PR #1936   👈

This stack of pull requests is managed by Graphite.

Merge activity

Jan 7, 10:49 PM: @Boshen started a stack merge that includes this pull request via Graphite.


Update Test Suite

The test suite should include tests for common operations users use the tool for so that bugs can be caught in development as new features are released.
Tests should be run on testnet

Tasks

Document the expected tests
Check to see if the tests are implemented
If tests are not implemented, create issues for each test
Schedule to implement tests in a sprint

opened in wrong repo