fix WindowsCryptProvider fixes #432

This fixes the problem by not creating a persistent key container to store private keys at all.
Microsoft documentation says this:

Therefore, applications must not use the default key container to store private keys. Instead, either prevent key storage by passing the CRYPT_VERIFYCONTEXT flag in the dwFlags parameter, or use an application-specific container that is unlikely to be used by another application.

and

For performance reasons, we recommend that you set the pszContainer parameter to NULL and the dwFlags parameter to CRYPT_VERIFYCONTEXT in all situations where you do not require a persisted key.

Thanks, this seems good. I wonder why we did it the old way. Maybe this wasn't around? Maybe we just didn't know better? I'll merge this when I am next working on qpdf and can make a ChangeLog entry for it. I see CI passed, so I'm inclined to accept it as is. Hopefully this will be the end for real of this annoying issue.

I'm rebuilding this based on current master. If all is well, I will merge.


Crash when resizing terminal

I had rtv open in gnome-terminal and hit maximize. rtv then crashed with the following:
rtv version: rtv 1.26.0
rtv module path: /usr/lib/python3.7/site-packages/rtv/__main__.py
python version: 3.7.3 (default, Mar 26 2019, 21:43:19)  [GCC 8.2.1 20181127]
python executable: /usr/bin/python
praw version: packaged, commit 1656ec224e57
locale, encoding: en_US.UTF-8, UTF-8
Environment Variables
  BROWSER         :
  DISPLAY         : :0
  EDITOR          :
  LANG            : en_US.UTF-8
  PAGER           :
  RTV_BROWSER     :
  RTV_EDITOR      :
  RTV_PAGER       :
  RTV_URLVIEWER   :
  TERM            : xterm-256color
  VISUAL          :
  XDG_CONFIG_HOME :
  XDG_DATA_HOME   :

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/rtv/__main__.py", line 255, in main
    page = page.loop()
  File "/usr/lib/python3.7/site-packages/rtv/page.py", line 92, in loop
    self.draw()
  File "/usr/lib/python3.7/site-packages/rtv/page.py", line 663, in draw
    self._draw_content()
  File "/usr/lib/python3.7/site-packages/rtv/page.py", line 805, in _draw_content
    subwindow = window.derwin(subwin_n_rows, subwin_n_cols, start, data['h_offset'])
_curses.error: curses function returned NULL

rtv has crashed. Please report this traceback at:
https://github.com/michael-lazar/rtv/issues

Environment is Arch Linux and Gnome Terminal 3.32.1-1.

Thanks for the bug report. Is this reproducible or was it a random one-time error?

I can reproduce it when rtv is started and the terminal starts windowed and is then maximized. Starting rtv with the terminal maximized, I can go back and forth with no issue.

I have the same problem in Gnome Terminal <IP_ADDRESS> on Arch Linux
rtv version: rtv 1.27.0
rtv module path: /usr/lib/python3.8/site-packages/rtv/__main__.py
python version: 3.8.2 (default, Feb 26 2020, 22:21:03)  [GCC 9.2.1 20200130]
python executable: /usr/bin/python
praw version: packaged, commit 1656ec224e57
locale, encoding: en_GB.UTF-8, UTF-8
Environment Variables
  BROWSER         :
  DISPLAY         : :0
  EDITOR          : vim
  LANG            : en_GB.UTF-8
  PAGER           : less
  RTV_BROWSER     :
  RTV_EDITOR      :
  RTV_PAGER       :
  RTV_URLVIEWER   :
  TERM            : xterm-256color
  VISUAL          :
  XDG_CONFIG_HOME :
  XDG_DATA_HOME   :

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/rtv/__main__.py", line 255, in main
    page = page.loop()
  File "/usr/lib/python3.8/site-packages/rtv/page.py", line 92, in loop
    self.draw()
  File "/usr/lib/python3.8/site-packages/rtv/page.py", line 663, in draw
    self._draw_content()
  File "/usr/lib/python3.8/site-packages/rtv/page.py", line 805, in _draw_content
    subwindow = window.derwin(subwin_n_rows, subwin_n_cols, start, data['h_offset'])
_curses.error: curses function returned NULL


feat: added asset details dialog to market select (1226)

Related issues 🔗
Closes #1226
Description ℹ
Added asset details dialog to market select making "Asset" column now clickable.
Demo 📺

Technical 👨🔧

added onCloseAutoFocus to dialog in order to make sure that focus goes back to the dialog's trigger
added a handler for popover's onInteractOutside which's responsible for not closing itself when a dialog open from within

@asiaznik I've dug a bit deeper into the code and I have a few thoughts.

I don't think the focus handling is worth the extra complexity right now and I'd prefer to just let the market popover close when you open the dialog, if the popover must remain open lets use react state to handle it rather than passing elements and symbols around. You might want to combine the asset dialog store into the global store.
Secondly (and apologies this is less to do with this PR and more with the dialog as a whole), right now all assets are fetched as soon as the page loads, we then find the selected asset by symbol. IMO we can simplify this and prevent some over-fetching by passing the asset id to the dialog and using a slightly different query to only fetch that asset, and we should do this only once the dialog content is rendered.

This query should suffice
query Asset($assetId: ID!) {
  asset(assetId: $assetId) {
     ... asset fields
  }
}


ERROR  Invariant Violation: [4603,"RCTView",11,{"position":"absolute","left":236.65289256198346,"top":"<>"}] is not usable as a native method argument

ERROR  Invariant Violation: [4603,"RCTView",11,{"position":"absolute","left":236.65289256198346,"top":"<>"}] is not usable as a native method argument  This error is located at:     in RCTView (created by View)     in View (created by BarAndLineChartsWrapper)     in RCTView (created by View)     in View (created by BarAndLineChartsWrapper)     in AndroidHorizontalScrollContentView (created by ScrollView)     in AndroidHorizontalScrollView (created by ScrollView)     in ScrollView (created by ScrollView)     in ScrollView (created by BarAndLineChartsWrapper)     in RCTView (created by View)     in View (created by BarAndLineChartsWrapper)     in BarAndLineChartsWrapper (created by LineChart)     in LineChart (created by MachineAvailability)     in RCTView (created by View)     in View (created by MachineAvailability)     in MachineAvailability (created by SiteOverview)     in RCTView (created by View)     in View (created by SiteOverview)     in RCTView (created by View)     in View (created by ScrollView)     in RCTScrollView (created by ScrollView)     in ScrollView (created by ScrollView)     in ScrollView (created by SiteOverview)     in SiteOverview (created by SceneView)     in StaticContainer     in EnsureSingleNavigator (created by SceneView)     in SceneView (created by SceneView)     in RCTView (created by View)     in View (created by DebugContainer)     in DebugContainer (created by MaybeNestedStack)     in MaybeNestedStack (created by SceneView)     in RCTView (created by View)     in View (created by SceneView)     in RNSScreen     in Unknown (created by InnerScreen)     in Suspender (created by Freeze)     in Suspense (created by Freeze)     in Freeze (created by DelayedFreeze)     in DelayedFreeze (created by InnerScreen)     in InnerScreen (created by Screen)     in Screen (created by SceneView)     in SceneView (created by NativeStackViewInner)     in Suspender (created by Freeze)     in Suspense (created by Freeze)     in Freeze (created by DelayedFreeze)     in DelayedFreeze (created by ScreenStack)     in RNSScreenStack (created by ScreenStack)     in ScreenStack (created by NativeStackViewInner)     in NativeStackViewInner (created by NativeStackView)     in RCTView (created by View)     in View (created by SafeAreaInsetsContext)     in SafeAreaProviderCompat (created by NativeStackView)     in NativeStackView (created by NativeStackNavigator)     in PreventRemoveProvider (created by NavigationContent)     in NavigationContent     in Unknown (created by NativeStackNavigator)     in NativeStackNavigator (created by HomeStack)     in HomeStack (created by SceneView)     in StaticContainer     in EnsureSingleNavigator (created by SceneView)     in SceneView (created by Drawer)     in RCTView (created by View)     in View (created by Screen)     in RCTView (created by View)     in View (created by Background)     in Background (created by Screen)     in Screen (created by Drawer)     in RNSScreen     in Unknown (created by InnerScreen)     in Suspender (created by Freeze)     in Suspense (created by Freeze)     in Freeze (created by DelayedFreeze)     in DelayedFreeze (created by InnerScreen)     in InnerScreen (created by Screen)     in Screen (created by MaybeScreen)     in MaybeScreen (created by Drawer)     in RNSScreenContainer (created by ScreenContainer)     in ScreenContainer (created by MaybeScreenContainer)     in MaybeScreenContainer (created by Drawer)     in RCTView (created by View)     in View (created by Drawer)     in RCTView (created by View)     in View (created by AnimatedComponent(View))     in AnimatedComponent(View)     in Unknown (created by Drawer)     in RCTView (created by View)     in View (created by AnimatedComponent(View))     in AnimatedComponent(View)     in Unknown (created by PanGestureHandler)     in PanGestureHandler (created by Drawer)     in Drawer (created by DrawerViewBase)     in DrawerViewBase (created by DrawerView)     in RNGestureHandlerRootView (created by GestureHandlerRootView)     in GestureHandlerRootView (created by DrawerView)     in RCTView (created by View)     in View (created by SafeAreaInsetsContext)     in SafeAreaProviderCompat (created by DrawerView)     in DrawerView (created by DrawerNavigator)     in PreventRemoveProvider (created by NavigationContent)     in NavigationContent     in Unknown (created by DrawerNavigator)     in DrawerNavigator (created by DrawerStack)     in DrawerStack (created by SceneView)     in StaticContainer     in EnsureSingleNavigator (created by SceneView)     in SceneView (created by SceneView)     in RCTView (created by View)     in View (created by DebugContainer)     in DebugContainer (created by MaybeNestedStack)     in MaybeNestedStack (created by SceneView)     in RCTView (created by View)     in View (created by SceneView)     in RNSScreen     in Unknown (created by InnerScreen)     in Suspender (created by Freeze)     in Suspense (created by Freeze)     in Freeze (created by DelayedFreeze)     in DelayedFreeze (created by InnerScreen)     in InnerScreen (created by Screen)     in Screen (created by SceneView)     in SceneView (created by NativeStackViewInner)     in Suspender (created by Freeze)     in Suspense (created by Freeze)     in Freeze (created by DelayedFreeze)     in DelayedFreeze (created by ScreenStack)     in RNSScreenStack (created by ScreenStack)     in ScreenStack (created by NativeStackViewInner)     in NativeStackViewInner (created by NativeStackView)     in RNCSafeAreaProvider (created by SafeAreaProvider)     in SafeAreaProvider (created by SafeAreaInsetsContext)     in SafeAreaProviderCompat (created by NativeStackView)     in NativeStackView (created by NativeStackNavigator)     in PreventRemoveProvider (created by NavigationContent)     in NavigationContent     in Unknown (created by NativeStackNavigator)     in NativeStackNavigator (created by AppNavigator)     in EnsureSingleNavigator     in BaseNavigationContainer     in ThemeProvider     in NavigationContainerInner (created by AppNavigator)     in AppNavigator (created by App)     in RCTView (created by View)     in View (created by LayoutProvider)     in LayoutProvider (created by Providers)     in CommonMastersProvider (created by Providers)     in TaskManagementProvider (created by Providers)     in LogBookProvider (created by Providers)     in PodProvider (created by Providers)     in AuthProvider (created by Providers)     in Providers (created by App)     in RCTView (created by View)     in View (created by App)     in App     in RCTView (created by View)     in View (created by AppContainer)     in RCTView (created by View)     in View (created by AppContainer)     in AppContainer     in FleetManager(RootComponent), js engine: hermes
<LineChart
dataSet={chartData}
height={250}
width={screenWidth / 1.32}
adjustToWidth
endSpacing={10}
yAxisTextStyle={{ color: colors.black }}
xAxisIndicesHeight={5}
xAxisIndicesWidth={1}
color="#00ff83"
thickness={2}
startFillColor="rgba(20,105,81,0.3)"
endFillColor="rgba(20,85,81,0.01)"
startOpacity={0.9}
endOpacity={0.2}
scrollToEnd
focusEnabled
showStripOnFocus
pointerConfig={{
pointerStripUptoDataPoint: true,
pointerStripColor: 'lightgray',
pointerStripWidth: 2,
strokeDashArray: [2, 5],
pointerColor: 'lightgray',
radius: 4,
pointerLabelWidth: 100,
pointerLabelHeight: 120,
pointerLabelComponent: pointerLabelComponent
}}
/>
      Getting this error when using pointer config
      Please resolve @Abhinandan-Kushwaha

