PostgreSQL check constraints are not updated when definition changes

When doing some testing, I discovered that if you update the definition of a check constraint when using PostgreSQL with HCL input, the change is not detected or applied. To reproduce, start with an initial schema:
schema "public" {
}
table "categories" {
  schema = schema.public
  column "id" {
    null = false
    type = int
  }
  column "name" {
    null = true
    type = varchar(100)
  }
  primary_key {
    columns = [column.id]
  }
}

Run a schema apply which creates the table:
$ atlas schema apply -u "postgresql://localhost:5432/testing?sslmode=disable" --dev-url "docker://postgres/14" -f schema.hcl --auto-approve
-- Planned Changes:
-- Create "categories" table
CREATE TABLE "public"."categories" ("id" integer NOT NULL, "name" character varying(100) NULL, PRIMARY KEY ("id"));

Add a constraint to the table definition:
schema "public" {
}
table "categories" {
  schema = schema.public
  column "id" {
    null = false
    type = int
  }
  column "name" {
    null = true
    type = varchar(100)
  }
  check "validate_id" {
    expr = "id >= 100"
  }
  primary_key {
    columns = [column.id]
  }
}

Run a schema apply which creates the constraint:
$ atlas schema apply -u "postgresql://localhost:5432/testing?sslmode=disable" --dev-url "docker://postgres/14" -f schema.hcl --auto-approve
-- Planned Changes:
-- Modify "categories" table
ALTER TABLE "public"."categories" ADD CONSTRAINT "validate_id" CHECK (id >= 100);

Modify the constraint definition in the schema, changing "id >= 100" to "id >= 500":
schema "public" {
}
table "categories" {
  schema = schema.public
  column "id" {
    null = false
    type = int
  }
  column "name" {
    null = true
    type = varchar(100)
  }
  check "validate_id" {
    expr = "id >= 500"
  }
  primary_key {
    columns = [column.id]
  }
}

Run a schema apply, which does not detect or apply the change:
$ atlas schema apply -u "postgresql://localhost:5432/testing?sslmode=disable" --dev-url "docker://postgres/14" -f schema.hcl --auto-approve
Schema is synced, no changes to be made

This was discovered using the latest version of Atlas. Please let me know if you would like any additional information.
Thanks!

I found something similar with SQLite. I had a constraint like this
check "type" {
  expr = "type IN ('meeting', 'phone_call')"
}

and found that if I added more options to the constraint, it would not update the database.

Same issue as described
I have to delete the constraint, apply the modification and create a new one ....
When can it be corrected ?

Thanks for reporting this. Issue was resolved with https://github.com/ariga/atlas/pull/3208


Keep by best hp max

Short Description:
Add the possibility to keep pokemon by best max hp. I believe the IV is already dependent of the hp (and therefore hp max). therefore I'm not quite sure of the utility of this commit... Yet, since it was requested, I did it.
Fixes/Resolves/Closes (please use correct syntax):

Resolve #3958 ?

Not sure why there is my old commit on the update wiki...

Can we use a list of criteria to keep based so the user can pick keep stats from most to least importance. Instead of adding a new method for each one. What if I find moveset.defense_perfection, cp, then iv the order I want them in.
For example.
"Ekans": { "keep_best": "defensive_moveset_dps,cp,iv"}
Instead of forcing players to choose one of the few keep bests they can define their own, on what they think is best?

+1 to @Foulwerp 's idea, makes it more customisable and prevents the incoming xx number of feature requests

You right, I'll have a look at it.

I did the changes, but I didn't have time to test them a lot though. It seems to work, but I only tried for "moveset.defense_perfection, hp_max" and not for the other (my bot don't have a lot of pokemons...).
I removed what I did for keep_best_hp_max, so if people used it in their configuration, it will not work anymore.
And I'm not sure why there is the "Merge remote-tracking branch 'upstream/dev' into dev" here... :/

This is really good, just could you please also look into the pokemon_optimizer.py?
This is not applied to pokemon_optimizer.py.

Probably answer #4084

@solderzzc I'll have a look at it. pokemon_optimizer is a bit more confusing though, I will need some time to understand it.


