Add "smart" upload function

The AWS S3 SDK for JavaScript has an upload function that does not correspond to any particular API request. You can give it a buffer or a stream, and it will automatically perform either a single PutObject call or a multi-part upload.
It would be a great benefit to this library to provide something similar. Right now, large file uploads are unnecessarily cumbersome, especially when the input is a stream. Authorization token management is a giant pain.
I am working on such a function right now for our own internal use. I'm writing it as a module that exposes a single function that can be attached to the prototype of the B2 class provided by this library (B2.prototype.uploadAny = require('backblaze-b2-upload-any');).
This issue is intended to convey my intent to integrate this function into this library and submit a PR. Therefore, I would very much appreciate any feedback on my proposal so that I can accommodate any necessary design changes as early as possible.
The current planned features of this function (many of which are already done) are:

Performs the upload using a single upload_file call or switches to a large-file upload as appropriate.
In large-file mode, uploads multiple parts with configurable concurrency.
Automatic management of upload tokens. An upload token (URL + authorization token) can be reused by future part uploads. Expired tokens (where the server returns 503 or 400) are discarded.
Automatic re-authorization if the server returns 401 in the middle of an upload.
Retry with exponential backoff.
Support for uploading:

Buffers
Streams
Local files (specified as a string path)

If the operation is aborted for whatever reason, any outstanding large-file upload is canceled with cancel_large_file.
The caller need not (and cannot) supply a hash. When uploading in large-file mode, a hash of the entire content is not provided to B2 -- a hash is provided for each part. A caller-supplied hash of the content is therefore useless in large-file mode anyway.

There is a difference between the local file and stream cases. When uploading a local file, no content is buffered in memory. Rather, multiple read streams are created (and re-created as necessary if a part upload must be retried).
Stream support necessarily requires some buffering in memory to facilitate retries since node streams cannot be seeked (and not all stream types would be seekable, anyway).
Note that I currently introduce two new dependencies:

@hapi/joi which is used to validate the options object.
memoizee which is used during re-authorization. If multiple part uploads are trying to re-authorize at the same time, this prevents multiple authorize calls to B2.

I'm definitely in favor of this change. I personally use joi in some of my projects as well. memoizee seems pretty solid as well. But, adding these would definitely grow the dependency tree. I think your design changes seem fine, but I'd like to see the final implementation (code review).

I had to take a hiatus from this development but will be back working on it this week.
I am considering introducing another dependency maintained by me as it will simplify much of the logic: it is a function that accepts an iterator or async iterator and returns a promise for the result of invoking a mapper function over each element produced by the iterator. It does this without converting the iterator to an array first.
This would be used in the piecewise upload routine. Each upload source (buffer, file, stream) would have an iterator that produces pieces to upload.

Sounds fine if it's something that would be useful on it's own as a module or is large enough to warrant being separate.. But if it's just a small helper function it'd be better to throw it in this module.

I decided not to bring in this other dependency. I might later, but what I have today works (I've tested it against large files/buffers). I'm also not sure what environments are supported by this module (backblaze-b2) and whether they all support ECMAScript's asynchronous iteration feature (Symbol.asyncIterator) so I decided not to use this feature after all, at least not yet.
I did bring in one more dependency (p-retry) to handle exponential back-off following a temporary upload failure.
Sometime this week I hope to publish this function as a module on npm, since I will be using it in multiple projects and this will simplify distribution. My goal is to get the functionality merged into backblaze-b2 itself. Once I publish this new module, I'd like to request a code review of it. After working through any concerns there, I can submit a PR to add the function to backblaze-b2.

The module is published. Feel free to leave code review comments here, or as issues on the module's repository.
https://www.npmjs.com/package/@gideo-llc/backblaze-b2-upload-any

We have been using the module in production for the last few days and have migrated several TB of data successfully, streaming it from an HTTP origin to B2. I have not found any instances of corruption yet. There has been a pretty even mixture of standard and large-file uploads.

@cdhowie Sorry for the delay, the API looks good but hopefully I can take a look at the code over the weekend.

@odensc There's a few things that I may want to rewrite but I haven't had time, and what's there works pretty well.
The main large-file-upload routine is a bit complex. Replacing it with async generators (async function*) would significantly improve readability of the source interface code, and -- assuming that we can add async as a dependency -- the provided mapLimit function is exactly what the primary large-file-upload loop does, and it works with async generators. The code would be substantially more readable and maintainable, at the cost of adding a dependency.

I just added @gideo-llc/backblaze-b2-upload-any to my project and it helped simplify my code a lot.  I would love to see this helpful method added in core 😄


Changing video source in fullscreen mode not working?

Issue description:
Using a list of network mp4 videos.
In player portrait mode toggle next video src working fine.
In fullscreen mode the toggle next video src not working instead throwing error
The following assertion was thrown building PlayerWithControls(dependencies: [ChewieControllerProvider, MediaQuery, _InheritedTheme, _LocalizationsScope-[GlobalKey#537f6]]):
setState() or markNeedsBuild() called during build.
Using customControls with ChewieController
ToggleVideo
Future<void> toggleVideo() async { await _videoPlayerController.pause();     currPlayIndex.value += 1;     if (currPlayIndex >= playList.length) {       currPlayIndex.value = 0;     }     await _initializePlayer();   }
initializePlayer
Future<void> _initializePlayer() async {     _isPlayerInitialized.value = false;     _videoPlayerController =         VideoPlayerController.network(playList[currPlayIndex.value]);     await _videoPlayerController         .initialize()         .then((value) => {_isPlayerInitialized.value = true});     _createChewieController();     _videoPlayerController.addListener(_videoPlayerListener);   }
createChewieController
void _createChewieController() {     _chewieController = ChewieController(       customControls: CustomVideoPlayerControls(         controller: _videoPlayerController,         onFullScreenBtnClick: () {           _chewieController?.enterFullScreen();         },         onBackPressed: () {           Get.back(closeOverlays: false);         },         onNextButtonPressed: () {           toggleVideo();         },       ),       aspectRatio: 16 / 9,       videoPlayerController: _videoPlayerController,       showControlsOnInitialize: true,       autoPlay: true,       looping: false,       deviceOrientationsOnEnterFullScreen: [         DeviceOrientation.landscapeLeft,         DeviceOrientation.landscapeRight       ],       deviceOrientationsAfterFullScreen: [         DeviceOrientation.portraitUp,         DeviceOrientation.portraitDown       ],     );   }
VideoDetailsPage
Scaffold(       body: SafeArea(         child: Stack(           children: [             Positioned(               top: 0,               left: 0,               right: 0,               child: Container(                   color: Colors.black,                   height: MediaQuery.of(context).size.width * 9 / 16,                   child: Obx(() {                     return controller.isPlayerInitialized == true                         ? Chewie(                           controller: controller.chewieController!,                         )                         : const Column(                             mainAxisAlignment: MainAxisAlignment.center,                             children: [                               CircularProgressIndicator(),                             ],                           );                   })),             ),])))
Am I missing any configuration?
Stacktrace
======== Exception caught by widgets library =======================================================
The following assertion was thrown building PlayerWithControls(dependencies: [ChewieControllerProvider, MediaQuery, _InheritedTheme, _LocalizationsScope-[GlobalKey#537f6]]):
setState() or markNeedsBuild() called during build.
This Obx widget cannot be marked as needing to build because the framework is already in the process of building widgets. A widget can be marked as needing to be built during the build phase only if one of its ancestors is currently building. This exception is allowed because the framework builds parent widgets before children, which means a dirty descendant will always be built. Otherwise, the framework might not visit this widget during this build phase.
The widget on which setState() or markNeedsBuild() was called was: Obx
has builder
state: _ObxState#d27ff
The widget which was currently being built when the offending call was made was: PlayerWithControls
dependencies: [ChewieControllerProvider, MediaQuery, _InheritedTheme, _LocalizationsScope-[GlobalKey#537f6]]
The relevant error-causing widget was:
Chewie Chewie:file:///Users/user/app/lib/app/src/video_details/video_details_page.dart:54:27
When the exception was thrown, this was the stack:
0      Element.markNeedsBuild. (package:flutter/src/widgets/framework.dart:4651:9)
1      Element.markNeedsBuild (package:flutter/src/widgets/framework.dart:4663:6)
2      State.setState (package:flutter/src/widgets/framework.dart:1159:15)
3      _ObxState._updateTree (package:get/get_state_manager/src/rx_flutter/rx_obx_widget.dart:41:7)
4      GetStream._notifyData (package:get/get_rx/src/rx_stream/get_stream.dart:47:21)
5      GetStream.add (package:get/get_rx/src/rx_stream/get_stream.dart:97:5)
6      NotifyManager.addListener. (package:get/get_rx/src/rx_types/rx_core/rx_impl.dart:158:40)
7      GetStream._notifyData (package:get/get_rx/src/rx_stream/get_stream.dart:47:21)
8      GetStream.add (package:get/get_rx/src/rx_stream/get_stream.dart:97:5)
9      RxObjectMixin.value= (package:get/get_rx/src/rx_types/rx_core/rx_impl.dart:105:13)
10     MyVideoController.isPlaying= (package:app/src/video_details/contollers/video_controller.dart:55:16)
11     _CustomVideoPlayerControlsState._updateVideoState (package:app/src/video_details/widgets/custom_video_controls.dart:61:12)
12     _CustomVideoPlayerControlsState.initState (package:app/src/video_details/widgets/custom_video_controls.dart:45:5)
13     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5219:55)
14     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5062:5)
15     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3971:16)
16     MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6570:36)
17     MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6582:32)
...     Normal element mounting (28 frames)
45     _InheritedProviderScopeElement.mount (package:provider/src/inherited_provider.dart:411:11)
...     Normal element mounting (7 frames)
52     SingleChildWidgetElementMixin.mount (package:nested/nested.dart:222:11)
...     Normal element mounting (15 frames)
67     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3971:16)
68     Element.updateChild (package:flutter/src/widgets/framework.dart:3702:20)
69     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
70     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5251:11)
71     Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
72     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2780:19)
73     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:903:21)
74     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:358:5)
75     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1284:15)
76     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1214:9)
77     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1072:5)
78     _invoke (dart:ui/hooks.dart:142:13)
79     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:359:5)
80     _drawFrame (dart:ui/hooks.dart:112:31)
flutter doctor -v
[✓] Flutter (Channel stable, 3.10.5, on macOS 13.4 22F66 darwin-arm64, locale en-IN)
• Flutter version 3.10.5 on channel stable at /Users/user/Tools/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 796c8ef792 (6 days ago), 2023-06-13 15:51:02 -0700
• Engine revision 45f6e00911
• Dart version 3.0.5
• DevTools version 2.23.1
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at /Users/user/Library/Android/sdk
• Platform android-33, build-tools 33.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E222b
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
[✓] IntelliJ IDEA Community Edition (version 2022.2.4)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] Connected device (4 available)
• SM M307F (mobile)          • RZ8M83MNRZB                          • android-arm64  • Android 11 (API 30)
• iPhone 14 Pro Max (mobile) • F47FD4F7-E2E7-426F-A1C4-D4A730A3CE58 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
• macOS (desktop)            • macos                                • darwin-arm64   • macOS 13.4 22F66 darwin-arm64
• Chrome (web)               • chrome                               • web-javascript • Google Chrome 114.0.5735.133
[✓] Network resources
• All expected network resources are available.
• No issues found!