Hi @Niteshgithub174
Can you share the value of chartData that you have passed as dataSet.

Hi @Niteshgithub174 👋
Thanks for reporting this issue. It has been fixed in versions 1.4.17 onwards. 🎉
Please use the latest version of the library.


Tests broken

Mangopay API return error validation on fields when running nosetests. It appears on PUT methods where not required field are not set but the API said they are! I guess it's a bug of mangopay API

Tests were OK for #167 PR, which has been merged and release.
Thanks for your contribution 👍


When dragging slider, if you leave browser window, release, and enter window again, it stays stuck dragging

When you are dragging a slider, and you move the mouse pointer outside of the browser window, and release the mouse press outside, when you return to the slider, the slider is still dragging along with the mouse even though you are not pressing the mouse key anymore. This isnt an issue with my code, react version etc, as the same issue occurs on the Material UI "demo" page for the slider. However, the issue DOESNT occur in their sandbox example for some reason.

[x] Checked for similar issues. Found a thread from a year ago saying it had been fixed.
[x] Its not related to React or MUI version since the issue also occurs on the MUI demo page for sliders.
Current Behavior 😯
When you are dragging a slider, and you move the mouse pointer outside of the browser window, and release the mouse press outside, when you return to the slider, the slider is still dragging along with the mouse even though you are not pressing the mouse key anymore. This isnt an issue with my code, react version etc, as the same issue occurs on the Material UI "demo" page for the slider. However, the issue DOESNT occur in their sandbox example for some reason.
Expected Behavior 🤔
When you drag a slide to an edge, leave the browser window, and release the drag outside, the slider should be left on the edge it was last left on, and not stick to the mouse pointer when you hover back into the browser window.
Steps to Reproduce 🕹
https://material-ui.com/components/slider/ (DOESNT WORK)
https://codesandbox.io/s/3gtqd (WORKS FINE)
Steps:

click on a slider to drag and keep holding mouse press
move mouse pointer outside of browser (still holding mouse press)
while outside browser window, release mouse press
return mouse pointer over slider area
5 (slider will still be dragging following the cursor even though you stopped pressing the key)

Context 🔦
Your Environment 🌎
|Chrome| Latest |
| React | Latest |
|Material-UI| Latest |
|MacOS Mojave | Latest|

@PCMACHero I can't reproduce the issue. What versions are you using?

Reproducible in 4.4.2 with Chrome 75.0.3770.142 on macOS 10.14.6

@PCMACHero I can't reproduce the issue. What versions are you using?

I didn't get it at first either. When you mouse back in you actually have to enter the slider again.

I don't have to enter the slider again, but perhaps it's different in this slightly older version of Chrome?

Yes, I believe that in my case too, I don't have to specifically hover over the slider again. Either way, it's strange that it works in the sandbox example but not on the demo page or my implementation.

@eps1lon Thanks for the video! I can reproduce it too. The good news is that the bug is not present in https://v3.material-ui.com/lab/slider/. The regression comes from #16986. I would propose that we revert and that we encourage not to create a new component at each render in #16983 (we already have this constraint with the TransitionComponent prop).

I don't have to enter the slider again, but perhaps it's different in this slightly older version of Chrome?

I'm on 77 not your ancient 75 :smile:
Couldn't reproduce it because I re-entered above the page TOC. At any other point the slider sticks. We're doing something weird with the page TOC I guess.

https://v3.material-ui.com/lab/slider/

Im new at MUI. Does your response mean it will fix the issue if I merely downgrade to v3?

@PCMACHero Olivier is suggesting that we revert the fix applied in #16986, and encourage the use described in here: https://github.com/mui-org/material-ui/issues/16983#issuecomment-520836867, presumably in the docs.

Yes, I propose

We revert #16986:

diff --git a/packages/material-ui/src/Slider/Slider.js b/packages/material-ui/src/Slider/Slider.js
index cac0edc69..8715ae63c 100644
--- a/packages/material-ui/src/Slider/Slider.js
+++ b/packages/material-ui/src/Slider/Slider.js
@@ -568,11 +568,7 @@ const Slider = React.forwardRef(function Slider(props, ref) {
   const handleMouseEnter = useEventCallback(event => {
     // If the slider was being interacted with but the mouse went off the window
     // and then re-entered while unclicked then end the interaction.
-    //
-    // In Firefox, the event can be triggered when a new DOM node is inserted and hovered.
-    // We need to make sure that the relatedTarget (The EventTarget the pointing device exited from)
-    // is not null (it should be the html element)
-    if (event.buttons === 0 && event.relatedTarget !== null) {
+    if (event.buttons === 0) {
       handleTouchEnd(event);
     }
   });

We give up on #16983: @Astrantia should move the component outside the render method.

@PCMACHero If you want to work on the issue, you are welcome :).

@oliviertassinari I want to work on this issue. With which solution are we going?

@neon98 I have proposed a single solution. Point 1 and 2 are two sides of the same fix. Thanks for the care :).

@oliviertassinari my bad! I'll submit the PR soon :D

@oliviertassinari  definitely :)

Still does not work. The white area is an iframe modal:


[SUGGESTION] generics

We have this pattern in our infra for defining collections of system objects:
class ObjectType(WekaObject):
    class CollectionType(WekaObjectsCollection):
        def method_on_the_collection(self, ...): ...

    def method_on_an_individual_object(self, ...): ...

This dichotomy feels a little weird, and it would have been nice if we could define methods on the collection like we define methods on classes - if we had, like the @classmethod decorator, a similar decorator named @wekacollectionmethod:
class ObjectType(WekaObject):
    @wekacollectionmethod
    def method_on_the_collection(col, ...): ...

    def method_on_an_individual_object(self, ...): ...

I've created a quick PoC for this:

https://github.com/weka-io/black-magic/blob/master/black_python_magic/generics.py
https://github.com/weka-io/black-magic/blob/master/tests/test_generics.py

This is how it works:
class GenericList(list, Generic):
    pass

class Foo:
    def __init__(self, num):
        self.num = num

    @genericmethod(list)
    @property
    def sum_squares(lst):
        return sum(foo.num ** 2 for foo in lst)

foos = GenericList[Foo]([Foo(1), Foo(2)])

assert foos.sum_squares == 5

