add.php dropdown issues

it automatically selects the first subject instead of showing the question like it's supposed to
add selected to the option containing the question, and check if it has been changed at submission

it doesn't select the question because of the disabled tag you added in 5b06a91523226040036ad4c5306b1cce77996159

so do i remove the disabled tag or do I add the selected tag next to the disabled tag (which sounds weird to me but HTML often sounds weird to me)

ok i add both

you add selected. html can select anything, disabled is just a restriction for the user

"Warning: Undefined array key "class" in C:\xampp\htdocs\exam_prep\main\add.php on line 26"
if you try to add a topic without selecting a subject, it does throw it back along with the toast, but it also gives this error

didn't do that before, great

ok so disabled option doesn't send value back

ok so disabled option doesn't send value back

why would it? disabled => you can't submit that, that's not a valid option


New get_supported_countries function

This PR adds a new get_supported_countries function that has a different approach to the existing list_supported_countries.
This implementation search for the HolidayBase subclasses that are in the holidays.countries folder/module.
With this approach only first subclass is take in consideration.
The method returns a map the keys of which are the countries (large name) and as values a CountryInfo object created for this purpose.
This class exposes the following information about the countries supported by the library:

name
classes extending from class
states (if you have)
provinces (if you have)

Also a subcountries property has been added to return the list of states or provinces in a unified way.

Upssss, not dataclasses in Python6.
Would it be appropriate to add it as a dependency?I will delete it for now.

The new approach have some differences with the actual list_supported_countries.
Fisrts of all, don't return all the Alpha-2 and Alpha-3 code classes, only the 'large' country Name.
But also there are some diferences in the list that returns (despite teh short codes).
I have run a little test to validate diferences in implementations:
l_s_c = holidays.utils.list_supported_countries()
g_s_c = holidays.utils.get_supported_countries()
filtered_cntrs = {fc for fc in l_s_c if len(fc) > 3}  # only validate against 'large' names

for k in filtered_cntrs:
    if k not in g_s_c:
        print("-- %s" % k)

for l in g_s_c:
    if l not in filtered_cntrs:
        print("++ %s" % l)

and here is the result:
-- PRTE
-- Ireland
-- Wales
-- Scotland
-- NorthernIreland
-- PortugalExt
-- IsleOfMan
-- Slovak
-- Polish
-- England

So, there is no 'country' in the new method that does not return the first one (there was one, but PR #574 is being corrected).
But there are a few 'countries' in the old method that are not included in the new one. Let's see which ones are:

deprecated classes:

Wales

Scotland

NorthernIreland

IsleOfMan

Slovak

Polish

UnitedKingdom subclasses

Ireland

not filtered

PRTE

IMHO the deprecated classes is fine that they do not come out (we don't want them to be usable right?)
Ireland is a country of its own, so the initialization could be modified to make it extend from HolidayBase and get all the UnitedKingdom holydays.
And PortugalExt is something odd. The same approach as in Ireland can be taken here and extend from HolidayBase. PRTE appears here because size > 3 (and not, can not put > 4 because Peru).

:warning: Tests will fail until PR #574 is merged.

Close/open to launch tests

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

21 of 21 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.004%) to 97.861%

Totals

Change from base Build<PHONE_NUMBER>:
0.004%

Covered Lines:
5792

Relevant Lines:
5860

💛  - Coveralls

Hi @javicalle ,
thank you for your work.
Although in the meantime I/we have made some improving code fixes (eg: removed support for already deprecated names, some UK cleanups, etc..), I still don't like so much the constraints inducted by this change, and I also feel it lacks some of the required strictness (especially regarding some countries lost on the way).
I would possibly prefer a different, more controlled approach, such as adding a class property to HolidayBase, eg:
class HolidayBase(dict):
    synonym = False
    [...]

to be then overridden by synonym classes, ie: all ISO code-based classes should do
class PRTE(dict):
    synonym = True

so finally, when returning the list, only non-synonym classes would be considered.
Although requiring some extra work (small refactoring on every class), this would allow complete control on the listed classes, without enforcing rules on the class hierarchy.
Pls let me know your thoughts / if you would like to work on this change.
Thank you very much, cheers!

I understand (and share) the objections to my approach. In my defense I will say that I have looked for a middle ground between the current implementation of list_supported_countries and that it was not too disruptive. 😇
The proposed approach does not seem bad, but I have some doubts, how are the aliases related to the main class?
I've been trying another approach, which maybe could fit:
class Spain (HolidayBase, metaclass = AKA):
    "" "Spain holidays." ""

    country = "ES"  #or maybe alpha2
    alpha3 = "ESP"
   .../...

The AKA metaclass will create the class aliases:
class AKA (type):
    """
    'Also Known As' metaclass to create aliases for a class.
    This will create aliases for the Alpha-2 and Alpha-3 country codes.
    """

    def __new __ (cls, classname, bases, attrs):
        class_ = type (classname, bases, attrs)
        globals (). update ({attrs.get ("country"): class_})
        globals (). update ({attrs.get ("alpha3"): class_})
        return class_

This way any Holiday will be defined in a single class. The aliases are created automagically. All class info can be getted from the class.
Constraints must be defined (is country attribute required? and alpha3?), controls must be added and so on, but I believe that can be a clean approach.
What do you think?
Any other approach would be fine to me but my concerns are mainly 2:

be able to obtain some type of list that allows exploiting the configurations
some freedom to create class structures in each 'country' file

Cheers.

Hi @javicalle
thank you and sorry for my belated answer.
My last code snippets were not in fact exact nor totally clear: I've reviewed them.
Your approach seems promising: it's very smart and advanced (although maybe a bit complex to be understood, to be honest! :-) ).
I need a bit more time to analyze it in depth.
Pls let me know if the last changes I applied to my previous message make myself a little clearer, and what do you think about my proposition.
Thank you very much!

Hi, this has been superseded by #608 (different, more structured approach, similar results), therefore I'm closing it.
Thanks a lot, cheers! 👍


fix('networkd'): don't remove files when using profiles

while using networkd:profiles running networkd.init would remove the files.
not anymore testing if pillar profiles is filled skip file recurse.

@aboe76 centos-7 is still failing.

@myii fix the centos part.

@aboe76 All looking good now but now you've been caught out by the commitlint!  Do you want to fix it or do you want me to do it when merging here?

@myii please do it for me.

@aboe76 The title of this PR was fine, so I used it as the commit message.  All should be good now, it's been merged.  Thanks!

:tada: This PR is included in version 0.12.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Support custom conversion during binlog synchronization

Hi, Town：
Does it support data set column clipping when real-time synchronization is performed through binlog，My thoughts are as follows：
(1) Support user-defined SQL to simply process data sets during synchronization.
(2) Multi column derived fields are supported for partition column assignment of Hoodie table.

I get it!
I plan to add a user-defined logic before data warehousing, which can support SQL semantics firstly


Error when loading shipper into Lambda

When loading shipper into lambda and following the guide as described, the following error is recieved when tested, and the logs aren't being pulled through as expected:
{
"errorMessage": "Unable to import module 'lambda_function'"
}
START RequestId: e1cd6cb4-d3a9-11e8-b091-fb68b51def34 Version: $LATEST
Unable to import module 'lambda_function': No module named shipper
END RequestId: e1cd6cb4-d3a9-11e8-b091-fb68b51def34
REPORT RequestId: e1cd6cb4-d3a9-11e8-b091-fb68b51def34	Duration: 0.96 ms	Billed Duration: 100 ms 	Memory Size: 512 MB	Max Memory Used: 18 MB

@jackjohnsonontrac
The zipping instructions are not updated because of the structure changes. Can you 'cd' into cloudwatch folder and try 'mkdir dist; cp -r ../shipper dist/ && cp src/lambda_function.py dist/ && cd dist/ && zip logzio-kinesis shipper/* lambda_function.py' .
I will update the readme soon :)

@idohalevi
Thanks, works a treat now!

Alternatively, you can edit line 6 in lambda_shipper.py in the AWS Lambda Management Console:
from shipper.shipper import LogzioShipper to from shipper import LogzioShipper
for a 'quick and dirty' fix.

@LennartKloppenburg Exactly! thanks


Removed append_strings function, instead use join

The function join in Base was pretty similar in function to our append_strings, and also a little bit faster.

Nice catch, I didn't know there was a join function when I wrote that. I even had a test for it haha.
Thanks.

Coverage decreased (-0.25%) to 47.03% when pulling 30a99eb7000fc9709bfcbf230ffde4f3822b063b on brk00:master into 48b97ba9c6c42a1e1db330149d5f1b8dddb81a73 on codles:master.