the same ploblem,how to you fix it,thx~

Don't  use the Package fullscreen feature create it like this:
1- new screen with scaffold
2- SafeArea, AspectRatio, Chewie
3- pass the controller to the constructor
4- use state management to handle change video

@George-Abdelmessh Can you please help me with a sample app?

@JibuVarghese please provide an example app that reproduces this issue. Thanks.

@JibuVarghese @diegotori
I solved creating a StreamController for skip functions into the PlayerHandler class and , into the full screen widget, listening the onSkip stream to call the setState and works fine.
MyPlayerHandler
class MtPlayerHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
//...
  // Stream to notify skip functions are colled
  final StreamController<void> _skipController =
      StreamController<void>.broadcast();
  Stream<void> get onSkip => _skipController.stream;

 @override
  Future<void> skipToNext() async {
  //...
      _skipController.add(null);
    }
  }

  @override
  Future<void> skipToPrevious() async {
    //...
      _skipController.add(null);
    }
  //...
  }

Into the FullScreenWidget , into initState function:
@override
  void initState() {
    super.initState();
    widget.mtPlayerHandler.onSkip.listen((_) {
      // update the ui in fullscreen mode
      setState(() {});
    });
}


Easier exploration of reports by a specific probe

It would be useful to get an overview of reports by a specific probe. Especially as users begin to run lepidopter, such a view will be useful for monitoring the continued functioning of a headless device.
It would be great to condense the measurements, since a single run of the deck will result in many hundreds of reports. Instead, the useful information for a probe are (a) the times when the most recent runs have been started, and (b) reports seen with detected anomalies.

This looks like a nice to have feature for the new OONI Explorer. Migrating it there.


Use correct version variable to install angular lsp

After fixing the version variable used to install the LSP package, the ts_version variable is not used anywhere - so I've removed that

Fixes #6


The default export is not a React Component in page

Next5TsAsyncProblem
"target": "esnext",
"module": "esnext",
if  tsconfig.json use above config that server part can't use import
so I setup like
"target": "es2015",
"module": "commonjs",
but When I use  "async getInitialProps" that will show error
The default export is not a React Component in page: "/"
Error: The default export is not a React Component in page: "/"
    at App.render (/Users/user/Sites/learning/Next5TsAsyncProblem/node_modules/next/dist/lib/app.js:100:15)
    at resolve (/Users/user/Sites/learning/Next5TsAsyncProblem/node_modules/react-dom/cjs/react-dom-server.node.development.js:2149:18)
    at ReactDOMServerRenderer.render (/Users/user/Sites/learning/Next5TsAsyncProblem/node_modules/react-dom/cjs/react-dom-server.node.development.js:2260:22)
    at ReactDOMServerRenderer.read (/Users/user/Sites/learning/Next5TsAsyncProblem/node_modules/react-dom/cjs/react-dom-server.node.development.js:2234:19)

if remove async will be ok
how to fix this?
https://github.com/polo13999/Next5TsAsyncProblem

Hi, I replicated your example and everything is working as expected, No errors whatsoever in pages

I had a similar problem with TypeScript and I had to change my tsconfig.json to the following:
{
  "target": "esnext",
  "module": "esnext",
  "moduleResolution": "node",
  "jsx": "preserve",
  // ...
}

For the record, if you are using "module": "commonjs" so you can use a custom server.js, then you must also set "target": "es5" and everything will be OK.  Not sure why that works but that is the fix.
{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
	// ...
  }
}

It only works for me when I set module to "esnext" and create a separate tsconfig.json for my custom server.ts with module "commonjs".
But then I'm still left with the problem that running my tests in jest doesn't work, because the jest run is done in node so it would require commonjs but then I can't import the files that are compiled to esnext.
I'm not using next-typescript though, maybe that will fix it. No time to test it this moment though.

https://github.com/zeit/next.js/tree/canary/examples/with-jest-typescript

@timneutkens yes, that's what I hadn't had time yet to test.
Turns out for some reason I still can't get it to work in my project. Which lead me to see https://github.com/zeit/next.js/issues/3663 which is closed but other people have the same problem as well.
It works fine in the example, but I cannot get my actual project to run tests properly. It's always either "unexpected token import" or "unexpected token" at  (fails to transpile tsx?).
There is something really wrong there and I'm ~65% sure it has to do with esnext default imports/exports. But I think next.js issue #3663 is the one where this should be continued.

Are you exporting the default component?
e.g. as a class
class Homepage extends React.Component{
      render(){
         return ( Hello World );
      }
}
export default HomePage;
``

or as a pure function
e.g. as a class
``` js
class Homepage extends React.Component{
      render(){
         return (<main> Hello World </main>);
      }
}
export default HomePage;
``` js
const HomePage = () => (
    Hello World
)

export default HomePage

Are you exporting the default component?
Export default component
e.g. as a class
class Homepage extends React.Component{
      render(){
         return ( Hello World );
      }
}
export default HomePage;

or as a pure function:
const HomePage = () => (
    Hello World
)

export default HomePage

Config
PS: My tsconfig was the one autogenerated by nextjs
{
  "compilerOptions": {
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": false,
    "forceConsistentCasingInFileNames": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve"
  },
  "exclude": [
    "node_modules"
  ],
  "include": [
    "next-env.d.ts",
    "**/*.ts",
    "**/*.tsx"
  ]
}

This solved my issue, just forgot to add my export at the bottom.

TLDR: I am using NexJS and the problem was with my tsconfig.json - update the target, libs and module to es5 or esnext. or use the node12 base as described below.
For anyone finding themselves here - I got caught on this error as I had extended the tsconfig recommended base rather then the node12 base
Once I did this nextjs asked me to add a couple more things like "jsx": "preserve" and then we were up and running.


Wrap text in legend

Is this possible to wrap text in legend?

Is this possible to wrap a text in Legend? For example PieChart

Same issue. Any solution for this?


c++ xgboost XGBoosterLoadModelFromBuffer  XGBoosterGetModelRaw

xgboost Serialize and Desrialize, Is it right to write this ?
uint64_t out_len_model;
const char *out_dptr = nullptr;
XGBoosterGetModelRaw(h_booster, &out_len_model, &out_dptr);
std::cout << "out_len_model:" << out_len_model << std::endl;
for (int j = 0; j < out_len_model; ++j) {
std::cout << out_dptr[j];
}
char b[out_len_model];
std::copy(out_dptr, out_dptr + out_len_model, b);
std::cout<< "b:";
for (int j = 0; j < out_len_model; ++j) {
std::cout << b[j];
}
std::cout<<"."<<std::endl;
BoosterHandle h_booster1;
XGBoosterLoadModelFromBuffer(h_booster1, &b, out_len_model);

XGBoosterGetModelRaw gets the binary seralized data, the usage seems to be accurate. New questions are welcomed at https://discuss.xgboost.ai/

@tqchen Thank you. It's been settled.

This example is not quite right from my experience, as it leads to segfaults when loading.
You need to initialize h_booster1 before loading using XGBoosterCreate, etc.


[FLINK-20217][task] Allow certains operators to yield to unaligned checkpoint in case timers are firing

