Maximum call size exceeded error

This is a very simple application. I do not know why I am getting "Uncaught RangeError: Maximum call stack size exceeded".
In folder called 'both', I have a JS file with schema defined as follows
Schema1 = new SimpleSchema({
    name:{
        type:String,
        label:'Name'
    }
});

In client folder,
Now I have an HTML template as shown:
<template name="test">
    {{#autoForm schema="Schema1" id = "schema1" type="method-update" meteormethod="processInServer" doc=formDoc}}
        {{> afQuickField name='name'}}
        <button type="insert">Update</button>
    {{/autoForm}}
</template>

The helpers of the above template is as follows:
Template.test.helpers({
    formDoc:function(){
        return 'avishek';
    }
})

var hook = {
    before:{
        method:function(doc){
            console.log(doc);
            return doc;
        }
    }
}

AutoForm.addHooks(['schema1'],hook);

In server folder,
Meteor.methods({
    'processInServer': function () {
        console.log('called server');
        return 'success';
    }
})
``

What could go wrong in this application. I have nothing apart from this.

use doc=this.doc

I am running into the same error - "Maximum call stack size exceeded".  I don't understand why it is happening and I don't understand the comment from @jmlv either.

I have an insert form and the error occurs when the form is displayed. I have 14 fields in my schema. The error does not occur anymore when I remove a few fields.
Here is the stack trace:

Exception from Tracker afterFlush function:
RangeError: Maximum call stack size exceeded
at Object (native)
at Function..isObject (http://localhost:3000/packages/underscore.js:1063:20)
at http://localhost:3000/packages/aldeed_autoform.js:322:48
at Function..each..forEach (http://localhost:3000/packages/underscore.js:157:22)
at compactArrays (http://localhost:3000/packages/aldeed_autoform.js:316:9)
at http://localhost:3000/packages/aldeed_autoform.js:324:11
at Function..each..forEach (http://localhost:3000/packages/underscore.js:157:22)
at compactArrays (http://localhost:3000/packages/aldeed_autoform.js:316:9)
at http://localhost:3000/packages/aldeed_autoform.js:324:11
at Function..each._.forEach (http://localhost:3000/packages/underscore.js:157:22)

This happens to me as well after updating to Meteor 1.3.

using this.doc seemed to have fixed the issue. If you have any routes in place then having "doc" by itself means something else. this.doc tells Meteor to specifically use the helper function attached to that template called "doc"

Having the same issue... @Amritpd You're saying that passing this.doc to the helper function fixes this?

Fixed my problem...rookie mistake: turned out I was returning an doc ID to the helper, not an actual document

@thsowers Good to know you fixed your problem! For some reason, simply specifying type=update wasn't enough for AutoForm to pre-populate the form with the current object's values. Furthermore, after pressing the "Save Changes" button, the object was not updated in the collection. I had to come up with an alternative way to fill the update form with the object's data and ensure it gets updated properly. My solution ended up being a bit more complicated but it works:
   {{#with currentRow}}
{{#autoForm id="editPaymentForm" type="method-update" meteormethod="updateTable" collection="paymentTable" doc=currentRow}}`
     <fieldset>
	{{> afQuickField name="dateReceived" value=dateReceived}}
	{{> afQuickField name="paymentAmount" label="Payment Amount" value=payment}}
	{{> afQuickField name="taxes" value=taxes}}
	{{> afQuickField name="fees" value=fees}}
	<button type="submit" class="btn btn-primary">Save Changes</button>
	<button class="cancel">Cancel</button>
	 </fieldset>
	{{/autoForm}}
	{{/with}}

What's happening in the code above is that I created a helper function called currentRow that returns the object I want to edit. This object included its _id, and various other attributes like taxes or fees. Notice that I don't need to use doc=this.currentRow anymore.
I registered a Handlebars helper called "with" that allows me to directly use the values of the object. Its implementation can be found here. By using type=method-update, I could manually update the object.


Latest release from 2021/quickstart instructions invalid

Following the Quickstart instructions will end up in a very frustrating experience (https://github.com/saltstack/salt-extension/issues/32 https://github.com/saltstack/salt-extension/issues/34 https://github.com/saltstack/salt-extension/pull/33).
Most necessary fixes are in master, but the latest release is from 2021. In light of the current migration to extensions, I would suggest to polish this so that after generation, the initial commit just works, and then releasing a new version. Otherwise, the README quickstart command would have to be updated to pipx install git+https://github.com/saltstack/salt-extension to even have a chance of working.

Thanks for releasing :)


Alias Object is always Null in getTable of any Object

When getTable() is done on any Column object, the returned Table object has Alias as null and it holds alias name as table name and it is wrong. Somebody provide info whether this library supports Alias ( even though class exists)

JSqlParser is a parser. If you write tab1.col, it cannot decide, if it is a table name or an alias. This would be a task to be done after JSqlParser has parsed your statement.
What is the concrete problem you try to solve? Maybe there is another way.

I want to get the column names and table names of the parameres in WHERE clause with IN operator.

Period (.) can be used along with column name in SQL only when alias is used or otherwise it should be enclosed with brackets like [ name.name ] . So there is a way that Alias name column can be filled and the table names. I would like to add this feature to your lib as alias names are common in sql.  I am willing to do this change if you agree

IMHO your last statement is wrong:
alias.col, table.col
[alias].[col], [table].[col]
are valid, while
[alias.col], [table.col]
are not.
Or at least I dont know a dbms where this is the case. I tested this within SqlServer.
With this in mind, there is no possibility to differ between aliases and names during the parse. One has to postprocess the data. But this is not a trivial task to do having visibility of names or aliases in different blocks of one sql.
select a.c from table1 a where exists (select a.d from table2 a)
a.c should be derived from table1 while a.d should be from table2.
Using JSqlParser you could modify the TableNameFinder utility and process columns building a stack of defined aliases.

Is there any way using JSqlParser for getting the table name associated with table name and column name.

I outlined the way above. I litte more specific. To traverse the parse result you have to build a visitor. Look at the examples for some base info here.

find all "Table" - objects. Here is the alias definition for a concrete tablename.
scan through visibility block of this object: meaning for a simple sql walk through "Column" - objects and use alias definitions found under 1

Point 2 is the non trivial part.


Command may need to be redesign

LogicTaskList currently wraps around an ArrayList, and manages all business logic related to CRUD tasks - which is good.
What's the problem? The problem is that, for some commands, they need to access other components - for example, :w will need to access the storage.
There are some options to solve this:

Bundle LogicTaskList and Storage together, and pass that into the execute method (but now CreateCommand/DeleteCommand can access the storage).
Check for the type of command after the parser return. For example, if it is LogicCommand, we cast it into a LogicCommand and pass the TaskList into the execute method. If it's :w, we pass the storage.

What's the better solution?
Another question is how to deal with undo - which class should handle the actual operation? I want Logic/Model to handle it - but now the logic of the command will be exposed in Logic/Model which will hurt our codebase.
I need your opinion about this problem.

I am more inclined towards the 2nd option (checking the type of command, either using instanceof or inheritance), as the 1st option will most likely make the components more tightly coupled.


services.xserver.imwheel: add module

Add IMWheel module.

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Notify maintainers
cc @

rebased. Any idea who to ask for a review @worldofpeace @Infinisil @jhillyerd ?

I haven't done services yet with NixOS, so I'm probably not the best to review.  One comment though: could we make -d mandatory instead of default, so that imwheel never daemonizes itself, and drop the ExecStop=pkill line?

I guess that would be an option though I'm not sure if there is not any valid usecases for overriding that flug though I guess there isn't any.

@jhillyerd I think I found a problem with this. If -d would be present in options this would not work. You can try to run imwheel -d -d which will start imwheel as a deamon. Same way imwheel -d -d -d works same way as -d so there is probably some negation going on. I personally feel that theit would be better to keep this as is but it's open to discussion.

changes based on feedback are implemented but I would still want to try it out on my desktop to be sure it works.

Ready for next review. Sorry it took so long. I needed to find some time while I'm on a machine that actually has mouse attached. Example configuration I've tested this with:
  services.xserver.imwheel = {
    enable = true;
    rules = {
      "chromium-browser" = ''
        None,      Up,   Button4, 8
        None,      Down, Button5, 8
        Shift_L,   Up,   Shift_L|Button4, 4
        Shift_L,   Down, Shift_L|Button5, 4
        Control_L, Up,   Control_L|Button4
        Control_L, Down, Control_L|Button5
      '';
    };
  };

I've also tested 2 months with multiple buttons to make sure default configuration doesn't break things like back and forward buttons.

rebased onto master


App waits for period to expire before attempting first measurement and send

As the title says. Need to find a way to let the app measure and send the first message without delay.

Fixed in 78ef883f36d67b96b72e38aa369dfbee04850696


Android Notification when phone is closed/screen turned of

We're having the problem that the notifications always gets delivered for both iOS and Android but on Android there is no sound/display/vibration when the notification is received.  Oddly enough it is working on a very old Android phone we are testing with but with newer phones the notification just gets "silently" delivered i.e. shows up in the Android navbar but the user doesn't see/hear it unless opening the screen.
Could somebody somebody who has Android notifications working (with sound/vibration/screen popup) share payload/snippet of what is being sent to make this work? We're using .NET Framework 4.8

Hi, just a guess - don't forget to grant notification permission for newer androids.
Checking code in Java:
public static boolean CheckIfHaveNotificationPermission()
{
    // This is only necessary for API level >= 33 (TIRAMISU)
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
    {
        if (ContextCompat.checkSelfPermission(MyApplication.getContext(), Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED)
            return false;
    }

    return true;
}


Option to create params from input in custom validation

zod custom validation allows params to be passed in to the error object. It would be nice if these could be created based on the initial data.
That is, instead of this type signature:
.refine(validator: (data:T)=>any, params?: RefineParams)
zod could use:
.refine(validator: (data:T)=>any, params?: RefineParams | (data: T) => RefineParams

Great idea. I'll definitely do something like this. Might leave the .refine method as is but add a .refinement for more advanced use cases.

For a more advanced use, I would also like to have the method with a single parameter:
type Success = {
    isValid: true
}

type Error = {
    isValid: false,
    params: RefineParams
}

.refinement((data: T) => Success | Error)

with this, the customs validations can be reused more easily:
isFoo(data) {
    if(data === 'Foo') {
        return {
            isValid: true;
        }
    }

    return {
        isValid: false,
        params: {
            message: 'it's not Foo'
        }
    }
}

z.string().refinement(isFoo)

That is only a draft to present the option

@FranckBontemps check this one out #132 I think that this can be even more powerful when the ZodError is exposed.

I have a related use-case, where I'd like to use information from the validation function in the error message.
E.g. a simple database definition where we can define a record of column names and a primary key array:
z.object({
    columns: z.record(z.string()),
    primaryKey: z.array(apiString({}).nonempty()).nonempty()
  })

in this case the primaryKey array must only contain keys of the columns record.
The custom validation function could look like this:
.refine(
   (data) => {
     for (const pkItem of data.primaryKey) {
       if (!(pkItem in data.columns)) {
         // We'd like to include pkItem in the error message
         return false;
       }
     }
     return true;
   },
   {
     message: `the primaryKey array must only contain keys from the columns record`,
     path: ['primaryKey']
   }
 );

In this function we already have the logic to find the item that violates the check. It would be great if we could easily reuse this in the error-message.
Maybe we could have a new refine function that returns undefined (when everything is okay) or the RefineParams type (including message, path, params) in case of an error?
I hope that this can also be considered when working on a solution for this issue.

This is now possible in Zod 2 (now in beta)
const dynamicRefine = z.string().refine(
    val => val === val.toUpperCase(),
    val => ({ params: { val } }),
  );

  console.log(dynamicRefine.safeParse('asdf'));

returns
{
    Error: [
      {
        code: 'custom_error',
        params: {
          val: 'asdf',
        },
        path: [],
        message: 'Invalid input.',
      },
    ];
  }

@tmtron this is a pretty advanced use case but it is possible. Internally .refine delegates to the more advanced ._refinement method which you can use to implement this. You can use this method without worrying about breaking changes, I consider it a part of the public API; it only starts with an underscore mostly because it's a "power user" feature.
Some other context: in Zod 2 the errors property of a ZodError has been renamed to issues. This clarifies the confusing "error" vs "suberror" aspect of the previous naming.
const apiString = z.string();
  z.object({
    columns: z.record(z.string()),
    primaryKey: z.array(apiString.nonempty()).nonempty(),
  })._refinement((data, ctx) => {
    const invalidPks = data.primaryKey.filter(
      pk => !Object.keys(data.columns).includes(pk),
    );
    if (invalidPks.length) {
      ctx.addIssue({
        code: z.ZodIssueCode.custom,
        message: `Invalid PKs: ${invalidPks.join(', ')}`,
      });
    }
  });```

As you can see there's no need to return anything from `_refinement()`. If `ctx.addIssue` is called at any point during the execution of the refinement, the parse will fail. You can call `ctx.addIssue` multiple times to create multiple errors. You can also make this function async if you want to do your database fetches inside your refinement.

You need to manually provide the error code using the `z.ZodErrorCode` enum. This isn't required in `.refine` because `.refine` only every throws a single `ZodCustomIssue` whereas `_refinement_ lets you throw arbitrarily many issues of any kind. The error handling guide has more information on this.

---

@brabeji The approach above also enables what you were trying to achieve with `.dynamicRefinement`. Great job on that PR 👍


Show Axis Layout

You need to show an axis layout for this (is +Z up or is it in the front for example)

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

ID: 903e424e-1b58-e98e-7f5c-d7a5cfe94338
Version Independent ID: 0e21fe74-1551-669a-74b9-6c2cf642d809
Content: AudioNodeEmitter.Position Property (Windows.Media.Audio) - UWP app developer
Content Source: https://cpubwin.visualstudio.com/DefaultCollection/windows-uwp/_git/winrt-api-build?path=%2fwinrt-api-build%2fwindows.media.audio.audionodeemitter.yml&version=GBlive&_a=contents
Product: windows
Git Login: wdg-dev-content
Microsoft Alias: wdg-dev-content

Thanks for taking the time to let us know about this and we sincerely apologize for the delayed response. Due to the sheer volume of feedback in our repo, we are currently prioritizing new Issues. This page has been updated with the following remark:
The positions of all of the emitters in the graph are relative to the position and orientation of the AudioNodeListener object assigned to the AudioDeviceOutputNode for the audio graph. By default, the listener is located at the origin (0,0,0) facing forward along the Z axis, but you can set it's position and orientation with the Position and Orientation properties.


By default, where is your fontconfig ?

I only see the font size setting in your init-fonts.el, but I did not see the "what font to use" setting.
So...Where does your font configuration inherit?
I know how to manually specify the font, but I want to know this.
Thanks.

Nowhere: that's not a decision I make for users. Just M-x customize-face for default, and then choose the preferred family and size, but leave the other attributes unset so that they can be themed.

You may not understand what I mean...
In fact I also found that you did not set the font.
So this setting inherits from "Emacs default settings"...  :-)
Thank you very much.


[LiveComponent] Error: Could not update model for non HTMLElement

I've been building my first Live Component and I'm running into the following problem:
I have the following boolean live prop:
    #[LiveProp(writable: true)]
    public bool $overlayOpen = false;

In my view, I have the following button:
    <button data-action="live#update" data-model="overlayOpen" data-value="1">Open overlay</button>
When I clickt it, $overlayOpen is set to true and the component rerenders with a new element that contains the following button:
<button data-action="live#update" data-model="overlayOpen" data-value="0">Close overlay</button>
The "open" button works fine, but when clicking the "close" button, I get the following error:
Error invoking action "click->live#update"

 Error: Could not update model for non HTMLElement
    updateModelFromElementEvent live_controller.js:2260
    update live_controller.js:2198
    invokeWithEvent stimulus.js:281
    handleEvent stimulus.js:253
    handleEvent stimulus.js:31

The same happens in another instance, where I try to set a LiveProp to null.
I'm not sure if this is a bug or a problem on my side. Any help is appreciated.

I did some more testing.
I changed the property to a string containing "open" or "closed". The same error occurs. So it doesn't seem to relate to the fact that it is a "falsey" value. Rather I believe it has to do with the fact that these buttons appear only after the first rerender of the component. However, I have other buttons, that appear later on and do work correctly.

Are the components embedded in each other?

@1ed No, there is no nesting in this case.

Hey @Lorenzschaef!
This definitely smells like a bug to me. But I can't yet repeat it locally. My guess is that it has something to do with the elements hiding/showing, and so I set up something similar locally:
{% if isMessageShown %}
    I AM THE MESSAGE!!!
    <button data-action="live#update" data-model="isMessageShown" data-value="0">Hide message</button>
{% else %}
    <button data-action="live#update" data-model="isMessageShown" data-value="1">Show Message</button>
{% endif %}

But this seems to be working fine. Two things to check / debug:
A) Try going to the absolute, bleeding edge latest version of the bundle. I'm not aware of any specific fix that is unreleased, but I'm testing with the absolute latest code and that's where it's working fine. To do this, in composer.json, you'll need "symfony/ux-live-component": "2.x-dev", - then do a yarn install --force and yarn watch
B) Assuming the problem still happens, try hacking some debug code into the dist file. The error is that the "element" that was clicked to trigger the model change... somehow isn't an HTMLElement? I'm wondering what it is? In<EMAIL_ADDRESS>find the line where the error is coming from - line 2260 in your stacktrace. It should look something like this:
if (!(element instanceof HTMLElement)) {
    throw new Error('Could not update model for non HTMLElement');
}

Right before the new Error, add:
console.log(element)

Then stop Encore and restart it so that it builds with this. What does that log?
Cheers!

Hello @weaverryan
I have the same issue and for me, the problem is apparently coming from the usage of svg icons (we use fontawesome kits).
In my code I have 2 links :
// 1.

// 2.

The first render is ok. But then clicking on the links gives the same error, with those console logs for the "non-HTMLElement" :
// either
<svg class="svg-inline--fa fa-list fa-sm" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="list" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" data-fa-i2svg=""><path fill="currentColor" d="..."></path></svg>
// or
<path fill="currentColor" d="..."></path>

It looks like the different console logs are related to where we click on the icon (the whole svg or only path).
I tried with inserting directly a super simple svg and still got the error.
Using only text instead of icons works fine.
I pushed the tests a bit further and seems like if we put html tags inside the link, live#update is triggered but the value is not updated (no ajax call).
What works :

    List

what doesn't work (live#update logged in console but no ajax call)

List

This might be another bug ? should it work ? Am I using it wrongly ?
Thanks in advance

Hey @fGuix!
Ok, thanks to you, we might be circling closer on the issue. Actually, there may be 2 separate things, and I need some more info about at least one of them.
About the SVG, I still don't quite understand your setup. You posted the HTML for 2  tags that each have data-action="live#update"attached to them. That makes sense. But where does the SVG come into the picture? You also mentioned something about it depending on where you click, but I don't see any SVG inside those links? I'm missing a piece of the puzzle
Now, to the 2nd issue (I think this is unrelateed):

I pushed the tests a bit further and seems like if we put html tags inside the link, live#update is triggered but the value is not updated (no ajax call).

So you said this this will NOT cause an Ajax call to trigger when the text is clicked:

List

The cause might be simply that having a
 (a block element) inside of  (an inline element, or inline-flex with the class you have on it) is not allowed... so your browser might even be doing something funny where the
List
 is moved outside of the  when rendered. I could be totally wrong - but try it with a List and see if it's any better.

A a matter of fact, I am using fontawesome too. I didn't include that in my example for simplicity. I didn't think of it as a possible origin of the problem, so sorry for that.
The svgs are inserted by a script, based on the classes in the  tag.

Ah, yes, as mentioned by @Lorenzschaef , a fontawesome script is loaded in the head of the pages, and it changes the  tags with <svg> tags based on classes. I'm not particularly familiar with the underlying process, but on the rendered component, the icons are replaced correctly (and the result is the svg shown in my previous comment).
I tried with a simple svg like this :

    List
    <svg height="210" width="500">
        <polygon points="100,10 40,198 190,78 10,78 160,198" style="fill:lime;stroke:purple;stroke-width:5;fill-rule:nonzero;"/>
    </svg>

When I click on the "List" part, everything works fine.
When I click on the , I got the "Could not update model for non HTMLElement" error.

For the 2nd issue, I tried with the  and the behavior is the same. I tried with this other test :
Listtest

When I click on the "List" part, the live #update is logged but no ajax call triggered.
When I click on the "test" part, the live #update is logged and an ajax call is triggered (and the component is refreshed).
Should we (I) open another issue for this ?

It works in my project now, with the last version (2.16.0). So i guess updating to last version will do the trick.


Small syntax fixes in markdown file

I really don't want to be that guy who is just creating a pull request for small markdown adjustments but on the other hand it would be great if the file is correct and as great as the framework is. Thanks for your work! :)

Many thanks for improving the docs!


Jaeger query doesn't propagate auth token on dependency endpoint

Describe the bug
Jaeger query doesn't propagate auth token on the /dependencies endpoint. Works fine others.
To Reproduce
Steps to reproduce the behavior:

Start jaeger-query with QUERY_BEARER_TOKEN_PROPAGATION=true
make a GET request to /dependencies?endTs=?????????&lookback=??????? with an authorization token
inspect jaeger-query request headers

Expected behavior
The dependency endpoint should propagate the auth token the same way it does on other endpoints (/operations, /traces, etc.)
Version (please complete the following information):

OS: [macOS]
Jaeger version: [1.8]
Deployment: [Docker]

Additional context
We're using ES as storage although it seems that it affects all storage types
looks like the issue (for ES storage) is located here: plugin/storage/es/dependencystore/storage.go:84 where it uses the DependencyStore's context (Background context) instead of the original one

@yoave23 Thanks for reporting this - would you be interested in submitting a PR?

@objectiser sure, on it

@objectiser it seems like we need to change the GetDependencies in storage/dependencystore/interface.go:32 in order to be able to use the real context. Does this sound like a valid approach? if not, would you mind recommending a different approach?

@yoave23 Yes that is the right approach.

@yoave23 Sorry should have realised earlier, but might be worth waiting for #2364 to merge (hopefully this week) - and then add your change on top?


Application error on Safari mobile with v2.0.0-beta.9

Problem
I recently got reports that my blog is giving Application error: a client-side exception has occured error on some browser. One of the browsers was Safari mobile. I downgraded nextra to v2.0.0-beta.56 and nextra-theme-blog to v2.0.0-beta.55 and everything seems to be working fine. Sadly, I wasn't able to test this myself as I don't own iOS devices.
Link: https://site-git-deps-numtostr.vercel.app/blog/lsp-neovim-retrospective

Screenshot

Packages
"next": "^12.2.3",
"nextra": "2.0.0-beta.9",
"nextra-theme-blog": "2.0.0-beta.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"

Config

next.config.mjs

import nextra from "nextra";

const withNextra = nextra({
    theme: "nextra-theme-blog",
    themeConfig: "./theme.config.js",
    unstable_staticImage: true,
});

/**
 * @type {import('next').NextConfig}
 */
const config = {
    experimental: {
        browsersListForSwc: true,
        legacyBrowsers: false,
    },
    async redirects() {
        return [
            {
                source: "/tags",
                destination: "/blog",
                permanent: false,
            },
        ];
    },
};

export default withNextra(config);

theme.config.js

const theme = {
    darkMode: true,
    readMore: "Read More →",
    titleSuffix: ` - NAME`,
    head: Seo,
    footer: <Footer />,
};

export default theme;

Closed as completed https://github.com/shuding/nextra/pull/612


Deleting an ACL of a deleted consumer results in a HTTP 500 - an unexpected error occurred

Is there an existing issue for this?

[X] I have searched the existing issues

Kong version ($ kong version)
2.8.3
Current Behavior
When I :

create a consumer
add an ACL to the consumer
delete the consumer
delete the ACL

The ACL delete causes a server error (500).
The expected behaviour is to receive a 404, as I get when I attempt to delete an already deleted consumer.
Expected Behavior
When I :

create a consumer
add an ACL to the consumer
delete the consumer
delete the ACL

The delete ACL returns a 404.
Steps To Reproduce
Run the following scripts against a test kong instance:
#!/bin/bash
echo "## delete the consumer"
curl -X DELETE http://localhost:8001/consumers/deleteme
echo ""

echo "## create the consumer"
CONSUMER_ID=$(curl -sS -X POST http://localhost:8001/consumers --data username=deleteme | jq -r .id)
echo ""

echo "## add the ACL to the consumer"
ACL_ID=$(curl -sS -X POST http://localhost:8001/consumers/deleteme/acls --data group=admin | jq -r .id)
echo ""

echo "## delete the consumer"
curl  -X DELETE http://localhost:8001/consumers/$CONSUMER_ID
echo ""

echo "## delete the acl"
curl  -X DELETE http://localhost:8001/consumers/$CONSUMER_ID/acls/$ACL_ID
echo ""

In de case of version 2.8 the last delete will read:
## delete the acl
{"message":"An unexpected error occurred"}

With version 3.2.2 the message is:
## delete the acl
{"message":"Not found"}

Anything else?
No response

I'm sorry, but according to our policy, version 2.8 of the community edition is not supported. If you want to resolve this issue, we recommend upgrading to the latest version of Kong.

Will do. Just wanted to make sure you knew about this problem,

Solved in 3.2.2


Bug report: Unable to run createGitCommit due to "'branches.find' is undefined"

Unhandled Promise Rejection: TypeError: branches.find is not a function. (In 'branches.find(b => b.name === headBranchName)', 'branches.find' is undefined)

Error when running the following:
    const github = GitHubApiCreateCommit.create({
      owner: "csssbot",
      repo: "testing",
      accessToken: process.env.REACT_APP_TOKEN,
    });

    const response = await github.createGitCommit({
      baseBranchName: 'main',
      headBranchName: 'dev',
      commitMessage: `Added ${state.title} event`,
      files: [
        {
          path: getNewEventFileName(),
          content: getNewEventFileContent(),
        },
      ],
    });

I'm assuming that 'branches.find' is undefined means that it wasn't able to find any branches. But I'm pretty confident that the owner and repo are configured properly
More info:
"@himenon/github-api-create-commit": "^2.0.0"
"react": "^18.2.0"
"typescript": "^4.4.2"
"@types/node": "^16.7.13"

Resolved: I had an invalid Token.

I'm glad we were able to fix it.


make windows build work

closes #304

Can Travis (or other SaaS CI tool) run Windows builds so that those of us without a Windows machine don't accidentally introduce more OS dependent code?

@tsiq-karold I tried to add windows to travis. Unfortunately it complained that Java is not supported.

Wow, indeed it's not: https://docs.travis-ci.com/user/reference/windows/#supported-languages
I guess you'll have to let me know if I break it on Windows 😁

good to merge?

Go for it.


Connecting to wemos

Hey.
I have successfully uploaded your fork to my wemos D1 mini, but when I connect to led AP, I don't get a interface but something ups downloading. Can you help me

Hey @Muliku82 , wemos D1 is ESP8266, right? Did you upload the firmware from the esp8266 branch? My fork only supports ESP32, but there is an experimental version on the esp8266 branch that should work. See #1

Yes, i used the 8266 branch.Holen Sie sich Outlook für Android


Exception AttributeError: "'_SocketDuckForFd' object has no attribute '_closed'"

Bot starts, runs [UpdateLiveInventory], runs [ShowBestPokemon], then crashes with:
[Errno 32] Broken pipe
Exception AttributeError: "'_SocketDuckForFd' object has no attribute '_closed'" in  ignored
Traceback (most recent call last):
File "pokecli.py", line 865, in
main()
File "pokecli.py", line 283, in main
report_summary(bot)
File "pokecli.py", line 331, in report_summary
metrics.capture_stats()
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/pokemongo_bot/metrics.py", line 117, in capture_stats
inventory.refresh_inventory()
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1432, in refresh_inventory
_inventory.refresh(data)
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1272, in refresh
inventory = self.bot.api.get_inventory()
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/pgoapi/pgoapi.py", line 140, in function
return request.call()
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 237, in call
result = self._call()
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 185, in _call
return PGoApiRequest.call(self)
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/pgoapi/pgoapi.py", line 250, in call
default_libraries = get_lib_paths(version)
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/pgoapi/utilities.py", line 172, in get_lib_paths
arch = platform.architecture()[0]
File "/usr/lib/python2.7/platform.py", line 1134, in architecture
output = _syscmd_file(executable, '')
File "/usr/lib/python2.7/platform.py", line 1081, in _syscmd_file
output = proc.communicate()[0]
File "/usr/lib/python2.7/subprocess.py", line 791, in communicate
stdout = _eintr_retry_call(self.stdout.read)
File "/usr/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
return func(*args)
File "/usr/lib/python2.7/socket.py", line 351, in read
data = self._sock.recv(rbufsize)
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/eventlet/greenio/py2.py", line 160, in recv
data = os.read(self._fileno, buflen)
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/eventlet/green/os.py", line 50, in read
hubs.trampoline(fd, read=True)
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/eventlet/hubs/init.py", line 162, in trampoline
return hub.switch()
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 294, in switch
return self.greenlet.switch()
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 332, in run
self.close_one()
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 265, in close_one
listener.tb(IOClosed(errno.ENOTCONN, "Operation on closed file"))
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/eventlet/green/select.py", line 62, in on_error
original = ds[get_fileno(d)]['error']
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/eventlet/green/select.py", line 23, in get_fileno
raise TypeError("Expected int or long, got %s" % type(obj))
TypeError: Expected int or long, got <class 'eventlet.hubs.IOClosed'>
[2017-02-14 09:54:08] [sentry.errors] Sentry responded with an error: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128) (url: https://app.getsentry.com/api/90254/store/)
Traceback (most recent call last):
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
super(ThreadedHTTPTransport, self).send(data, headers)
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
ca_certs=self.ca_certs,
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
return opener.open(url, data, timeout)
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
response = self._open(req, data)
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
'_open', req)
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
return self.do_open(ValidHTTPSConnection, req)
File "/home/pi/PokemonGo-Bot/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 1284, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python2.7/httplib.py", line 1001, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1035, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 997, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 848, in _send_output
msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128)
[2017-02-14 09:54:08] [sentry.errors.uncaught] [u"TypeError: Expected int or long, got <class 'eventlet.hubs.IOClosed'>", u'  File "pokecli.py", line 865, in ', u'  File "pokecli.py", line 283, in main', u'  File "pokecli.py", line 331, in report_summary', u'  File "pokemongo_bot/metrics.py", line 117, in capture_stats', u'  File "pokemongo_bot/inventory.py", line 1432, in refresh_inventory', u'  File "pokemongo_bot/inventory.py", line 1272, in refresh', u'  File "pgoapi/pgoapi.py", line 140, in function', u'  File "pokemongo_bot/api_wrapper.py", line 237, in call', u'  File "pokemongo_bot/api_wrapper.py", line 185, in _call', u'  File "pgoapi/pgoapi.py", line 250, in call', u'  File "pgoapi/utilities.py", line 172, in get_lib_paths', u'  File "python2.7/platform.py", line 1134, in architecture', u'  File "python2.7/platform.py", line 1081, in _syscmd_file', u'  File "python2.7/subprocess.py", line 791, in communicate', u'  File "python2.7/subprocess.py", line 476, in _eintr_retry_call', u'  File "python2.7/socket.py", line 351, in read', u'  File "eventlet/greenio/py2.py", line 160, in recv', u'  File "eventlet/green/os.py", line 50, in read', u'  File "eventlet/hubs/init.py", line 162, in trampoline', u'  File "eventlet/hubs/hub.py", line 294, in switch', u'  File "eventlet/hubs/hub.py", line 332, in run', u'  File "eventlet/hubs/hub.py", line 265, in close_one', u'  File "eventlet/green/select.py", line 62, in on_error', u'  File "eventlet/green/select.py", line 23, in get_fileno']
Tue 14 Feb 09:54:09 GMT 2017 Pokebot  Stopped.
Press any button or wait 20 seconds to continue.
Other Information
OS: raspbian/Linux on raspberry pi
Branch: master
Git Commit: eaab3f590feef5ad559fa3461cb05762e260c364
Python Version: Python 2.7.9

is this still valid?

No response in a while, closing this issue. If you still encounter this problem, or have anything else to add, let us know! Thank you for reporting this issue, it helps us all make this bot the best of them all!


Ensure the alternative ND manager can use GPUs

This makes a massive performance difference when using OnnxRuntime, which delegates to PyTorch for some NDArray operations.  This almost makes OnnxRuntime run as fast compared to PyTorch.  Without this change, OnnxRuntime was over 3 times slower.

@frankfliu - on my tests with my application (which does a lot of non-GPU work too), my original change ran in 6m 8s, but with the change not to keep the device, this went to 6m 25s.  So it is a significant performance hit on multi-GPU systems, and for other workloads the discepancy will be much higher.
I also saw GPU 0 having way higher (too high) utilisation compared to the other GPUs since this is the default device set for the alternative ND manager, for all my worker processes (16 on my test).
Can't we keep my original change without the catch for UnsatisfiedLinkError?  Otherwise this puts OnnxRuntime further away from PyTorch again, which won't have this issue.

@david-sitsky
You are right, in multiple GPU case, it does make sense to keep original device. I just doesn't like try catch. Let me think a bit, there should a simple way.

@frankfliu - any ideas with this?  I am pretty keen to get that multi-GPU performance back. :wink:

@david-sitsky
I created a PR: #3146

Awesome - thank you.  That looks like a better way of achieving it too.


uses the selected text to use in href for emmet wrap with a

Fixes #54711
Replaces ${0} with $TM_SELECTED_TEXT so the href part of the a tag gets filled when is called to  wrap piece of text

@nestoralonso Thanks for the PR.
I have added a few comments above for the approach taken in this PR.
#59870 is an existing PR that is looking into this issue and is close to completion. Therefore, I will be closing this PR in favor of #59870.
You can perhaps work with @FizzBuzz791 on it together?


[question] Android build fails

Hi dear openh264 community,
I am trying to build cross build openh264-android on linux but build fails. Here are details:
OS: docker image based on ubuntu 20.04
openh264 version: tag https://github.com/cisco/openh264/releases/tag/v2.3.1
cmd:
export PATH=/openh264/NDK/android-ndk-r21e/build/tools:$PATH
make clean
make OS=android NDKROOT=/openh264/NDK/android-ndk-r21e NDK_TOOLCHAIN_VERSION=clang TARGET=android-21 NDKLEVEL=21 ARCH=arm

log:
make OS=android NDKROOT=/openh264/NDK/android-ndk-r21e NDK_TOOLCHAIN_VERSION=clang TARGET=android-21 NDKLEVEL=21 ARCH=arm
/openh264/NDK/android-ndk-r21e/build/core/add-application.mk:178: *** Android NDK: APP_STL stlport_shared is no longer supported. Please switch to either c++_static or c++_shared. See https://developer.android.com/ndk/guides/cpp-support.html for more information.    .  Stop.
/openh264/NDK/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -O3 -DNDEBUG -DHAVE_NEON -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID_NDK -fpic --sysroot=/openh264/NDK/android-ndk-r21e/platforms/android-21/arch-arm -MMD -MP -fstack-protector-all -isystem /openh264/NDK/android-ndk-r21e/sysroot/usr/include -isystem /openh264/NDK/android-ndk-r21e/sysroot/usr/include/ -D__ANDROID_API__=21 -target armv7-none-linux-androideabi -DGENERATED_VERSION_HEADER -fno-rtti -fno-exceptions -I./codec/api/wels -I./codec/common/inc -Icodec/common/inc -Dandroid_getCpuIdArm=wels_getCpuIdArm -Dandroid_setCpuArm=wels_setCpuArm -Dandroid_getCpuCount=wels_getCpuCount -Dandroid_getCpuFamily=wels_getCpuFamily -Dandroid_getCpuFeatures=wels_getCpuFeatures -Dandroid_setCpu=wels_setCpu  -I/openh264/NDK/android-ndk-r21e/sources/android/cpufeatures -c -o codec/common/src/common_tables.o codec/common/src/common_tables.cpp
In file included from codec/common/src/common_tables.cpp:33:
In file included from ./codec/common/inc/wels_common_defs.h:38:
In file included from ./codec/common/inc/macros.h:45:
In file included from /openh264/NDK/android-ndk-r21e/sysroot/usr/include/string.h:36:
In file included from /openh264/NDK/android-ndk-r21e/sysroot/usr/include/bits/strcasecmp.h:37:
In file included from /openh264/NDK/android-ndk-r21e/sysroot/usr/include/sys/types.h:36:
/openh264/NDK/android-ndk-r21e/sysroot/usr/include/linux/types.h:21:10: fatal error: 'asm/types.h' file not found
#include <asm/types.h>
         ^~~~~~~~~~~~~
1 error generated.
make: *** [codec/common/targets.mk:119: codec/common/src/common_tables.o] Error 1

As I understand it is internal issue in NDK. What am I doing wrong?
Thanks in advance.

Seems like hard-code in build/platform-android.mk helps:
CFLAGS += -isystem $(NDKROOT)/sysroot/usr/include -isystem $(NDKROOT)/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=$(NDKLEVEL)

Still has issues with .so linking due to hard-coded .mk file but it compiled libopenh264.a. I will try implement better fix... Still strange behavior. Am I doing something wrong or this NDK is unsupported? :)

Retrospective: after additional patching original build/platform-android.mk build work with ndk v21. .so builds well too. Issue closed :)


Additional for privacy cockroaches

(\.|^)amazon-adsystem\.com$ → amazon ads script
(\.|^)connect\.facebook\.net$ → meta pixel base script
(\.)posthog\.com$ → yet another hog, do it like Session replay - Watch users interacting with your app or website.

Thank you for this Zsolt @toviszsolt.
There are no wild card characters in hosts files.  Also, we already block some of these.
Closing.

@StevenBlack
Yes, I can see that you are maintaining a host file, so I didn't open a PR, but an Issue.
I thought you would focus on the content rather than the format.
A useful tip: If you do not close the issue in front of the users, you give them a chance to communicate further. Usually users will close the issue.


Other options for drawing rectangles

Should we add an option to draw rectangles using two points?

I think this would be a fine addition that may cut down on calculations in some circumstances.

I vote no.  It's easy enough to compute the width/height from points if that is how the user is tracking position or size.  And not adding another function helps keep the API clean and consistent since there wouldn't be anything matching for other primitives.


require behaves in surprising ways

Basically, we copied node's node_module logic so require now walks the entire tree before giving up and attempting to interpret global module names as relative paths.
e.g.

Install ArangoDB in the home directory (or a subdirectory therein).
npm install a module (e.g. lol) in your home directory
Add a JS file with the same name to your Foxx app
Try to require the file as a global name (e.g. require("lol"))
The module from the node_modules folder in your home directory will be loaded

Let's also make sure require does the right thing for Foxx services. The require cache is likely global, not service-specific at the moment.

I can't reproduce this problem anymore. Have we accidentally fixed this?

create a file named test.js that contains broken JavaScript code.
put that file into ~/node_modules
start arangod from ~/ArangoDB/ (or some other subdirectory directly below ~)
run make unittests-shell-client to produce the error

This should no longer be happening now.


RuntimeError: received 0 items of ancdata

Hi,
I am following the instruction on ReadMe to run training part. When I execute "python tools/plain_train_net.py --config-file "configs/smoke_gn_vector.yaml", I get an error "RuntimeError: received 0 items of ancdata"
Ubuntu: 16.04
Python: 3.7.7
CUDA: 10.0
Pytorch: 1.4.0
The entire log is below
Command Line Args: Namespace(ckpt=None, config_file='configs/smoke_gn_vector.yaml', dist_url='tcp://<IP_ADDRESS>:50153', eval_only=False, machine_rank=0, num_gpus=1, num_machines=1, opts=[])
[2020-06-19 18:10:56,601] smoke INFO: Using 1 GPUs
[2020-06-19 18:10:56,601] smoke INFO: Collecting environment info
[2020-06-19 18:10:57,952] smoke INFO:
PyTorch version: 1.4.0
Is debug build: No
CUDA used to build PyTorch: 10.0

OS: Ubuntu 16.04.6 LTS
GCC version: (Ubuntu 5.5.0-12ubuntu1~16.04) 5.5.0 20171010
CMake version: version 3.5.1

Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: 10.0.130
GPU models and configuration:
GPU 0: GeForce GTX 1080 Ti
GPU 1: GeForce GTX 1080 Ti
GPU 2: GeForce GTX 1080 Ti
GPU 3: TITAN Xp

Nvidia driver version: 418.87.01
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.2

Versions of relevant libraries:
[pip3] numpy==1.18.1
[pip3] torch==1.4.0
[pip3] torchfile==0.1.0
[pip3] torchvision==0.5.0
[conda] blas                      1.0                         mkl
[conda] mkl                       2020.1                      217
[conda] mkl-service               2.3.0            py37he904b0f_0
[conda] mkl_fft                   1.1.0            py37h23d657b_0
[conda] mkl_random                1.1.1            py37h0573a6f_0
[conda] pytorch                   1.4.0           py3.7_cuda10.0.130_cudnn7.6.3_0    pytorch
[conda] torchvision               0.5.0                py37_cu100    pytorch
        Pillow (7.1.2)
[2020-06-19 18:10:57,952] smoke INFO: Namespace(ckpt=None, config_file='configs/smoke_gn_vector.yaml', dist_url='tcp://<IP_ADDRESS>:50153', eval_only=False, machine_rank=0, num_gpus=1, num_machines=1, opts=[])
[2020-06-19 18:10:57,952] smoke INFO: Loaded configuration file configs/smoke_gn_vector.yaml
[2020-06-19 18:10:57,953] smoke INFO:
MODEL:
  WEIGHT: "catalog://ImageNetPretrained/DLA34"
INPUT:
  FLIP_PROB_TRAIN: 0.5
  SHIFT_SCALE_PROB_TRAIN: 0.3
DATASETS:
  DETECT_CLASSES: ("Car", "Cyclist", "Pedestrian")
  TRAIN: ("kitti_train",)
  TEST: ("kitti_test",)
  TRAIN_SPLIT: "trainval"
  TEST_SPLIT: "test"
SOLVER:
  BASE_LR: 2.5e-4
  STEPS: (10000, 18000)
  MAX_ITERATION: 25000
  IMS_PER_BATCH: 32
[2020-06-19 18:10:57,953] smoke INFO: Running with config:
CUDNN_BENCHMARK: True
DATALOADER:
  ASPECT_RATIO_GROUPING: False
  NUM_WORKERS: 4
  SIZE_DIVISIBILITY: 0
DATASETS:
  DETECT_CLASSES: ('Car', 'Cyclist', 'Pedestrian')
  MAX_OBJECTS: 30
  TEST: ('kitti_test',)
  TEST_SPLIT: test
  TRAIN: ('kitti_train',)
  TRAIN_SPLIT: trainval
INPUT:
  FLIP_PROB_TRAIN: 0.5
  HEIGHT_TEST: 384
  HEIGHT_TRAIN: 384
  PIXEL_MEAN: [0.485, 0.456, 0.406]
  PIXEL_STD: [0.229, 0.224, 0.225]
  SHIFT_SCALE_PROB_TRAIN: 0.3
  SHIFT_SCALE_TRAIN: (0.2, 0.4)
  TO_BGR: True
  WIDTH_TEST: 1280
  WIDTH_TRAIN: 1280
MODEL:
  BACKBONE:
    BACKBONE_OUT_CHANNELS: 64
    CONV_BODY: DLA-34-DCN
    DOWN_RATIO: 4
    FREEZE_CONV_BODY_AT: 0
    USE_NORMALIZATION: GN
  DEVICE: cuda
  GROUP_NORM:
    DIM_PER_GP: -1
    EPSILON: 1e-05
    NUM_GROUPS: 32
  SMOKE_HEAD:
    DEPTH_REFERENCE: (28.01, 16.32)
    DIMENSION_REFERENCE: ((3.88, 1.63, 1.53), (1.78, 1.7, 0.58), (0.88, 1.73, 0.67))
    LOSS_ALPHA: 2
    LOSS_BETA: 4
    LOSS_TYPE: ('FocalLoss', 'DisL1')
    LOSS_WEIGHT: (1.0, 10.0)
    NUM_CHANNEL: 256
    PREDICTOR: SMOKEPredictor
    REGRESSION_CHANNEL: (1, 2, 3, 2)
    REGRESSION_HEADS: 8
    USE_NMS: False
    USE_NORMALIZATION: GN
  SMOKE_ON: True
  WEIGHT: catalog://ImageNetPretrained/DLA34
OUTPUT_DIR: ./tools/logs
PATHS_CATALOG: /home/robot1/Shukai/SMOKE/smoke/config/paths_catalog.py
SEED: -1
SOLVER:
  BASE_LR: 0.00025
  BIAS_LR_FACTOR: 2
  CHECKPOINT_PERIOD: 20
  EVALUATE_PERIOD: 20
  IMS_PER_BATCH: 32
  LOAD_OPTIMIZER_SCHEDULER: True
  MASTER_BATCH: -1
  MAX_ITERATION: 25000
  OPTIMIZER: Adam
  STEPS: (10000, 18000)
TEST:
  DETECTIONS_PER_IMG: 50
  DETECTIONS_THRESHOLD: 0.25
  IMS_PER_BATCH: 1
  PRED_2D: True
  SINGLE_GPU_TEST: True
[2020-06-19 18:10:57,954] smoke.utils.envs INFO: Using a generated random seed 58027627
[2020-06-19 18:11:00,129] smoke.utils.check_point INFO: Loading checkpoint from catalog://ImageNetPretrained/DLA34
[2020-06-19 18:11:00,129] smoke.utils.check_point INFO: catalog://ImageNetPretrained/DLA34 points to http://dl.yf.io/dla/models/imagenet/dla34-ba72cf86.pth
[2020-06-19 18:11:00,130] smoke.utils.check_point INFO: url http://dl.yf.io/dla/models/imagenet/dla34-ba72cf86.pth cached in /home/robot1/.torch/models/dla34-ba72cf86.pth
[2020-06-19 18:11:00,163] smoke.utils.model_serialization INFO: backbone.body.base.base_layer.0.weight                                loaded from base_layer.0.weight                 of shape (16, 3, 7, 7)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.base_layer.1.bias                                  loaded from base_layer.1.bias                   of shape (16,)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.base_layer.1.weight                                loaded from base_layer.1.weight                 of shape (16,)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level0.0.weight                                    loaded from level0.0.weight                     of shape (16, 16, 3, 3)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level0.1.bias                                      loaded from level0.1.bias                       of shape (16,)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level0.1.weight                                    loaded from level0.1.weight                     of shape (16,)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level1.0.weight                                    loaded from level1.0.weight                     of shape (32, 16, 3, 3)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level1.1.bias                                      loaded from level1.1.bias                       of shape (32,)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level1.1.weight                                    loaded from level1.1.weight                     of shape (32,)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level2.project.0.weight                            loaded from level2.project.0.weight             of shape (64, 32, 1, 1)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level2.project.1.bias                              loaded from level2.project.1.bias               of shape (64,)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level2.project.1.weight                            loaded from level2.project.1.weight             of shape (64,)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level2.root.conv.weight                            loaded from level2.root.conv.weight             of shape (64, 128, 1, 1)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level2.tree1.conv1.weight                          loaded from level2.tree1.conv1.weight           of shape (64, 32, 3, 3)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level2.tree1.conv2.weight                          loaded from level2.tree1.conv2.weight           of shape (64, 64, 3, 3)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level2.tree2.conv1.weight                          loaded from level2.tree2.conv1.weight           of shape (64, 64, 3, 3)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level2.tree2.conv2.weight                          loaded from level2.tree2.conv2.weight           of shape (64, 64, 3, 3)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.project.0.weight                            loaded from level3.project.0.weight             of shape (128, 64, 1, 1)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.project.1.bias                              loaded from level3.project.1.bias               of shape (128,)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.project.1.weight                            loaded from level3.project.1.weight             of shape (128,)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.tree1.project.0.weight                      loaded from level3.tree1.project.0.weight       of shape (128, 64, 1, 1)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.tree1.project.1.bias                        loaded from level3.tree1.project.1.bias         of shape (128,)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.tree1.project.1.weight                      loaded from level3.tree1.project.1.weight       of shape (128,)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.tree1.root.conv.weight                      loaded from level3.tree1.root.conv.weight       of shape (128, 256, 1, 1)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.tree1.tree1.conv1.weight                    loaded from level3.tree1.tree1.conv1.weight     of shape (128, 64, 3, 3)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.tree1.tree1.conv2.weight                    loaded from level3.tree1.tree1.conv2.weight     of shape (128, 128, 3, 3)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.tree1.tree2.conv1.weight                    loaded from level3.tree1.tree2.conv1.weight     of shape (128, 128, 3, 3)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.tree1.tree2.conv2.weight                    loaded from level3.tree1.tree2.conv2.weight     of shape (128, 128, 3, 3)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.tree2.root.conv.weight                      loaded from level3.tree2.root.conv.weight       of shape (128, 448, 1, 1)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.tree2.tree1.conv1.weight                    loaded from level3.tree2.tree1.conv1.weight     of shape (128, 128, 3, 3)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.tree2.tree1.conv2.weight                    loaded from level3.tree2.tree1.conv2.weight     of shape (128, 128, 3, 3)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.tree2.tree2.conv1.weight                    loaded from level3.tree2.tree2.conv1.weight     of shape (128, 128, 3, 3)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level3.tree2.tree2.conv2.weight                    loaded from level3.tree2.tree2.conv2.weight     of shape (128, 128, 3, 3)
[2020-06-19 18:11:00,164] smoke.utils.model_serialization INFO: backbone.body.base.level4.project.0.weight                            loaded from level4.project.0.weight             of shape (256, 128, 1, 1)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level4.project.1.bias                              loaded from level4.project.1.bias               of shape (256,)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level4.project.1.weight                            loaded from level4.project.1.weight             of shape (256,)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level4.tree1.project.0.weight                      loaded from level4.tree1.project.0.weight       of shape (256, 128, 1, 1)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level4.tree1.project.1.bias                        loaded from level4.tree1.project.1.bias         of shape (256,)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level4.tree1.project.1.weight                      loaded from level4.tree1.project.1.weight       of shape (256,)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level4.tree1.root.conv.weight                      loaded from level4.tree1.root.conv.weight       of shape (256, 512, 1, 1)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level4.tree1.tree1.conv1.weight                    loaded from level4.tree1.tree1.conv1.weight     of shape (256, 128, 3, 3)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level4.tree1.tree1.conv2.weight                    loaded from level4.tree1.tree1.conv2.weight     of shape (256, 256, 3, 3)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level4.tree1.tree2.conv1.weight                    loaded from level4.tree1.tree2.conv1.weight     of shape (256, 256, 3, 3)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level4.tree1.tree2.conv2.weight                    loaded from level4.tree1.tree2.conv2.weight     of shape (256, 256, 3, 3)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level4.tree2.root.conv.weight                      loaded from level4.tree2.root.conv.weight       of shape (256, 896, 1, 1)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level4.tree2.tree1.conv1.weight                    loaded from level4.tree2.tree1.conv1.weight     of shape (256, 256, 3, 3)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level4.tree2.tree1.conv2.weight                    loaded from level4.tree2.tree1.conv2.weight     of shape (256, 256, 3, 3)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level4.tree2.tree2.conv1.weight                    loaded from level4.tree2.tree2.conv1.weight     of shape (256, 256, 3, 3)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level4.tree2.tree2.conv2.weight                    loaded from level4.tree2.tree2.conv2.weight     of shape (256, 256, 3, 3)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level5.project.0.weight                            loaded from level5.project.0.weight             of shape (512, 256, 1, 1)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level5.project.1.bias                              loaded from level5.project.1.bias               of shape (512,)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level5.project.1.weight                            loaded from level5.project.1.weight             of shape (512,)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level5.root.conv.weight                            loaded from level5.root.conv.weight             of shape (512, 1280, 1, 1)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level5.tree1.conv1.weight                          loaded from level5.tree1.conv1.weight           of shape (512, 256, 3, 3)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level5.tree1.conv2.weight                          loaded from level5.tree1.conv2.weight           of shape (512, 512, 3, 3)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level5.tree2.conv1.weight                          loaded from level5.tree2.conv1.weight           of shape (512, 512, 3, 3)
[2020-06-19 18:11:00,165] smoke.utils.model_serialization INFO: backbone.body.base.level5.tree2.conv2.weight                          loaded from level5.tree2.conv2.weight           of shape (512, 512, 3, 3)
[2020-06-19 18:11:00,191] smoke.data.datasets.kitti INFO: Initializing KITTI trainval set with 7481 files loaded
[2020-06-19 18:11:00,191] smoke.trainer INFO: Start training
Traceback (most recent call last):
  File "tools/plain_train_net.py", line 100, in <module>
    args=(args,),
  File "/home/robot1/Shukai/SMOKE/smoke/engine/launch.py", line 56, in launch
    main_func(*args)
  File "tools/plain_train_net.py", line 88, in main
    train(cfg, model, device, distributed)
  File "tools/plain_train_net.py", line 53, in train
    arguments
  File "/home/robot1/Shukai/SMOKE/smoke/engine/trainer.py", line 58, in do_train
    for data, iteration in zip(data_loader, range(start_iter, max_iter)):
  File "/home/robot1/anaconda3/envs/SMOKE/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 345, in __next__
    data = self._next_data()
  File "/home/robot1/anaconda3/envs/SMOKE/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 841, in _next_data
    idx, data = self._get_data()
  File "/home/robot1/anaconda3/envs/SMOKE/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 808, in _get_data
    success, data = self._try_get_data()
  File "/home/robot1/anaconda3/envs/SMOKE/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 761, in _try_get_data
    data = self._data_queue.get(timeout=timeout)
  File "/home/robot1/anaconda3/envs/SMOKE/lib/python3.7/multiprocessing/queues.py", line 113, in get
    return _ForkingPickler.loads(res)
  File "/home/robot1/anaconda3/envs/SMOKE/lib/python3.7/site-packages/torch/multiprocessing/reductions.py", line 294, in rebuild_storage_fd
    fd = df.detach()
  File "/home/robot1/anaconda3/envs/SMOKE/lib/python3.7/multiprocessing/resource_sharer.py", line 58, in detach
    return reduction.recv_handle(conn)
  File "/home/robot1/anaconda3/envs/SMOKE/lib/python3.7/multiprocessing/reduction.py", line 185, in recv_handle
    return recvfds(s, 1)[0]
  File "/home/robot1/anaconda3/envs/SMOKE/lib/python3.7/multiprocessing/reduction.py", line 161, in recvfds
    len(ancdata))
RuntimeError: received 0 items of ancdata

Any help is appreciated!
Shukai

I am also getting same error.

same error

I am also getting same error.

I solved it. The batchsize is too large for a single GPU, so you need to change IMS_PER_BATCH to a smaller size

I am also getting same error.

I solved it. The batchsize is too large for a single GPU, so you need to change IMS_PER_BATCH to a smaller size

Thanks. I solved this question.

This command can also solve it
ulimit -n 2048


Issues #29 & #95

Issues #29 & #95 : Displays the average coverage % for all coverage types

Interesting that run two different times, codecov reports two different results...

Made a benign whitespace change to get the build process to re-run and fix Codecov issues. @tonerdo let me know if there's anything I need to do.

@StephenMP no need. Will take a look once I get the chance

Hiya @StephenMP Can I please see a screenshot of the final output. Also, I have my reservations about this feature considering the 2.0 update simply compares each assembly's coverage against the threshold instead of the average coverage

@tonerdo
The final output looks like the following
Starting test execution, please wait...

  Total tests: 87. Passed: 87. Failed: 0. Skipped: 0.
  Test Run Successful.
  Test execution time: 9.2234 Seconds

  Calculating coverage result...
    Generating report 'path\to\coverage.xml'

  +---------------+--------+--------+--------+
  | Module        | Line   | Branch | Method |
  +---------------+--------+--------+--------+
  | coverlet.core | 90.3%  | 85.5%  | 94.1%  |
  +---------------+--------+--------+--------+

  +---------+--------+--------+--------+
  |         | Line   | Branch | Method |
  +---------+--------+--------+--------+
  | Average | 90.3%  | 85.5%  | 94.1%  |
  +---------+--------+--------+--------+

If you have your reservations, that's fine, I was just adding something suggested by two open tickets. If you don't want to include it you can close the pull request and the tickets 😄

I would love to have this averaging feature.
In my solution I have unit tests and integration tests over multiple projects. Since these tests complement each other, it makes more sense to look at the average coverage, instead of the lowest coverage.


Fix .flowconfig to not overwrite FlowFixMe

Problem
.flowconfig in a some repositories still override $FlowFixMe which causes release verification failures (example).
Solution
Identify and update the .flowconfig files for all of these offending repositories.

!merge


*** Forcing RESYNC *** Loop

Hello,
I am working on a Jetson Nano with Breakout Board v2.0 and Lepton 3.5 Camera.
I followed every steps of the installation:
Enabled SPI
Checked I2C communication
Changed Buffersize
However, I stuck at Forcing RESYNC ERROR.
Any help would be appreciated.

Hi :) were you able to solve the issue? I'm running into the same problem

Hi, I changed my board to purethermal 3. But I guess problem is related to jetpack version. you can try different jetpack versions


WorldOfDarknessの正規表現をシンプル化

冗長な処理が多かったのでパターンを一つにまとめました。

Codecov Report

Merging #83 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #83      +/-   ##
==========================================
- Coverage   85.74%   85.74%   -0.01%
==========================================
  Files         176      176
  Lines       21163    21159       -4
==========================================
- Hits        18146    18142       -4
  Misses       3017     3017

Impacted Files
Coverage Δ

src/diceBot/WorldOfDarkness.rb
98.38% <100%> (-0.1%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5fc62b2...cea9159. Read the comment docs.

ありがとうございます。マージしました。


Add awesome badge

This cool looking badge links to A curated list of awesome lists where Awesome PHP is listed also.

Sorry but for now @ziadoz isn't keen on adding the badge yet. Maybe at a later point?


Trying to understand why other boost asio non-grpc async work in same thread with grpc?

I've been trying to understand how it is possible for your excellent library to be able to execute async operations (for example steady_timer) on the same main thread as grpc.
I ran the hello-world-server-cpp20.cpp in a debugger to help my understanding.
Part of my initial confusion is because I see in grpcContext.ipp/get_next_event() that it seems to be blocking only on the grpc completion queue (call to get_completion_queue()->AsyncNext()), so how could it unblock on other async events that are not grpc?
Then using the debugger I found that at the start of main() of hello-world-server-cpp20.cpp that this statement:
    boost::asio::basic_signal_set signals{grpc_context, SIGINT, SIGTERM};

spawns a 2nd ASIO thread.
Then I see that when I have another non-grpc async operation, such as steady_timer, that when the steady_timer expires it wakes up this 2nd ASIO thread somehow. Then when that wakes up somehow you get it to post a grpc alarm with immediate deadline to the grpc completion queue which unblocks the main thread and allows the handler for the steady timer to execute. Is this the proper understanding?
So would it be that any (not just steady_timer) non-grpc async completion handlers would wake up that 2nd thread which then sends an immediate grpc alarm to wake up the completion handler in the main thread? That is how you get non-grpc async completion handlers to execute?
Not knowing how boost::asio works so well, I suppose this 2nd thread is always there and wakes up the main thread, even when using basic io_context and not an overridden execution_context? Or is this 2nd thread somehow created because you have overridden the basic io_context/execution_context?

You analyzed that perfectly. Boost.Asio has a mechanism called Services, which allows an IO-Object (like asio::steady_timer) to instruct an asio::execution_context to create and hold on to some "global" state that the IO-Object needs to perform its tasks. In the case of asio::steady_timer this would be an asio::io_context (and a timer thread on Windows). If you step through the debugger of the constructor of asio::steady_timer you will eventually see a call like use_service<win_iocp_io_context>(context). This call tells the GrpcContext that it should provide an asio::io_context for the timer. Since the GrpcContext is not an asio::io_context itself, it has to create one and run it on a background thread. All that happens automatically btw. by Boost.Asio, all I had to do is to inherit from asio::execution_context which is required.
So you are right that when using an asio::io_context directly with an asio::steady_timer that no such extra thread is being created. In my library you can use grpc::Alarm instead to avoid creating the extra thread.
Once the asio::steady_timer has expired it will use the GrpcExecutor to notify the GrpcContext by calling  asio::dispatch. You can see in GrpcContextImplementation::add_remote_operation that this will set an immediate alarm on the GrpcContext that will wake it up so that it can call the completion handler that was passed to steady_timer.async_wait.
Some functions do not require an extra thread like asio::post, asio::dispatch, asio::execute, asio::co_spawn and so on. They instead either set the immediate alarm (if they were made from a different thread) or simply allocate an operation and put it into the GrpcContext's intrusive queue.

For v1.4.0 I am planning on making this available the other way around as well. For applications that primarily use asio::io_context, e.g. because they are a webserver and only need the occasional RPC functionality, let's say as a client it would then be more efficient (and probably convienent) to write something like:
const auto stub = test::v1::Test::NewStub(grpc::CreateChannel(host, grpc::InsecureChannelCredentials()));
boost::asio::io_context io_context;
agrpc::GrpcStub grpc_stub{*stub, io_context};
co_await agrpc::request(..., grpc_stub, ...);

In which case the constructor ot agrpc::GrpcStub would ask the io_context for a agrpc::GrpcContext via the use_service mechanism. If none exists, then one will be created and run on a background thread.


Undefine avr-libc macros that clash with library features

Undefine avr-libc macros that clash with library features. Including avr/io.h will expose clashes.

[x] include/picolibrary/microchip/megaavr.h
[ ] include/picolibrary/microchip/megaavr/asynchronous_serial.h
[ ] include/picolibrary/microchip/megaavr/gpio.h
[ ] include/picolibrary/microchip/megaavr/i2c.h
[ ] include/picolibrary/microchip/megaavr/multiplexed_signals.h
[ ] include/picolibrary/microchip/megaavr/multiplexed_signals/atmega2560.h
[ ] include/picolibrary/microchip/megaavr/multiplexed_signals/atmega328p.h
[ ] include/picolibrary/microchip/megaavr/peripheral.h
[ ] include/picolibrary/microchip/megaavr/peripheral/atmega2560.h
[ ] include/picolibrary/microchip/megaavr/peripheral/atmega328p.h
[ ] include/picolibrary/microchip/megaavr/peripheral/instance.h
[ ] include/picolibrary/microchip/megaavr/peripheral/port.h
[x] include/picolibrary/microchip/megaavr/peripheral/spi.h
[ ] include/picolibrary/microchip/megaavr/peripheral/twi.h
[ ] include/picolibrary/microchip/megaavr/peripheral/usart.h
[ ] include/picolibrary/microchip/megaavr/register.h
[ ] include/picolibrary/microchip/megaavr/spi.h
[ ] include/picolibrary/microchip/megaavr/version.h

Some definitions interfere with names defined outside picolibrary-microchip-megaavr (e.g. the ADC macro interferes with the picolibrary ADC namespace). This makes the current approach for preventing clashes non-feasible. Having avr-libcpp optionally undefine register definition macros will be pursued instead.


vim: usable defaults

vim should have usable default settings like Ubuntu and maybe every other Linux Distribution.
i can't use the arrow keys and delete characters for example...

:+1:

it also doesn't load /etc/vim/vimrc so you cant just set defaults in configuration.nix

i don't know what is the best practice for the configuration files of nixpkgs. @edolstra
ubuntu has this files for example:
/etc/vim/vimrc:
https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/vivid/vim/vivid/view/head:/debian/runtime/vimrc
/usr/share/vim/vim74/debian.vim:
https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/vivid/vim/vivid/view/head:/debian/runtime/debian.vim.in

Why doesn't upstream vim provide usable defaults?

@edolstra actual there is only <nixstore>/share/vim/vim74/vimrc_example.vim and no vimrc.
@lovek323 we should cp vimrc_example.vim vimrc and maybe change some values.
i can make a PR for that.

@edolstra Upstream vim does provide defaults: The default is that the user has to configure vim to fit his needs and that's exactly the reason why I strongly vote against a default-vimrc.
Vim is a tool that users have to configure to their very specific needs. There are people out there (for example me) that do not even share their vim configuration because they consider it as something really private and intimate.
I'd go the archlinux-kindof way here: default vimrc == empty vimrc!

@matthiasbeyer we have ~200 ubuntu-servers and only use the default config for vim. it works for us.
i think programs should have usable default configurations. vim is not usable without a vimrc (at least for me).

@matthiasbeyer I don't understand why you would intentionally raise the bar for usage of vim. Tons of users are casual users who just need to change the occasional config file on a server with it and don't care about setting up custom key bindings and commands. Why make life difficult for them, especially when it doesn't make life any more difficult for vim power users? It's not as if the default config can't be overridden, or as if power users need to jump through more hoops to install their custom configuration if a default is in place.

@copumpkin Because

We would need to agree on sane defaults. Hard enough.
Others made this effort already, for example tpope with vim-sensible
It would be effort for us. Investing the manpower elsewhere would benefit us much more
It is not the task of the packagers to add "sane defaults" for package configurations. If you argue against this, I propose to add a .gitconfig default - same issue, but nobody argued on "lets add some default aliases for git" by now... you see my point?

I thought we were just proposing adopting another distro's default file? All I want is to not have to tell folks that they need to jump through a hoop to make their arrow and delete keys behave sensibly in vim. We don't need anything fancy, but I does anyone ever actually want capital letters to show up instead of arrow keys?

I agree with @matthiasbeyer. We must not provide any defaults except the ones that program do provide. Vim do not provide default.vimrc, it has an example. So users have to look at example and create their own (or copy the example).
If you need to manage your vim configuration we have https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/vim-plugins/vim-utils.nix#L281. Check this for example https://github.com/jagajaga/my_configs/blob/master/.nixpkgs/common.nix#L28

As an alternative, I just switched to neovim entirely. It comes with sensible defaults baked in without the need to ship a default file. I would propose using neovim as a default editor instead of vim, as they have put in the effort to ship good defaults and we would not have to do that.
On-topic, I would recommend providing sane defaults for vim. This is already done for zsh with programs.zsh.enable and I don't see why vim should be any different. Also, Arch Linux actually does ship a defaults file in the vim-runtime package in /usr/share/vim/vimfiles/archlinux.vim - it's only 5 or 6 settings, but they make vim considerably more user-friendly. I definitely missed them when switching.
Failing that, I think it would be wise to at least have a programs.vim.enable option that sets up sane defaults, and just copy defaults from another distro (e.g. Arch), for users that just want vim to work without creating a complex configuration.

@aneeshusa How did you configure nvim with plugins? I used the nixos infrastructure for vim plugins, which should also work for nvim, but doesn't for me. I guess that's another topic, though.
On topic: An option like vim.enable would also set $EDITOR to vim right? I am not sure what my opinion is on this, though I think: We shouldn't ship defaults but if someone wants to maintain a set of defaults and provide options to auto-set them (not setting them as default but having an option to enable them), I personally wouldn't mind. I still think that the time spend for approaching this could be put into other things which are considerably more relevant.

To be honest, I don't use any plugins so I don't know about the existing NixOS infrastructure, but I also think that (n)vim plugins should be per-user and managed by a nixuser type system. Any extensive configuration like that is likely to be personal and I don't see the value in managing that at a system (NixOS) level.
programs.zsh.enable is different from users.defaultUserShell, which sets the default shell, and users.users.<name?>.useDefaultShell. Similarly, IMO a programs.vim.enable would default to false, would provide sane defaults (to be clear, change 5-6 settings and no plugins) if enabled, and would not set $EDITOR or $VISUAL; each user can do that individually if they want. I think this is a small enough scope to be valuable to add to NixOS; if this is something we are interested in, I would be willing to maintain that.

yesterday i installed 2 VMs and can't use vim on the live cd :(
i don't want to configure anything in an installation environment.
it are basically this two setting:
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible

" allow backspacing over everything in insert mode
set backspace=indent,eol,start

Radical!

On Nov 9, 2015, at 15:24, davidak<EMAIL_ADDRESS>wrote:
yesterday i installed 2 VMs and can't use vim on the live cd :(
i don't want to configure anything in an installation environment.
it are basically this two setting:
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
―
Reply to this email directly or view it on GitHub.

@davidak care to make a PR that imports either the defaults from Arch or just your two lines ?

@zimbatm I'm against this PR. Read my opinion above please.

@jagajaga how will it affect you if we merge a change like this ?
From what I've read it seems like you value upstream purity over convenience, is that correct ? If that's the way I would agree with you in principle, unless upstream is not willing to make any changes. That's certainly the case with vim (hence neovim).
Overall I don't think that changing the defaults to a vim-sensible equivalent would hurt anyone and would actually make the out-of-the-box experience nicer.

The settings proposed by @davidak really are required for vim, to the point that providing vim without them out of the box borders on misleading. Speaking for myself, I'm always startled when running vim and being treated to the authentic vi experience instead. It's like taking a drink thinking you're getting cola but then it turns out to be milk.
If authentic vi is desired, it makes more sense to me to provide a separate package, e.g., using heirloom vi or nvi.

Curious if any of the :-1:  wants to respond to this point I made earlier:

I thought we were just proposing adopting another distro's default file? All I want is to not have to tell folks that they need to jump through a hoop to make their arrow and delete keys behave sensibly in vim. We don't need anything fancy, but does anyone ever actually want capital letters to show up instead of arrow keys?

Here is a version that imports the vimrc from archlinux: https://github.com/NixOS/nixpkgs/pull/13486
I made the default configurable in case you really want that vi mode.

I see this is closed already, but I found that installing 'vimNox' as opposed to simply 'vim' was a bang-up-good solution to this. Looking at it's expression (in vim_configurable), it also looks like what you'd want to use if you wanted to set up a particular local compilation of vim. Hope this helps someone in the future.


Cannot get Netapp Files mount targets with azcli (version 2.3.1)

Describe the bug
After deploying ANF/CIFS, I cannot get the mount targets with the following az cli (version 2.3.1) commamd
az netappfiles list-mount-targets --resource-group  --account-name <account_name> --pool-name <pool_name> --volume-name <vol_name>
Command group 'netappfiles' is in preview. It may be changed/removed in a future release.
Azure Error: InvalidResourceType
Message: The resource type 'netAppAccounts/capacityPools/volumes/mountTargets' could not be found in the namespace 'Microsoft.NetApp' for api version '2019-10-01'. The supported api-versions are '2017-08-15,2019-05-01,2019-06-01,2019-07-01,2019-08-01'.
To Reproduce
Deploy ANF/CIFS and use az cli to get the mount targets.
Expected behavior
If I use az cli version 2.2.0 from cloud shell, I get the expected result.
cormac@Azure:~$ az netappfiles list-mount-targets --resource-group cg_ad_demo-scus --account-name hpcnetappad --pool-name anfpool --volume-name anfvolume1
Command group 'netappfiles' is in preview. It may be changed/removed in a future release.
[
{
"endIp": "<IP_ADDRESS>",
"fileSystemId": "9156b26e-4688-95cc-c110-a568a9338313",
"gateway": "",
"id": "/subscriptions/f5a67d06-2d09-4090-91cc-e3298907a021/resourceGroups/cg_ad_demo-scus/providers/Microsoft.NetApp/netAppAccounts/hpcnetappad/capacityPools/anfpool/volumes/anfvolume1/mountTargets/9156b26e-4688-95cc-c110-a568a9338313",
"ipAddress": "<IP_ADDRESS>",
"location": "southcentralus",
"mountTargetId": "9156b26e-4688-95cc-c110-a568a9338313",
"name": "hpcnetappad/anfpool/anfvolume1/9156b26e-4688-95cc-c110-a568a9338313",
"netmask": "",
"provisioningState": "Succeeded",
"resourceGroup": "cg_ad_demo-scus",
"smbServerFqdn": null,
"startIp": "<IP_ADDRESS>",
"subnet": "",
"tags": null,
"type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/mountTargets"
}
]
cormac@Azure:~$
Environment summary
az cli installed on Windows 10 WSL, Ubuntu 16.04.5 LTS
az --version
azure-cli                          2.3.1
command-modules-nspkg              2.0.3
core                               2.3.1
nspkg                              3.0.4
telemetry                          1.0.4
Python location '/opt/az/bin/python3'
Extensions directory '/home/linuxuser/.azure/cliextensions'
Python (Linux) 3.6.5 (default, Apr  1 2020, 07:19:36)
[GCC 5.4.0 20160609]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.

netappfiles

When this will be fixed ?

I am presuming the issue is the from api_version used in azure-sdk-for-python?  I can see it is set here.  The modification history for that is here.

Quick test using Azure CLI docker images shows this working the same in latest (2.8.0), 2.3.1 and 2.2.0.
However note that list-mount-targets is due for deprecation/removal in upcoming version of the CLI, as mount target information can be retrieved using volume show.
az netappfiles volume show -g TestRG -a test-account -p test-pool -v tests-vol-1
. . "mountTargets": [ { "endIp": "", "fileSystemId": "3fcf5730-6f36-0900-7228-5effdea724bd", "gateway": "", "ipAddress": "<IP_ADDRESS>", "mountTargetId": "3fcf5730-6f36-0900-7228-5effdea724bd", "netmask": "", "provisioningState": "", "startIp": "", "subnet": "" } ], . .

As of latest azure-cli v 2.10.1 this is working as expected:
azure-cli                         2.10.1

command-modules-nspkg              2.0.3
core                              2.10.1
nspkg                              3.0.4
telemetry                          1.0.4

az netappfiles volume show -a anf-sizing -p sizing -g general -n sizingvol

  "mountTargets": [
    {
      "endIp": "",
      "fileSystemId": "6146bcab-df85-9f90-1711-dc62d5b485b7",
      "gateway": "",
      "ipAddress": "<IP_ADDRESS>",
      "mountTargetId": "6146bcab-df85-9f90-1711-dc62d5b485b7",
      "netmask": "",
      "provisioningState": "",
      "smbServerFqdn": null,
      "startIp": "",
      "subnet": ""
    }

I believe this issue can be closed.


Refactor NumSharp in Branch 2.x

In order to make NumSharp more practical, we plan to open a new branch and refactor the NumSharp kernel to build based on ArrayFire. The purpose of this is to make NumSharp perform better and the data will be stored entirely in unmanaged memory. Easier to implement the view of ndarray function Take advantage of ArrayFire's sophisticated underlying computing framework to make NumSharp easy to use GPU resources.
First we need to improve the array-dotnet project, and NumSharp then encapsulates the numpy syntax based on it.
More contributors are welcome to join SciSharp STACK to discuss or submit code.

data will be stored entirely in unmanaged memory.

I would like to hear more about this. Is the memory going to be left to arrayfire? There will be marshalling back and forth?

As long as you avoid repeatedly accessing elements in managed memory, there is no problem, and transfer computation to low level c++. The performance improvement is worthwhile. Especially for the intensive calculation of machine learning model training.

ArrayFire only support up to 4 dimensions.

@Oceania2018 yes the 4 dimension limitation is also something I read in their documentation.
But I think we have to find a way to overcome this limitation since I think some Numpy people will do it and when computing take parts of the tensor, e.g. have a 3x3x2 tensor and "cut" out 2 matrix 3x3 and 3x3.
But you are right - it is an extreme nice to use library.
There are some points we could check (and I already started).

I think I read that it is possible in arrayfire to get a C pointer back from their array class (as a view)
unfortunately setting up all and even interact from C# with their lib took longer than expected and so point 1 (C pointer as view) is still unchecked from my side
most important! it must be a view!
If we really could get back such a view as C Pointer we can bring it into C# area (maybe even as fancy new Span or Memory class) and! it will be the same memory area in C# and C
It would be extreme nice if we can "see" this array not just in unmanaged C world but also in C# level because it makes things easier (especially debugging)

Good point. I am a little hesitant, we might just refactor our storage first, in order to implement numpy view.

thats fine! :) first clear all things here before we start. But Haiping - with Arrayfire you already found an extreme good to use and good performance library. I totally agree - we must (somehow) integrate them.
Until now I was very surprised how easy Span can be used with arrayfire.
Example :
if define
public class AF
{
        [DllImport("af.dll")]
    	public static extern int af_create_array(out IntPtr array_arr, [In] float[] data, uint ndims, [In] long[] dim_dims, int type);
        [DllImport("af.dll")]
        public static extern int af_get_data_ptr(ref float data, IntPtr array);
}

you can use :
float[] data = {1,2,3,4,5};

int z = AF.af_create_array(out ptr, data, (uint)data.Rank,new long[]{data.Length},0);

System.Span<float> a = new float[5];

z = AF.af_get_data_ptr(ref MemoryMarshal.GetReference(a), ptr);

But this is a copy .... the Span in C# is not the same memory like in C. Found it out by got a 2nd Span and changed 1st one - 2nd was not affected.

@dotChris90 It's not perfect. Let's don't use managed memory Span or Memory operations. We'll all use unmanaged memory if we use ArrayFire. Because we might pass data between process. Have you took about the Apache Arrow project? They share data between different projects.

@dotChris90 @emrahsungu I decided to adopt a multi-kernel architecture mechanism that supports both default Tensor or ArrayFire or other open source Tensor computing libraries.

There was a project by Alex-Weaver "TensorSharp" which I tried to use for building a neural network library. The library had all the basic math, elementwise, dimensionwise ops well written in C++ and have a C# wrapper on the top of it. It's also integrated with ManagedCuda which can be built with any Cuda version from 8.0 till 10. The size of the library is small to around 4 MB and doesn't need any separate installation, can be embedded within NumSharp library. The only problem with using ArrayFire is the big dependency on another product which can be overcome with having built-in functions.
https://github.com/SciSharp/SiaNet/tree/master/Backends/SiaNet.Backend.TensorSharp/Cpu
https://github.com/SciSharp/SiaNet/blob/master/Backends/SiaNet.Backend.TensorSharp/Ops.cs
There are the equivalent CUDA operations as well.
C++ ops implemented:
https://github.com/SciSharp/SiaNet/blob/master/Library/CpuOps/DimensionwiseOps.h
https://github.com/SciSharp/SiaNet/blob/master/Library/CpuOps/ElementwiseOps.h
.. more
Please give a thought if you think we can merge these functions within NumSharp without any external dependencies, makes it easy to use.

It's good idea. I'll look at your code deeply. you didn't PR to TensorSharp?
I'm thinking how to integrate to NumSharp, from your fork or TensorSharp master ?

There was lot of refactor and added dependency on bit of customized
managedcuda project, so only didn't raised PR. I will do that in next 2
days and see can be accepted.
On Thu, 18 Apr. 2019, 10:12 pm Haiping<EMAIL_ADDRESS>wrote:

It's good idea. I'll look at your code deeply. you didn't PR to
TensorSharp?
I'm thinking how to integrate to NumSharp, from your fork or TensorSharp
master ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/SciSharp/NumSharp/issues/195#issuecomment-484489862,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABQJAKOSUOSF7JAMPNEHRUTPRBUCLANCNFSM4GXFHVLQ
.


PowerToys Run : System.InvalidCastException

Microsoft PowerToys version
“<IP_ADDRESS>”
Running as admin

[X] Yes

Area(s) with issue?
General, Awake
Steps to reproduce
Version: <IP_ADDRESS>
OS Version: Microsoft Windows NT 10.0.19042.0
IntPtr Length: 8
x64: True
Date: 2021/7/1 8:47:52
Exception:
System.InvalidCastException: Unable to cast object of type 'System.Windows.Documents.Run' to type 'System.Windows.FrameworkElement'.
at PowerLauncher.MainWindow.SuggestionsList_PreviewMouseLeftButtonUp(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnPreviewMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.ContentElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
✔ Expected Behavior
just start my PC
❌ Actual Behavior
crash
Other Software
No response

Duplicate of #11898

@mykhailopylyp do you know of a reason why this error would occur at startup? I'm hoping the hot-fix for 0.41.4 addresses this, but the repro steps are different as @franky920920 pointed out.

@MannixGu
Does it happen on each startup? If yes, would you be able to install a private build with a fix?

@MannixGu
Please update to 0.41.4. It should be fixed there. Let us know if it's not.

Closing as duplicate of #11898


Fix typos of about page circular p.p.

Changed "cicular" to "circular"

I put paranthesis on previous PR's name then I think it crashed the deployment. I fixed the name.


Where is the test directory？

Some images are neither in train directory nor in val directory. Are they in test directory?

And there is an error like↓, but there is no 'test1' directory.

Thanks for your answer!

Thanks for your interest and pointing out this issue!
The readme is updated with test data links. find it in section Usage in 2.


docs: Don't hardcode minimum golang version

The minimum golang version should be defined once - in [1]. Since the
developer guide already provides a link to that human-readable file,
remove the hard-coded golang version number to avoid having to maintain
that part of the devguide.
Fixes #232.
[1] - https://github.com/kata-containers/runtime/blob/master/versions.yaml
Signed-off-by: James O. D. Hunt<EMAIL_ADDRESS>

LGTM

lgtm

Since this is a very tiny change and already has other 3 acks, will proceed to merge.


⚠ API - Lens has degraded performance

In 148594a, API - Lens ($LENS_API_URL) experienced degraded performance:

HTTP code: 503
Response time: 638 ms

Resolved: API - Lens performance has improved in 6dd8d23 after 6 minutes.


HTTPCORE-756  - Enforced the requirement that "https" URIs must not have an empty host identifier

This PR brings our URIBuilder in line with the standards set by RFC 9110, specifically Section 4.2.2 regarding HTTPS URIs.
Changes:

Implemented a check to ensure https URIs do not have an empty host identifier.
Modified URIBuilder's toString() method to return invalid:// for URIs that don't adhere to the standards, as the RFC mandates such URIs be rejected as invalid.

@arturobernalg Is this PR ready for review?

@arturobernalg Is this PR ready for review?

@ok2c yes. Or is there something I'm missing?

I'm not sure that changing toString() is a good idea here.

@arturobernalg What you can do here is move the checks to the #build method and keep #buildString as is. That would also enable to remove that ugly try-catch from the #toString

@arturobernalg Please also do not forget to update the description as it will be used as a commit message

@arturobernalg Please also do not forget to update the description as it will be used as a commit message

@ok2c
Done