Is it possible to remove coveralls from checks? When the coverage decreses, it gives the impression that tests are not passing (a big red X in front of the PR on PR's screen), which isn't necessarily true.


Cookie banner does not appear

After following the installation instructions, both from the blog post and this repo, I was unable to get the plugin working. Specifically:
Gtag loads and sends analytics OK, but at no point does the consent banner appear.
I noticed the section where you mention the script tags in the blog post (shown below), but it is unclear to me: are these tags implemented in the plugin code, or should I put them in my application code manually?
<script
      key={`gatsby-plugin-google-gtag`}
      type="text/plain"
      data-category="analytics"
      src={`${origin}/gtag/js?id=${firstTrackingId}`}
    />,
    <script
      key={`gatsby-plugin-google-gtag-config`}
      type="text/plain"
      data-category="analytics"
      dangerouslySetInnerHTML={{ __html: renderHtml() }}
    />,

Thanks for reaching out @lymperis-e .
The described script tags you are mentioning are indeed adjusted in the plugin code, which is the main reason why I had to fork the original gatsby-plugin-google-gtag plugin. Namely here. The post I put up in order to describe the way the plugin was developed. The important part here is that the scripts get the data-category attribute and that you have the analytics category in your consent config like so
exports.cookieConsentConfig = {
  categories: {
    necessary: {
      enabled: true, // this category is enabled by default
      readOnly: true, // this category cannot be disabled
    },
    analytics: {},  // <--- this needs to be here
  },
  language: {
...
  },
};

It is difficult to say why the plugin is not showing up. A first point to check could be that the plugin is added correctly to the gatsby-config.js. Mine looks like this
plugins: [
    {
      resolve: `gatsby-plugin-google-gtag-cookieconsent`,
      options: {
        cookieConsentConfig: cookieConsentConfig,
        googleGtagPluginConfig: {
          // You can add multiple tracking ids and a pageview event will be fired for all of them.
          trackingIds: [
            "GA_ID", // Google Analytics / GA
            // "AW-CONVERSION_ID", // Google Ads / Adwords / AW
            // "DC-FLOODIGHT_ID", // Marketing Platform advertising products (Display & Video 360, Search Ads 360, and Campaign Manager)
          ],
          // This object gets passed directly to the gtag config command
          // This config will be shared across all trackingIds
          gtagConfig: {
            optimize_id: "OPT_CONTAINER_ID",
            anonymize_ip: true,
            cookie_expires: 0,
          },
          // This object is used for configuration specific to this plugin
          pluginConfig: {
            // Puts tracking script in the head instead of the body
            head: false,
            // Setting this parameter is also optional
            respectDNT: true,
            // Avoids sending pageview hits from custom paths
            exclude: ["/preview/**"],
            // Defaults to https://www.googletagmanager.com
            origin: "https://www.googletagmanager.com",
          },
        },
      },
    },
    ...
 ]
    ```

And that you have the `cookie-consent-config.js` next to the `gatsby-config.js` file.

After having a second thought, the issue is most likely related to this
export const isPluginDisabled = (pluginOptions) => {
    return !pluginOptions.enableForAllEnvironments && process.env.NODE_ENV !== `production` && process.env.NODE_ENV !== `test`
}

So without NODE_ENV==='production' the plugin won't work unless enableForAllEnvironments is set to true in the plugin options. This is probably not a good limitation and I should change the configuration to have a simple enabled flag that can then be configured in any way.

Could be something like this https://github.com/astoiccoder/gatsby-plugin-google-gtag-cookieconsent/pull/4

I had enableForAllEnvironments set to true. I just noticed that I had both this plugin and the original gatsby-plugin-google-gtag installed. I  uninstalled the later, but then I got stuck at #2

@lymperis-e thanks for being persistent on this matter. I was able to reproduce the issue in https://github.com/astoiccoder/gatsby-plugin-google-gtag-cookieconsent/issues/2 with a simple blog starter, which is fixed for now in 0.0.6.


cannot scroll while dragging

while dragging an element i cannot scroll anymore.
is there a way to fix this?

+1

+1

+1

My temporary solution:
var _x, _y;

function cursorScroll(e){
	if (_x && _y && e.which == 1) {
		window.scrollBy(e.clientX - _x, e.clientY - _y);
	}
	_x = e.clientX;
	_y = e.clientY;
}

sortable('.js-grid')[0].addEventListener('sortstart', function(e) {
    document.getElementsByClassName('js-grid')[0].addEventListener('mousemove', cursorScroll);
    //...
});

sortable('.js-grid')[0].addEventListener('sortstop', function(e) {
	document.getElementsByClassName('js-grid')[0].removeEventListener('mousemove', cursorScroll);
	//...
});

It's not unlock scroll, but when you dragging object you can scroll page with cursor, just move cursor to the bottom.

Hey @Wakirin,
do you think you could turn this into a PR with tests?

@lukasoppermann, I can try, but later.

I created example file with long list http://dev.coding.kz/html5sortable/examples/long-list.html
and there scrolling working without this function (cursorScroll). lol.
I don't understand, when I did the same on my project it's not worked.
@lukasoppermann I think issue can be closed?

Hmm, this is weird indeed. Did you test it in the same browser & same version of the package?

Package version the same.
Browser Chrome, current version 56.0.2924.87 (64-bit), but don't know what version when I tested it on my project.
Again test it on my project, I can, but later.

I was tested it again on my project without this function (cursorScroll), and it's working.
Don't know what happened, maybe some conflicts or I just hurried.

Good to know, thanks.

I created example file with long list http://dev.coding.kz/html5sortable/examples/long-list.html and there scrolling working without this function (cursorScroll).
Scrolling on this site works for me in current Chrome (but kind of awkward) and Internet Explorer, but not in Firefox. With the old version of html5sortable from Ali Farhadi I used dndPageScroll (https://github.com/martindrapeau/jQueryDndPageScroll) which worked nicely in all browsers. Unfortunately it does not work with the current html5sortable.
dndPageScroll acts on dragstart, but there's no reaction when in use with the current version of html5sortable. Do you have any idea why dndPageScroll does not catch the dragstart event?

It could be that we swallow the dragstart https://github.com/lukasoppermann/html5sortable/blob/master/src/html.sortable.js#L546. maybe you can create a fork and try if changing this helps and if it has any other negative consequences? If not feel free to send in a PR.

I'm seeing this issue but only in Firefox on Linux desktops (I've tried Mint and Ubuntu).

Okay, I can not test this. Do you have any solution for the issue?

I don't offhand.  I am curious though, will play with it some more.  I guess one could check in the dragover event if near the visible top/bottom of container and scroll if needed.  Might be strange on browsers that currently do the right thing though.
I do have a possible PR, I made it possible to pass options.placeholder and options.dragImage as funcs.

Okay, looking forward to seeing what you come up with.
The PR you mention is not related to this issue though, correct? If you have the code already written, please submit it as a PR so we can discuss & merge it, thanks. 👍

Correct, unrelated...  I needed more control over those things in our application.

Okay, looking forward to your PR

Try to use this. It's works for me (tested in Safari and Chrome).
 body {
   overflow-y: scroll;
 }


re-evaluate succinct key design

current succinct delegation process has threeparts

create delegation
create delegation key (store it for each delegated role)
initialize metadata for each delegated role

but only two commands:
tufrepo edit demo add-delegation --succinct 256 demo-bin
tufrepo init-succinct-roles demo

this works but the key is now magic that happens without user having any control: init-succinct-roles creates it -- but we don't know if user actually wanted a new key or not, and user might not even notice that a key was created... I think it would make sense if the key-step was separate just like it is for other delegations:
tufrepo edit demo add-delegation --succinct 256 demo-bin
tufrepo edit demo add-key
tufrepo init-succinct-roles demo

this would require two changes:

add-key would not need "delegate" argument iff the delegation is succinct (but would need to store the key in keyring for each delegated role)
ini-succinct-roles should stop doing anything with keys

cc @MVrachev for comment

I think you have a point that the behavior for succinct hash bin delegation should be the same as when delegating to a standard delegation.
It makes sense to split the process in three steps given how important is a key addition.
About that:

add-key would not need "delegate" argument iff the delegation is succinct (but would need to store the key in keyring for each delegated role)
that's easy to do as we are actually doing that in init-succinct-role:
https://github.com/vmware-labs/repository-editor-for-tuf/blob/9896bcf2606307276a7bf9a217e8c6a187b1fe97/tufrepo/cli.py#L142-L145

I will work on that.


Feature 2933 rename to pdssecretscanconfigbuilder

Rename PDSSecretScanConfigImpl's PDSLicenseScanConfigBuilder's static class to PDSSecretScanConfigBuilder to standardized the naming convention.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Stephen Leow seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

Hi @steleow thanks for the contribution! :+1:
This pull request seems to contain more changes than you did.
The changes from me @sven-dmlr and @de-jcup are already in the community branch.
I suspect your "force-push" caused this.
Can you please create a new PR that contains only your changes?
(The branches community and develop are even)
Thanks in advance.

@steleow - thanx for the contribution, but looking at the commits (like @sven-dmlr explained before) there is something wrong with the history.
Maybe you did not rebase on pulls and you used merges instead?
Our git setup is described at
https://mercedes-benz.github.io/sechub/latest/sechub-techdoc.html#sechub-wanted-setup
Because the PR says BasicAuthUserExtraction.java is not in origin/community, but
looking at https://github.com/mercedes-benz/sechub/blob/community/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/logging/BasicAuthUserExtraction.java
shows it is, we have an odd situation inside the PR.
So also from my side: Could you please create a new PR that contains only your changes?
Remark: I noticed that the git setup is not documented in Developer Quickstart guide, so I created an issue for  this at https://github.com/mercedes-benz/sechub/issues/2959.

hi @sven-dmlr, @de-jcup Sure, I will close this PR and create a new PR for the changes.


Add ORCID as an authentication method for Cognito

Setup an OpenID connect integration with our Cognito user pool.

Moving this to the backlog. Something we can consider down the line

Would start with research spike to get an estimate, understand work

We got a request for this in the dmptool repo https://github.com/CDLUC3/dmptool/issues/638


Manifest should return "vary" header

"vary" header should be returned when fetching a manifest. This has been implemented for iiif and storage collections (see #19)
Implementation note - ideally the manfiest/iiif-collection/storage-collection methods should share a way of returning 'stuff' as they're all flavours of IIIF / JSON. This could set headers (accepts / content-type / cache etc).  Similar approach in Protagonist is https://github.com/dlcs/protagonist/blob/91633e0a8b1d23c34f9ebeb3b1970682c8ef115b/src/protagonist/Orchestrator/Infrastructure/IIIFAssetControllerBase.cs#L65-L66

The ticket mentions creating a way of "sharing stuff", but I believe this might already be implemented for the Vary via the use of decorators


tests?

I have no idea about this
@sanny-io @dishwasher-detergent send help

There are so many endpoints that it would be pretty tedious to mock each individual one, so I think integration tests are the way to go -- at least for now. I have opened a pull request with a basic setup for this.

@probablyArth does this look easy enough?
https://github.com/react-appwrite/react-appwrite/blob/ff632ef188a4e055a93a8998c4e0a3191c847236/tests/avatars.tsx#L11-L279

Yes! I think we can move forward with it :ok_hand:


X370 Gaming Pro Carbon not working

The default, 4e, only changes this LED:

I can disable it and make it pulse but that's it.
2e gives me this error and using --ignore-check doesn't change any LED:

Goto #5.


Add support for collapsing all output modes

This makes the collapsing work in all output modes (other than PreviewHTML).
It also fixes the problem where NativeMML output is collapsed initially when it shouldn't be.

Observations:
SVG: Collapse works stepwise when using the slider. Interactively, when I try to uncollapse sub-expressions or collapse parts of the formula, I always get a collapse of the full formula. Maybe there's a problem with bubbling, or I just can't hit the right rectangle. (FF + Chrome + Opera on Linux)
NativeMML: Top level is now uncollapsed. Collapse works stepwise when using the slider. Interactively, it does the same to-and-fro-ing between top-level and un/collapsed subexpressions. (FF on Linux)

Update:
SVG: The Collapse problem was because I was running with a local MathJax and not the rawgit!


automated testing

added testing CI
added badge for flutter testing

flutter testing is suppose to fail at this point so this is actually running perfectly fine contrary to how it looks


sharding-jdbc Cannot support sub query for join table

sharding-jdbc Cannot support sub query for join table? i remember it seems works good at old version.

Before asking a question, make sure you have:

Googled your question.
Searched open and closed GitHub issues.
Read documentation: Sharding-Sphere Doc.


[backport] Avoid looking up null pointers' attributes

Backport of #2802

[automatic post] Jenkins, test this please.

We should also back port to v6 as this touches the consumer side.

@leofang Thank you for pointing out! #2868

Jenkins CI test (for commit 61bb14fb71573e679ffc8bd463c8ef03ba2861f5, target branch v7) succeeded!


Generate code regarding queued state machines is not valid

Consider the following example:
interface I{
  void test();
}

class TestSM {
  isA I;
  queued sm{
    s1 {
      e1 /{System.out.println("e1");} ->s2;
    }
    s2 {
      e2 /{System.out.println("e2");} ->s1;
    }
  }
}

In the generated code, we have the following line:
public class TestSM implements I implements Runnable

That's wrong. It must be like the following line:
public class TestSM implements I, Runnable

This was a duplication.


Update WorkflowExecuteRunnable.java

What happened
When it exists in the conditional node, that is, the task flow can execute and complete the DAG task correctly, at this time, the task flow status cannot be considered as a failure because of a node error in the task flow. This will cause dependent nodes not to correctly identify the task flow state
What you expected to happen
xxx
How to reproduce

Use conditional nodes
Let the task flow go to the failure branch of the conditions node

Anything else
No response
Version
3.0.3, 3.0.4, 3.1.x, dev

Hi @ititdog please use the correct title, thanks.
See https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md


COCO class number is wrong?

Hi,
Thanks for the contribution.
I saw the config.py has "num_classes: 201" in coco.
Is that the right number? I thought it should be 81?
Thank you!

I have the same question.

yes, 81 is good


CLI: Prompt Error for unsupported cli commands

Current coverage is 72.63% (diff: 25.00%)

Merging #1154 into master will decrease coverage by 0.97%

@@             master      #1154   diff @@
==========================================
  Files           128        125     -3
  Lines         17586      17147   -439
  Methods        2492       2426    -66
  Messages          0          0
  Branches       2124       2070    -54
==========================================
- Hits          12946      12455   -491
- Misses         3830       3917    +87
+ Partials        810        775    -35

Powered by Codecov. Last update ab866ee...1967c62


Could not compile by docopt_macros error at macro.rs line 187

When I try to use docopt_macros v0.8.1, I found compile error like that,
-> % cargo run
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling docopt_macros v0.8.1
error[E0308]: mismatched types
   --> /Users/Khigashiguchi/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt_macros-0.8.1/src/macro.rs:187:20
    |
187 |              .map(|(ident, ty)| {
    |                    ^^^^^^^^^^^ expected struct `std::vec::Vec`, found tuple
    |
    = note: expected type `std::vec::Vec<(syntax::ast::Ident, syntax::ptr::P<syntax::ast::Ty>)>`
               found type `(_, _)`

error: aborting due to previous error

error: Could not compile `docopt_macros`.

My code is above...

src/main.rs

#![feture(plugin)]
#![plugin(docopt_macros)]

#[macro_use]
extern crate serde_derive;
extern crate docopt;

use docopt::Docopt;

docopt!(Args derive Debug, "
Usage:
    cref
    cref import <import-repo>...
    cref list
    cref update [<update-repo>...]
    cref delete <delete-repo>
    cref (--help | --version)

Options:
    -h, --help     Show this screen
    -v, --version  Show version
");

fn main() {
    let args: Args = Args::docopt().deserialize().unwrap_or_else(|e| e.exit());
    println!("{:?}", args);
}

Cargo.toml

[package]
name = "cli_search_proper_english_message"
version = "0.1.0"
authors = ["Khigashiguchi"]

[dependencies]
docopt = "0.8"
docopt_macros = "*"
serde = "1.0"
serde_derive = "1.0"

cargo --version
cargo 0.24.0-nightly (5bb478a51 2017-11-29)

rustc --version
rustc 1.24.0-nightly (1956d5535 2017-12-03)

Please teach me how to solve it.

In the future, please search the issue tracker for similar issues: https://github.com/docopt/docopt.rs/issues?utf8=✓&q=is%3Aissue+docopt_macros
docopt_macros relies on an unstable compiler plugin interface. It breaks somewhat regularly, and I don't have the time to maintain it. I take PRs that fix it, but otherwise, you're on your own. If stability is important to you, then don't use docopt_macros.


Implement Vue.notify()

What problem does this feature solve?
I am sorry if this has already been discussed because I think it's something quite basic but I was searching previous issues and I really didn't find it, so maybe I missed something.
When talking about reactivity in the guide, it's mentioned multiple times limitations about which operations will be reactive or not. For example, in the arrays example it mentions how this.myArray[index] = value will not be reactive and Vue.setor Array.splice should be used. But, for a general purpose scenario, there should be a Vue.notify method.
Let me give a real life example. I have a date picker component, which contains a Date object in the data. When I click a button to move the calendar to the next month, I execute the following code: this.date.setMonth(this.date.getMonth() 1) which doesn't trigger a notification, so I am forced to create a new object: this.date = new Date(this.date.getTime()). I have been looking in the source code to see how reactivity works exactly, and I found out this can be executed in order to trigger a notification: this._data.date.__ob__.dep.notify(). But this is obviously relying on internal implementation, so I think it would be useful to have a Vue.notify method (as well as this.$notify) in order to implement this functionality and make any further adjustments.
I have also seen the implementation of Vue.set and it ignores any value which is already set, so maybe it would also be an option to have Vue.set notify watchers if the property already exists.
What does the proposed API look like?
Vue.notify({vue model}, {reactive-property});

The key here is understanding the difference between plain object vs. native objects. A Date object is the latter and Vue will not attempt to observe its mutations.
And honestly, I think setting a fresh new Date object (treating date as immutable object) is cleaner, and I'd recommend using an immutable date utility lib like date-fns if you need to wrangle with dates a lot. I don't really see the necessity of an extra concept here.

@yyx990803 Thanks for your reply!
This date scenario is only an example, I understand with date it may not be so necessary but in my case I am not using Date, I am using Moment (which is not a native object) and the same applies, I need to call notify() manually or create a new instance. Maybe with dates it isn't so bad, but there may be some scenarios where this would be better. At the end of the day it'd only be a helper method and people can choose to use it or not, I thought it made sense since this.$watch() is available. Maybe I should have mentioned that I am using typescript, not sure it that has anything to do with the moment object not being reactive.
In any case, thanks for all your work, I recently started using vue and it's awesome. If you think it doesn't fit in the framework it's ok, I can always implement this myself in my project :smile:.
Cheers


[WIP] feat: refactor entry

Summary
Related Links

Checklist

[x] I have added changeset via pnpm run change.
[ ] I have updated the documentation.
[ ] I have added tests to cover my changes.

all the addRuntimeExports should comment deprecated ?

what's the different between the runtime/core/server and runtime/ssr

what's the different between the runtime/core/server and runtime/ssr

runtime/core/server will replace of runtime/ssr

Now context is a reserved field of , can we use _context or more private fields?


Imports .zh-CN into .ar-IQ

I've tried to import an Excel file with 49 Languages. The last two columns are .ar-IQ (empty) and .zh-IQ. The tool imports the .zh-IQ column into .ar-IQ and .zh-CN  resx file.   :-(

I've tried to import an Excel file with 49 Languages. The last two columns are .ar-IQ (empty) and .zh-IQ. The tool imports the .zh-CN column into .ar-IQ and .zh-CN resx file. :-(
Sorry - the first description  was wrong

Sorry, I don't understand either of them, can you please add some more details? It would be very helpful to attach an Excel file that can reproduce the problem and some screenshots that show what happens.
P.S.: you can modify or delete your comments if you did wrong.

iCatcher_WEEDSCOUT_Translations.xlsx

Hi Tom,
I have in the project all resx file in the Project. Than I try to update them with the Excel file. All works fine, apart from the last two columns. The tool includes the last column .zh-CN into .ar-IQ resx file.

@MarianXXL with your sample .xlsx it was straight forward to reproduce.
The CI build version on http://vsixgallery.com/ already has the fix.


copr: Use dnf builddep

Yet another copy of our build dependencies here... The core problem right now is that we embed pre-built manpages as part of the "source"...which means we need all of our build dependencies there.
It's tempting to switch to not generating man pages.

xref https://download.copr.fedorainfracloud.org/results/rhcontainerbot/bootc/srpm-builds/07689202/builder-live.log.gz


please re-instate copyright headers

👋 hey there, it appears the copyright headers were removed from the source code [1] in many of these files. I would kindly ask that you retain the origin copyright headers, in compliance with section 4.c of the Apache License. Thanks!
[1] https://github.com/drone/drone-go/commit/f543e903b5258a10a8366be9b54eff9cbbe27f61#diff-97dc6e5c80e7b897be6a7200517c396c

Hi @bradrydzewski, thanks for checking this, sorry somehow this has been wiped out, I have added them back! Thanks again.


Add an Integration Test Stage to the pipeline

As a wishlists Manager
I need an automatic integration testing stage on cloud
So that every new feature that is added is tested in the entire pipeline
Details and Assumptions

Add a Integration Test Stage to the pipeline to run your integration tests with behave against the Dev deployment

Acceptance Criteria
Given the service is running and deployed on cloud
When we merge a PR
Then integration tests should run in the pipeline

I have completed the addition of integration tests on pipeline on dev namespace. Below is the screenshot for the same:


Cannot use energy dispersion with fermitools

Hello,
I have tried to generate a binned like object using the nouveau argument edisp_bins, and
got the following error message when calling BinnedAnalysis() :
TypeError: init() got an unexpected keyword argument 'edisp_bins'
What is the correct method to apply energy dispersion ? I could not get it in the documentation.
The only occurence of string 'edisp_bins' being :
[landriu@sappcfermi] ~ > grep edisp_bins /dsm/saplxglast/glast/fermitools/1.2.0/lib/python2.7/site-packages/fermitools/*py
/dsm/saplxglast/glast/fermitools/1.2.0/lib/python2.7/site-packages/fermitools/BinnedAnalysis.py:                                   kwargs.get('edisp_bins', 0),
....
Thank you for your help,
David Landriu
PS: the whole test :
[landriu@sappcfermi] ~ > python
Python 2.7.14 | packaged by conda-forge | (default, Oct  5 2017, 14:19:56)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
*** Using startup saving python history in ~/.pyhistory ***

from BinnedAnalysis import *

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

obs = BinnedObs( irfs="CALDB", expCube="ltCube_100.fits", srcMaps="srcMap_5_E1.fits", binnedExpMap="binned_exposure_E1.fits")
like = BinnedAnalysis(obs,"srcModel_5_E1.xml-initial",optimizer="Minuit", edisp_bins=0)
Traceback (most recent call last):
File "", line 1, in
TypeError: init() got an unexpected keyword argument 'edisp_bins'

It looks like you are using the 1.2.0 version.  If you update, you should get the 1.2.1 version which fixed some issues with missing parameters.

Sorry,
I had the error in a fermitools 1.2.1 environment, but reproduced it in a 1.2.0 one .
I started again in  the proper one :
[landriu@sappcfermi] ~ > conda list | grep fermi
WARNING: The conda.compat module is deprecated and will be removed in a future release.
packages in environment at /dsm/saplxglast/glast/fermitools/1.2.1:
ape                       2.9                           0    fermi
f2c                       0.0.1                         0    fermi
fermitools                1.2.1            py27h39e3cac_0    fermi
fermitools-data           0.17                          0    fermi
[landriu@sappcfermi] ~ > which python
/dsm/saplxglast/glast/fermitools/1.2.1/bin/python
[landriu@sappcfermi] ~ > which gtlike
/dsm/saplxglast/glast/fermitools/1.2.1/bin/fermitools/gtlike
[landriu@sappcfermi] ~ > python
Python 2.7.14 | packaged by conda-forge | (default, Oct  5 2017, 14:19:56)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
*** Using startup saving python history in ~/.pyhistory ***

from BinnedAnalysis import *

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

obs = BinnedObs( irfs="CALDB", expCube="ltCube_105.fits", srcMaps="srcMap_5_E4.fits", binnedExpMap="binned_exposure_E4.fits")

like = BinnedAnalysis(obs,"srcModel_5_E4.xml-initial",optimizer="Minuit", edisp_bins=0)
Traceback (most recent call last):
File "", line 1, in
TypeError: init() got an unexpected keyword argument 'edisp_bins'

My investigation tells me that the "grep   " command gives same result on  BinnedAnalysis.py :
[landriu@sappcfermi] ~ > grep edisp_bins /dsm/saplxglast/glast/fermitools/1.2.1/lib/python2.7/site-packages/fermitools/BinnedAnalysis.py
kwargs.get('edisp_bins', 0),
Only pyLikelihood.py has occurences of edisp_bins, but I do not know if there is a
relationship with the current problem.
Thank you again,
David Landriu
PS :
[landriu@sappcfermi] ~ > grep edisp_bins /dsm/saplxglast/glast/fermitools/1.2.1/lib/python2.7/site-packages/fermitools/pyLikelihood.py
def edisp_bins(self):
"""edisp_bins(BinnedLikeConfig self) -> size_t"""
return _pyLikelihood.BinnedLikeConfig_edisp_bins(self)
init(Likelihood::Drm self, double ra, double dec, Observation observation, DoubleVector ebounds, size_t edisp_bins=0) -> Drm
init(Likelihood::Drm self, double ra, double dec, DoubleVector ebounds, DoubleVectorVector values, size_t edisp_bins=0) -> Drm
def edisp_bins(self):
"""edisp_bins(Drm self) -> size_t"""
return _pyLikelihood.Drm_edisp_bins(self)
def expand_energies(energies, edisp_bins):
"""expand_energies(DoubleVector energies, int edisp_bins)"""
return _pyLikelihood.expand_energies(energies, edisp_bins)
def edisp_bins(self):
"""edisp_bins(SourceMap self) -> size_t"""
return _pyLikelihood.SourceMap_edisp_bins(self)

I can reproduce this.  We also had another problem report today about BinnedAnalysis, so maybe something didn't get implemented correctly there.  I'll have @jasercion take a look. He's out today and Monday is a holiday here, so he might not get to it until next week.

@landriu This should be fixed in the most recent release.  Can you please confirm if it is still present?

Approach with edisp_bins definition via  BinnedConfig described  in
https://fermi.gsfc.nasa.gov/ssc/data/analysis/documentation/Pass8_edisp_usage.html
seems to work for positive values of edisp_bins.
Attempting to set edisp_bins to negative values, e.g. edisp_bins=-2 and checking if everything went fine:
conf = BinnedConfig(edisp_bins=-2)
print 'Conf edisp_bins = ' , conf.edisp_bins()
I've  got Conf edisp_bins = 0 , although no error, exception or warning is rised that
conf = BinnedConfig(edisp_bins=-2) failed.
For positive edisp_bins values correct value is returned by  conf.edisp_bins()

@landriu Is this still an issue or can it be closed?

Hi Don,
I have sent the following commands :
from BinnedAnalysis import *
obs = BinnedObs( irfs="CALDB", expCube="ltCube_100.fits", srcMaps="srcMap_5_E1.fits",binnedExpMap="binned_exposure_E1.fits")
like = BinnedAnalysis(obs,"srcModel_5_E1.xml-initial",optimizer="Minuit", edisp_bins=0)
and I still get the same outputs, with fermi-1.3.5 :
(fermi-1.3.5)
[landriu@sappcfermi] ~/dev/testEdisp_bins > python
Python 2.7.15 | packaged by conda-forge | (default, Mar  5 2020, 14:56:06)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
*** Using startup saving python history in ~/.pyhistory ***

from BinnedAnalysis import *
obs = BinnedObs( irfs="CALDB", expCube="ltCube_100.fits", srcMaps="srcMap_5_E1.fits",binnedExpMap="binned_exposure_E1.fits")
like = BinnedAnalysis(obs,"srcModel_5_E1.xml-initial",optimizer="Minuit", edisp_bins=0)
Traceback (most recent call last):
File "", line 1, in
TypeError: init() got an unexpected keyword argument 'edisp_bins'

(fermi-1.3.5)

@landriu To apply the weighed bins you need to create a BinnedConfig object and pass that object to BinnedAnalysis.  This should work:
from BinnedAnalysis import *
conf = BinnedConfig(edisp_bins=0)
obs = BinnedObs( irfs="CALDB", expCube="ltCube_100.fits", srcMaps="srcMap_5_E1.fits",binnedExpMap="binned_exposure_E1.fits")
like = BinnedAnalysis(obs,"srcModel_5_E1.xml-initial",optimizer="Minuit", config=conf)

Please let me know if you run into any other problems or if this works and we can close out the issue.

Where is this documented? I have looked at the FSSC documentation, but https://fermi.gsfc.nasa.gov/ssc/data/analysis/scitools/binned_likelihood_tutorial.html does not mention python, and https://fermi.gsfc.nasa.gov/ssc/data/analysis/scitools/python_tutorial.html does not mention binned analysis, although https://fermi.gsfc.nasa.gov/ssc/data/analysis/LAT_essentials.html says binned analysis is most common and recommended.

It's on the page https://fermi.gsfc.nasa.gov/ssc/data/analysis/documentation/Pass8_edisp_usage.html
This page is linked to in some of the other pages, but I'll talk to Nestor about updating the documentation to make the information more obvious, especially on the python pages.

OK, I see it. I think what is missing (or I could not find it) is a python tutorial for binned analysis, which would include this.

Issue verified fixed in both the python3 and python2 beta builds.  Closing issue and referring documentation updates to @donhorner and @nmirabal .

A tutorial on binned likelihood analysis with energy dispersion is now available at

Thanks for putting this to the tutorial!
Just noticed, that gtexpcube2 also have (hidden) parameter edisp_bins:
https://raw.githubusercontent.com/fermi-lat/fermitools-fhelp/master/gtexpcube2.txt
should it be explicitly set to -2 as well? It is not set in the current tutorial.
Same for gtsrcmap step:
https://raw.githubusercontent.com/fermi-lat/fermitools-fhelp/master/gtsrcmaps.txt
should edisp_bins set to -2 too?

The edisp_bins parameter is useful to gtexpcube2 and gtsrcmaps only if you want to set it positive in the fit (this requires having a spatial model beyond the energy interval used in the analysis). It can be ignored if you set edisp_bins to a negative value in the fit.


allow users to disable auto push tracking

cc @amitayfeder1
Users don't have a way to disable automatic push tracking. This PR provides a boolean enableAutomaticPushTracking that allows users to optionally disable setupAutomaticPushTracking.

This solution is a work around for Mixpanel 3.2.0+ not working with Urban-airship 8.2.2+

@amitayfeder1 what method of integrating are you using for each? And how are you initializing Urban Airship? We've recently been working on an integration with Urban Airship and didn't run into any of these issues while testing. I tried initializing the libraries in both orders. I tested using CocoaPods for Urban Airship and initializing using AirshipConfig.plist.

This is more or less the order with set it in our appDelegate:
In - (BOOL) application: (UIApplication *) Application didFinishLaunchingWithOptions (NSDictionary *) LaunchOptions
We do:  [[Mixpanel sharedInstance] registerSuperProperties:@{@"Platform":@"iOS"}]; [UAirship setLogging:YES]; [UAirship setLogLevel:UALogLevelDebug];  UAConfig *config = [UAConfig defaultConfig];  [config setAutomaticSetupEnabled:YES];  [config setDevelopmentLogLevel:UALogLevelDebug];  [config setProductionLogLevel:UALogLevelDebug];  config.productionAppKey = ——;  config.productionAppSecret = ——;  config.developmentAppKey = ——;  config.developmentAppSecret = ——; [UAirship takeOff:config]; [UAirship push].notificationOptions = (UANotificationOptionAlert | UANotificationOptionBadge | UANotificationOptionSound); [UAirship push].userPushNotificationsEnabled = ——; [[UAirship push] setBackgroundPushNotificationsEnabled:——]; [self registerUAActions]; [[UAirship push] setUserPushNotificationsEnabledByDefault:——]; [[UAirship push] setBackgroundPushNotificationsEnabledByDefault:——]; [[UAirship push] setPushNotificationDelegate:[GKPushNotificationHandler defaultHandler]]; [[UAirship push] setRegistrationDelegate:self]; }
and later:
- (void)registrationSucceededForChannelID:(NSString *)channelID deviceToken:(NSString *)deviceToken {     if ([[UAirship push] userPushNotificationsEnabled]) {         [[Mixpanel sharedInstance].people set:@{@"Push Notification - iOS":@"On"}];     }     [[Mixpanel sharedInstance].people addPushDeviceToken:[deviceToken dataUsingEncoding:NSUTF8StringEncoding]]; }

I ended up doing a slightly different fix in https://github.com/mixpanel/mixpanel-iphone/pull/761. You'd want to initialized Mixpanel with automaticPushTracking:NO (https://github.com/mixpanel/mixpanel-iphone/blob/master/Mixpanel/Mixpanel.h#L288-L292). A release will probably go out next week.

@wgins I will wait for next release. Let me know if you think 3.2.4 will work for us

@amitayfeder1 3.2.5 has the option for you to disable automatic push tracking now.

Will,
I created a pull request:
Expend sharedInstanceWithToken #763
Reason is that the only way to set automaticPushTracking is via the init
method, but it's much better to set it from shareInstance (that how we do
it now)
So in our code instead of doing:
[Mixpanel sharedInstanceWithToken:@MIXPANEL_TOKEN];
We will call the new static function I added.
Let me know if it make sense and please help to push it to next version (or
advise a better way to solve the issue)
Thanks
On Tue, Dec 19, 2017 at 4:07 PM, pchien<EMAIL_ADDRESS>wrote:

@amitayfeder1 https://github.com/amitayfeder1 3.2.5 has the option for
you to disable automatic push tracking now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mixpanel/mixpanel-iphone/pull/758#issuecomment-352924778,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKoyXcy06RtAKk_QYK9nLNN0REdoN1Efks5tCE-tgaJpZM4Q-NGY
.

--
Amitay Feder
1-847-867-7022


net: http: Add error status string to HTTP server error

Add status error string when sending a error message from
HTTP server to client as described in RFC 2616 ch 6.1.
Previously only error code was sent except for 400 (Bad Request).
This also fixes uninitialized memory access in error message.
Coverity-CID: 178792
Fixes #4782
Signed-off-by: Jukka Rissanen<EMAIL_ADDRESS>

Some discussion about this can be found in #4818 but as this fix is more than just a coverity fix, I separated the patch.


Integrate actinia stac collections

With the implementation of actinia-stac-plugin and this PR, it is now possible to also request STAC collections registered in actinia. They will be integrated in the collections list and can be requested by id.
For this feature to work, actinia needs to be installed with the actinia-stac-plugin. If it is not installed, the STAC collections are simply not included in the /collections response (like before).
"Normal" STRDS:

STAC collection:

There are some differences in attributes but I decided to not use the CollectionInformation. See more detailed explanation why in comment in src/openeo_grass_gis_driver/collection_information.py

I don't know why the codeql checks keep staying in pending. I will merge now, in the actions overview it looks fine.


Shouldn't be possible to make a table if there aren't any valid columns

Currently if you try to make a table from a class without any public properties, you get a wonky table without any headers or content, although the correct numbers of (empty) rows do get printed.
When creating a table, we should check to see how many valid columns are present. The either throw an exception, or handle the "no column" case like we do the "no data" case.
Related: what happens if there are valid columns, but they're all set to "hide"?

I'm guessing this can be closed, @tdwright ?

Absolutely. Thanks again for your contribution @rahl0b10!
I think the related problem of what to do when all columns are set to "hidden" may still need addressing, but this should be done with a separate issue.
Tom


Add setFlexBasisAuto to entry-common.js

So adding a flow type declaration for the function will make the function available? I wonder how this magic works...
Anyway I would like to see a fix for setFlexBasisAuto on js

Superseded by #1112


Boost library problems

CMake Error at /usr/share/cmake-3.5/Modules/FindBoost.cmake:1677 (message):
Unable to find the requested Boost libraries.
Boost version: 0.0.0
Boost include path: /usr/include
Detected version of Boost is too old.  Requested version was 1.67 (or
newer).

You need to set BOOST_ROOT=$HOME/eosio/1.8/src/boost_1_70_0 and run the build script again.


Added ciserver-url option to the build-publish command

See https://github.com/JFrogDev/jfrog-cli-go/issues/33
I added an option "--ciserver-url" to the "build-publish" command to have a "url" field in the generated buildInfo.json to be shown in the Artifactory "builds" pages.

Thanks for sharing this pull request @AndreGleichner.
We'll soon decide if we'll go for including the CI Server URL as an option of the build-publish command or expose a different API for it.
In any case, this should definitely be added to the CLI.

@AndreGleichner,
Version 1.14.0 adds a new --build-url to the build-publish command. I'm therefore closing this pull request.
Thanks again for sharing this requirement and submitting this pull request.


switch to use the Project.toml approach

this fixes some dependency resolution issues with newer versions of ImageMorphology

Thank you @tlnagy, could you please double check why the build is failing on Travis? It seems that there is a dependency conflict.

Merging the changes, and fixing the build error on the master branch.

:+1:


Taxonomy filtering do nothing if cache is enabled

Hi,
Having a problem on my production server, but not on my dev one, I suspected that the cache was involved. After disabling it completly, the problem disappeared.
Here was the problem : when clicking on a tag label, the filtering was failing and the page was reloading with all the blog items, instead of filtering them. Yet, the URI has all the required params.
My actual blog config

One blog at /actualites.
One other blog (in wich the problem occurs because I use taxonomy in this one) in /critiques/_presse (the blog is in a modular page).

I use a special user_blog_route: frontmatter option, in order to solve the use of {{ blog_url|rtrim('/') }} in taxonomy.html.twig (taken from the Quark theme). Indeed, the native system provides only one blog route in site.yaml.
So in this user_blog_route:, I did set '{{page.parent.url}}' in order to use its parent's route (/critiques, actually) in a dynamic manner to avoid breaking if the page is moved.
Apart from that, my blog system is pretty a clone of the Quark one. I control filtering with this :
	{% set tag = uri.param('tag') %}
	{% set request = tag ? taxonomy.findTaxonomy({'tag':tag}) : collection %}
	{% for child in request %}
		{% include 'partials/blog/images_layout.html.twig' with {'blog':page, 'blog_url':blog_url, 'page':child, 'truncate':true} %}
	{% endfor %}

And the layout of this blog display its sub-templates like the one of Quark does. Finally, the tags are displayed with the usual :
{% if page.taxonomy.tag %}

    {% for tag in page.taxonomy.tag %}
    {{ tag }}
    {% endfor %}

{% endif %}

The only difference is that this blog is in a modular page.
Tests made (concluding)
(between each attempts, I cleared the cache on the prod server)

Disabling twig cache in the frontmatter : FAIL.
In system.yaml : twig cache false + cache true = FAIL.
In system.yaml : twig cache false + cache false = SUCCEED.
In system.yaml : twig cache true + cache false = SUCEED.
In system.yaml : twig cache true + cache true = FAIL.

And, for clearing the situation about twig use in frontmatter, I did set user_blog_route: '/critiques' and retried :

In system.yaml : twig cache false + cache true = FAIL.
In system.yaml : twig cache false + cache false = SUCCEED.
Doesn't need to go further...

Thanks for the details on this.  However, I'm a little confused by your Twig.  It seems you are manually trying to filter the collection based on a tag.  However, Grav already automatically filters collections using taxonomy filtering passed in the URL:
https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Page/Page.php#L2694-L2717
So do you have this system.pages.url_taxonomy_filters option turned off? And if so why when you seem to be trying to do the same thing?  If you don't have this option turned off, I think your logic is stepping on the toes of the built-in logic.

I @rhukster and thanks for the answer.
For the twig code, I simply followed the documentation on how to loop over items with a specified taxonomy : https://learn.getgrav.org/16/content/taxonomy#taxonomy-example

Kevin Smith's Posts

{% for post in taxonomy.findTaxonomy({'author':'ksmith'}) %}

{{ post.title }}

{% endfor %}

I adapted this code to a more restricted logic, given that I only use tags as taxonomy, and never categorie or other type of thing. So, I used :
{% set tag = uri.param('tag') %}
to say "get the tag specified in the url".
Then, I used :
{% set request = tag ? taxonomy.findTaxonomy({'tag':tag}) : collection %}
to say "if there is tag, find the items, or if there isn't, just use the normal collection un-filtered.
My system.pages.url_taxonomy_filters is turned on, I never changed it.

The example in the docs demonstrates a programatic way to use taxonomy, but it seems what you are trying to do is something that Grav has built-in without the need of custom code.  If you download the grav blog skeleton (https://getgrav.org/download/skeletons/blog-site/2.0.0), you will see that the taxonomy filters in action and how they filter the blog listing, by using the built-in capabilties of the collection. I suggest you look into that approach.

Ok, I confirm that the Quark theme just use a :
{% for child in collection %}
         {% include 'partials/blog-list-item.html.twig' with {blog: page, page: child} %}
{% endfor %}

and that it works even in my theme.
But the other thing I confirm, is that using my own way to collect items works in the Quark theme (I tested it). I also noticed that my production server keeps failing to filter things with the Quark's way + cache enabled, and that the Quark way does work with the cache enabled in local. So I conclude that the problem comes from my templates.
The problem is that it means that using doc tutorial, or "exporting" Quarks snippets, isn't enough and the cache conflicts with the process, and alternatively that it is difficult to make the taxonomy to work without copying the right files (or even, the entire files) from the default Quark theme. I will investigate with people's help on Discord, especially those who would have successfully used taxonomy.
Thanks for your time @rhukster ;). I'll bring more information when I'll have some.

@Romarain Any updates on this?


🐞 [Bug]: fn type definitions/lifetimes are lost

What happened?
#[require(Initial)]
fn foo<'bar, T> (&'bar self, obj: T) -> T {
}

The custom lifetime and T will be lost.
Expected behavior
No response

Hang on, that may be because it was a function that returned a Result instead of "Self"?

Hang on, that may be because it was a function that returned a Result instead of "Self"? Did not have time to investigate further.

Quite possible. I only thought of returning Self when I was writing this macro. Will investigate soon, thanks!

@jkneer
previously we were only retaining the lifetimes and generics for the struct, but not methods.
Now, we are also retaining the full signature of the methods.
In addition, I added support to enable wrapping the struct in complex types like Result<Option<Struct>> for the methods
in both return type and in the body.
Thanks for the code snippet you shared, helped me address both of the issues!


Update scaffold

PR Type
[Feature | Fix | Documentation | Other ]
Short Description
In PR #222, @scarere introduced a transform_gradients hook. This could be leveraged by the ScaffoldClient to avoid having to redefine the train_step function to modify the gradient to combat client drift.
Clickup Ticket(s): Convert Scaffold to leverage transform_gradient hook

One "trick" that I do when I have PRs that build off one another (and this is likely kind of hacky, but it makes them a little cleaner) like you're doing with your change to bring in the upgrade to python 3.10, is to merge that PR into this branch, then target the PR to the pending PR you're working off of (the python 3.10 upgrade PR in this case). The diffs will then only include the changes you intend to make with this PR.

One "trick" that I do when I have PRs that build off one another (and this is likely kind of hacky, but it makes them a little cleaner) like you're doing with your change to bring in the upgrade to python 3.10, is to merge that PR into this branch, then target the PR to the pending PR you're working off of (the python 3.10 upgrade PR in this case). The diffs will then only include the changes you intend to make with this PR.

That is a really good point! I am not sure why I even based this branch off the other since they are independent anyway. Will keep this in mind for the future!


Master broken

@JuliaSprenger @apdavison @bjoern1001001
The master branch do not pass tests because of a pretty print in Epoch.
I don't remember who play with the print recently ?
We have to fix it before other PR because they all fail for py36 but not for py27.
Any idea ?
======================================================================
FAIL: test__pretty (neo.test.coretest.test_epoch.TestEpoch)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/circleci/repo/neo/test/coretest/test_epoch.py", line 230, in test__pretty
    self.assertEqual(prepr, targ)
AssertionError: '<Epoch: test epoch<EMAIL_ADDRESS>ms for 20.0 ns,[62 chars] ns>' != "Epoch\nname: 'test'\ndescription: 'teste[44 chars] 2]}"
- <Epoch: test epoch<EMAIL_ADDRESS>ms for 20.0 ns, test epoch<EMAIL_ADDRESS>ms for 40.0 ns, test epoch<EMAIL_ADDRESS>ms for 60.0 ns>
+ Epoch
name: 'test'
description: 'tester'
annotations: {'test1': 1.1, 'test0': [1, 2]}

======================================================================
FAIL: test__pretty (neo.test.coretest.test_event.TestEvent)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/circleci/repo/neo/test/coretest/test_event.py", line 372, in test__pretty
    self.assertEqual(prepr, targ)
AssertionError: '<Event: test event<EMAIL_ADDRESS>ms, test event [26 chars] ms>' != "Event\nname: 'test'\ndescription: 'teste[44 chars] 2]}"
- <Event: test event<EMAIL_ADDRESS>ms, test event<EMAIL_ADDRESS>ms, test event<EMAIL_ADDRESS>ms>
+ Event
name: 'test'
description: 'tester'
annotations: {'test1': 1.1, 'test0': [1, 2]}

======================================================================
FAIL: test__pretty (neo.test.coretest.test_spiketrain.TestPropertiesMethods)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/circleci/repo/neo/test/coretest/test_spiketrain.py", line 1699, in test__pretty
    self.assertEqual(res, targ)
AssertionError: '<SpikeTrain(array([3., 4., 5.]) * ms, [0[13 chars]s])>' != "SpikeTrain\nname: 'train 1'\ndescription[59 chars]1.1}"
- <SpikeTrain(array([3., 4., 5.]) * ms, [0.5 ms, 10.0 ms])>
+ SpikeTrain
name: 'train 1'
description: 'a test object'
annotations: {'targ0': [1, 2], 'targ1': 1.1}

This error occurs due to a new version of ipython and not due to a change in neo. It is working for ipython 6.1.0 but failing for 6.3.1.

ipython is involved in our test suite ?
Can we force a version of ipython for testing ?

Ipython is what we support for pretty printing. We could force a version of ipython for testing, but I think it would be better to understand why ipython is yielding different results and adjust to that. No?

Yes and maybe support several version of ipython in the code for pretty.
AnalogSignala nd SpikeTrain don't have pretty ?

I guess your happiness descovering this new issue.


Menu bug inside of table

When I trying to add IconButton inside of Table and open Menu when this IconButton clicked , Menu is rendered outside of table. Menu placed top left of page. Please , fix this bug. Menus is not working properly when using with Tables

Please show the code as well, So I can help you find a work around.


organized code, updated readme, added changelog and code of conduct

Added additional files and organized src code in different namespaces

Hi clsource,
thanks for the code reorganization and addition of the code of conduct. I'm planning to set up a microsite for wireshell in the near future (containing command documentation, changelog, info about contribution, thanks and code of conduct) in order to slim the readme in this repo down to links to the microsite and its sections.
Therefore: Could you start a new PR just containing Namespaces, changes of wireshell executable and the overall bump to 0.3.4?
Either way - big thanks for the contribution! I'm really amazed about wireshell's growth :)
Best,
marcus

ok done :+1:


Distribute extractor and creator as dotnet tools

Is your feature request related to a problem? Please describe
Customers wish to install the extractor and creator as .NET 6 tools, which means the tools have to be packaged, signed, and distributed via NuGet so that they can be installed with dotnet tool install.
Describe the solution you'd like
dotnet tool install apim-devops-toolkit
dotnet apim extract --configFile extractor.yml

Describe alternatives you've considered
We currently pack an exe and distribute via GitHub releases.  The dotnet tool is "the recommended way" because  code signing creates a more secure code pipeline.

This project is now in "maintenance" mode. This means that no new features will be accepted and fixes will be limited to security fixes. We expect to retire the DevOps Resource Kit by the end of 2023. At that time, the DevOps Resource Kit repository will be archived and there will be no further updates.
While you are free to fork the DevOps Resource Kit yourself, we recommend that you migrate to the following products:

If you are using creator, switch over to using Bicep templates. Bicep is a descriptive language for describing infrastructure, fully supports all features of Azure API Management, and is covered in any support agreement that you have with Azure. You can find bicep modules and examples for handling API Management APIs at https://github.com/azure-samples/api-management-sample-apis.
If you are using extractor, switch your pipelines to use APIOps. APIOps applies the concepts of GitOps to API deployments. It is faster and more flexible than the DevOps Resource Kit.


Check for new Update from MainMenu

To make it easier for people to update v1.2 will add a option to the main menu to check for a new available update to RaspiBlitz.
If a new Version is available it should give instructions. And maybe also offer the option to prepare an update with making a LND-Rescue-Backup before making new SD card image.
This is no auto-update or automatic update installer. To update the user has still to burn/flash a new SD card image.

Works :) Closing Issue.


Does neural-style support cpu run?

I got this error:
[root@localhost neural-style]# python run.py
INFO:root:load the content image, size = (1000, 1500)
INFO:root:resize the content image to (400, 600)
[11:30:29] ./dmlc-core/include/dmlc/././logging.h:208: [11:30:29] src/storage/storage.cc:44: Please compile with CUDA enabled
Traceback (most recent call last):
  File "run.py", line 115, in <module>
    model_executor = importlib.import_module('model_' + args.model).get_model(size, dev)
  File "/root/softwares/mxnet/example/neural-style/model_vgg19.py", line 50, in get_model
    arg_dict = dict(zip(arg_names, [mx.nd.zeros(shape, ctx=ctx) for shape in arg_shapes]))
  File "/usr/local/lib/python2.7/site-packages/mxnet-0.5.0-py2.7.egg/mxnet/ndarray.py", line 428, in zeros
    arr = empty(shape, ctx)
  File "/usr/local/lib/python2.7/site-packages/mxnet-0.5.0-py2.7.egg/mxnet/ndarray.py", line 411, in empty
    return NDArray(handle=_new_alloc_handle(shape, ctx, False))
  File "/usr/local/lib/python2.7/site-packages/mxnet-0.5.0-py2.7.egg/mxnet/ndarray.py", line 45, in _new_alloc_handle
    ctypes.byref(hdl)))
  File "/usr/local/lib/python2.7/site-packages/mxnet-0.5.0-py2.7.egg/mxnet/base.py", line 74, in check_call
    raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [11:30:29] src/storage/storage.cc:44: Please compile with CUDA enabled

yes, run python run.py and look at the options


Many menus should be disabled when no hardware connected

Layout menu crashes if no hardware connected
Config load menu doesn't make sense either

"Unless on_press is called, the Button will be disabled." https://docs.iced.rs/iced/widget/struct.Button.html#method.on_press
Button in iced::widget - Rust
A generic widget that produces a message when pressed.
Zocky710 — Today at 12:46 PM
You can use on_press_maybe. If you pass None to it, the button will be disabled and if Some(message) it will be enabled.
Otherwise you can call on_press for an enabled button or not if you want it to be disabled.


Revamp gitian building guides

Signed-off-by: pasta<EMAIL_ADDRESS>

@PastaPastaPasta linter is unhappy

Closed due to gitian removing: #5756


Unable to generate the install-CLI command.

This is autogenerated. Please review and update as needed.
Describe the bug
getting error "Permission denied: '/usr/local/bin/kubelogin'"
Command Name
az aks install-cli
Errors:
[Errno 13] Permission denied: '/usr/local/bin/kubelogin'
Traceback (most recent call last):
az/lib/python3.6/shutil.py, ln 550, in move
    os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/tmp/tmp8qo1p71h/bin/linux_amd64/kubelogin' -> '/usr/local/bin/kubelogin'

...

az/lib/python3.6/shutil.py, ln 121, in copyfile
    with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/usr/local/bin/kubelogin'

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az aks install-cli --install-location={}

Expected Behavior
Environment Summary
Linux-4.15.0-1103-azure-x86_64-with-debian-10.2 (Cloud Shell)
Python 3.6.10
Installer: DEB

azure-cli 2.17.1
azure-cli-ml 1.19.0

Extensions:
ai-examples 0.2.5
azure-cli-ml 1.19.0

Additional Context

aks

aks

#16070

#16070

@avinash-kaushik Apologies for the late reply. The error is documented here if you don't have the full access to the installing folder. So you can follow the below steps:
To install kubectl (specific version) in a specified path in the home folder, for example:

XXXX/Azure:~$ az aks install-cli --install-location mykubetools/kubectl1.19.1 --client-version 1.19.1 --kubelogin-install-location mykubetools/kubelogin

Output
Downloading client to "mykubetools/kubectl1.19.1" from [https://storage.googleapis.com/kubernetes-release/release/v1.19.1/bin/linux/amd64/kubectl]
Please ensure that mykubetools is in your search PATH, so the kubectl1.19.1 command can be found.
Downloading client to "/tmp/tmps1qp6p1e/kubelogin.zip" from [https://github.com/Azure/kubelogin/releases/download/v0.0.11/kubelogin.zip]
Please ensure that mykubetools is in your search PATH, so the kubelogin command can be found.

XXXX/Azure:~$ ./mykubetools/kubectl1.19.1 version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.1", GitCommit:"206bcadf021e76c27513500ca24182692aabd17e", GitTreeState:"clean", BuildDate:"2020-09-09T11:26:42Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}

Hope this helps. Please let me know if you have any further questions on this.


register global azure in Vietnam

We would like to register the global azure event 2023 for Vietnamese community
Thanks

Hi @thiennn . Welcome to the Global Azure 23. Are you planning to use Sessionize for the Call for Speakers?
Thanks.

Hi @hugobarona we don't call for speakers, we already have speakers from our community network


Disable suffix sharing for block tree index

closes https://github.com/apache/lucene/issues/12702

Unfortunately, because I messed up conflict resolution on backport of #12633 (commit https://github.com/apache/lucene/commit/2ca906d99c64fc45dd4246b7daad57db3a7abdf8), I accidentally reverted this change!  This means it did not in fact make it into 9.9 :(
I uncovered this (and will correct it) while backporting #12624 ...


IfDescr via SNMP

tbh: snmp is dead and I would prefer not to interact with it. Will reopen if users actually want this

tbh: snmp is dead and I would prefer not to interact with it. Will reopen if users actually want this


NEW S.E.X@VIDEOs]** Viral Jenna Ortega Full Video Original

07 seconds ago - Jenna Ortega Viral Leaked Video Onlyfans On Social Media X Twitter L.ea𝚔ed Original Video Viral On Social Media the internet by storm and amazed viewers on various social media platforms.
🌐 CLICK HERE 🟢==►► WATCH NOW ONLINE HD
🌐 CLICK HERE 🟢==►► WATCH NOW ONLINE HD
The Gallerist will be directed by Cathy Yan of Birds of Prey fame, who has co-written the feature with James Pedersen.
In addition to starring, Portman is on board to produce alongside Sophie Mas, Jonathan King, Ash Sarohia, Tom McCarthy, Rae Baron, Sophie Mas and Zola Elgart Glassman.
Ortega is currently busy filming Wednesday season 2, with Netflix sharing a behind-the-scenes video of the cast on set in late September.
jenna ortega, wednesday season 2 behind the scenes
Netflix
Related: Wednesday's Jenna Ortega and Emma Myers share fun behind-the-scenes video
The teaser gives a first look at Ortega in the titular role for season 2, before concluding with her in voiceover: "If we showed you any more, your eyes would bleed… and I’m not that generous."
Catherine Zeta-Jones and Luis Guzmán will return to reprise their roles as Wednesday's parents Morticia and Gomez Addams, plus A Good Girl's Guide to Murder star Emma Myers is back as fellow Nevermore Academy pupil Enid Sinclair.
Season two – arriving in 2025 – will also see new cast members, including Scoop's Billie Piper, Fool Me Once's Joanna Lumley, Boardwalk Empire’s Steve Buscemi and Westworld’s Thandiwe Newton.
In addition to her Wednesday commitments, Ortega is signed on to a new untitled project from Star Wars: The Force Awakens director J.J Abrams that begins production next year.
She's also playing the titular role in Taika Waititi’s upcoming adaptation of Kazuo Ishiguro’s novel Klara and the Sun alongside Amy Adams and Poker Face's Natasha Lyonne.
Wednesday season 1 is available to stream now on Netflix. Season 2 is expected in 2025.
Natalie Portman And Jenna Ortega Circling ‘The Gallerist’ For Director Cathy Yan – The Dish
By Justin Kroll
Justin Kroll
Film Editor
@krolljvar
More Stories By Justin
Mia Healey Joins Djimon Hounsou In ‘The Monster’
Amazon MGM Studios Lands Package ‘American Speed’ Starring Tom Holland And Austin Butler
‘My Old Ass’ Breakout Star Maisy Stella Joins Maude Apatow’s Directorial Debut ‘Poetic License’
View All
October 29, 2024 11:56am
4
Comments
Services to share this page.
Share on Facebook
Post
Share to Flipboard
Email
Show more sharing options
Natalie Portman, Jenna Ortega and Cathy Yan
(L-R) Natalie Portman, Jenna Ortega and Cathy Yan
Getty Images
EXCLUSIVE: Natalie Portman and Jenna Ortega are in talks to star in The Gallerist, with Cathy Yan on board to direct. Yan co-wrote the pic with James Pedersen. Portman and Sophie Mas will produce through their MountainA banner along with Jonathan King, Ash Sarohia, Tom McCarthy, Rae Baron, Sophie Mas and Zola Elgart Glassman are producing.
The film follows a desperate gallerist who conspires to sell a dead guy at Art Basel Miami.


SSH port listening issue

Hello Guys,
I am using example from "http://socketo.me/docs/hello-world". After installing everything and copying all files in folders. When executing "php bin/chat-server.php" in SHELL commandline it doesn't displays message regarding listening of port. And after sometime I need to exit via "CTRL+Z".
How can I make the port listening? All files are properly copied and installed as earlier I was getting error regarding "MyApp/Chat" missing but fixed by copying it to "src" directly.
Any help will be highly appreciated. Thank you!

i think somewhere it says ssh is not supported yet, you need to use an stunnel proxy e.g.

Thank you Philipp for your reply! Do I need to ask hosting to create stunnel proxy?

I don't know how your host works, but you need a network professional to setup a ssl tunnel to your websocket port. On managed hosts this sometimes can be "difficult" - but hope you'll make it;)

Thank you for your help! There is one more query please if you have successfully made connection in past via Rachet.
"On a test.php page I have added following code:
var conn = new WebSocket('wss://mysite.com:8080');
conn.onopen = function(e) {
console.log("Connection established!");
};
conn.onmessage = function(e) {
console.log(e.data);
};
In console log I am getting error (Firefox can't establish a connection to the server at wss://mysite.com:3000/)
"
Thank you for your help Phillip. :)

Your code shows you're trying to connect to port 8080 but the error message says port 3000.  Which port is it listening on and have you ensured it's connecting to the Ratchet instance accordingly?

Thanks Cboden for your reply!
Sorry port number was written wrong above. It is "wss://mysite.com:3000" instead of "wss://mysite.com:8080".
I have asked hosting provide to check if any firewall is there on port 3000 and they have removed firewalls from port 3000. But error is still there "Firefox can't establish a connection to the server at wss://mysite.com:3000/"

Got it fixed. It was firewall issue. Working fine.
Thank you Cboden, Phillip for looking into matter. :) <3


Notebook instance on Sagemaker and setup env

There are two option to set up custom kernel on  sagemaker notebooks.

Use docker container and push it to ECR. Use ECR container for Env.
Add a lifecycle configuration to Notebook instance


Refactor

Refactored the code into multiple Python files to conform a bit better according to the single responsibility principle.
Added in --company flag to allow for further extensibility with other scrapers.

Hey Kyle,
I've reviewed your PR and everything looks good to me. I've made a few minor changes, but that's it. I appreciate you contributing to this project, and am especially grateful that you refactored the code and made everything much cleaner! I'm sure that current and future users of this program will very much appreciate it as well, and I look forward to more contributions from you (if you so desire).


Libsystemd dev + newer runc

LGTM

LGTM

Broken by b87bdced1. Solution: change iproute to iproute2

Images built successfully: https://cirrus-ci.com/task/5754003001442304
Converting them into VM images now using command e.g.:
sudo podman run -it --rm -e AS_ID=$UID -e AS_USER=$USER -v /home/$USER:$HOME \
--security-opt label=disable quay.io/cevich/gcloud_centos:latest compute images create \
--source-uri gs://packer-import/fedora-29-libpod-548c1c05.tar.gz \
fedora-29-libpod-548c1c05

Once that finishes I'll remove the test-commit here, update .cirrus.yml and --force push.

@cevich According to @rhatdan in IRC we needed a newer build of container-selinux that just hit Koji, so I think we might need a respin in a few hours...

@mheon oh ok, well just ping me and I'll roll 'em again.  Updating with the ones I made, just as a trial-run, see if anything else breaks...

we needed a newer build of container-selinux that just hit Koji, so I think we might need a respin in a few hours...

May I give that a try? I could piggyback it onto my #2956. I would very much like to understand the process for updating cache images, and to update the documentation.

@edsantiago of course you may, thank you for volunteering!  The process is long-in-waiting to be streamlined.  I've been working a PR to automate the build and validate the build by running the tests, but it's challenging (the validation part).   Perhaps a fresh pair of eyes will bring new insight, as what we have currently is for sure, far out-dated.  I'll ping you on IRC so we can go over the undocumented bits...which should probably remain undocumented (they need to be removed entirely).

/lgtm

/lgtm

/approved

/approve


Rails gem does not include the stylesheets/javascripts

For some reason the vendor/ directory is not bundled in the gem right now.

could it be that you have the the gitignore ignore the vendor folder then the gemspec asks git to list the files?

Yes so I tried fixing that to no success. The gem name changed too, slightly. Can this be reverted?

On May 29, 2015, at 02:38, dsmorse<EMAIL_ADDRESS>wrote:
could it be that you have the the gitignore ignore the vendor folder then the gemspec asks git to list the files?
—
Reply to this email directly or view it on GitHub.

I had to change the gem name, because there was a conflict on rubygems and I don't have permissions to overwrite the other persons stuff.

try it now.  I updated the build configs and pushed <IP_ADDRESS>

@dsmorse yes I believe that was the problem for the vendor directory. The other issue which prevented the gem from working is fixed in #15

#14 & #15 have been merged.  I'll push <IP_ADDRESS> to rubygems

0.6.10 √
Thanks @dsmorse .


Experiment assimilating IASI with thinned obs removed from memory

Description
Currently obs thinned out remain in the memory, which caused some memory issues with high-res. applications with a large amount of obs. Ideally it would be good if UFO/IODA can remove the thinned obs from memory. Current solution with this PR is to run a hofx step first with thinning filter, then use a python code to convert hofx file into a size-reduced file, in which the thinned obs are removed. While this PR addresses only IASI radiance data, the procedure could be applied to other data as well.
Issue closed
Closes #170
Tests completed

[ ] 3dvar_OIE120km_WarmStart
[ ] 3denvar_OIE120km_WarmStart
[ ] 3dvar_OIE120km_ColdStart
[ ] 3dvar_O30kmIE60km_ColdStart
[ ] 3denvar_O30kmIE60km_WarmStart
[ ] eda_OIE120km_WarmStart

We will be re-working on this. This PR is to ease understanding the procedure. NOT merge.

@zhumingying This is a feature branch you will work on for IASI radiance DA.


Enhancement: Extract interface for RFC7231

This PR

[x] extracts an interface for RFC7231

💁♂ For reference, see https://tools.ietf.org/html/rfc7231.

@localheinz Could you add a comment to PATCH?
     /**
     * @see https://tools.ietf.org/html/rfc5789
     */

@szepeviktor
Follow-up PR is coming up!


Write a Java program to find digital root of a number

Description
Write a Java program to find digital root of a number
Digital root of a number is the recursive sum of its digits until we get a single digit number.
Input  : 1234
Output : 1

How to contribute

Save the solution in program/FindDigitalRootOfANumber.java file
Add FindDigitalRootOfANumber.java file in find-digital-root-of-a-number folder

assign me!

!assign


pyodbc4 drops millisecond precision from datetime values on MSSQL

Environment

Python: 2.7, 3.5, 3.6
pyodbc: 4.0.16
OS:  Windows Server 2012 R2, Ubuntu 16.04, macOS 10.12
DB: MSSQL 2014/2016 (Windows), MSSQL vNext (Ubuntu)
driver: ODBC Driver 13 for SQL Server (WIndows/Ubuntu), FreeTDS 1.00.37 (macOS)

Issue
I have the following table on my MSSQL database,
CREATE TABLE pyodbc_datetime_test (pyodbc_version varchar(8) not null, inserted_at datetime2 not null)

and the following test script.
from datetime import datetime
import pyodbc

print('pyodbc version: %s' % pyodbc.version)
connstr = "DRIVER={ODBC Driver 13 for SQL Server};SERVER=.\\;UID=sa;PWD=xxxxxxxx;DATABASE=testdb;MARS_Connection=yes"
conn = pyodbc.connect(connstr, autocommit=True)
cursor = conn.cursor()
now = datetime.now()
print(now)
cursor.execute("INSERT INTO pyodbc_datetime_test VALUES (?, ?)", [pyodbc.version, now])
cursor.execute("SELECT TOP 1 inserted_at FROM pyodbc_datetime_test ORDER BY inserted_at DESC")
inserted_at = cursor.fetchone()[0]
print(inserted_at)
conn.close()
assert inserted_at == now, "%s is not equal to %s" % (inserted_at, now)

The test script finishes successfully with the folloing output when I run it with pyodbc 3.
pyodbc version: 3.1.1
2017-05-05 01:02:00.986414
2017-05-05 01:02:00.986414

But I receive the following error when I run the same script with pyodbc 4.
pyodbc version: 4.0.16
2017-05-05 01:04:34.251514
2017-05-05 01:04:34
Traceback (most recent call last):
  File "pyodbc_datetime_test.py", line 15, in <module>
    assert inserted_at == now, "%s is not equal to %s" % (inserted_at, now)
AssertionError: 2017-05-05 01:04:34 is not equal to 2017-05-05 01:04:34.251514

From sqlcmd I can see the following records in the table after executing the test script.
1> select * from pyodbc_datetime_test
2> go
pyodbc_version inserted_at
-------------- --------------------------------------
3.1.1                     2017-05-05 01:02:00.9864140
4.0.16                    2017-05-05 01:04:34.0000000

I have reproduced the issue with pyodbc 4.0.16 under Python 2.7.13 on Windows. The Python statement ...
cursor.execute("INSERT INTO #pyodbc_datetime_test VALUES (?, ?)", [pyodbc.version, now])

results in the following call (without fractional seconds) being logged in SQL Profiler:
exec sp_prepexec @p1 output,N'@P1 varchar(6),@P2 datetime2',N'INSERT INTO #pyodbc_datetime_test VALUES (@P1, @P2)','4.0.16','2017-05-06 04:10:25'

A workaround would be to cast the now variable from datetime to string ...
cursor.execute("INSERT INTO #pyodbc_datetime_test VALUES (?, ?)", [pyodbc.version, str(now)])

... which results in a call like this (note that @P2 is now varchar instead of datetime2) ...
exec sp_prepexec @p1 output,N'@P1 varchar(6),@P2 varchar(26)',N'INSERT INTO #pyodbc_datetime_test VALUES (@P1, @P2)','4.0.16','2017-05-06 04:15:28.499000'

... but that cast really should not be necessary.

Further investigation suggests that the pyodbc4 behaviour might be a workaround for (or simply a consequence of) a deficiency in Microsoft's ODBC Driver for SQL Server ("mssql-odbc").
My guess is that pyodbc3 bound datetime parameters as string values, similar to the str() workaround in my previous comment. pyodbc4 appears to be trying to "do the right thing" by binding the datetime parameter as an actual ODBC timestamp value ...
main            1c58-a14    EXIT  SQLBindParameter  with return code 0 (SQL_SUCCESS)
        HSTMT               0x005EAFE8
        UWORD                        2
        SWORD                        1 <SQL_PARAM_INPUT>
        SWORD                       11 <SQL_C_TIMESTAMP>
        SWORD                       11 <SQL_TIMESTAMP>
        SQLULEN                   19
        SWORD                        0
        PTR                0x01368F80
        SQLLEN                     0
        SQLLEN *            0x01368F6C (16)

... but mssql-odbc seems to have problems handling fractional seconds when the parameter values are passed that way.
To illustrate, if I do this in C# using System.Data.Odbc
now = new DateTime(2017, 05, 06, 13, 14, 15, 0);  // i.e., 13:14:15.0
cmd.Parameters.Add("?", OdbcType.DateTime).Value = now;
cmd.ExecuteNonQuery();

it works fine. However, if I do
now = new DateTime(2017, 05, 06, 13, 14, 15, 678);  // i.e., 13:14:15.678
cmd.Parameters.Add("?", OdbcType.DateTime).Value = now;
cmd.ExecuteNonQuery();

I get

ERROR [22008] [Microsoft][ODBC Driver 11 for SQL Server]Datetime field overflow. Fractional second precision exceeds the scale specified in the parameter binding.

The ODBC parameter binding is not exactly identical to that of pyodbc4, with .NET using SQL_C_TYPE_TIMESTAMP and SQL_TYPE_TIMESTAMP instead of SQL_C_TIMESTAMP and SQL_TIMESTAMP
OdbcConsoleApp. 12b4-108    EXIT  SQLBindParameter  with return code 0 (SQL_SUCCESS)
        HSTMT               0x04B65590
        UWORD                        2
        SWORD                        1 <SQL_PARAM_INPUT>
        SWORD                       93 <SQL_C_TYPE_TIMESTAMP>
        SWORD                       93 <SQL_TYPE_TIMESTAMP>
        SQLULEN                   23
        SWORD                        0
        PTR                0x040B2234
        SQLLEN                    16
        SQLLEN *            0x040B2230 (0)

but I have a strong suspicion that the results would be the same if pyodbc4 tried to pass fractional seconds to mssql-odbc as actual ODBC timestamp values.

I originally suspected that pyodbc3 was binding datetime parameters as string values and pyodbc4 was binding them as timestamp values. However, that appears not to be the case; they are both using timestamp values.
pyodbc3 binds such parameters as
main            fa4-1d60    EXIT  SQLBindParameter  with return code 0 (SQL_SUCCESS)
        HSTMT               0x0054B310
        UWORD                        2
        SWORD                        1 <SQL_PARAM_INPUT>
        SWORD                       11 <SQL_C_TIMESTAMP>
        SWORD                       11 <SQL_TIMESTAMP>
        SQLULEN                   27
        SWORD                        7
        PTR                0x0143CB70
        SQLLEN                     0
        SQLLEN *            0x0143CB64 (16)

while pyodbc4 binds them as
main            1d30-1254   EXIT  SQLBindParameter  with return code 0 (SQL_SUCCESS)
        HSTMT               0x004BAFE8
        UWORD                        2
        SWORD                        1 <SQL_PARAM_INPUT>
        SWORD                       11 <SQL_C_TIMESTAMP>
        SWORD                       11 <SQL_TIMESTAMP>
        SQLULEN                   19
        SWORD                        0
        PTR                0x01388F80
        SQLLEN                     0
        SQLLEN *            0x01388F6C (16)

I'm not very fluent in C++, but GetDateTimeInfo at params.cpp:216 seems a likely place to start looking for a reason why pyodbc4 seems to only be passing 19 bytes while pyodbc3 appears to be passing 27 bytes.

For what it's worth, I can confirm this is happening in pyodbc 4.0.16, but not 3.0.10, with MS SQL Server 2008 R2 and Python 3.4.4.  The fraction of a second is being lost when the Python datetime.datetime value is passed as a parameter, for both datetime and datetime2 column types.  The following code:
import datetime as dt
import decimal

import pyodbc

conn_str = 'DSN=xxx;UID=xxx;PWD=xxx;Database=xxx'
conn = pyodbc.connect(conn_str, autocommit=True)
crsr = conn.cursor()
sql = """
    IF OBJECT_ID('dbo.pyodbc_datetimefraction') IS NULL
    CREATE TABLE dbo.pyodbc_datetimefraction(
        cDateTime datetime NULL,
        cDateTime2 datetime2 NULL
    )
"""
crsr.execute(sql)

crsr.execute("TRUNCATE TABLE dbo.pyodbc_datetimefraction")

sql = """
    INSERT INTO dbo.pyodbc_datetimefraction
    (cDateTime, cDateTime2)
    VALUES
    ('1970-07-04 23:43:56.123', '1970-07-04 22:45:58.654321')
"""
crsr.execute(sql)

sql = """
    INSERT INTO dbo.pyodbc_datetimefraction
    (cDateTime, cDateTime2)
    VALUES
    (?,?)
"""
crsr.execute(sql, (dt.datetime(1970, 7, 4, 23, 43, 56, 123000),
                   dt.datetime(1970, 7, 4, 22, 45, 58, 654321)))

rows = crsr.execute("select * from dbo.pyodbc_datetimefraction").fetchall()
for row in rows:
    print(row)

conn.close()

returns the following with 4.0.16 (but not with 3.0.10):
(datetime.datetime(1970, 7, 4, 23, 43, 56, 123000), datetime.datetime(1970, 7, 4, 22, 45, 58, 654321))
(datetime.datetime(1970, 7, 4, 23, 43, 56), datetime.datetime(1970, 7, 4, 22, 45, 58))

Thanks for reporting this.  I've been sick for a few days and haven't been keeping up.
Even the SQL Server unit tests showed this bug - I try to run them all before releasing so I don't know how I missed it (though it takes a lot of VMs to run them all).

Hi @mkleehammer , if this issue results in a loss of data, does the fix for it not warrant a new release?

You are correct - I need to make a release.  The issue is that some drivers fail if you write more than they can store, so I have to use getInfo on the first connection to determine the size of a datetime.  That call was failing so the default was being used.
I'll make a release later today.

Great!  Thanks @mkleehammer .

Hi @mkleehammer, have you released the fix to this issue?  It has actually come up in my code just today.  When using a datetime as one of the parameters, it truncated off the milliseconds and the query predicate did not work correctly.  Thanks.

Doing so right now.

Windows versions of 4.0.17 are uploaded.  Having trouble linking with the latest clang on mac.

I reproduced the issue in both 2.7.12 and 3.5.2 and can confirm the fix is very effective. Thank you very much for this.

Hi. I just noticed this bug running pyodbc in python 2. Is the fix python 3 specific ?
Thank you.

hi there -
my understanding is that this still drops an extra digit of precision from datetime2 because Python's datetime type only stores microsecond precision, whereas datetime2 seems to store a 7-digit precision.  is this accurate and if so what is the fix for users who want that extra precision?  CAST to string ?

@zzzeek - Hi Mike
Yes, the default behaviour of returning a Python datetime will truncate the seventh decimal point of a datetime(7) value.
CAST to string would work, but if someone wanted to get the extra precision without changing their query then they could define an output converter function like this ...
def decode_datetime2(raw_bytes):
    return(struct.unpack("<6HI", raw_bytes))

... which would return the individual date/time components with the fractional seconds expressed as nanoseconds:
cnxn.add_output_converter(pyodbc.SQL_TYPE_TIMESTAMP, decode_datetime2)
foo = crsr.execute("SELECT CAST('9999-12-31 23:59:59.9999999' AS datetime2(7)) AS foo").fetchval()
print(foo)  # (9999, 12, 31, 23, 59, 59, 999999900)

hi @gordthompson -
thanks for the quick reply.  just verifying there's no option on the datetime side with this, tuple is another good idea, thanks!


stopLossPhase === x evaluates true only when switching phases to phase x

If I use stopLossPhase === 2 in a condition, the condition evaluates true only on the candle that Stop switches phases from 1 to 2. After the switch, the condition evaluates false, even when phase 2 is active.
The gif below shows this in practice; look at condition #3:

fixed


Compiling giving wrong results

Compiling the following sass
.editor
height: auto
margin-left: 20%
margin-top: 40px
margin-bottom: 3rem
width: 60%
padding-top: 1em
padding-bottom: .5em
padding-left: 1em
font-size: 2em
results in the following css
.editor{height:auto;margin-left:20%;margin-top:40px;margin-bottom:3rem;width:60%;padding-top:1em;padding-bottom:.5em;padding-left:1em;padding-left-font-size:2em}
As you can see font-size gets changed to padding-left-font-size. This problem als occurs when changing the order of css, it's always results in lastLine+"-font-size".

It magically went away, like most programming issues

There seems to be more weird stuff going on, for instance when compiling:
.hover-dropdown ul
padding-left: 0
display: none
list-style: none
position: absolute
width: 220px
border: 1px solid #ddd
I get
.hover-dropdown:hover ul{display:list-item}.hover-dropdown ul{padding-left:0;display:none;list-style:none;list-style-position:absolute;list-style-width:220px;list-style-border:1px solid #ddd}

It was caused by atom not applying the same tab length to every row (I have no idea why). This was solved by setting the tab length to a different value.


Update celo-dapp-gallery.md

Added Bru Finance platform to the list

Added on https://github.com/celo-org/docs/pull/429


Improved Manual setup

As mentioned here https://github.com/wemogy/libs-aspnet/issues/55, not allowing direct Environment injection is intended. Please revert @SebastianKuesters


Fix-lists.

Description
Problem fixed with this MR:
I have a field with the type Int[]. The output field, before this MR, would only output number, without parsing it as a list. This is now fixed by always running the field.isList check.

Released in: https://github.com/omar-dulaimi/prisma-class-validator-generator/releases/tag/0.2.3
Please consider sponsoring me :)