Swift, Cocoapods and use_frameworks! flag: cannot find the module

Hello,
I'm integrating the SDK in a Swift project, I use the use_frameworks! flag in my Podfile. It correctly find the library but I'm not be able to use it as it doesn't recognise it as a module.
Any suggestions?

I'm having the same issue

I found this: https://github.com/AravinthChandran/Mobihelp-Swift-Sample
You have to manually create a bridging header file and import it there. Then you can use the Mobihelp SDK as normal.

Thanks for sharing the solution @rdougan


updated key to '3bf863cc.pub'

the updated key is '3bf863cc.pub'. updated the line from sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub to sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub

@ram-msft : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@PatrickFarley
Can you review this PR?
IMPORTANT: When this content is ready to merge, you must add #sign-off in a comment or the approval may get overlooked.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

I'll merge. Is this something that's going to change regularly in the future? If so we should find a smoother way to stay up to date.
#sign-off


Loading local data

Is it possible to use this wrapper to load local data, namely data from a v-model ?
I want to display the selected options from a multiselect element in a table. I know it can be done using standard bootstrap table, but I need the ease of DataTables features like search, pagination, filter, etc.
I see this wrapper has a prop that I think can be used (the dataLoader parameter), but it's said it hasn't been tested.
Please help, thanks.

I'm looking for something similar - simple client-side loading of data into the data tables component through a prop? I've looked through the docs and examples but they all seem to mention server-side processing.
Many thanks

Old documentation as it wasn't originally planned, but I've used it in several projects and it works fine.  The logic is a callback function that return array of data.  You simply bind a function that call the callback method to return array of items.   Example:
:data-loader="yourFunction"

methods:{
  yourFunction(callback) {
     const that = this
     const itemsArray = that.model.children
     callback(itemsArray)
  }
}

@noogen,
So for example, if my v-model parameter is myChoices (which is already an array) and I've already defined it in the data() methode of my component, all I have to do is callback(this.myChoices)?
Do I have to define callback itself?

The component expect that you pass in a method that accept 1 parameter that is a function.  So the answer is yes, callback is whatever you call as first parameter of the dataLoader method.    Let say your dataLoader method is called someMethod(), then you would define it like so:
someMethod(cb) {
  // since you already define myChoices in data(), simply return it here
  cb(this.myChoices)
}

@noogen, I got an error. This is the dataLoader part I put in the wrapper options :
dataLoader: {
    tableData() {
        cb(this.groupAlat);
    }
},

this.groupAlat is a v-model from a multiselect box, defined as groupAlat: [] in the return part of data() method.
When I look at the reponse of datatable, it was the HTML of the page, not a JSON at all.
So, where am I doing wrong?

@noogen, nevermind....silly of me, I still use serverSide: true in my options :smile:.
Thanks for the help!

So after a lof of mix-ups, here's what I got in my code :
// in <vdtnet-table> tag :
:dataLoader="loaderGroupAlat"

// in method() part of the Vue :
loaderGroup (cb) {
    cb(this.groupAlat)
}

this.groupAlat is a v-model parameter from multiselect box and it's an array of objects, defined in the return {} part data() as groupAlat: [].
This doesn't work, and I got an error message Error in mounted hook: "TypeError: Cannot read property 'style' of undefined".
What did I do wrong?

It should be.
:data-loader="loaderGroupAlat"

Also, that error is something else.  You have some bad html somewhere relating to a component that has "style" attribute definition.

I've used vdtnet-table on usual server-side scripting and using camelCase, but there's no error regarding that.
If I remove the :data-loader prop from the vdtnet tag, the error message is gone.
I'm sure I don't use style attribute anywhere on the page.
Also, on mounted phase, there's nothing showing on the table even though this.groupAlat has values in it. But when I change the selection in multiselect element, the table shows the data. I think it has something to do with the error message I mentioned before.

Thanks @noogen I'll check out that table.
Appreciate the reply

Stale issue.


Dynamic parameter validation

This PR adds more dynamic parameter validation, making use of ParamTools ability to make the valid choices for some parameters dependent on the value of others.
cc @hdoupe