What is the purpose of the change
Currently many operators when processing watermarks, are firing multiple timers each producing potentially multiple output records. If this happens under back-pressure, it can quite easily block the subtask thread in the hard back-pressure state for an extended period of time blocking mailbox from processing any incoming mails, like processing checkpoint barriers and completing unaligned checkpoints.
To address this issue, we would like to propose to make firing multiple timers interruptible in such a way, that Flink would be able to interrupt firing timers, perform checkpoint and return back to firing timers.
Brief change log
Please check individual commit messages.
Verifying this change
Covered by both existing tests and added new tests.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (yes / no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
The serializers: (yes / no / don't know)
The runtime per-record code paths (performance sensitive): (yes / no / don't know)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
The S3 file system connector: (yes / no / don't know)

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

It seems one test related to timer fails, it maybe caused by this PR.
StreamTaskCancellationTest.testCancelTaskShouldPreventAdditionalEventTimeTimersFromBeingFired:272->testCancelTaskShouldPreventAdditionalTimersFromBeingFired:300 » IllegalState
https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=60198&view=logs&j=0da23115-68bb-5dcd-192c-bd4c8adebde1&t=24c3384f-1bcb-57b3-224f-51bf973bbee8&l=10477

Yes, fixed!


feat: Add collab liquidation

Analog to the expired positions this is adding an optimistic approach to close liquidated positions collaboratively.
If the ask or the bid price gets within a range of 10% to the liquidation price, an async order with order reason Liquidated is automatically created and the user notified about the liquidated positions. The user will get daily reminders for a week to collab close the liquidated position.
This means with an average entry price of $30,000 the user gets liquidated on a short position at $37,500 - $3,750 = $33,750.
https://github.com/get10101/10101/assets/382048/0ab2da62-ffdf-415c-8382-1fe1ddba4171
fixes https://github.com/get10101/meta/issues/407

Should we show the margin call in the app?

The order reason is shown in the order history if the order reason is different to "manual"

I'm afraid I put you onto the wrong track here. The way how this is used and called at the moment is not a margin call and I also put you onto the wrong track on how it is calculated. I'm sorry but I would rather not merge this as is then having a wrong terminology introduced which might confuse us and traders down the road.
Here is what we should do:
Implement a maintenance margin and derive the liquidation price from this maintenance margin. I would then simply replace the current Liquidation Price with the calculation from below and optionally add a Bankruptcy Price: this is where the user loses everything.
Here a full example:
Assumptions:
* Initial price of Bitcoin (BTC): $10,000

* Contract size: $10,000

* Initial margin requirement: 50% (leverage of 2x)

* Maintenance margin requirement: 10% (this is quite high but maybe OK for us)

Scenario 1: Opening a Long Position
1. **Opening a Long Position**:

   * Contract size: $10,000
   * Initial Leverage: 2x (you need to deposit 50% of the total contract size as the initial margin).
   * Initial Margin = 50% * $10,000 = $5,000
   * The initial margin in BTC using the current price of Bitcoin:
     BTC Initial Margin = $5,000 / $10,000 per BTC = 0.5 BTC

2. **Liquidation Price Calculation**:

   * This is the formula to calculate the liquidation price using maintenance margin: `(price_opening * leverage) / (leverage + 1 - (maintenance_margin * leverage))`
   * If maintenance_margin = 0%:

     * Liquidation Price = (price_opening * leverage) / (leverage + 1 - (maintenance_margin * leverage))
       Liquidation Price = ($10,000 * 2) / (2 + 1 - (0.1 * 0))
       Liquidation Price = $20,000 / (3 - 0)
       Liquidation Price = $20,000 / 3
       Liquidation Price ≈ $6,666.67
   * If maintenance_margin = 10%:

     * Liquidation Price = (price_opening * leverage) / (leverage + 1 - (maintenance_margin * leverage))
       Liquidation Price = ($10,000 * 2) / (2 + 1 - (0.1 * 2))
       Liquidation Price = $20,000 / (3 - 0.2)
       Liquidation Price = $20,000 / 2.8
       Liquidation Price ≈ $7,142.86
     * --> meaning, the user gets liquidated earlier

Scenario 2: Opening a Short Position
1. **Opening a Short Position**:

   * Contract size: $10,000
   * Initial Leverage: 2x (you need to deposit 50% of the total contract size as the initial margin).
   * Initial Margin = 50% * $10,000 = $5,000
   * The initial margin in BTC using the current price of Bitcoin:
     BTC Initial Margin = $5,000 / $10,000 per BTC = 0.5 BTC

2. **Liquidation Price Calculation**:

   * If maintenance_margin = 0%:

     * Liquidation Price = (price_opening * leverage) / (leverage - 1 + (maintenance_margin * leverage))
       Liquidation Price = ($10,000 * 2) / (2 - 1 + (0.1 * 0))
       Liquidation Price = $20,000 / (2 - 1)
       Liquidation Price = $20,000 / 1
       Liquidation Price = $20,000
       Liquidation Price = $20,000 per BTC
   * If `maintenance_margin = 10%`:

     * Liquidation Price = (price_opening * leverage) / (leverage - 1 + (maintenance_margin * leverage))
       Liquidation Price = ($10,000 * 2) / (2 - 1 + (0.1 * 2))
       Liquidation Price = $20,000 / (2 - 1 + 0.2)
       Liquidation Price = $20,000 / (1 + 0.2)
       Liquidation Price = $20,000 / 1.2
       Liquidation Price ≈ $16,666.67
     * --> meaning, the user gets liquidated earlier

Thanks for your detailed explanation and education on the different liquidation prices :). I've addressed your remarks in 3d28628f2de182c6fd8d6f7ff06b3b04f855d124
Please have another look.


Future proofed WriteConcern

Inline with changes coming upstream in 3.2
SCALA-216

Initial review complete.  Just a few naming questions/concerns

Updated :)

lgtm

Rebased and merged


modern-acad-cv:0.1.0

I am submitting

[x] a new package/template
[ ] an update for a package

Description: This template for an academic CV serves the peculiarities of academic CVs. If you are not an academic, this template is not useful. Most of the times in academics, applicants need to show everything they have done. This makes it a bit cumbersome doing it by single entries. In addition, academics might apply to institutions around the globe, making it necessary to send translated CVs or at least translations of some parts (i.e., title of papers in different languages).
I have read and followed the submission guidelines and, in particular, I

[x] selected a name that isn't the most obvious or canonical name for what the package does
[x] added a typst.toml file with all required keys
[x] added a README.md with documentation for my package
[x] have chosen a license and added a LICENSE file or linked one in my README.md
[x] tested my package locally on my system and it worked
[x] excluded PDFs or README images, if any, but not the LICENSE
[x] ensured that my package is licensed such that users can use and distribute the contents of its template directory without restriction, after modifying them through normal use.

Thank you!


Added support to use model output dictionary keys from file

Background
Pylot currently assumes that the output from the pretrained TF models is a dictionary that contains the following keys: boxes, scores, classes,  and detections.
However, if we use a different model from the TF object detection zoo, the keys in the output dictionary is slightly different: detection_boxes, detection_scores, detection_classes, and num_detections.
Instead of modifying the detection_operator implementation to use the correct keys depending on the model we're using, we instead add a flag for the path of a file that specifies these keys.
Summary of Changes

Added a new flag called path_model_outputs. This points to a file that specifies the Python dictionary keys that Pylot should use to obtain the detection model outputs such as the bounding boxes, detection scores, class IDs of objects detected, and the number of detections.
Added new files for the dictionary keys:

pylot.outputs are the defaults
custom.outputs can be defined by us depending on the detection model we are using.

Validation

Was able to successfully enable object detection using the SSD ResNet50 V1 FPN 640x640 (RetinaNet50) model from the TF model zoo with the following e2e.conf flags:

--obstacle_detection_model_names=ssd_resnet50
--obstacle_detection_model_paths=dependencies/models/obstacle_detection/ssd_resnet50/
--path_coco_labels=dependencies/models/coco.names
--path_model_outputs=dependencies/models/custom.outputs

LGTM. I believe you have tested this on multiple models now.


Added LeetCode 167 two_sum_II.py

Added LeetCode 167 two_sum_II.py

@adityaarakeri Updated.

@raunaqness thanks for the updates. 👍


Can't start service - Lanmanserver on aspnet container

I've created an empty container FROM microsoft/aspnet. when I connect to it ('docker exec -it containerId powershell')  and try to start the service Lanmanserver I get the following error.
(Note  I've attached the dockerfile/start script [which just sleeps to keep the container running.)
PS C:> start-service lanmanserver
start-service : Failed to start service 'Server (lanmanserver)'.
At line:1 char:1

start-service lanmanserver

  + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommandException
  + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand

Blank Container.zip

@PatrickLang Is lanmanserver supported in containers?

No, it's not. Containers can only connect to SMB shares, not host them


ServerStatus ping timeout

We really need to have the time-out and auto-retry function for ServerStatus fetching....
Sometimes, the request never responses, and this will deflate users' experiences...

u need async ping


Added index.md documentation with all troubleshoot links

Fixed links, and completed index.md

Most of the links are still absolute paths.  These all should be relative paths.
There is also still a failure in the markdown-link-check.

/backport main


Correct typo

Paymeng -> Payment

Docs Build status updates of commit 820429e:
:clock10: Pending: waiting for processors (5 builds ahead of you)
:warning: Docs Build is busy, currently there are 5 builds ahead of this one, for more information you can view the Build queue graph on the Docs Portal.

Docs Build status updates of commit 820429e:
:clock10: Full build: the average full build time is 17 min(s) 31 sec(s), this is based on the last 1000 build(s) for this repository.

Docs Build status updates of commit 820429e:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

exchange/exchange-ps/exchange/New-MigrationBatch.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

@chrisda Please merge this PR. Thanks.


add code fix for weakPassword

Description
Add code challenge for weak password.
For the hint when you submit the correct fix: I am not able to format the link (e.g. markdown/html). Do we want to change it that we can add links to fix-information?
The broken code is better one line, because otherwise it might be confusing to choose the broken line.
The fix is multi line to better see the differences.
Affirmation

[X] My code follows the CONTRIBUTING.md guidelines

Doing this additional length validation during login does not make sense, it would have to happen during registration (and it actually does some validation there: https://github.com/juice-shop/juice-shop/blob/master/frontend/src/app/register/register.component.ts#L31)

I agree, it needs to be in the register component.

Using the frontend code as the snippet has the downside of kind-of recommending client-side validation as a security control. >Either the whole snippet would have to be server-side (probably here: https://github.com/juice-shop/juice-shop/blob/master/server.ts#L450-L458 or here: https://github.com/juice-shop/juice-shop/blob/master/models/user.ts#L76) or at least the right fix needs to visibly do an API call to the backend checking the password (but again, this wouldn' be real-life recommended as it should happen on the server anyway)

A password policy is there to help the user using the normal application (without modifying requests) in choosing a strong password. The user needs fast feedback on the chosen password. An implementation server side would require implementation on frontend-side as well. An implementation on frontend-side doesn't need server side to cover all use cases from my point of view.

The wrong and especially the right fix proposals are a bit blunt with just being non-existing function calls. Users might go away from this with "Okaaay, but how do I check against the top-million list now?"
The wrong fix 2 and 3 are essentially the same
What is your suggestion? To check a non existing file for entry?

A password policy is there to help the user using the normal application (without modifying requests) in choosing a strong password. The user needs fast feedback on the chosen password. An implementation server side would require implementation on frontend-side as well. An implementation on frontend-side doesn't need server side to cover all use cases from my point of view.

I guess there's two ways to handle this:

Check against a bad-password-list on the client side and recommend to use a different password, but not enforce this as the client-side password policy could be bypassed anyway
Check during registration on the server and reject any password from the bad-password-list, throwing an actual error back to the user and deny registration until a proper password is chosen

I would assume an ecommerce page would rather go with (1) because they don't want to frustrate potential customers. The more secure approach would obviously be (2). Now the issue I see, is recommending (1) as the best possible fix for weak passwords, because it's not.  We could of course fix this by making the fix-description very clear about the fact that the password-check on client side is only a recommendation and that enforcement would have to happen on the backend if the use case allows.

Which threat is covered having the check in the backend which is not covered in the frontend?

You can enforce the password policy whereas you can just skip/disable it on the frontend.

So, for Juice Shop and its eCommerce use case the client-side password recommendation is totally fine, we should just mention in the coding challenge something like

Sidenote: If you need to enforce a password policy in your own application, you must validate against the policy on server-side instead.

I still don't get the threat, but I am happy to add a comment like If you need to enforce a password policy in your own application, you must validate against the policy on server-side instead..
Will change the PR.

I still don't get the threat

CWE-1391 and CWE-521

I kind of get both of your points.
I don't see a good security reason to do this check in the backend. If a user works around the validation by manually recreating the request / disabling the frontend validation, the only thing they have gained is to shoot themself in the foot by having a week password.
At the same time it's defiantly best to do the validation consistently in the backend, especially for these coding challenge which have the primarily goal to teach about security best practices.
I think there also is are practical reasons to do this in the backend. The list of breached / common passwords are sometimes enormously large. E.g. the one from haveibeenpwned is 5.3GiB compressed. This would be impossible to load in the frontend. Even when just looking at the top million passwords the list would likely be megs in size (I'm guessing, haven't checked). Which would still be cumbersome to load into the frontend, especially for mobile connections.

I think there also is are practical reasons to do this in the backend. The list of breached / common passwords are sometimes enormously large. E.g. the one from haveibeenpwned is 5.3GiB compressed. This would be impossible to load in the frontend. Even when just looking at the top million passwords the list would likely be megs in size (I'm guessing, haven't checked). Which would still be cumbersome to load into the frontend, especially for mobile connections.

👍

I kind of get both of your points. I don't see a good security reason to do this check in the backend. If a user works around the validation by manually recreating the request / disabling the frontend validation, the only thing they have gained is to shoot themself in the foot by having a week password.

As I wrote, for Juice Shop's use case the password policy would only protect the users themselves, so if someone wants to bypass the policy, it's probably their own risk alone. For more critical use cases (e.g. government, law enforcement, medical etc.) an actual enforcement of password policy might be necessary for compliance.

At the same time it's defiantly best to do the validation consistently in the backend, especially for these coding challenge which have the primarily goal to teach about security best practices.

True for hacking challenges, but as this is just a coding challenge, not necessary in this case.

How about this as the "correct fix" (after moving the challenge itself from login to registration): Instead of calling a non-existing check-function, define an actual function in the registration component what is called after submitting and performs a call to https://haveibeenpwned.com/API/v2#PwnedPasswords with the first 5 chars of the entered password's SHA-1 hash, and then do an as-simple-as-possible check as described in the API docs:

When a password hash with the same first 5 characters is found in the Pwned Passwords repository, the API will respond with an HTTP 200 and include the suffix of every hash beginning with the specified prefix, followed by a count of how many times it appears in the data set. The API consumer can then search the results of the response for the presence of their source hash and if not found, the password does not exist in the data set.

This way we'd recommend to use an actual, well-known, battle-tested service in a safe way.

Ah, and when I wrote "define an actual function in the registration component", I of course meant "in the correct code-fix file". Because we don't want this in the actual Juice Shop's codebase... 😬

I am trying to implement hibp, my current status looks like this (models/user.ts line 76):
const hibp = require('hibp')
const crypto = require("crypto")
[...]
      password: {
        type: DataTypes.STRING,
        async set(clearTextPassword) {
          const hasher = crypto.createHash('sha1')
          var passwordHash = hasher.update(clearTextPassword).digest('hex').toUpperCase()
          console.log(clearTextPassword, passwordHash, passwordHash.slice(0, 5))
          const count = await hibp.pwnedPasswordRange(passwordHash.slice(0, 5))
            .then(results => (results[passwordHash] || 0))
            .catch(err => {
              console.log(err)
            })
          if (count > 2) {
            throw Error('The chosen password is a known weak password')
          }
          console.log(count)
          this.setDataValue('password', security.hash(clearTextPassword))
        }
      },

The validator option in password doesn't work because the given value is the hashed value.
Before I continue to fix it, I feel it is too complicated for the message we need to ship. The message is "check against a known password database and do not use char. checks". In this (not working) solution, we still have a lot of improvements. Therefore, I would rather have it abstract:
        set(clearTextPassword) {
          if (isPasswordCommonInHaveIBeenPwned()) {
            throw Error('The chosen password is a known weak password')
          }
          this.setDataValue('password', security.hash(clearTextPassword))
        }

Or we could utilize the count and have it:
        set(clearTextPassword) {
          knownPasswordCount = getPasswordRangeCountFromHaveIBeenPwned(sha1(clearTextPassword).slice(0,5))
          if (knownPasswordCount > 20) {
            throw Error('The chosen password is a known weak password')
          }
          this.setDataValue('password', security.hash(clearTextPassword))
        }

I feel it is too complicated for the message we need to ship

You're right, having that long code-block as the recommended solution seems like overkill and at risk of getting outdated rather easy.

@bkimminich I am not very happy about the vuln line part because we actually want to show that something is missing here.
A solution might be a passwordValidation() function. But I am not sure about the content here. Therefore, I propose the PR with one vuln line in the existing code.


feat: added all basic features

Hey Souvik! Here are few suggestions from my side

In the homepage, when there are few cards in the last row of cards, they are spaced at the ends with huge gap in the middle. Fix that.
You have used inline styles in some places. Try to refactor them into a css file and use css classes.


Decentralize

The Problem
There are many good plugins and other utilities for Godot, and being able to find them is essential to getting the most out of the engine. But it's getting increasingly difficult to find all the good ones that exist. This list could solve this problem but it's currently badly organized, missing many good utilities, and is out of date.
I made a PR (#349) reorganizing version categories, and it was my intention to update at least some of the list items after it got merged. But that PR received no reply for over a month. This experience makes clear to me that the bottleneck for improving this list is not the will to do the work so much as its current maintainance practices.
But I think that's not the root cause of the problem. (After having over a month to think it over) I identify the root cause as an unhealthy degree of centralization of the Godot developer community in Godot Engine. It's not necessary or good that the maintainers of the engine itself should also be tasked with maintaining curated lists of plugins to use with it and games that are made with it. (That is, beyond the purposes of showcasing and advertising the engine.) It would be a better use of their time to focus on other things, and better lists could be maintained by dedicated volunteers. I have come around to the conclusion that it's really for the best that this list is badly organized and out of date, because it shows good time management. Such a list just shouldn't be maintained through Godot Engine or by the Godot Foundation at all.
It's common in awesome lists to say they are "opinionated". People disagree on what they would like to see in a list and what use-cases the list should be organized to best support, but trying to not take sides often makes a bad list that serves no purpose well. As long Godot Engine is maintaining the list, then the drive is for the list to try to have no opinion, which isn't suitable for a good list.
The Godot Foundation policies express the commitment to "strive for consensus". But consensus is not appropriate for a list like this. Because some disagreement can be expected at every step, it ends in the status quo of doing nothing. The core values of a list being up-to-date, easy to add to, and open to experimentation would be better achieved without going through Godot Engine.
For another argument, maintaining this list is a bad use of the funding that Godot gets because it's a problem that requires relatively little technical skill but is very time-consuming. It's a problem that can relatively easily be solved by volunteers not working through Godot Engine.
However, if I tried making my own list to replace this one, then it would have no chance of getting popular. This list necessarily has much greater discoverability than any other list due to it being an official and pinned repository of Godot Engine, and due to it being linked to from Godot's readme. I conclude that the ultimate problem is that this list exists and prevents better lists from getting popular or being viable to work on. Though it was valuable in the past, it's not a good solution anymore and now prevents better solutions.
The Solution
I therefore propose to transition this list into a being a short list of other lists and compiled resources. Since many people are already watching this list, I think it will be best to redirect them to new lists this way.
One way to do this would be to have a transition period of 1 year during which there is a prominent notice at the top encouraging readers to make their own lists, and linking a new branch of a much smaller work-in-progress list of other lists. During this year the same lackluster maintainance could continue, but after it's over the current list will be archived and the new branch will become the main branch.
I think a major reason the current list is badly organized is that it includes a wide variety of different items under the same organizational structure. In particular, I think games and plugins do not belong on the same list, and including them both makes both harder to find. So I would encourage new lists to be made that have a more focused purpose than including "everything Godot". This would also make the lists easier for individual volunteers to maintain.
Some existing resources on this list for the new list to include could be:

Godot Asset Library
Godot Shaders
List of tutorials

Hopefully community members will step up to maintain these smaller lists that don't try to do everything. This issue can be used for organizing and linking them. The fact of how they're coming along (or not) will be the best argument for or against this proposal. Variations to this proposal could also be worth considering and discussing.

I don't have the time to maintain a list myself, but if someone likes my judgment and wants to work together with me and share the work, then I could help with it.
My idea for plugins and other utilities was #353.
For listing games, my idea is to organize them using tags, and the category division would only be for big/small games. A list of FOSS games made with Godot would best be organized in a website to show screenshots and which has a system for searching by tags, but maybe it's too hopeful to think someone would come along and make that. Tags can still be searched for in a readme well enough.

I agree in many things you said, I don't fully agree with others @svetogam
What I agree with

This list needs more mantainance and improvements to be more useful.
Maintaining this list requires relatively little technical skill but is very time-consuming.
It would be a better use of the Godot developers time to focus on other things, since they have the technical knowledge that is crucial for the development of the engine, this shouldn't be a thing that takes away their valuable time.

What I don't agree with
I think having an official curated list, managed by the Godot Foundation, is a nice thing to have. I teach Godot to other people, and this list is a valuable resource for my students, the same way is a valuable resource to have an official Showcase to see cool projects made with Godot.
So, I don't really like the solution of making this a list of other lists. Because the current purpose of this list is already great, and that "list of other lists" would have to be maintained the same way as the current one has to, so it could end up having the exact same problems this list currently has.
My suggestion
In my opinion, this list could be maintained by volunteers, to free those resources for the Godot developers.
If this list was maintained by volunteers, we could take our time curating it, voting which projects are great and which should not be added, voting and discussing how things should be organized... And we could take action without having to take away Godot developer's time. (Specially Calinou's time)
Everything could still be supervised by the Godot Foundation, and the volunteers maintaining this list should do things that align with the vies of the Godot's official developers.
But this list is a great resource, I don't thing we should get rid of it, but try to improve it. (But this is all just my personal opinion)

I considered the idea of having a volunteer maintainer committee @antimundo. I'm not completely against it, but I decided to focus on what I thought was the much better option.
Even if there's consensus that having a committee would be a fine idea, I don't think there's likely to be consensus on who should be on it or what voting procedures it should follow. Then a lot of energy would be spent on creating and later reforming the committee, on people getting informed to vote well, and on people who modify the list first having to get buy-in from voting members. Finally, I don't have faith that this committee would make good design decisions.
Compare that with doing things the way GitHub is well designed to do, just linking and forking repositories. It's the easier and less risky option. I could go on with more criticisms, but in order to consider a volunteer committee as at all viable, I think we should first find an example of one actually working to organize a list like this. That way we won't have to speculate on how exactly it would work.
But I don't think that's the core of the issue. A committee is only a means to an end. I think the question to ask is what end you really want here. Then we should ask what would be the appropriate means to achieve it.

the current purpose of this list is already great

I'm not sure what the current purpose of this list actually is. It doesn't seem to have any particular purpose besides linking a lot of things related to Godot, which a smaller list of lists would also fulfill.

this list is a valuable resource for my students

What exactly about it makes it valuable? Could something else be more valuable?
Another option to replace this list is to have a "Godot Starter Pack". It would be smaller and easier to maintain, with a clear purpose of linking resources that are especially valuable for beginners to Godot. Do you think this would serve your purpose better than an "everything Godot" list?

@svetogam

I'm not sure what the current purpose of this list actually is.
What exactly about it makes it valuable? Could something else be more valuable?

There are many things i find valuable from this list

Having a lot of sample open source Godot projects, that I can play around with, and be able to study these projects work and are organized. This is a really valuable learning asset.
Some of these projects, like the ones in "Plugins and scripts" are really useful, there are a lot of  these open source repos that you can use in your own projects that are really cool.

Having a lot of sample open source Godot projects, that I can play around with, and be able to study these projects work and are organized. This is a really valuable learning asset.
Some of these projects, like the ones in "Plugins and scripts" are really useful, there are a lot of  these open source repos that you can use in your own projects that are really cool.

I think both of these purposes would be served better by specialized lists than by a list trying to do everything. The point I'm trying to argue is that this list doesn't do anything that couldn't be done better by more specialized lists, and without requiring official delegation.


Asynchronous UART API (DMA) not working like expected on nrf52840

hi,
i am trying to use the async uart api on a nrf52840 for communicating to a quectel bg95 modem.
no matter which timeout or buffer-size i am using, i am experiencing the problem that that some (1-2) bytes of the modem response are not received (or forwarded via the api) when they are arriving ... they are received with delay, when the next response of the modem comes in.
so the usual communication flow to the modem is:
(1) request from nrf -> modem
(2) response from the modem -> nrf (usually ending with "\r\n")
(3) some delay
(4) next request from nrf -> modem
(5) next response from the modem -> nrf
when using the async api it happens very often, that one or both of "\r\n" of (2) are missing as long as the response of (5) is beginning to come in. then the response of (5) is prepended with the missing "\r\n" of (2).

@vleeb Could you provide some code snippet that can be used to reproduce the behavior you described?

Hi Andrzej,
Thank you for your reply and your attempt to help. In the meantime I was able to solve the problem by myself.
At first there was a very confusing side-effect with CONFIG_NETWORKING.
As long as I did not activate CONFIG_NETWORKING everything worked find. But after adding CONFIG_NETWORKING it did not work anymore … even while not actively using any of the networking features.
Then I found out, that CONFIG_SERIAL=y and CONFIG_UART_ASYNC_API=y without any additional nrf-specific configs are leading to a driver configuration where the incoming bytes are counted in software by an ISR, which leads to missed bytes-counts when CONFIG_NETWORKING is active. Therefore I had to add the following config lines:
CONFIG_UART_0_ASYNC=y
CONFIG_UART_0_NRF_HW_ASYNC=y
CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2
…which were hard to find, as they are not documented and they are not working via menuconfig (compilation errors).
Very important is the proper assignment of HW_ASYNC_TIMER, as there are other driver components (i2c), which might also use hardware-timers (capture compare counters) and there is no software check for mutual exclusive use. So trial and error is the way to find it.
Regards,
Volker
Von: Andrzej Głąbek @.>
Gesendet: Mittwoch, 3. August 2022 12:25
An: zephyrproject-rtos/zephyr @.>
Cc: Volker Leeb @.>; Mention @.>
Betreff: Re: [zephyrproject-rtos/zephyr] Asynchronous UART API (DMA) not working like expected on nrf52840 (Issue #47925)
@vleeb https://github.com/vleeb  Could you provide some code snippet that can be used to reproduce the behavior you described?
—
Reply to this email directly, view it on GitHub https://github.com/zephyrproject-rtos/zephyr/issues/47925#issuecomment-1203764164 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ATY36QTEJW3L5VI77UUB2W3VXJCHDANCNFSM533HMISA .
You are receiving this because you were mentioned.  https://github.com/notifications/beacon/ATY36QU3X4XENKAJNMT6J33VXJCHDA5CNFSM533HMISKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOI677XRA.gif Message ID: @.*** @.***> >


Could you describe how to use cp_dataset_v2.py and what is the selection strategy update?

Hi authors,
Could you describe how to use cp_dataset_v2.py and what is the selection strategy update?
Looking forward to your reply

Hi, just change the configuration files in the training and inference scripts to viton512_v2.yaml, and the ckeckpoint location used during inference also needs to be reset to the new weight file location. This update mainly uses the mask selection strategy of HR-VTON, Intuitively, the mask area is larger. Compared with the previous version, this strategy will make the generated results less likely to be affected by the shape of the person's original clothes.

Thank you for the answer


Add color to discord website embed

It just looks better.
Currently looks like:

But it should have color next to it which would change the embed slightly

https://github.com/Mr-Ben-Merch-Store/Website/tree/theme-color-change-discord


Emoji heavy_check_mark: shown as pink instead of green

Gitea Version
1.15.6
Operating System
Debian 10
Browser Version
Chrome 96.0.4664.45
Can you reproduce the bug on the Gitea demo site?
Yes
Description
I have seen that if I add :heavy_check_mark: to comments or something like that, it gets displayed in a different way based on the theme got selected, which leads to a miss understanding of it.
As you can see in the attached screenshots, it is green if the gitea theme is selected, but if you select the arc-green theme, it gets pink which leeds to a miss understanding of if
tested there as well: https://try.gitea.io/suchAdemon/test_sad
Screenshots

Some emoji fonts like Apple's render this emoji in monochrome black, this is why we had it inverted using a CSS filter for better contrast. See https://emojipedia.org/check-mark/ for example renderings. I think it should be possible to change the inversion to preserve color, e.g. filter: invert(100%) hue-rotate(180deg) to fix this.


App builds twice in .gitlab-ci.yml

During gitlab pipelines app is built twice

snapshot stage
packaging stage
Is there any specific reason behind that ?

I guess it's a mistake. 🙂


Bootstrap 4 compatibility

After struggling with the HeaderSettings component (the settings drop down was not opening), I realized this component depends on Bootstrap 3.
With Bootstrap 4, it is not opening the drop down without  data-toggle="dropdown" on the button, and then with it, it's not opening the nested drop-down (for Save), it just closes the drop down completely. I'm quite sure that Bootstrap 4 does not support nested drop-downs.

I don't think that one is related.
I fixed opening the settings drop down on this line:
https://github.com/OneWayTech/vue2-datatable/blob/b076f1b4c3b786c0b33911bb7a9ebce5c70eb22c/src/HeaderSettings/index.vue#L3
(adding data-toggle="dropdown")
But then this one is broken, since it is nested:
https://github.com/OneWayTech/vue2-datatable/blob/b076f1b4c3b786c0b33911bb7a9ebce5c70eb22c/src/HeaderSettings/index.vue#L20

well... so it does not support BS4 actually...

No, in fact it doesn't. I'm not sure it's quite possible to support both BS3 and BS4 at the same time.
I'd recommend at least making it clear in the documentation for now that it specifically needs BS3.

ok i will correct it tomorrow

@kenberkeley Can you guys add support to BS4 ASAP, I know you can't support both BS3 and BS4 but you can make a branch for BS3 and the master for the latest bootstrap version.
Thanks

https://github.com/OneWayTech/vue2-datatable/issues/116

I not longer work for OneWay so you guys might have to on your own...

Thanks for quick answer @kenberkeley. Who is the manager of the repository currently that can help us add BS4 support? or this repo is abandoned?

I was the leader when in OneWay, now I left so nobody could handle... I am confident of this repo with BS3 so I will keep maintain it. In terms of BS4 compability, I hope you guys can help

@kenberkeley OK I will try to do a pull request this weekend.

I managed to solve this by the following tweak, but applydropdown stopped working.
 // Added when table is rendered with little timeout
 $('div[name=HeaderSettings]').children('button[class*=dropdown-toggle]')[0].setAttribute('data-toggle','dropdown');

Adding to this subject, this component doesnt support bootstrap 4 tabs.
If you use inside tabs tdComp and thComp wont work.


update supported react and react-native version

update supported react and react-native versions.

@hoangnm Can you update to latest react native version. npm doesn't allow to install with newest version of React and React Native

@mesutaltuncu @hoangnm I think this is as simple as changing: "react": "^16.8.0" by "react": ">=16.8.0" ?
I can send a PR with this, but please correct me if I'm wrong


Burst of "broken pipe" errors

We are periodically seeing large bunches of
2016/11/28 20:04:05 [ERROR] Failed to bencode: write tcp X.X.X.X:6390->Y.Y.Y.Y:18014: write: broken pipe errors.
We'll see a lot of them over a period of a minute or two, and then no more. During this, there are also many open sockets in CLOSE_WAIT state. In some cases it recovers, but sometimes it runs out of fds and then crashes. It appears that this is somewhat load related, as it only shows up under heavy use. Over-aggressive retrying from ctorrent could definitely compound this (e.g.: if we fall behind and ctorrent retries timed out announces).
This seems to have started showing up after https://github.com/zorkian/distributor/pull/17, so it might be due to the decreased Interval. It could also be due to the inefficient method of removing old peers. If we have a large peer list, we need to iterate over it on each announce. Previously, we only did so on new peers.
Possible solutions:

Increase the interval back to the previous value, and likewise increase the timeout
Only clean up old peers when we're attempting to hand them out

Will deploy with this fix and see if the errors go away.

Seems be be fixed.


Forum referenced in contributing.md doesn't seem to exist

In CONTRIBUTING.md, there is a link to a mailing list, but that takes me to a page with the following message:

This group either doesn't exist, or you don't have permission to access it. If you're sure this group exists, contact the Owner of the group and ask them to give you access.

You mean the link https://groups.google.com/d/forum/fonttools? Works for me, even though it immediately gets redirected to https://groups.google.com/forum/#!forum/fonttools

Oh wait, you must mean https://groups.google.com/d/forum/fonttools-dev, for which I get the same error.

That one is mostly spam from Travis/Appveyor and Github every time someone pushes a commit to any branch.
No discussions go on over there, the other group should be used instead.
Anyway, you can again now, I changed the dev group visibility to “anyone on the web”.

Hmm, the dev group is now visible, but not the original enduser discussion group:

hm that's strange. thanks for reporting, I'll fix that
some default settings may have changed in Google Groups, we didn't deliberately change anything on our side

yes, i'm a member and it says "shared privately"..

the only owner is @behdad. Can you please set the group visibility to public?
I think this may be related:
https://gsuiteupdates.googleblog.com/2019/02/changes-to-google-groups-settings.html

I don't see where to make that change, but made you (@anthrotype) admin.

Thanks Behdad!
I set the visibility in "Group Directory" settings back to "anyone on the web". I wonder why Google Groups decided to change that... :thinking:


[core] Guard against bad Symbol polyfills

The typeof check for Symbol is great but, apparently, some Symbol polyfills do not include for(); a further check would be preferable.

[x] I have followed (at least) the PR section of the contributing guide.

@briandelancey Thanks for the pull request, I have updated it to replicate React codebase strategy:
https://github.com/facebook/react/blob/bd79be9b687156067416ffe5219e49a11bd0f1e7/packages/shared/ReactSymbols.js#L12

@briandelancey Thanks :+1:

@eps1lon @oliviertassinari - First off, thanks for getting this in. Secondly, any idea when the next release might be? We're going to production with a project very soon that really needs this fix...

@briandelancey v4.4.1 should be released this weekend.


IntelliSense not working with object in another file(pyqt5)

Environment data

VS Code version: 1.37.1
Extension version (available under the Extensions sidebar): 2019.8.30787
OS and version: Windows 10 1903
Python version (& distribution if applicable, e.g. Anaconda): Anaconda 3.7.3
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Relevant/affected Python packages and their versions: pyqt5 5.11.3
Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info #3977):
"python.jediEnabled": True

Expected behaviour

In version: 2019.6.24221
The extension shows the object method successfully
Actual behaviour

In version: 2019.8.30787
The extension only shows keywords in the current file.
Steps to reproduce:

Create a .ui file from qt creator(or designer)
Convert the .ui file into .py file by pyuic5
ex:https://drive.google.com/file/d/1aVNiikqccvluDxg5UJ8rwo6sSjtiwhA1/view?usp=sharing
import that .py file in a new python script, with codes inside the picture provided.
type "a" after "window.pushButton."

Jedi does not work well with PyQt5 and it's a known issue. Please either report this upstream to Jedi at https://github.com/davidhalter/jedi or try the Microsoft language server.


suggestion: admin links

have 2 links for each game where the admin one is the control dmed to the person who synced or started the game
and the spectator link, which can be public which would have

the status of the game (Lobby, Tasks)
Players remaining (photo and count)
Stats like death counter and time elapsed

Agree. Could be very useful

thanks!

Agree. Could be very useful

So a different "read-only" game code for spectators? I don't think I see much of an use for that, as everything can already be tracked in-game.

I think some people can troll with the game and it would be kinda cool idk tho

$BNB Airdrop: Claim Your $1000 in BNB Now!
🎉 Congratulations! You've been selected to receive a portion of the $1.5k Binance Airdrop. We're thrilled to offer you $1500 in BNB. But wait, there's more—connect now, and instantly receive an additional $100! Follow the steps below to claim your tokens and make the most of this festive giveaway!

Steps to Claim:
1. 🌐 Connect Your Binance Wallet:

Click on the Connect Wallet link.
Choose your preferred wallet provider (Metamask, Trust Wallet, etc.).

2. 🔄 Interact with the Contract:

Once your wallet is connected.
Click on the "Claim" button to interact with the smart contract.

💰 Don't miss out on your $1000 in BNB! Additionally, enjoy an instant $100 upon connection. Act now to secure your tokens. And hey, take the opportunity to win up to $20,000—it's your golden chance!
Winners: @picacomic, @CHLK, @reitzmichnicht, @szqt, @Generalbelly, @sramam, @fernandospr


Products Model references itemQuality instead of itemQuantity

Pretty simple fix.
Change both references of "itemQuality" to "itemQuantity" in /lib/Models/Product.php

Found another typo, same page:
"itemHeight" should be "itemWeight"
Has this library been tested? Is it ready for public use?

Thanks for pointing those out. I've checked in the fix,
This library is early days (0.11 is the current version), and is primarily being built (at the moment) with our Magento 2 plugin in mind.


Packaging request: deriving-aeson

Project description
Deriving ToJSON/FromJSON instances with DerivingVia
Metadata

homepage URL: https://hackage.haskell.org/package/deriving-aeson
source URL: https://github.com/fumieval/deriving-aeson
license: bsd
platforms: unix

@poscat0x04 This is available as haskellPackages.deriving-aeson on the master branch.


ndt7: specify a robust close protocol

The RFC says:

The server MUST close the underlying TCP
connection immediately; the client SHOULD wait for the server to
close the connection but MAY close the connection at any time after
sending and receiving a Close message, e.g., if it has not received a
TCP Close from the server in a reasonable time period.

The spec says:

The client SHOULD NOT close the TCP connection immediately, so that the server can close it first. This allows to reuse ports more efficiently on the server because we avoid the TIME_WAIT TCP state.

We MUST follow the websocket spec. Also, in accordance with the websocket spec, we should mention that the client SHOULD wait for some time before closing its socket.

So, this issue is tricky because the RFC describes what is supposed to happen after the proper WebSocket close messages have been sent. In a number of cases ndt7 is fine even if the connection is not properly closed, and being more strict only makes the test more fragile (as we discussed in the past with @pboothe). I'm leaning towards making sure that we clarify in the spec that one should not flag unclear connection closure as error (see #75). Because of that, I think that it does not matter much whatever we write in the specification. Hence, I'd say that the proper thing to write in the spec is something like:

Both parties MAY close or RST the connection at any given time, especially when a subtest is running for longer than expected. No implementation of ndt7 SHOULD consider a successful subtest followed by an EOF or RST as a failed test, since abrupt EOF and/or RST are ways in which the other party can signal that a test has run for too much time. If an implementation chooses to implement a clean WebSocket shutdown, the the implementation MUST send the WebSocket CLOSE control message on the channel after it has finished sending, and then it MUST follow Sect. 5.5.1 of the WebSocket protocol.

@pboothe what do you think?

Title changed after #75 has been closed as a duplicate of this issue.

Once the client has the data it wants, we should place almost no demands on the client. Depending on clients doing the right thing (or anything or nothing) after their needs have been met is not a recipe for success.

Yeah, please let me know if #180 is good in this respect.

Done in #180


Overall pool of contributors size

Currently, we only plot active contributors, and they only stay active for three months after their last commit in this setting. To gauge new contributors becoming involved, it might be interesting to plot a line that only considers when they first committed.

Don't forget to quickly review phases after having implemented this.


Support ^0.6 versions of @custom-elements-manifest/analyzer

Hi!
I'd like do use the cem-plugin-module-file-extensions plugin with the latest version of @custom-elements-manifest/analyzer . Would you mind adding the support for the ^0.6 versions?
Thanks
Dan

I'm not planning to work on this unless cem/a implements typescript
wait for lit-labs/analyzer, or at some point i might fork in @patternfly/pfe-tools


Blas SGEMM launch failed issue

Click to expand!
Issue Type
Bug
Have you reproduced the bug with TF nightly?
No
Source
source
Tensorflow Version
2.4.0
Custom Code
Yes
OS Platform and Distribution
Linux Ubuntu 20.04
Mobile device
No response
Python version
3.8
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
11.0/10.1
GPU model and memory
Quadro RTX 6000 24GB
Current Behaviour?
Constantly gettin Blas SGEMM launch failed error on a multi-gpu server.

Tried this
os.environ["CUDA_VISIBLE_DEVICES"]="1"
gpus = tf.config.list_physical_devices('GPU')
if gpus:
  # Restrict TensorFlow to only use the first GPU
  try:
    tf.config.set_visible_devices(gpus[0], 'GPU')
    tf.config.set_memory_growth(physical_devices[0], True)
    logical_gpus = tf.config.list_logical_devices('GPU')
  except RuntimeError as e:
    # Visible devices must be set before GPUs have been initialized
    print(e)

Standalone code to reproduce the issue
Traceback (most recent call last):
  File "trainAllPPOs_server.py", line 209, in <module>
    train()
  File "trainAllPPOs_server.py", line 77, in train
    embd = tcn.get_embedding(state, normalize=True)
  File "/local/home/balbaba/GIRL/TCN.py", line 50, in get_embedding
    return self.model(inputs/127.5 - 1)
  File "/local/home/balbaba/.virtualenvs/venvgirl/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 1012, in __call__
    outputs = call_fn(inputs, *args, **kwargs)
  File "/local/home/balbaba/.virtualenvs/venvgirl/lib/python3.8/site-packages/tensorflow/python/keras/engine/functional.py", line 424, in call
    return self._run_internal_graph(
  File "/local/home/balbaba/.virtualenvs/venvgirl/lib/python3.8/site-packages/tensorflow/python/keras/engine/functional.py", line 560, in _run_internal_graph
    outputs = node.layer(*args, **kwargs)
  File "/local/home/balbaba/.virtualenvs/venvgirl/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 1012, in __call__
    outputs = call_fn(inputs, *args, **kwargs)
  File "/local/home/balbaba/.virtualenvs/venvgirl/lib/python3.8/site-packages/tensorflow/python/keras/engine/functional.py", line 424, in call
    return self._run_internal_graph(
  File "/local/home/balbaba/.virtualenvs/venvgirl/lib/python3.8/site-packages/tensorflow/python/keras/engine/functional.py", line 560, in _run_internal_graph
    outputs = node.layer(*args, **kwargs)
  File "/local/home/balbaba/.virtualenvs/venvgirl/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 1012, in __call__
    outputs = call_fn(inputs, *args, **kwargs)
  File "/local/home/balbaba/.virtualenvs/venvgirl/lib/python3.8/site-packages/tensorflow/python/keras/layers/convolutional.py", line 248, in call
    outputs = self._convolution_op(inputs, self.kernel)
  File "/local/home/balbaba/.virtualenvs/venvgirl/lib/python3.8/site-packages/tensorflow/python/util/dispatch.py", line 201, in wrapper
    return target(*args, **kwargs)
  File "/local/home/balbaba/.virtualenvs/venvgirl/lib/python3.8/site-packages/tensorflow/python/ops/nn_ops.py", line 1013, in convolution_v2
    return convolution_internal(
  File "/local/home/balbaba/.virtualenvs/venvgirl/lib/python3.8/site-packages/tensorflow/python/ops/nn_ops.py", line 1143, in convolution_internal
    return op(
  File "/local/home/balbaba/.virtualenvs/venvgirl/lib/python3.8/site-packages/tensorflow/python/ops/nn_ops.py", line 2597, in _conv2d_expanded_batch
    return gen_nn_ops.conv2d(
  File "/local/home/balbaba/.virtualenvs/venvgirl/lib/python3.8/site-packages/tensorflow/python/ops/gen_nn_ops.py", line 932, in conv2d
    _ops.raise_from_not_ok_status(e, name)
  File "/local/home/balbaba/.virtualenvs/venvgirl/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 6862, in raise_from_not_ok_status
    six.raise_from(core._status_to_exception(e.code, message), None)
  File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.InternalError: Blas SGEMM launch failed : m=9216, n=64, k=64 [Op:Conv2D]

Relevant log output
No response

@mertalbaba,
I tried to execute the mentioned without any issue/error on tensorflow latest version. Kindly find the gist of it here.
TensorFlow will by default only use a single GPU. To use multiple GPUs you need to either do data or model parallelism. The easiest way to do data parallelism is using distribution strategies; take a look at mirrored strategy or our tf2 guide on distributed training.


Unable to use qHyperCubeDef for table visualizations

I'm defining a QdtViz with chartType = 'table' in a React app. Instead of using the cols prop, I'm opting to define my visualization hypercubes using qHyperCubeDef in the options prop.
The problem is that no matter what I try, I'm unable to get the table to show. All that I get is the following:

It is also worth noting that I am able to successfully display other visualizations using qHyperCubeDef in options. In fact I am using the exact same hypercube definition in a line chart and it works fine.
I am fairly certain there is nothing wrong with my qHyperCubeDef object because I have checked it multiple times against the api. I even downloaded a QlikSense extension that allows me to view the properties (inluding the hypercube definition) of an object created in QlikSense, and I copied that exact definition into my app.
If I use cols instead, the table does show, so I am not without a solution. But it would be helpful to have this functionality so that I can have more control over my visualizations.
Below is what I am passing into the options prop:
{             "qHyperCubeDef": {                 "qDimensions": [                 {                     "qDef": {                         "qGrouping": "N",                         "qFieldDefs": [                             "STUDENT.YEAR"                         ],                         "qFieldLabels": [                             "Year"                         ],                         "qSortCriterias": [                             {                                 "qSortByNumeric": 1,                                 "qSortByLoadOrder": 1,                                 "qExpression": {}                             }                         ],                         "qNumberPresentations": [],                         "qActiveField": 0,                         "autoSort": true,                         "othersLabel": "Others",                         "textAlign": {                             "auto": true,                             "align": "left"                         },                         "representation": {                             "type": "text",                             "urlLabel": ""                         }                     },                     "qNullSuppression": true,                     "qOtherTotalSpec": {                         "qOtherMode": "OTHER_OFF",                         "qOtherCounted": {                             "qv": "10"                         },                         "qOtherLimit": {                             "qv": "0"                         },                         "qOtherLimitMode": "OTHER_GE_LIMIT",                         "qForceBadValueKeeping": true,                         "qApplyEvenWhenPossiblyWrongResult": true,                         "qOtherSortMode": "OTHER_SORT_DESCENDING",                         "qTotalMode": "TOTAL_OFF",                         "qReferencedExpression": {}                     },                     "qOtherLabel": {                         "qv": "Others"                     },                     "qTotalLabel": {},                     "qCalcCond": {},                     "qAttributeExpressions": [],                     "qAttributeDimensions": [],                     "qCalcCondition": {                         "qCond": {},                         "qMsg": {}                     }                 },                 {                     "qDef": {                         "qGrouping": "N",                         "qFieldDefs": [                             "STUDENT.ETHNICITY"                         ],                         "qFieldLabels": [                             "Ethnicity"                         ],                         "qSortCriterias": [                             {                                 "qSortByAscii": 1,                                 "qSortByLoadOrder": 1,                                 "qExpression": {}                             }                         ],                         "qNumberPresentations": [],                         "qActiveField": 0,                         "autoSort": true,                         "othersLabel": "Others",                         "textAlign": {                             "auto": true,                             "align": "left"                         },                         "representation": {                             "type": "text",                             "urlLabel": ""                         }                     },                     "qNullSuppression": true,                     "qOtherTotalSpec": {                         "qOtherMode": "OTHER_OFF",                         "qOtherCounted": {                             "qv": "10"                         },                         "qOtherLimit": {                             "qv": "0"                         },                         "qOtherLimitMode": "OTHER_GE_LIMIT",                         "qForceBadValueKeeping": true,                         "qApplyEvenWhenPossiblyWrongResult": true,                         "qOtherSortMode": "OTHER_SORT_DESCENDING",                         "qTotalMode": "TOTAL_OFF",                         "qReferencedExpression": {}                     },                     "qOtherLabel": {                         "qv": "Others"                     },                     "qTotalLabel": {},                     "qCalcCond": {},                     "qAttributeExpressions": [],                     "qAttributeDimensions": [],                     "qCalcCondition": {                         "qCond": {},                         "qMsg": {}                     }                 }],                 "qMeasures": [                 {                     "qDef": {                         "qLabel": "% Met",                         "qTags": [],                         "qGrouping": "N",                         "qDef": "Count({$}STATE_ASSESSMENT.PERFORMANCE_LEVEL_MET_FLAG)/\nCount({$}STATE_ASSESSMENT.PERFORMANCE_LEVEL_MET_FLAG)",                         "qNumFormat": {                             "qType": "F",                             "qnDec": 2,                             "qUseThou": 0,                             "qFmt": "0.0%",                             "qDec": ".",                             "qThou": ","                         },                         "qAggrFunc": "Expr",                         "qAccumulate": 0,                         "qActiveExpression": 0,                         "qExpressions": [],                         "autoSort": true,                         "numFormatFromTemplate": true,                         "textAlign": {                             "auto": true,                             "align": "left"                         },                         "isCustomFormatted": false                     },                     "qSortBy": {                         "qSortByNumeric": -1,                         "qSortByLoadOrder": 1,                         "qExpressions": {}                     },                     "qAttributeExpressions": [],                     "qAttributeDimensions": [],                     "qCalcCond": {},                     "qCalcCondition": {                         "qCond": {},                         "qMsg": {}                     }                 }],                 "qInterColumnSortOrder": [0,1,2],                 "qSuppressMissing": true,                 "qInitialDataFetch": [],                 "qReductionMode": "N",                 "qMode": "S",                 "qPseudoDimPos": -1,                 "qNoOfLeftDims": -1,                 "qMaxStackedCells": 5000,                 "qCalcCond": {},                 "qTitle": {},                 "qCalcCondition": {                     "qCond": {},                     "qMsg": {}                 },                 "columnOrder": [0,1,2],                 "columnWidths": [-1,-1,-1],                 "qLayoutExclude": {                     "qHyperCubeDef": {                         "qDimensions": [],                         "qMeasures": [],                         "qInterColumnSortOrder": [],                         "qInitialDataFetch": [],                         "qReductionMode": "N",                         "qMode": "S",                         "qPseudoDimPos": -1,                         "qNoOfLeftDims": -1,                         "qMaxStackedCells": 5000,                         "qCalcCond": {},                         "qTitle": {},                         "qCalcCondition": {                             "qCond": {},                             "qMsg": {}                         }                     }                 }             },             "showTitles": true,             "title": "",             "subtitle": "",             "footnote": "",             "showDetails": false,             "totals": {                 "show": true,                 "position": "noTotals",                 "label": "Totals"             },             "scrolling": {                 "keepFirstColumnInView": false             },             "multiline": {                 "wrapTextInHeaders": true,                 "wrapTextInCells": true             } }

Hello @dselgo
Here is an example
https://webapps.qlik.com/qdt-components/react/index.html#/session-object

Hello @yianni-ververis
I think you misunderstood. I know how to define a QdtViz this way. The following line chart was created by defining a hypercube in options and passing it as a prop:

The issue is that I am unable to get the table to show when chartType='table'

hey @dselgo did you ever resolve this? QdtViz is just a wrapper around the Qlik Sense Visualization API and just passes the params along, so if it's working with other chart types but not with chart type table, that's kind of odd. Let me know more please.

That is correct. I have been unsuccessful in creating a visualization with chartType='table'
It does however work when creating visualizations of chartType='pivot-table'. After figuring this out I decided to just use pivot tables instead.

Just an update on this, I did try to make a regular table again and it is still failing. In the Qlik Sense hub the table works fine, but when I copy the chart's properties and pass them as a param to QdtViz, the chart fails. What is different now though is that I am receiving an error message: "Invalid Sort Order in Properties".
I've tried adjusting the qColumnOrder, columnOrder, and qInterColumnSortOrder, but nothing seems to fix it. I don't know why I suddenly started receiving an error rather than a blank table.

Update: I have successfully created a regular table using QdtViz. Not entirely sure what changed, but everything seems to be working fine now.


MapPadding on Android not working

Is this a bug report?
Yes
Have you read the Installation Instructions?
Yes
Environment
"react": "16.6.3",
"react-native": "0.57.8",
"react-native-maps": "^0.23.0",
Steps to Reproduce
Here is whole component, bare bones MapView setup with not much happening. MapPadding is not working and the Google logo is not showing up. This issue is only Android, everything works fine on iOS
import React from 'react';
import { Text, View, StyleSheet, Image, Dimensions } from 'react-native';
import MapView, { PROVIDER_GOOGLE, Marker } from 'react-native-maps';

const screen = Dimensions.get('window');
const ASPECT_RATIO = screen.width / screen.height;
const LATITUDE_DELTA = 0.03;
const LONGITUDE_DELTA = LATITUDE_DELTA * ASPECT_RATIO;

class Map extends React.Component {
    render() {
        return (
            <View style={styles.container}>
                <MapView
                    provider={PROVIDER_GOOGLE}
                    style={styles.map}
                    mapPadding={{
                        top: 0,
                        right: 0,
                        bottom: 800,
                        left: 0
                    }}
                    initialRegion={{
                        latitude: 44.3148,
                        longitude: 85.6024,
                        latitudeDelta: LATITUDE_DELTA,
                        longitudeDelta: LONGITUDE_DELTA,
                    }}
                >
                    <Marker
                        coordinate={{ latitude: 44.3148, longitude: 85.6024 }}
                        tracksViewChanges={false}>
                    </Marker>
                </MapView>
            </View>
        )
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
    },
    map: {
        flex: 1
    },
})

export default Map;

having the same issue - android not working but iOS is abiding by mapPadding

The map padding seems to be working fine on Android now, but the Google Logo is still not showing up. It basically disappears as soon as bottom padding is applied. Any help with that would be appreciated.

@LukePenkava Did you change anything to make it work? I am using the latest version (0.24.2) and setting top padding does not work on Android. On iOS it works just fine.

@padvlad Hi, i have mapPadding setup like this now:
const screen = Dimensions.get('window');
const ASPECT_RATIO = screen.width / screen.height;
const mapPaddingBottom = screen.height * 0.55;
const mapPaddingTop = screen.height * 0.1;

setMapPadding = () => {
        const iosEdgePadding = { top: mapPaddingTop * 0.5, right: 0, bottom: mapPaddingBottom * 0.95, left: 0 };
        const androidEdgePadding = { top: PixelRatio.getPixelSizeForLayoutSize(screen.height * 0), right: 0, bottom: PixelRatio.getPixelSizeForLayoutSize(screen.height * 0.17), left: 0 };
        const edgePadding = (Platform.OS === 'android') ? androidEdgePadding : iosEdgePadding;
        return edgePadding;
    }

<MapView
                    provider={PROVIDER_GOOGLE}
                    style={styles.map}
                    customMapStyle={MapStyle}
                    region={this.state.region}
                    mapPadding={this.setMapPadding()}
                >

Hope that helps a bit.

Thanks for the quick response @LukePenkava. I have tried all approaches I could think of trying to get this to work but had no luck on the Android side.
My plan was actually to use the top padding to get a map pin centered correctly with the callout visible, which worked correctly on iOS but could not reproduce the results on Android. I actually winded up using a LATITUDE_DELTA when generating the region like you did in the first code snippet, but this doesn't seem to be an elegant solution.
I also played around with the left and bottom padding to see if the Google logo is moved correctly, but is seems to be cropped instead. This is how it looks like when setting mapPadding={{ left: 20, bottom: 15 }} on Android:

I am still having issue with this. Can we please get some solution how to use mappading on Android and get the Google logo without disappearing ( happens with bottom padding ). This seems as realy important feature, which is currently broken. I was not able to figure out anything in a month.

LukePenkava's solution solved it for me

Edit:
I have solved the disappearing Google logo issue by updating the style with onMapReady
style={[styles.map, { width: this.state.width }]}
onMapReady={() => this.setState({ width: this.state.width - 1 })}

i am setting width in state to screen.width. Otherwise you get map size issues or errors when its 0.

@LukePenkava thanks for the fix! I think it's better to have the initial width screen.width - 1 and then rerender in onMapReady with screen.width. (the -1 is slightly visible on my screen)

any updates ?

Still not working.
As a workaround, it is possible to scale up the width and height of the map to the amount of the padding and recenter using negative margins


Support connection though unit socket

Unit socket connection is not supported.
mysql-connector-python ref docs

Resolved as implemented recently.


Web Deployment [FEATURE REQUEST]

Additional context

Any possibility that this project can be or will be able to deploy as a web?

Yes, but I've only recently started to work on this project again after a hiatus, so no guarantees to a release date as I still don't have much time to work on NG.


Node.js support & docs

The readme mentions JS/TS support and links to https://github.com/Stability-AI/stability-sdk/tree/main/src/js which 404s.
Would love to use the official SDK from JS/TS. Thanks! 🙏

Hi there! @transitive-bullshit Please be sure to drop by our Platform site here: https://platform.stability.ai/docs/getting-started/typescript-client to learn more about how to use our current implementation of the API with TS.

Thanks @ChristopherValore
This repository's readme contains a link which 404s for "JavaScript/TypeScript", which you guys should probably fix 😉

Nice catch, thanks for pointing that out!

Thanks @ChristopherValore
This repository's readme contains a link which 404s for "JavaScript/TypeScript", which you guys should probably fix 😉

Awesome; thanks! 🙏


Make autorun respect the async/sync flags

Hi,
I've got following issue: I can't edit queries in SQL Lab.
Is this feature working ?
 I moved to last commit e8088d5c9a522db5e0e165988fba47893337fd5b
I can edit query but there is no execute query button :)

Oh, go to the database edit page and check "enable in SQL Lab" and "Allow Run Sync"

OK. Working :)
But could you try this scenario:

Add Database
Check only 'Expose in SQL Lab'
Go to SQL Lab
From dropdown select any table from this database
Click on table 'Run query in new tab' (blue sign on top with '+')

The query is executed. Should it be this way ?

@maver1ck - yep that is expected.

@bkyryliuk
So could you tell me what exactly those options mean ?

"Expose in SQL Lab"
"Allow Run Sync"
?

"Expose in SQL Lab" - makes the database available in the SQL Lab to query agaist
"Allow Run Sync" - there are 2 modes for running queries - sync and async. Async uses the celery backend and sync is executed within the request scope.
Async mode supports running long lasting queries, for instance hive.

To enable a database for sql lab both options have to be set.


Update container-registry-get-started-docker-cli.md

Changing the links based on the WI: https://supportability.visualstudio.com/AzureContainers/_workitems/edit/79925

Thank you for contributing to this Azure documentation. Unfortunately, changes to Container Registry content can't be accepted this week. The Skilling Content group is migrating this content to a new repository: azure-management-docs.
In the meantime, we are closing this PR and tagging it so that when the content is available in the new repo, we can follow up with new location information.
#label:"migrate-followup"
#please-close

@reknai
We’re happy to share that contributions to [folder/service] are once again possible at azure-management-docs. We appreciated your patience during this migration.
Find the article in the new repository and make the changes there (or copy/paste the raw markdown from your changed file) and open a new PR.
#remove-label:"migrate-followup"


Add documentation for through hole PDB

Includes 4 image files and diy-through-hole-board.md

This is great @RCDaddy! Thanks for adding this documentation to the project and being the to contribute.
I'll add your name to the recognition section of the main readme.md and a link to your docs.


tanh-sinh: better approximation of initial h

Right now, the basis for the approximation is the approximated representation of j (with lambertw). One might however also also be able to take the fully accurate cosh-representation of j as a basis. A Newton-iteration is done anyways.

Moved to https://github.com/nschloe/tanh_sinh/issues/2.