Generic is a quick implementation of the generic instantiation. I did a very basic implementation in the PoC, but a full implementation can be used as base for MultiException and MultiObject - that already have separate implementations - and other things like ObjectCollectionBase.
When we instantiate generic G with type T (G[T]), it'll look through all the methods of T that are marked with @genericmethod(G') (where G' is G or a superclass of G) and make them all regular methods of G[T]. In our case - sum_squares becomes a method of GenericList[Foo] (because GenericList is a subclass of list) and thus we can use foos.sum_squares.
Once we have this, we can have wekacollectionmethod = genericmethod(WekaObjectsCollection). We could also have other useful decorators - like collectionmethod = genericmethod(ObjectCollectionBase) - to be able to easily define methods on sub/filtered colletions of specific types.

One possible issue is our remove method. Currently we have remove defined on the collection type, and it accepts a list of objects to remove. For the actual objects we redirect it like this:
class WekaObject(...):
    def remove(self, **kwargs):
        collection = self.sync_collection_tmp
        collection.remove(self, **kwargs)

If we try to implement it with Generic:
class WekaObject(...):
    def remove(self, **kwargs):
        collection = self.sync_collection_tmp
        collection.remove(self, **kwargs)

class ObjectType(WekaObject):
    @collectionmethod
    def remove(col, **kwargs): ...

The remvoe on the collection will override the one on the object.
I can think of 3 ways to solve it:

Decorate the method on the object:class ObjectType(WekaObject):
    @collectionmethod
    def remove(col, **kwargs): ...

    @remove.for_object
    def remove(self, **kwargs):
        collection = self.sync_collection_tmp
        collection.remove(self, **kwargs)

Note that we won't have to manually add the for_object remove for every object type, because we are already going to use a decorator (@WekaObjectsCollection.remover) to create the collection method.
Use a metaclass on WekaObject to put the @collectionmethod version of remove separately.
Make genericmethods, when called on the object itself, invoke the super() version of themselves.

c.c. @koreno and @yuvalweka - I had this idea when we discussed the lifecycle refactor.
Also c.c. @DoronCohen

IMHO it's replacing one complicated mechanism with another.
why not just do something like:
class Filesystem(WekaObject):
    @property
    def collection(self):
        return self.system.filesystems

    def method_on_individual_object(self, ...): ...

class WekaObject:
    @property
    def collection(self):
       assert False, "Subtype should define its collection"

    def remove(self, ...):
        self.collection.remove(self, ...)

class FilesystemCollection(WekaObjectCollection):
    def add(self, ...): ...
    def remove(self, ...): ...

    def method_on_collection(self, ...): ...

no need for Lifecycle or other nested classes or special syntax.

Here is a better example. In our codebase we have:
class WekaHost(MachineMixin, StatefulWekaObject, HostRoleMixin):
    class CollectionType(WekaObjectsCollection):
        def configure_hosts(self, hosts, num_io_nodes_per_host=AUTO, failure_domains=AUTO, roles=AUTO, memory=AUTO):
            ...

And we need to use it with system.hosts.configure_hosts(some_hosts). This genericmethod would have solved this by:
class WekaHost(MachineMixin, StatefulWekaObject, HostRoleMixin):
    @wekacollectionmethod
    def configure(hosts, num_io_nodes_per_host=AUTO, failure_domains=AUTO, roles=AUTO, memory=AUTO):
        ...

Which will allow us to simply hosts.configure() (assuming hosts is one of our special collections)
But if you don't like the @genericmethod magic, we can also do this:
class WekaHost(MachineMixin, StatefulWekaObject, HostRoleMixin):
    class CollectionMethods:  # unless you have a better name?
        def configure(selves, num_io_nodes_per_host=AUTO, failure_domains=AUTO, roles=AUTO, memory=AUTO):
            ...

And when we create it:
collection = cls.CollectionType(cls.COLLECTION_NAME, system, cls, extra_methods_source=cls.CollectionMethods)
setattr(system, cls.COLLECTION_NAME, collection)

(alternatively, make WekaObjectsCollection take it from its ItemType?)
The collections will pass the extra_methods_sources to each other.
The downside of this method is that it won't work for things like system.weka_machines.M.hosts.C.configure()...


Accomodate for Ganache negative transaction cost during debug_traceTransaction

As per https://github.com/trufflesuite/ganache/issues/277 and https://github.com/trufflesuite/ganache/pull/578 a Ganache blockchain may report negative gas cost for a REVERT or RETURN EVM command.
The StructLog struct (module/debug/trace.go) for the result of the debug_traceTransaction RPC is using a uint to save the gas resulting in an error.

The RPC-methods supported by this package are meant to support go-ethereum which can not report negative gas costs. Unfortunately the more advanced RPC-methods like tracing differ a lot between nodes and testing frameworks in their output format.
You can do two things:

implement a custom debug_traceTransaction for Ganach. w3 is extendable with custom method bindings. You need to implement the w3types.Caller interface. See e.g. https://github.com/lmittmann/w3/blob/v0.13.0/module/eth/call.go#L98 as reference.
play with the w3vm branch which will bring something like Ganache, but pure Go and super fast with state forking via RPC to w3. It allows tracing using any vm.EVMLogger implementation. However, this is still experimental and only "documented" here<EMAIL_ADDRESS>

Thank you very much for your very detailed reply.
That w3vm branch looks great and so does the ease in extending through w3types.Caller.


No builds for Linux Py3.6-gpu TF1.3 RC2?

Using Python 3.6 in Anaconda on Ubuntu 16.04
source activate py36env
pip install --upgrade \
> https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.3.0rc2-cp35-cp35m-manylinux1_x86_64.whl
tensorflow_gpu-1.3.0rc2-cp35-cp35m-manylinux1_x86_64.whl is not a supported wheel on this platform.

I checked the build stream and don't see a Linux PY3.6 GPU being built?
Seems to me that since I have TF 1.2 installed (it had the PY3.6GPU support that new RC's should also include builds for Py3.6/GPU or a lot of people just won't build a separt downgraded test environment for the RC?
Or is the intention to drop support?? (I hope not!)

https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.3.0rc2-cp36-cp36m-linux_x86_64.whl

Awesome Thanks for the quick response!

grr now I just have to upgrade my cdnn, for libcudnn.so.6 which will probably break the older TF env but I think that is fixable with a symlink..

Hi @dartdog, has your issue been resolved?


[New] add TypeScript types

For now I've just typed these out manually based on what we're using internally - while it would be good to have some tests at some point, I'm hoping/recommending not blocking on that for now as I think the types are small enough to be easy to maintain manually for the time being.
Resolves #3090

Can we add a tsc run, at least?

Can we add a tsc run, at least?

Done - note that it requires using typescript v5 since types like @types/node require that version, which led to a weird "works locally but not in CI", but I think I've got that resolved and should be good enough for now 🤞

Nice work on this!


Download of demo dataset fails

Sintel version: 0.1.0.dev0
Python version: 3.8.17
MongoDB version: 4.0 (defined in docker-compose-db.yml)
Operating System: Ubuntu 20.04.6 LTS

Description
Download of demo dataset fails.
Has the URL for the demo dataset distribution location changed?
What I Did
$ make docker-db-up
rm -f -r ./db-instance/data/*
rm -f -r ./db-instance/log/*
mkdir -p db-instance
# this folder is for saving the downloaded demo mongodb data
mkdir -p db-instance/data
# this folder is for saving the log files
mkdir -p db-instance/log
# this folder is for saving the newly dumped mongodb data
mkdir -p db-instance/dump
curl -o sintel.tar.bz2 "https://d3-ai-sintel.s3.us-east-2.amazonaws.com/sintel.tar.bz2"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   302    0   302    0     0    284      0 --:--:--  0:00:01 --:--:--   284
tar -xf sintel.tar.bz2 -C ./db-instance/data/ && rm sintel.tar.bz2
tar: This does not look like a tar archive
bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
tar: Error is not recoverable: exiting now
make: *** [Makefile:78: docker-db-up] Error 2

For reference, the results of opening the URL of the demo dataset in a browser are shown below.
<Error>
  NoSuchBucket
  <Message>The specified bucket does not exist</Message>
  <BucketName>d3-ai-sintel</BucketName>
  <RequestId>BBDT03YZJZ8PH84F</RequestId>
  <HostId>V3ANwcCBC6xlySIw6V/mhrRmjGjr3TIuM84+oApwVKLwxz5rG4dN9NBaW3J1e1BEZDBr4vj+b2g=</HostId>
</Error>

ping. same issue here.

same issue here.


Dragging an item as it's removed from the layout causes funny behaviour

Describe the bug
If you're dragging a Grid Item as it's removed from the layout prop, the placeholder gets stuck in place, and unresponsive, until you pick up a different grid item.
Your Example Website or App
https://codesandbox.io/s/react-grid-layout-disappearing-drag-item-6fpjis
Steps to Reproduce the Bug or Issue

Click the "Remove Item B in 1s" button
Start dragging item B immediately, before it gets removed
Wait for item B to be removed from the layout
Observe the placeholder remaining around

Expected behavior
As a user, I expect the dragging item to just disappear, maybe the layout be rearranged a bit, as through I dragged the item out of the grid altogether.
react-grid-layout library version
1.3.4
Operating System Version
macOS
Browser
Chrome
Additional context
Sometimes I've noticed the dragging item gets swapped to a different grid item, as it's removed, maybe a different issue.
I'm guessing the solution might be something like the onDragLeave event, ie just call this.removeDroppingPlaceholder(), but at the appropriate time - which is something like, when the layout prop or React.Children changes (I'm not sure what's correct)....
Basically, layout property and children array get updated to remove the item the user is currently dragging around. We need to somehow clear our the dragging item if that happens I think.
Screenshots or Videos
placeholder getting stuck once item B is removed from layout/children
https://user-images.githubusercontent.com/8600684/213623784-adf0d077-c170-442b-9d99-9331af10f6aa.mov

Can confirm this patch fixes the issue for me, although I'm unsure if it's the best spot for the code; maybe getDerivedStateFromProps would be better, any suggestions? 👍🙏
Index: lib/ReactGridLayout.jsx
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/ReactGridLayout.jsx b/lib/ReactGridLayout.jsx
--- a/lib/ReactGridLayout.jsx	(revision 30ac6508c2d422a425f7aa2742ccb889b9153e0d)
+++ b/lib/ReactGridLayout.jsx	(date<PHONE_NUMBER>653)
@@ -206,6 +206,16 @@
   }

   componentDidUpdate(prevProps: Props, prevState: State) {
+    if (this.state.activeDrag) {
+      const children = this.props.children || [];
+      const draggingKey = this.state.activeDrag.i;
+      if (!children.find(child => child.key === draggingKey)) {
+        // the item we're dragging around has been removed from children,
+        //  so we need to clean up our state and forget about it
+        this.removeDroppingPlaceholder()
+      }
+    }
+
     if (!this.state.activeDrag) {
       const newLayout = this.state.layout;
       const oldLayout = prevState.layout;


Disable lockFileMaintenance by default

Principle: By default, make the least changes

Since is the current default, would this be a case where renovate would submit a pull request against current consumers to update their renovate.json file with the configuration needed to maintain current behavior?

Yes


User Issue: Unable to gracefully terminate pods container

Describe the bug
While executing a container-failure-graceful experiment I noticed that the injector pod starts, identifies the target pods but does not terminate the application container inside the pod.
To Reproduce
Steps to reproduce the behavior:

I applied the following "graceful container termination" Disruption :

Delete the disruption once it's succeeded.

Expected behavior
I injected the disruption into a pod with 2 containers:

Application container (name: demo-curl)
Istio sidecar container (name: istio-proxy)

The expectation is for both the containers inside the pod to restart. The actual behavior observed is only the istio container restarts, the applications container in the pod does nothing.
Screenshots
we can see the injector pod spins up:

It identifies the target pod:

The time stamp show that nothing has happened :

Injector logs
{"level":"info","ts":1677068244553.9192,"caller":"injector/main.go:219","message":"injector targeting container","disruptionName":"container-failure-all-graceful","disruptionNamespace":"chaos-engineering-framework","targetName":"demo-curl-75585bc5dd-j7zhd","targetNodeName":"ip-0-xxx-xx","containerID":"docker://e8c649289fe1a8ec8547cadc487cb5cea5dd369f743d1b3f802bd7e3bda906b1","container name":"/k8s_curl_demo-curl-75585bc5dd-j7zhd_chaos-engineering-framework_ab0c72c0-b295-4c31-93e9-1790e7ac9dde_0"}

Application Logs
This was checked, but showed no updates.
Environment:
Kubernetes version: 1.21
Controller version: 7.10.0
Cloud provider (or local): EKS
Base OS for Kubernetes: Amazon Linux (5.4.209-116.363.amzn2.x86_64)

Hey, from what I understand of your use case here, it is the expected behavior of the container failure but I may be missing something, so let me know if it's the case.
The container failure is expected to SIGTERM (forced: false) or SIGKILL (forced: true) the container(s) in the targeted pod. Doing this will increase the restart count but the pod will NOT be recreated by Kubernetes. This behavior is related to kubelet itself which will keep the pod and recreate a new container into it instead of creating a new pod. Killing a container is different than killing a pod.
Is there something I'm missing that was unexpected here?

To provide more context,  when we run a graceful failure, we expect the container to restart which we do not see happening.
We have two containers in this pod:

Istio sidecar container
Application container

We can see the istio container restart, however we see the application container does not terminate.
Application container logs show no indication to why the pod does not terminate.
p.s will update the issue to provide this context.

Is your application supposed to catch SIGTERM signals? I can reproduce your case locally with an application not expected to react to SIGTERM so the application just ignores it and nothing happens which is also expected. Note that this is exactly the kind of things we want to catch with that disruption, application not reacting to SIGTERM signals, since it is a potential issue with Kubernetes pods lifecycle. When a pod is terminated because of a rollout or an eviction for instance, kubelet will send a set of SIGTERM signals. After some time with no response to that signal from the application, usually 30s, kubelet will send a SIGKILL to force the application to shutdown.
The problems with this SIGKILL are that:

the application can't catch it and can't gracefully terminate
it slows down the rollout because it needs to wait for the 30s timeout

You can switch to force: true for the injector to send a SIGKILL instead which can't be trapped and which should kill all containers. If it is the case, then you just confirmed your application is ignoring SIGTERM. Can you keep us posted with that please? So we can validate that the problem is on the application side, not on the injector side.

Thanks for your response Joris! So We have run a forced termination experiment which does kill all the containers correctly with the SIGKILL. Though, we have separately tried to send a SIGTERM signal with a kill -15 <pid> and a docker stop against our application which correctly shuts down the containers but its not catching it though the injector. Is it possible for the application to be able to catch only some SIGTERM signals?

I would be surprised that the application ignores only some SIGTERM and not the others. Would you be able to verify that the PID to which the signal is sent by the injector is the expected one please? It is printed in the injector logs (log message is injecting a container failure and the field containing the PID is named container). It's a shot in the dark because if the SIGKILL is working I don't see why the SIGTERM would not.
If that's possible, could you also:

strace your application to get received signals (to confirm the signal is received, even if ignored)
print caught signals in your application (to confirm the signal is caught/trapped)

With those information we should at least be able to tell where the problem is. I'll do some similar testings against dummy apps on my side too.

Thanks Joris, We will get back to you with this information

I couldn't reproduce the problem locally so far. I applied the example we have on the local env we have (the one used to work on the chaos-controller project, lima) against the demo pod (also in examples). The curl container does not trap SIGTERM so nothing happens, which is expected, but I'm able to see the signal being received by the main process:
root@lima-default:~# strace -e 'trace=!all' -p 6211
strace: Process 6211 attached
[...]
--- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=0, si_uid=0} ---

PID 6211 is the PID returned by the container engine when inspecting the curl container, and also the one used by the injector. It is the main process of the container (defined as PID 1 within the container and its pid namespace) and the one receiving the SIGTERM/SIGKILL when stopping the container manually.
I ran the same test with the SIGKILL disruption just to be sure:
root@lima-default:~# strace -e 'trace=!all' -p 6211
strace: Process 6211 attached
[...]
+++ killed by SIGKILL +++

Let me know what you have on your side.

Hi Joris! We appreciate your response, it was helpful for us in identifying our application was unable to receive signals since our ENTRYPOINT was defined in the "shell" form rather than the "exec" form. We have been able to validate the graceful termination experiment, and it correctly terminates. You may close this issue.

Hi, glad to hear it helped you find the issue! I'm closing it now.


Refactor

These are some changes made to the drivetrain characterization to simplify code and increase the refresh rate.
(All tests now need to be unified)

If the four commits already made are intended to be merged separately, some of them need cleanups. For example, the first one has JSON data files that shouldn't be there. Instead of removing them in another commit, the original commit should be modified to never add them in the first place. "git rebase -i" will do that for you.

I think the way the project is structured is a little weird; STATE seems to act as a global variable to me.
https://github.com/Piphi5/frc-characterization/blob/08295a17a3b0c5b64b7c7554f7126b1f1b9c8ce2/frc_characterization/newproject/__init__.py#L51
These have about 30 different functions contained under this "configureGUI" function, which takes the GuiState as an argument. Perhaps these should be members of the GuiState class instead, and are called during the __init__ stage?

I think the way the project is structured is a little weird; STATE seems to act as a global variable to me.
https://github.com/Piphi5/frc-characterization/blob/08295a17a3b0c5b64b7c7554f7126b1f1b9c8ce2/frc_characterization/newproject/__init__.py#L51
These have about 30 different functions contained under this "configureGUI" function, which takes the GuiState as an argument. Perhaps these should be members of the GuiState class instead, and are called during the __init__ stage?

I'm not extremely familiar with tkinter and I was mostly going off of what was already present. This might be something we should discuss with @Oblarg.

I'm not familiar with Tkinter either, but documentation such as this tends to have this all under the main class, rather than in a configureGUI prompt. STATE essentially functions as the self in a class IMO.

I've changed the GUI Structure of the data analyzer and the new project.
It seems like the logger has a slightly different structure due to the fact that it needs a Runner that utilizes the state. Should I still try to reconfigure the structure of this class?
Also, I put some of the helper methods (calcfit, etc.) from the analyzer into the GUI class. Should I keep them within the class or should I move them outside?

Is there anything here that still needs to be done before merging?
-> any conversations marked "outdated" that aren't actually resolved.
(Probably also need to get someone else to review this again)

Is there anything here that still needs to be done before merging?
-> any conversations marked "outdated" that aren't actually resolved.
(Probably also need to get someone else to review this again)

It seems like the only unresolved suggestion is to try and abstract some of the data logger test enabling/disabling code.
Also, I've only tested this on a Simple Motor setup so I'll have to test at least the drivetrain test before it is ready to merge.

This needs rebasing.

This needs rebasing (again) now that we've modified the publishing to only do so on tags.

Closes #127, closes #132, closes #102, closes #61, closes #116


Proposal: InfoBar V2 - InfoCard control

Proposal: InfoBar V2 - InfoCard control

https://user-images.githubusercontent.com/7389110/104827620-93ccbe80-5857-11eb-8722-1722a1896493.mp4
Summary

Ideally this could be merged into the InfoBar control, with an API to switch to a Card or Overlay mode.  But if not, this could be an additional control called InfoCard
Rationale

InfoBar will push content as it appears on screen, it does not overlay content;
InfoBar controls are not designed to stack on top of each other;
A few Inbox apps already display a similar control, but the design is not consistent;

https://user-images.githubusercontent.com/7389110/104827635-c971a780-5857-11eb-9d7f-b186be8d0454.mp4

Scope

Capability
Priority

This control must overlay other content, using shadow and elevation
Must

This control should be as close to InfoBar in features and usage
Should

This control should support stacking as more InfoCards are Opened
Should

This control could be made part of InfoBar with a behaviour property or an Overlay mode.
Could

Visual Design

Light and Dark InfoCard examples

InfoCard design spec
Basic API properties
Many of these are shared/similar to the InfoBar control

Property/Resource
Value
Description

Colours

InfoCardErrorSeverityColorBrush
SystemFillColorCritical
Error Severity color

InfoCardWarningSeverityColorBrush
SystemFillColorCaution
Warning Severity color

InfoCardSuccessSeverityColorBrush
SystemFillColorSuccess
Success Severity color

InfoCardInformationalSeverityColorBrush
SystemFillColorAttention
Informational Severity color

InfoCardNeutralSeverityColorBrush
SystemFillColorNeutral
Neutral Severity color

InfoCardTitleForeground
TextFillColorPrimary
Title text color

InfoCardMessageForeground
TextFillColorSecondary
Message text color

InfoCardBackground
SolidBackgroundFillColorTertiary
Background color

InfoCardBorder
LayerFillColorTertiary
Border color

InfoCardIconForeground
TextFillColorPrimary
Icon color

InfoCardErrorIconForeground
TextFillColorPrimary
Error Severity  Icon color

InfoCardWarningIconForeground
TextFillColorPrimary
Warning Severity Icon color

InfoCardSuccessIconForeground
TextFillColorPrimary
Success Severity Icon color

InfoCardInformationalIconForeground
TextFillColorPrimary
Informational Severity Icon color

InfoCardNeutralIconForeground
TextFillColorPrimary
Neutral Severity Icon color

Sizing

InfoCardIconSize
Fluent UI System Icons 24
Icon Size

InfoCardIconAreaSize
56 × 56
Icon Area Size

InfoCardCloseButtonIconSize
Fluent UI System Icons 12
Close Button Icon Size

InfoCardCloseButtonSize
32 × 32
Close Button Size

InfoCardCloseButtonBackplateSize
24 × 24
Close Button Backplate Size

InfoCardTitleFontSize
14
Title text font size

InfoCardMessageFontSize
12
Message text font size

InfoCardTitleFontLineHeight
24
Title text font line height

InfoCardMessageFontLineHeight
24
Message text font line height

Close Button Visual States

Default
GhostFillColorTransparent
Close Button Default backplate color

PointerOver
GhostFillColorSecondary
Close Button PointerOver backplate color

Pressed
GhostFillColorTertiary
Close Button Pressed backplate color

Disabled
GhostFillColorDisabled
Close Button Disabled backplate color

Position

Where InfoCards will be positioned overlaying the content of the parent panel

InfoCard.PositionTop

InfoCard Positioned at the top

InfoCard.PositionBottom

InfoCard Positioned at the bottom

InfoCard.PositionLeft

InfoCard Positioned at the left

InfoCard.PositionRight

InfoCard Positioned at the right

Important Notes

I am fairly open to how this proposal is implemented, and so any and all comments are welcome.  The Examples posted here match the earlier ones I submitted to the conversation which became the InfoBar control - but updated to use Fluent UI System Icons, and the Latest colours and styles with the visual refresh.
Not sure if these InfoCards should include custom content and action buttons, but for matching the InfoBar spec, and featureset there is nothing stopping us including these features.

Custom Content and Action Button support
Open Questions

I have one question, but am happy to add others that are brought up... Should this design and functionality be part of the InfoBar control, or is it more suited to a separate or derived control.
More questions that have come to mind:

Do you extend position to support TopLeft, Middle Left, or BottomRight etc
Do you support horizontal stacking? (I'd say no)
Does the control itself handle stacking, or do you create an InfoCardPanel where you can call to show/open an InfoCard, and it will handle placing it for you?

This design is flyout like.
I also want a static control that takes place in layout and not closable, to be a status indicator.

This design is flyout like.
I also want a static control that takes place in layout and not closable, to be a status indicator.

This design is flyout like.
I also want a static control that takes place in layout and not closable, to be a status indicator.

The InfoBar currently sits in the UI and moves other elements or of it's way.
But I don't see why InfoCard couldn't have an Overlay and an Inline option.

This design is flyout like.
I also want a static control that takes place in layout and not closable, to be a status indicator.

The InfoBar currently sits in the UI and moves other elements or of it's way.
But I don't see why InfoCard couldn't have an Overlay and an Inline option.

This is a nice to have, not a must have - but the same InfoCard could possibly update as a status changes, when a prior piece of information is no longer true or relevant.  This would be preferable to the InfoCard transitioning out, and a new one transitioning in.
https://user-images.githubusercontent.com/7389110/104866550-beda0f80-5936-11eb-9d1f-e512cb1c321b.mp4

This is a nice to have, not a must have - but the same InfoCard could possibly update as a status changes, when a prior piece of information is no longer true or relevant.  This would be preferable to the InfoCard transitioning out, and a new one transitioning in.
https://user-images.githubusercontent.com/7389110/104866550-beda0f80-5936-11eb-9d1f-e512cb1c321b.mp4

Whilst I have a preference for the designs in the main proposals - there may be some in the WinUI Design Team which may wish the InfoCard to closer match the InfoBar design.

Outer border and a 16px Elevation Shadow

Content examples

Whilst I have a preference for the designs in the main proposals - there may be some in the WinUI Design Team which may wish the InfoCard to closer match the InfoBar design.

Outer border and a 16px Elevation Shadow

Content examples

@mdtauk Thank you for opening up and creating this comprehensive proposal and designs!
This is definitely a feature on our radar to include in an InfoBar v2. We aimed to add an Overlay mode as part of the initial InfoBar but decided to focus on the inline usecases for the first iteration and make sure we designed the right architecture to support stacking the cards. In general, I agree with the notion that the Overlay mode would keep/take advantage of the same functionality and API as the inline InfoBar which leads towards adding an Overlay mode to the existing InfoBar versus a separate control for this. Would love to hear thoughts on this!
@community: To help prioritize and aim our development on this, I encourage you to share where you would use an InfoCard in your application and what functionality you need — especially around the open questions included in the proposal:

What positioning do you require (i.e. TopLeft, Middle Left, BottomRight, etc.)?
Do you require horizontal stacking of InfoCards (and why 😊)?
If you are vertically stacking multiple InfoCards with the same positioning (e.g. BottomRight), how would you expect to implement stacking? Should the control itself handle stacking, or does there also need to be a separate layout control that handles positioning?

I'd like to note the WCT InAppNotification has a built-in StackMode property to enable stacking in the control. However, the stacking is restricted to overlaying, replacing or queueing behind any existing notifications in that position. Would this functionality be useful here?

@mdtauk Could you elaborate on why you have a preference for your designs with the strip of color versus the background? I also see the addition of an 'Attention' Severity level outside of the 'Informational/Neutral'. When would Attention be used instead of Neutral?
Thanks again for opening up this proposal and discussion!

@mdtauk Thank you for opening up and creating this comprehensive proposal and designs!
This is definitely a feature on our radar to include in an InfoBar v2. We aimed to add an Overlay mode as part of the initial InfoBar but decided to focus on the inline usecases for the first iteration and make sure we designed the right architecture to support stacking the cards. In general, I agree with the notion that the Overlay mode would keep/take advantage of the same functionality and API as the inline InfoBar which leads towards adding an Overlay mode to the existing InfoBar versus a separate control for this. Would love to hear thoughts on this!
@community: To help prioritize and aim our development on this, I encourage you to share where you would use an InfoCard in your application and what functionality you need — especially around the open questions included in the proposal:

What positioning do you require (i.e. TopLeft, Middle Left, BottomRight, etc.)?
Do you require horizontal stacking of InfoCards (and why 😊)?
If you are vertically stacking multiple InfoCards with the same positioning (e.g. BottomRight), how would you expect to implement stacking? Should the control itself handle stacking, or does there also need to be a separate layout control that handles positioning?

I'd like to note the WCT InAppNotification has a built-in StackMode property to enable stacking in the control. However, the stacking is restricted to overlaying, replacing or queueing behind any existing notifications in that position. Would this functionality be useful here?

@mdtauk Could you elaborate on why you have a preference for your designs with the strip of color versus the background? I also see the addition of an 'Attention' Severity level outside of the 'Informational/Neutral'. When would Attention be used instead of Neutral?
Thanks again for opening up this proposal and discussion!

mdtauk Could you elaborate on why you have a preference for your designs with the strip of color versus the background? I also see the addition of an 'Attention' Severity level outside of the 'Informational/Neutral'. When would Attention be used instead of Neutral?

I think the strip of colour is bolder and stands out, almost like it's calling for your attention.  The text being on the neutral theme colours also solves any issues with legibility.
The strip of colour leads the direction of the animation, which helps draw the eye.
The Attention colour was present in the recently Added theme resources, so I included it for the sake of completeness

mdtauk Could you elaborate on why you have a preference for your designs with the strip of color versus the background? I also see the addition of an 'Attention' Severity level outside of the 'Informational/Neutral'. When would Attention be used instead of Neutral?

I think the strip of colour is bolder and stands out, almost like it's calling for your attention.  The text being on the neutral theme colours also solves any issues with legibility.
The strip of colour leads the direction of the animation, which helps draw the eye.
The Attention colour was present in the recently Added theme resources, so I included it for the sake of completeness

The shadow and subtle border may be enough to help the more subtle backgrounded InfoCards stand out from the surface and content beneath it.

The shadow and subtle border may be enough to help the more subtle backgrounded InfoCards stand out from the surface and content beneath it.

@gabbybilka the InAppNotification in the Toolkit doesn't stack messages like shown in the animation. The Toolkit control handles a queue of messages and replaces each message within the same content presenter. The StackMode property determines how the internal stack in memory is handled either with newer messages being displayed next or them being displayed in order.
So, it's really an option if developers only want one updating notice, or if they want to have multiple instances displayed on the screen at the same time.
If this gets implemented in WinUI and it can handle a queue of messages or displaying multiple messages, we'd remove our InAppNotification control in the Toolkit.


Test Autocomplete Preselection Powered By Inline Suggestions

Refs: https://github.com/microsoft/vscode/issues/131940

[ ] anyOS @TylerLeonhardt
[x] anyOS @jrieken

Complexity: 3
Create Issue

Preparation

Enable suggest preview: "editor.suggest.preview": true,.
Install Copilot

Tasks

Create a TypeScript file and write // Write an error to the console followed by a new line and console to prompt copilot.
Type . to trigger autocomplete.
Verify that autocomplete shows, but the inline suggestion stays and the non-autocomplete part becomes non-italic
Verify that an autocomplete item is preselected that is a prefix of the inline suggestion
Verify that the selected autocomplete item is shown in italic font.

I really like the improvements in this space :) it's really looking nice!


[AzureMonitorOpenTelemetryDistro] APPLICATIONINSIGHTS_CONNECTION_STRING to take precedence over IConfiguration

API change check
API changes are not detected in this pull request.


Throwing "No Content Provider" Error

i am using this Uri ->
"https://firebasestorage.googleapis.com/v0/b/sharenotes-9c333.appspot.com/o/Descriptive Answer Type Questions-HVPE Unit_1-5 - Dr.pdf?alt=media&token=68411cc7-594c-40d9-acc6-d2a6f51f5854"
Every time i am using your library. Its keep on throwing "No Content Provider" Error. I have used many URIs. But same problem in all of them. Please Help me.

Duplicate of #123

can you share the example uri then? so that i can take reference from it. It would be very helpful.

Example uri from Android's MediaStore content provider: content://media/external/images/media/47

Thanks man for your help. Now I am manually downloading my pdf from the server and using your library to view it.


Curry

Implement:
curry   :: ((a, b) -> c) -> a -> b -> c
uncurry :: (a -> b -> c) -> (a, b) -> c

As methods of the Arrow class.
Then, given arity of function f, return partial application (slice) of f with smaller number of arguments.
To do this properly, we should have product types, so that:
Arrow(A * B, C) ~ Arrow(A, Arrow(B, C))

And arity 2 is infered from the input type A * B.

Cartesian structure merged in #10


Add html and css feature1

Adds extra HTML for software toolkit section and implements the extra CSS for that section.

Merging this into main after we discussed and finalized the changes during our last lab.


Command keyaliases get does not respect environment

When trying to get keyalias getting NOT_FOUND response despite record is present. Noticed that path in the error message does not have any reference to environment. Even if different env is specified, error stays the same.
Notice nv in the meassage, doesn't reference to environment and doesn't change if env is changed.
apigeecli keyaliases get -k ts-my-alias -s my-alias -env dev -t $TOKEN
  "error": {
    "code": 404,
    "message": "alias not organizations/xyz/environments/nv/keystores/ts-my-alias/aliases/my-alias found",
    "status": "NOT_FOUND",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "7044290970465184028"
      }
    ]
  }
}```

Had -env instead of --env. Closing.


[Bug] Test-DbaLastBackup - backup history is getting corrupted - This could be a Restore-DbaDatabase problem.  Not sure.

Environmental information
$($PSVersionTable | Out-String); $(gmo dbatools -List | select name, path, version | fl -force | Out-String)
Name                           Value

PSVersion                      5.0.10586.117
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.10586.117
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
Name    : dbatools
Path    : C:\windows\system32\WindowsPowerShell\v1.0\Modules\dbatools\dbatools.psd1
Version : 1.0.9
SQL Server:
Microsoft SQL Server 2014 (SP3-CU2) (KB4482960) - 12.0.6214.1 (X64)
Feb  2 2019 01:10:18
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows NT 6.3  (Build 9600: ) (Hypervisor)
Report
I believe I have reviewed the things to consider.
Host used

[X ] powershell.exe
[ ] ISE
[ ] VS Code
[ ] Other (please specify)

If anything other than powershell.exe was used, please confirm that you can duplicate the issue with powershell.exe

[ ] Still buggy in powershell.exe

Errors Received
No errors were recieved.
Steps to Reproduce
##  Create a database with the exact same name on both instances (ExampleDB).

##  Strong preference that you save your backups with the server name in the backup name.  This will allow you to trace where the history is coming from when you get to the last line.

$MyExampleDatabase = 'ExampleDB'
$destinationInstance = 'InsertHere'
$Someplaceelse = 'InsertHere'

$mytsql = "-- Step 1 Delete backup history
            use msdb
            EXEC msdb.dbo.sp_delete_database_backuphistory @database_name = N'$MyExampleDatabase'
          "

Invoke-DbaQuery -SqlInstance $destinationInstance  -Database msdb -Query $mytsql

Get-DbaDbBackupHistory -SqlInstance $destinationInstance -Database $MyExampleDatabase | select SqlInstance, Database, Type, TotalSize, DeviceType, Start, Duration, End, path | ft

Backup-DbaDatabase -SqlInstance $destinationInstance  -Database $MyExampleDatabase

Get-DbaDbBackupHistory -SqlInstance $destinationInstance -Database $MyExampleDatabase | select SqlInstance, Database, Type, TotalSize, DeviceType, Start, Duration, End, path | ft

Test-DbaLastBackup -SqlInstance $destinationInstance  -Database $MyExampleDatabase  -Destination $destinationInstance   -CopyFile -Prefix "MY_DBCC_"

Get-DbaDbBackupHistory -SqlInstance $destinationInstance -Database $MyExampleDatabase | select SqlInstance, Database, Type, TotalSize, DeviceType, Start, Duration, End, path | ft

Test-DbaLastBackup -SqlInstance $Someplaceelse  -Database $MyExampleDatabase  -Destination $destinationInstance   -CopyFile -Prefix "MY_DBCC_" ```

## if you're backup file name has the server name in the name, then when you run this command, you'll see two instances have backup files in one database.
Get-DbaDbBackupHistory -SqlInstance $destinationInstance -Database $MyExampleDatabase | select SqlInstance, Database, Type, TotalSize, DeviceType, Start, Duration, End, path | ft

#### Expected Behavior
I expected the $MyExampleDatabase on the $destinationInstance instance would NOT have its backup history show backup information from the $Someplaceelse instance.

#### Actual Behavior
The $Someplaceelse backup information is in the $MyExampleDatabase from the $destinationInstance.  From what I can tell, this means that when the restore of the prefixed database (MY_DBCC_) somehow did not specify a database name when restoring and ended up confusing the histories together.  This could be a problem with the restore script and not the test database backup script.  If I had to guess, the prefix name (MY_DBCC_) should be passed in as the database name to prevent cross pollination.

Would someone mind trying to reproduce this problem and confirm it?  Thanks!

I believe this is a bug.  Can someone please investigate?
sorry... I got a stale notification. I'm not trying to be a pest.


SIGILL in pytorch

Describe the bug
wendy can not build pytorch-lighting on staging-20.09 because of
/nix/store/3vvij73hlqny9lyv4bal1kaxsaqirwzv-python-imports-check-hook.sh/nix-support/setup-hook: line 9:   138 Illegal instruction     (core dumped) /nix/store/xibghivp12jgk2xrwykpxxhy8wbmr5zi-python3-3.8.8/bin/python3.8 -c 'import os; import importlib; list(map(lambda mod: importlib.import_module(mod), os.environ["pythonImportsCheck"].split()))'

This indicates that it, or a dependency, produces a binary that contains instructions that are not available on wendy.
It could be caused by a wrong compiler flag or some assembly code that runs unconditionally.
See  https://hydra.nixos.org/build/138503219/nixlog/1
pytorch-metric-learning ends with a similar failure
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
writing pytorch_metric_learning.egg-info/PKG-INFO
writing dependency_links to pytorch_metric_learning.egg-info/dependency_links.txt
writing requirements to pytorch_metric_learning.egg-info/requires.txt
writing top-level names to pytorch_metric_learning.egg-info/top_level.txt
reading manifest file 'pytorch_metric_learning.egg-info/SOURCES.txt'
writing manifest file 'pytorch_metric_learning.egg-info/SOURCES.txt'
running build_ext
ERROR:root:The testing module requires faiss. You can install the GPU version with the command 'conda install faiss-gpu -c pytorch'
                        or the CPU version with 'conda install faiss-cpu -c pytorch'. Learn more at https://github.com/facebookresearch/faiss/blob/master/INSTALL.md
/nix/store/m2b73qq2wmxwmy6anb08nm0pxj1b2ahb-setuptools-check-hook/nix-support/setup-hook: line 4:   270 Illegal instruction     (core dumped) /nix/store/xibghivp12jgk2xrwykpxxhy8wbmr5zi-python3-3.8.8/bin/python3.8 nix_run_setup test

https://hydra.nixos.org/build/138492596/nixlog/1
Perhaps a good next step is to check if pytorch itself is binary reproducible on different hardware.
To Reproduce
Build python38Packages.pytorch-lightning on wendy or similar hardware, nixpkgs da851597b61e6e040309b806548f12e41bdee32c
Expected behavior
Build succeeds.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Notify maintainers

@tbenst
@bcdarwin
@danieldk
@teh
@thoughtpolice
@tscholak

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
 - python38Packages.pytorch-lightning
 - python38Packages.pytorch-metric-learning
# a list of nixos modules affected by the problem
module:

The problem is that some of the Hydra machines are Opteron 6100 machines that do not even support SSE4.1.
I don't think it is feasible to compile PyTorch pre-SSE4.1, since at least one of its dependencies (oneDNN) does not support pre-SSE4.2 machines. Also, it would be pretty detrimental for a machine learning to compile it and its dependencies against such an old baseline. (Of course, many of the libraries dynamically select kernels based on the instruction set.)
The preferred solution would be to be able to exclude these Hydra builders based on the platform. I have recently submitted a PR to Nix to add the new platform levels defined in the x86_64 ELF ABI as extra platforms. But I didn't have time yet to look how this could be adopted in nixpkgs.

Due to https://github.com/NixOS/nixos-org-configurations/issues/146 being solved, this should be fixed now.

This is still relevant today, as wendy is yet again failing with SIGILL on pytorch in release-21.05.
https://hydra.nixos.org/build/149565546

Generally it's nice when stuff works even on older HW, but Opteron machines surely won't be coming back to hydra.nixos.org anymore.

Wendy and Ike are long gone, so closing this issue is overdue.


skype tokens for a bot

Is it possible to get a skype token for a bot? Its easy to get one for a human but there are some functions I'd like the bot to be able to call that require a skype token like microsoftTeams.meeting.shareAppContentToStage(). Is this possible?

To obtain authorization token for skype bot APIs, please use below cURL function:
curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: application/x-www-form-urlencoded" -d 'client_id=<your-app-id>&client_secret=<your-app-secret>&grant_type=client_credentials&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default' 'https://login.microsoftonline.com/common/oauth2/v2.0/token'
Also refer: 1. https://learn.microsoft.com/en-us/skype-sdk/skype-for-business-bot-framework/docs/overview
2. https://learn.microsoft.com/en-us/skype-sdk/websdk/docs/ptauthwebticket


Update S3 binding

What content needs to be created or modified?
Update S3 binding, add documentation:

update create operation: support upload files in base64, return location and version id
add get operation
add delete operation
add list operation

Describe the solution you'd like

Where should the new material be placed?

https://docs.dapr.io/reference/components-reference/supported-bindings/s3/
The associated pull request from dapr/dapr, dapr/components-contrib, or other Dapr code repos

https://github.com/dapr/components-contrib/pull/1081
Additional context

@orizohar FYI, it looks like the related code tasks for this are going to be for v1.4, so you might want to track this as well.


unexpected token 'open'

Issue Type: Bug
with open("test.html", 'w', encoding='utf-8') as f:
f.write(page.text)
unexpected token 'open'
Extension version: 2018.7.0
VS Code version: Code 1.25.1 (1dfc5e557209371715f655691b1235b6b26a06be, 2018-07-11T15:43:53.668Z)
OS version: Windows_NT x64 10.0.17134

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz (4 x 2195)

GPU Status
2d_canvas: unavailable_softwareflash_3d: unavailable_softwareflash_stage3d: unavailable_softwareflash_stage3d_baseline: unavailable_softwaregpu_compositing: unavailable_softwaremultiple_raster_threads: unavailable_offnative_gpu_memory_buffers: disabled_softwarerasterization: unavailable_softwarevideo_decode: unavailable_softwarevideo_encode: unavailable_softwarevpx_decode: unavailable_softwarewebgl: unavailable_offwebgl2: unavailable_off

Memory (System)
7.92GB (4.18GB free)

Process Argv
D:\Microsoft VS Code\Code.exe F:\文档\GitHub\Protein

Screen Reader
no

VM
67%

I'm getting the issue as well. I believe I'm using the new language server, but don't have a way to check. I'm also getting like 10 other parsing errors that are also false alarms, but I can open a new issue for those if desired.

The code for the above problems is hangouts_parser.py from er0sin/hangouts_to_sms
For people who use text search, I'll copy the issues below:
Below are the json error reports:
The Error Reports
{
	"resource": "/c:/Users/USERNAME/odrive/Google Drive/Random/Hangouts2Messages-SMS/hangouts_to_sms_er0sin/hangouts_parser.py",
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "E16",
	"severity": 8,
	"message": "invalid syntax",
	"source": "Python (parser)",
	"startLineNumber": 10,
	"startColumn": 61,
	"endLineNumber": 10,
	"endColumn": 64
}
{
	"resource": "/c:/Users/USERNAME/odrive/Google Drive/Random/Hangouts2Messages-SMS/hangouts_to_sms_er0sin/hangouts_parser.py",
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "E16",
	"severity": 8,
	"message": "unexpected token 'open'",
	"source": "Python (parser)",
	"startLineNumber": 25,
	"startColumn": 14,
	"endLineNumber": 25,
	"endColumn": 18
}
{
	"resource": "/c:/Users/USERNAME/odrive/Google Drive/Random/Hangouts2Messages-SMS/hangouts_to_sms_er0sin/hangouts_parser.py",
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "E80",
	"severity": 8,
	"message": "can't assign to literal",
	"source": "Python (parser)",
	"startLineNumber": 25,
	"startColumn": 18,
	"endLineNumber": 25,
	"endColumn": 53
}
{
	"resource": "/c:/Users/USERNAME/odrive/Google Drive/Random/Hangouts2Messages-SMS/hangouts_to_sms_er0sin/hangouts_parser.py",
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "E16",
	"severity": 8,
	"message": "unexpected token '='",
	"source": "Python (parser)",
	"startLineNumber": 25,
	"startColumn": 53,
	"endLineNumber": 25,
	"endColumn": 54
}
{
	"resource": "/c:/Users/USERNAME/odrive/Google Drive/Random/Hangouts2Messages-SMS/hangouts_to_sms_er0sin/hangouts_parser.py",
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "E16",
	"severity": 8,
	"message": "unexpected token ')'",
	"source": "Python (parser)",
	"startLineNumber": 25,
	"startColumn": 61,
	"endLineNumber": 25,
	"endColumn": 62
}
{
	"resource": "/c:/Users/USERNAME/odrive/Google Drive/Random/Hangouts2Messages-SMS/hangouts_to_sms_er0sin/hangouts_parser.py",
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "E16",
	"severity": 8,
	"message": "unexpected token 'data_file'",
	"source": "Python (parser)",
	"startLineNumber": 25,
	"startColumn": 66,
	"endLineNumber": 25,
	"endColumn": 75
}
{
	"resource": "/c:/Users/USERNAME/odrive/Google Drive/Random/Hangouts2Messages-SMS/hangouts_to_sms_er0sin/hangouts_parser.py",
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "E16",
	"severity": 8,
	"message": "unexpected token ':'",
	"source": "Python (parser)",
	"startLineNumber": 25,
	"startColumn": 75,
	"endLineNumber": 25,
	"endColumn": 76
}
{
	"resource": "/c:/Users/USERNAME/odrive/Google Drive/Random/Hangouts2Messages-SMS/hangouts_to_sms_er0sin/hangouts_parser.py",
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "E32",
	"severity": 8,
	"message": "unexpected indent",
	"source": "Python (parser)",
	"startLineNumber": 27,
	"startColumn": 13,
	"endLineNumber": 27,
	"endColumn": 17
}
{
	"resource": "/c:/Users/USERNAME/odrive/Google Drive/Random/Hangouts2Messages-SMS/hangouts_to_sms_er0sin/hangouts_parser.py",
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "E80",
	"severity": 8,
	"message": "can't assign to ErrorExpression",
	"source": "Python (parser)",
	"startLineNumber": 27,
	"startColumn": 13,
	"endLineNumber": 27,
	"endColumn": 17
}
{
	"resource": "/c:/Users/USERNAME/odrive/Google Drive/Random/Hangouts2Messages-SMS/hangouts_to_sms_er0sin/hangouts_parser.py",
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "E16",
	"severity": 8,
	"message": "'return' outside function",
	"source": "Python (parser)",
	"startLineNumber": 65,
	"startColumn": 9,
	"endLineNumber": 65,
	"endColumn": 15
}

No, the parser error is unrelated to analysis. The process goes as Tokenizer -> Parser -> AST production -> code analysis. So it looks like parser issue.

@u2berggeist
Please could you send another screen shot.
Or please could you explain how the line numbers are not in order.
Looking at the line numbers we have line numbers going in reverse order from 14-1 and then we have 25 and then 1-14!
Is this based on some setting in VSC or some funky split editor panes?

It's just relative line numbering. IIRC, it's a default setting (ie. no extension necessary) in VSCode. Quite convenient when using VSCode-Vim.

Some more fun, apparently the open issue also occurs when using pathlib.Path object's .open() command. This then causes it to not recognize a user defined function:

I am getting the same error, and I can confirm that when I refactor to remove the with foo as bar construct, this error gets cleared.
AND then the debugger flags
                except Exception as e:

with
{
	"resource": "....py",
	"owner": "_generated_diagnostic_collection_name_#1",
	"code": "E16",
	"severity": 8,
	"message": "'as' requires Python 2.6 or later",
	"source": "Python (parser)",
	"startLineNumber": 179,
	"startColumn": 34,
	"endLineNumber": 179,
	"endColumn": 36
}

@u2berggeist @JohnRomanski what version of Python are each of you running?
I can't replicate with Python 3.7.0:

Please try quitting VS Code, deleting the languageServer directory for the extension (you can use the Open Extension Directory to find the extension directory easily), and then download the latest version of the language server.

I'm running Python 3.6.4
After deleting the languageServer directory, I loaded up the folder again. VSCode reported that it was downloading the Microsoft Python Language Server again.
After it re downloaded the new language server, I no longer have issues. I checked this with the two examples I discussed above as well as a blank Python file. Could it be that the language server just needed updating or something?

I am running Python 3.7.0

After deleting the languageServer directory, I loaded up the folder again. VSCode reported that it was downloading the Microsoft Python Language Server again.

After it re downloaded the new language server, I no longer have issues. I checked this with the two examples I discussed above as well as a blank Python file. Could it be that the language server just needed updating or something?

I did the same thing, and notice the server was downloaded again, and no longer received this error.

Most probably was caused by threading issue where text buffer was going out of sync with between LS and VS Code. Fixed by https://github.com/Microsoft/PTVS/pull/4645


Styled Components css prop does not work in Production

using Vite 4.1, and vite-plugin-react-swc 3.1.0
css prop works in dev mode, but it does not work in production mode.
the DOM css attribute looks like this css="[object Object]"
could be related to transpileTemplateLiterals ?

Do you use a the SWC plugin?

Without a plugin, I have a current test that works:

Code: https://github.com/vitejs/vite-plugin-react-swc/blob/main/playground/emotion/src/Button.tsx#L15
Assertion: https://github.com/vitejs/vite-plugin-react-swc/blob/main/playground/emotion/tests/emotion.spec.ts#L15

Can you provide a small reproduction?

The issue that OP mentioned is with styled-components, not emotion. See https://github.com/bengry/vite-plugin-react-swc/tree/styled-components-repro for a small reproduction on top of this repo.

My bad, I was induced in error by the linked issue.
Your code effectively throw an error, but I think this is because this pattern is not allowed (not sure I don't use styled components). This compile to invalid code where primary is not defined. The same error happens with the babel plugin.

You're right. I'm not sure if we use this pattern or not, but regardless it's a bit weird. Anyway, I think the issue is with build time. E.g. if you look at https://github.com/bengry/vite-plugin-react-swc/commit/dde3f0e39dcbe3d5dc191d0836d9255b4be015d8, the issue is simpler.
Reproduction steps:
pnpm install
cd playground/styled-components
pnpm build
pnpm preview

Navigate to the URL on screen and see the component. This is what I see:

I'm using the exact same code and I can't repo. What is your environment?

I'm using the exact same code and I can't repo. What is your environment?

Just to make sure, you're running the production build of my commit, right? I wrote the commands to get a reproduction here (I just noticed there was a slight error there - I missed the build step of the plugin itself and added it now).
I also published the output here: https://vite-plugin-reaect-swc-styled-components-repro.vercel.app/, not sure how much it helps though.
I'm using an M1 macOS, with Node v18.13.0. Although I'm not sure how much it matters all that much TBH.
Are you running these steps and seeing a different outcome in a production build of the styled-components plugin?

Yep I did the exact same steps, I can't repo (node 19, Mac Intel). I'm getting Button___StyledButton-sc-17626d7-1 imxLCF for the button class.
I read the doc, this is a feature to optimised template literals when targeting browser without support for it, so not a concern in 2023.

Yep I did the exact same steps, I can't repo (node 19, Mac Intel). I'm getting Button___StyledButton-sc-17626d7-1 imxLCF for the button class.
I read the doc, this is a feature to optimised template literals when targeting browser without support for it, so not a concern in 2023.

I just tried this on Node 19 as well and got the same results as you.
I think the issue though is that the current version in main is not the same as the one that's on npmjs.org. If you change the version of @vitejs/plugin-react-swc being used to the latest on npmjs.org, you should see the issue reproduce.
git clone https://github.com/vitejs/vite-plugin-react-swc
git checkout 896a72433cd5d47b0286fd242ad7baa73f6ec511
cd vite-plugin-react-swc/playground/styled-components
pnpm install
pnpm build
pnpm preview

Note that I'm ignoring the local version of the plugin, and just using the repo for the playground.

Oh ok this is an issue that was fixed by https://github.com/vitejs/vite-plugin-react-swc/commit/f52d8707d5d28982f7e58f76280a667f3f44d1da
Available in v3.2.0

@ArnaudBarre the issue is fixed but we are getting some warnings when using the css prop

Warning: React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

the warning goes away when not using the css prop


how to Concatenate the files of the decoupled modules

As recommoned, our modules pub/sub events of interest rather than directly communicating with each other, that cutting off the direct relationship between modules.
Our Module file structure as following:
Module A
- define File A
- Publish message A
- File A Logic

Module B
- define File B
- Subscribe message A
- File B Logic

Module C
- define File C
- Publish message C
- File C Logic

Module D
- define File D
- Subscribe message C
- File D Logic

And I want the Concatenation output:
Release folder
- a.js   // combine Module A and B
- c.js   // combine Module C and D

how can we achieve that?

RequireJS is baked into Aura, you can use features like bundles, packages, and dependencies to build optimized files.

@josephspens  thanks all the same.


infer on multi gpus

how can i run the infer on multi gpus?

Currently, multi-gpu inference is not supported, since one gpu inference is enough for our datasets.


Error "Unable to find the text segment base addr" if space present in binary path

Hi,
I played with this error for the past two days and pinpointed it to when the local binary passed to gdb contains a space in it's absolute path.
This happens in native gdb and with pwndbg too, but not GEF. Unfortunately GEF as a similar problem when connecting to a gdbserver (https://github.com/hugsy/gef/issues/901#issuecomment-1357912965) so I have to work around it anyway.
I know that gdb has always had troubles with paths containing spaces, but it's the first time after a year working with this setup that I notice one so I don't know if the problems lies in gdb or this library.

Hi @Angelo942, to clarify, you are running a local binary (not remote), and you are getting this error is a space is in the binary path?

My immediate hunch is that this line is the cause of this issue. If you wanted to debug it before I can get to it (which will likely be this weekend), you can set a breakpoint here and see what's going on:
https://github.com/mahaloz/decomp2dbg/blob/1073f2234d8317b86846b364884ed6e3c32d2006/decomp2dbg/clients/gdb/utils.py#L83
This is if you are running locally.

I tested it both debugging a local process and a remote one. The bug is present every time we pass a copy of the binary to gdb.
so gdb ./challenge will never work even if we connect to a gdbserver, but for remote processes just gdb will work fine.
I took a look at the code and we have a problem here, where the path_name used is truncated:
https://github.com/mahaloz/decomp2dbg/blob/1073f2234d8317b86846b364884ed6e3c32d2006/decomp2dbg/clients/gdb/utils.py#L60
I tried changing the parse to:
def vmmap_base_addrs():
    addr_maps = {}
    mappings = gdb.execute("info proc mappings", to_string=True).split("\n")
    for mapping in mappings:
        try:
            addr = int(re.findall(r"0x[0-9a-fA-F]+", mapping)[0], 16)
            path = "/" + "/".join(mapping.split("/")[1:])
        except IndexError:
            continue

        # always use the lowest addr
        if path in addr_maps or path == "/":
            continue

        if addr and path:
            addr_maps[path] = addr

    return addr_maps

This solves the problem for local processes, but not for remote ones. (I focus on that part because gdb ./challenge is how pwntools' gdb.debug launches gdb before connecting to the gdbserver)
https://github.com/mahaloz/decomp2dbg/blob/1073f2234d8317b86846b364884ed6e3c32d2006/decomp2dbg/clients/gdb/utils.py#L91
Now I'm trying to figure out why the hash is right with gdb, but not with gdb ./challenge.
The only think I noticed so far is that is that in the first case the hash changes every time, while in the second both hashes [other_file_hash and binary_hash] are constant but different. I tried with a path that doesn't contains any spaces and in that case the hashes are all constant.

This one too https://github.com/hugsy/gef/pull/998


Hardfork 1.1

I want to include this one https://github.com/Taraxa-project/taraxa-node/pull/1333 when it is approved

@mfrankovi does not work on already created DB, we need to "recreate" column I guess
Dynamic exception type: taraxa::DbException
std::exception::what: Db error. Status code: 4 SubCode: 0 Message:Invalid argument: taraxa.UintComparator: does not match existing comparator leveldb.BytewiseComparator

I recommend revert "change parameters for propose_block vote":
I review the PR1331 change parameters for propose block vote. I still think the old approach is better.
As I explained, In current Testnet: There are 713 delegation nodes, dpos total votes count is 2615
threshold = committee size = 1000
sortition rate = threshold / dpos_total_votes_count = 1000/2615 = 38%
Since in proposal state all delegation nodes only have 1 chance to win sortition, all delegation nodes have 38% rate to propose a PBFT block. They have the same probability. And there should be 713 * 38% = 273 proposal PBFT blocks for each period. I think that’s enough.
When a node add in Testnet as staking 1, will also add 2 stakes to our one of 6 consensus nodes. In order to make our 6 CN have majority.
Assume number of players as “n”, in mathematical model the proposal PBFT blocks per period should be (6 + n) * (threshold / (6 + 3n)). When “n” goes to be a big number, so there should have 1000 / 3 = 333 proposal PBFT blocks per period constantly. I think that’s enough.
In the new approach:
Sortition rate = threshold / total voters count, and all players have 1 chance to win the sortition that's same as old approach
Proposal PBFT blocks per period = total players * sortition rate = n * threshold / n = threshold, “n” is number of players. When n goes to a big number, that will propose 1000 PBFT blocks per period.
Since we only finalize 1 PBFT block per period, I think 1000 proposal blocks are too much and will cause network traffic. And the old approach 333 is better.


Add default logging option

:recycle: Current situation
There are both None and No Logging logging options.
:bulb: Proposed solution
Remove the None option and default to Standard Logging.
:gear: Release Notes
The None option has been removed and Standard Logging is the default.

Thank! I will be changing this a little bit.

This is in v1.12.1


Missing 'tags' in the GitHub project openjfx/samples.

Missing 'tags' in the GitHub project openjfx/samples.
Some suggestions for 'tags' for the GitHub project:

openjfx
javafx-11
java-11
examples
docmentation
maven
gradle
intellij
netbeans
eclipse

I've added these tags, thanks for pointing this out.


Some page streaming methods have no Pages method

I believe this only happens when the response has a nextPageToken field, but no pageToken field.
For example, cloudresourcemanager.organizations.search has a page streaming response, but the Go client library doesn't implement it as one:
https://godoc.org/google.golang.org/api/cloudresourcemanager/v1#OrganizationsSearchCall

http://d3uaxf08soql4q.cloudfront.net/thelostways/VSL Pem 2-Desktop.m4v

More specifically, the pageToken is anomalously a field of the request body rather than a query parameter of the method. See https://github.com/googleapis/toolkit/issues/692.

Sorry, just getting to this.
How can you tell from the json discovery doc that that method is a streaming method? It looks like an ordinary RPC to me, although it's structured differently. It still has a page size, token, and nextPageToken.

Not sure if we mean different things by "streaming" --- we've been using the term "page streaming" just to mean that the method returns results page by page using page tokens. The vast, vast majority of APIs implement such methods according to style guidelines with a method query parameter called pageToken and a response field called nextPageToken, but a few (see googleapis/toolkit#692) make the pageToken a field of the request body instead.

OK. Probably shouldn't use "streaming" for that -- "pagination" would be better.
Now my question is, does this issue affect the code generator? I thought it only worked with the more recent Google API framework, not the one that the google.golang.org/api methods are based on.

Not exactly sure what you're asking, but I think the code at issue is here:
https://github.com/google/google-api-go-client/blob/master/google-api-go-generator/gen.go#L1604
Right now, the generator assumes that any paging method will have pageToken as a query parameter, but in some exceptional cases it appears as a field of the request body instead.

Finally coming back to this after learning more about the generator.
So yes, the Go generator in this repo does not generate a Pages method if the page token is in the request instead of a query parameter. That's arguably a bug, but it's easy to work around by writing your own loop. It's not like Pages does much for you. (It doesn't even deal with page size.)
Since the generator in this repo is superseded by the one in googleapis/toolkit, I don't think it's worth the effort to fix this. Reopen if you disagree.

it's easy to work around by writing your own loop

That may be true, but if we want to generate correct samples, we need to automate this generation, and that seems more complicated than just fixing this bug. Looks like a fairly trivial fix to me, unless there's some subtlety I'm overlooking.

the generator in this repo is superseded by the one in googleapis/toolkit

What do you mean by this?

Btw, here's the generator function that decides whether or not a method is paging:
https://github.com/google/google-api-go-client/blob/master/google-api-go-generator/gen.go#L1355

This is more complicated than necessary to correctly identify paging methods for current APIs. The following logic would suffice:
If (
the response has a field named "pageToken" or "nextPageToken" AND (
the method has a parameter named "pageToken" OR
the request body has a field named "pageToken" or "nextPageToken") AND
the method is not bigquery.tabledata.list)
THEN the method is paging
ELSE the method is not paging.
The exception for bigquery.tabledata.list is necessary because bigquery.jobs.getQueryResults (a paging method) has an identical relevant signature, and they will not change their API.
The name "nextPageToken" occurs as a request body field only in one method in an undocumented API (identitytoolkit.relyingparty.downloadAccount), which I presume to be paging, as this signature occurs nowhere else.

It would not hurt to also allow "nextPageToken" as the name of the method parameter; this case currently does not occur.

It looks like bigquery.tabledata.list can be used to page through results: you can set a page token on the request, and you get a next-page token in the response. Why don't you consider it a paging method?

According to the docs, the token you get in the response is not a next-page token, but a stable-access identifier for the result set that you can use to retrieve the same results again when the underlying table is changing.

The docs are just poorly worded. What they mean by

Providing this token instead of the startIndex parameter can help you retrieve stable results when an underlying table is changing

is that if you page through results using startIndex, incrementing it each time by the number of rows you got, then you may miss rows or get rows twice if there have been changes to the table in a page you've already read. But if you use pageToken, you won't have that problem.
I confirmed that using pageToken really does do paging by using the embedded API explorer in https://cloud.google.com/bigquery/docs/reference/rest/v2/tabledata/list. I have a small table with an ID column that contains, in order,
2, 1, 4, 5, ...

First I ran
GET https://www.googleapis.com/bigquery/v2/projects/veener-jba/datasets/ds1/tables/products/data?maxResults=2&key={YOUR_API_KEY}

which returned rows with IDs 2 and 1, as well as a page token. Then I used the page token:
GET https://www.googleapis.com/bigquery/v2/projects/veener-jba/datasets/ds1/tables/products/data?maxResults=2&pageToken=BGRYXYBDLEAQAAASAUIIBAEAAUNAICACCABCBMFOCUVAA%3D%3D%3D&key={YOUR_API_KEY}

and got back rows 4 and 5.

CL https://code-review.googlesource.com/#/c/10110. Thomas, I couldn't add you as a reviewer because gerrit, but you should be able to visit and comment.

So just to clarify, in bigquery.tabledata.list you used the response pageToken in precisely the way one would typically use a response nextPageToken?

That is correct.

Super, thanks for catching that.


Sync of directory with files with spaces in filename fails

Describe the bug
Sync of directory with files with spaces in filename fails.
To Reproduce
Put file called some file.txt into the Šablony directory. Call
files.sync("configs/Šablony", "~/Šablony")

Expected behavior
File with spaces in filename is copied to the target directory.
Meta

Include output of pyinfra --support.

--> Support information:

    If you are having issues with pyinfra or wish to make feature requests, please
    check out the GitHub issues at https://github.com/Fizzadar/pyinfra/issues .
    When adding an issue, be sure to include the following:

    System: Linux
      Platform: Linux-4.15.0-20-generic-x86_64-with-LinuxMint-19.1-tessa
      Release: 4.15.0-20-generic
      Machine: x86_64
    pyinfra: v0.14.5
    Executable: /home/bystrousak/.local/bin/pyinfra
    Python: 2.7.17 (CPython, GCC 7.5.0)

How was pyinfra installed (source/pip)?

pip install --user -U . from cloned repository on latest master.

Include pyinfra-debug.log (if one was created)

It wasn't.

Consider including output with -vv and --debug.

/home/bystrousak/.local/bin/pyinfra -vv --debug inventory.py configure_local_pc.py
    [pyinfra_cli.main] Checking potential directory:
    [pyinfra_cli.main] Checking potential directory:
    [pyinfra_cli.main] Checking potential directory:
    [pyinfra_cli.main] Checking potential directory:
--> Loading config...
--> Loading inventory...
    [pyinfra_cli.inventory] Creating fake inventory...

--> Connecting to hosts...
    [@local] Connected
    [pyinfra.api.state] Activating host: @local

--> Preparing operations...
    Loading: configure_local_pc.py
    Use of `pyinfra.modules` is deprecated, please use `pyinfra.operations`.
    [pyinfra.api.operation] Adding operation, set([u'Files/Sync']), called @ configure_local_pc.py:24, opLines=(0, 24), opHash=deaf136562af1c35af570a63cea148d4aa3eb15a
    [pyinfra.api.facts] Getting fact: directory (ensure_hosts: (@local,))
    [pyinfra.api.connectors.util] Building command (shell_executable: sh): ls -ld --time-style=long-iso ~/Šablony 2> /dev/null || ls -ldT ~/Šablony
[pyinfra.api.connectors.local] --> Running command on localhost: sh -c 'ls -ld --time-style=long-iso ~/Šablony 2> /dev/null || ls -ldT ~/Šablony'
[@local] >>> sh -c 'ls -ld --time-style=long-iso ~/Šablony 2> /dev/null || ls -ldT ~/Šablony'
[@local] drwxrwxr-x 2 bystrousak bystrousak 4096 2020-06-15 00:38 /home/bystrousak/Šablony
[pyinfra.api.connectors.util] --> Waiting for exit status...
[pyinfra.api.connectors.util] --> Command exit status: 0
    Loaded fact directory: (u'~/\u0160ablony',)
    [pyinfra.api.facts] Getting fact: file (ensure_hosts: (@local,))
    [pyinfra.api.connectors.util] Building command (shell_executable: sh): ls -ld --time-style=long-iso ~/Šablony/other file.txt 2> /dev/null || ls -ldT ~/Šablony/other file.txt
[pyinfra.api.connectors.local] --> Running command on localhost: sh -c 'ls -ld --time-style=long-iso ~/Šablony/other file.txt 2> /dev/null || ls -ldT ~/Šablony/other file.txt'
[@local] >>> sh -c 'ls -ld --time-style=long-iso ~/Šablony/other file.txt 2> /dev/null || ls -ldT ~/Šablony/other file.txt'
[@local] ls: chybná šířka tabelátoru: „/home/bystrousak/Šablony/other“
[pyinfra.api.connectors.util] --> Waiting for exit status...
[pyinfra.api.connectors.util] --> Command exit status: 2
    Loaded fact file: (u'~/\u0160ablony/other file.txt',)
    [@local] Ready: configure_local_pc.py

--> Proposed changes:
    Groups: my_hosts / inventory / @local
    [@local]   Operations: 1   Commands: 1

--> Beginning operation run...
--> Starting operation: Files/Sync (u'configs/\u0160ablony', u'~/\u0160ablony')
    [pyinfra.api.operations] Starting operation Files/Sync on @local
    [pyinfra.api.connectors.util] Building command (shell_executable: sh): cp /tmp/tmpQJeuWX ~/Šablony/other file.txt
[pyinfra.api.connectors.local] --> Running command on localhost: sh -c 'cp /tmp/tmpQJeuWX ~/Šablony/other file.txt'
[@local] >>> sh -c 'cp /tmp/tmpQJeuWX ~/Šablony/other file.txt'
[@local] cp: cíl 'file.txt' není adresářem
[pyinfra.api.connectors.util] --> Waiting for exit status...
[pyinfra.api.connectors.util] --> Command exit status: 1
    [@local] Command IO error: IOError(u"cp: c\xedl 'file.txt' nen\xed adres\xe1\u0159em",)
    [@local] Error
    [pyinfra.api.state] Failing hosts: @local
--> pyinfra error: No hosts remaining!
Makefile:5: recipe for target 'build' failed
make: *** [build] Error 1

Issue can be probably solved by putting quotes around arguments called in connector and files api.
But, it can't just be quoted, as the paths like ~/something stops working, because ~ is not expanded in quotes. It is possible to do replacement of the filename with .replace('~', '$HOME'), which I can confirm works.
Suggestion: Maybe it would be better to use sh library I linked in the other issue, as it solves this kind of problems (and much more) automagically.

Nice catch @Bystroushaak, I'm amazed this hasn't come up before over the last few years! I'm looking at supporting this by proper escaping (ie path\ with\ space).
Avoiding quotes in this situation as this could cause unexpected side effects (possibly people already using environment variables/similar in path). Overall this has brought into question the string-based commands - in hindsight a list of arguments which can later be quoted and merged is better (although shlex.join appears in Python3.8 only).
Currently the fact or operation is responsible for correctly quoting or escaping such paths - very keen to investigate the possibility of handling this elsewhere in future; doing so will require major changes to the operation output.

This should now be fixed by https://github.com/Fizzadar/pyinfra/commit/05a36d164c587f8f3cd1b1d2a913d92898410734 + https://github.com/Fizzadar/pyinfra/commit/7b7974b946357944f02ccc8791e6161b05bba3a6 + https://github.com/Fizzadar/pyinfra/commit/003fa3c2941eb45786913292664c0e4945250ec5

Works like a charm, thanks a lot!