It appears there's an issue with CodeCov.io.  There are failures to upload the coverage report in all the repos I've been working in.

It appears there's an issue with CodeCov.io.  There are failures to upload the coverage report in all the repos I've been working in.

@rickecon This PR is ready to review.  All tests pass locally.  Failure of GH Action has to do with uploading code coverage reports to CodeCov.io.

@rickecon This PR is ready to review.  All tests pass locally.  Failure of GH Action has to do with uploading code coverage reports to CodeCov.io.

@jdebacker . This update to default_parameters.json is so cool. Thanks for doing this.

@jdebacker . This update to default_parameters.json is so cool. Thanks for doing this.


Add golang ci lint to CI

Some (mostly mechanical) fixes to run https://golangci-lint.run/ in CI. Also runs tests against explicit major versions of Go.

Merged. Thanks!


issue collection/overview of wxWidgets, wxGTK, wxPython (Phoenix), wxmac

FUD surrounding these packages mostly around resolving a kicad issue suspected to be caused by an incompatibility between wxWidgets 3.1.2 and wxPython 4.0.7

except for wxmac, none of these have a listed maintainer
wxPython releases depend on non-release wxWidgets revision
With help from their forum, i got wxPython 4.1.0 building
The result however is not usable probably due to it being in a buildPythonPackage
we now have wxGTK3*-gtk[2|3] (#90428)
While a practical and well meant approach by @peterhoeg to transitioning to gtk3 (#73145)
This means we have 4 packages providing wxWidgets,
plus wxmac and possibly the need for a wxPython.wxWidgets
wxPython, wxPython30, wxPython_4_0
What attribute should wxPython-4.1.0 be?
@veprbl seemingly suggested the _4_0 here
pkgs.wxGTK provides wxGTK but the pname is wxwidgets, their docs suggest it should be wxGTK?
4.1. wxmac should be wxOSX?
#86040

possibly interested parties
@deliciouslytyped @tbenst @lopsided98 @worldofpeace @matthewbauer @vcunat @FRidh @LnL7 @matthuszagh @tokudan

wxPython, wxPython30, wxPython_4_0
What attribute should wxPython-4.1.0 be?
@veprbl seemingly suggested the _4_0 here

This is based on a proposal: https://discourse.nixos.org/t/an-attrpath-format-policy-proposal/235
It was not formally accepted, I believe. And there are some namespaces where it is not always followed (e.g. for pythonPackages the attribute name supposed to match pypi package name)


swap-order="with" error

I'm submitting a bug report

Library Version:
1.1.1

Please tell us about your environment:

Operating System:
OSX 10.11.6

Node Version:
6.8.1

NPM Version:
3.10.8

JSPM OR Webpack AND Version
JSPM 0.16.48

Browser:
all

Language:
all

Current behavior:
When I use </router/view> an error occurs:
[app-router] TypeError: Cannot read property 'animatableElement' of undefined.
And the navigation does not occur. If I remove swap-order="with" or change it to "before" or "after", the error disappears and navigation works correctly.
GistRun: https://gist.run/?id=483906685f79bb97b0c35b28a9af68d8
There is a post from another user on stackoverflow (see link below) that says this does not occur in version 1.0.0 but I haven't verified this. I do know that swap-order="with" worked in previous versions.
stackoverflow post: http://stackoverflow.com/questions/41029542/error-aurelia-templating-router-1-0-1-with-swap-order
Expected/desired behavior:
No error should occur and navigation should work properly.

What is the expected behavior?
See above.

What is the motivation / use case for changing the behavior?
Bug.

This issue appears to be in the swap function in router-view.js of the aurelia-templating-router.
Currently, previousView is defined inside of the work function definition like this:

//router-view.js

  swap(viewPortInstruction) {
    let layoutInstruction = viewPortInstruction.layoutInstruction;

    let work = () => {
//////////////////////////////////////////////////////////////////////////
     let previousView = this.view; ////This is not being correctly set
//////////////////////////////////////////////////////////////////////////
      let swapStrategy;
      let viewSlot = this.viewSlot;

      swapStrategy = this.swapOrder in swapStrategies
                  ? swapStrategies[this.swapOrder]
                  : swapStrategies.after;

      swapStrategy(viewSlot, previousView, () => {
        return Promise.resolve().then(() => {
          return viewSlot.add(this.view);
        }).then(() => {
          this._notify();
        });
      });
    };
...

As it stands, previousView is not being set with the correct object for the Previous View and is failing to be found as it should when it is being removed.
When I changed previousView to be defined in the scope of the swap function everything seemed to work as it should and it passes all tests.
It appears that all that needs to be done is simply to move the previousView definition.
//router-view.js

  swap(viewPortInstruction) {
    let layoutInstruction = viewPortInstruction.layoutInstruction;
//////////////////////////////////////////////////////////////////////////
    let previousView = this.view;  ////This is now being correctly set
//////////////////////////////////////////////////////////////////////////

    let work = () => {

      let swapStrategy;
      let viewSlot = this.viewSlot;

      swapStrategy = this.swapOrder in swapStrategies
                  ? swapStrategies[this.swapOrder]
                  : swapStrategies.after;

      swapStrategy(viewSlot, previousView, () => {
        return Promise.resolve().then(() => {
          return viewSlot.add(this.view);
        }).then(() => {
          this._notify();
        });
      });
    };
...

You can easily reproduce the error here:
https://github.com/bbarne8/AureliaSwapOrderRepro

fix merged
can be closed


Adds new flag: reuseDraftOnly

@remixz Can you please review (and publish) this when you have some time? Thanks!


Being able to listen to platformBrightness from MediaQuery

I'm currently taking advantage of platformBrightness from MediaQuery to be able to set different colours for the status and navigation bar, but it doesn't work very well when the user switches themes since my app is unaware.
However, it would be great if we were able to listen, when a user switches to a dark theme whether on a Samsung device, Android, or iOS. If we were able to do that, we could be able to change the status bar and navigation bar colours when the user switches from dark mode to light mode and vice versa.

CC @darrenaustin, @LongCatIsLooong
You should already be able to depend on MediaQuery.of(context).platformBrightness on both Android and iOS, i.e. the MediaQueryData.platformBrightness value should change and dependent contexts should be rebuilt automatically.

As Hans mentioned, you can just use the value of MediaQuery.of(context).platformBrightness in your build methods to react to changes to the system settings for dark themes. A minimal example:
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData.from(colorScheme: const ColorScheme.light()),
      darkTheme: ThemeData.from(colorScheme: const ColorScheme.dark()),
      home: Builder(
        builder: (BuildContext context) {
          final MediaQueryData mediaQuery = MediaQuery.of(context);
          final String brightness =
            mediaQuery.platformBrightness == Brightness.light ? 'light' : 'dark';
          return Scaffold(
            appBar: AppBar(
              title: Text('Brightness test'),
            ),
            body: Center(child: Text('Let there be $brightness')),
          );
        },
      ),
    );
  }
}

When the system settings change, this will automatically trigger a rebuild of the dependent widgets and the change will be reflected in the MediaQuery values. In this case the Text widget will display a different value based on the platformBrightness. You can use a similar pattern to adjust the colors and other visuals of your app accordingly.
Can you give us an example of where this doesn't work for you?

I'm using a system with initialRoute, would it work the same way? If so, can you give me minimal example of how? I'm not home right now, but I can get something up later.

I can't seem to make it work with a route system, would I have to make a builder in each build function checking the platformBrightness in each?

Using this code on the initialRoute page, it doesn't seem to work. The only reason the status bar seems to work is because the background of it is transparent. It's very likely that I'm doing something wrong and that I just can't see it since I'm very tired but here it is.
class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Builder(builder: (BuildContext context) {
      final MediaQueryData mediaQuery = MediaQuery.of(context);

      if (mediaQuery.platformBrightness == Brightness.dark) {
        Themes.setDarkSystemColors(); // Nothing special, just uses SystemUiOverlayStyle
      } else {
        Themes.setLightSystemColors();
      }

      return Scaffold(
        appBar: CustomAppBar(title: "Home"),
        drawer: CustomDrawer(),
        body: SizedBox(),
      );
    });
  }
}

Does MediaQuery.platformBrightnessOf resolve this issue? https://api.flutter.dev/flutter/widgets/MediaQuery/platformBrightnessOf.html


Search Functionality for elements

I think we need search functionality in elements to be working. It'll make the app more slick.
Also I think there should be a back button after selecting a group of elements because after selecting a group of element
user is not able to go back to elements again.
Let me know what do you think about this Savio.

This looks like a great idea, feel free to work on this 👍


Create: neon-startup service

The HAProxy container deployed to cluster nodes to provide HA access to Etc does not restart automatically on node restart after we converted to CRI-O.  We suspect that CRI-O is not honoring the restart-always option (perhaps by design).
The solution is to create a new neon-startup systemd service that is configured to start after CRI-O.  Note that kublet and any other Kubernetes base services seem to run as static pods by default rather than as systemd services, so we won't be able make those services dependent on the new neon-startup service.

Looks like we can use a static pod for this:
https://unofficial-kubernetes.readthedocs.io/en/latest/concepts/cluster-administration/static-pod/

Looks like we can use a static pod for this:
https://unofficial-kubernetes.readthedocs.io/en/latest/concepts/cluster-administration/static-pod/

@marcusbooyah: Is this still necessary or can we close it?

This is done. We're using it for the registry too.


Filetype filtering

Is a filter for filetypes (e.g. RegEx based) planned? I need a file picker that only shows SVG files :)

Extension filtering has been explained here in the Wiki.
In reference to link above, your extension array would look like:
String ext={"svg"};
and dialog will include only svg files.

Ah, thanks a lot! I ctrl-f-ed for "filter", that's why I didn't find it :)


Bump to latest version

Changelog: https://github.com/ministryofjustice/data-platform/blob/main/containers/daap-get-glue-metadata/CHANGELOG.md

This is working as expected in the sandbox. Just need to sort out the lint issues.


text_detection_db/demo.py

There are two bugs
64 to 72,69 line needs a '',"
model = DB(modelPath=args.model,
               inputSize=[args.width, args.height],
               binaryThreshold=args.binary_threshold,
               polygonThreshold=args.polygon_threshold,
               maxCandidates=args.max_candidates,
               unclipRatio=args.unclip_ratio
               backendId=args.backend,
               targetId=args.target
    )

83 to 85,the score is a float in line 85
   print('{} texts detected.'.format(len(results[0])))
        for idx, (bbox, score) in enumerate(zip(results[0], results[1])):
            print('{}: {} {} {} {}, {:.2f}'.format(idx, bbox[0], bbox[1], bbox[2], bbox[3], score[0]))

Thanks for locating the bugs! You are welcome to make a pull request to fix it.

Hi Tong @the-star-sea, it would be nice if you could submit a PR to fix this bug.
Some potentially useful information:
CPP demo of DB model

ok.I will do it today


is_test option

The is_test option (https://akismet.com/development/api/#comment-check) would be very handy, especially when running integration tests on my application.
Appears easy enough to implement but would be willing to submit a pull request if required :)

Thanks for the issue! I can definitely see the use case for this.
I'm open to a pull request which adds this functionality, or if you want to wait I should have time to get to this by the end of the week :)

Pull request submitted!

This was resolved in #43

Published in 2.2.0


Roll the engine and update for new binary names

This may have broken the platform_channel_test_ios and flutter_view_ios__start_up tests.

This also seems to have significantly regressed the microbenchmarks_ios stock_build_iteration and stock_layout_iteration benchmarks.


plotting code

https://www.sciencedirect.com/science/article/pii/S0165783623000450
Can someone point me to the code used to make Figure 3 in the paper? I know it's somewhere in postprocessing/Plots, but I'm not really sure which one it is.

Those should be the SSBplotwithCI, FplotwithCI, and CatchplotwithCI. But there must have been code that combines them in one plot, so I can do some digging or maybe @mdmazur knows off the top of her head.

But there must have been code that combines them in one plot, so I can do some digging or maybe @mdmazur knows off the top of her head.

Thanks @jerellejesse .. I don't need that now.  No need to go digging around for it.