text:
How to handle multiple object instance

If some other place in html page create instance it will affect to my current script. Is there a way to handle or controll that ?
Example
script 1 create new Swiper(config) here
myscript create new Swiper too. In here my instance will be affect by script 1

Do you want to ask a question? Are you looking for support? The Swiper forum and Stack Overflow are the best places for getting support

Please, don't use GitHub issues for questions


text:
Swiper breaks build on Nuxt 3

Check that this is really a bug

[X] I confirm

Reproduction link
https://stackblitz.com/edit/nuxt-starter-k7kdqv?file=components%2FSiteSlider.vue,pages%2Findex.vue
Bug description
When running yarn generate option in Nuxt 3 application build breaks with the following error.
ERROR  [nuxt] [request error] Cannot find module '/home/projects/nuxt-starter-k7kdqv/.nuxt/prerender/chunks/app/modules/navigation/navigation.js' imported from /home/projects/nuxt-starter-k7kdqv/.nuxt/prerender/chunks/app/server.mjs
  at InternalError.get (https://nuxt-starter-k7kdqv.w.staticblitz.com/blitz.e40b17327b4f777f5dccacbb86b346b09cdd4176.js:6:292488)
  at normalizeError (./.nuxt/prerender/chunks/nitro/nitro-prerenderer.mjs:278:24)
  at Object.errorhandler [as onError] (./.nuxt/prerender/chunks/nitro/nitro-prerenderer.mjs:297:57)
  at nodeHandler (./node_modules/h3/dist/index.mjs:431:23)
  at async ufetch (./node_modules/unenv/runtime/fetch/index.mjs:28:17)
  at async generateRoute (./node_modules/nitropack/dist/chunks/prerender.mjs:2507:17)
  at async Module.prerender (./node_modules/nitropack/dist/chunks/prerender.mjs:2537:22)
  at async eval (./node_modules/nuxt/dist/index.mjs:1227:7)
  at async build (./node_modules/nuxt/dist/index.mjs:1672:5)
  at async Object.invoke (./node_modules/nuxi/dist/chunks/build.mjs:56:5)
  at async Object.invoke (./node_modules/nuxi/dist/chunks/generate.mjs:43:5)
  at async _main (./node_modules/nuxi/dist/cli.mjs:61:20)

Expected Behavior
Build passes without errors.
Actual Behavior
Build breaks with the error message.
Swiper version
8.2.6
Platform/Target and Browser Versions
macOS
Validations

[X] Follow our Code of Conduct
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
[X] Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

[ ] I'm willing to open a PR

I tried the following link. It helped https://github.com/nuxt/framework/issues/5348

Closing as not related to Swiper

source: gharchive/issue

license: MIT

license_type: permissive

license_source: github-api


text:
🛑 gomastodon.cz is down

In 38b42ea, gomastodon.cz (https://gomastodon.cz/nodeinfo/2.0) was down:

HTTP code: 0
Response time: 0 ms

Resolved: gomastodon.cz is back up in 8738ab4.

repo: nolog-it/mastodon-uptime


text:
Plugin: LiteyukiBot(plugin)

PyPI 项目名
nonebot-plugin-liteyukibot
插件 import 包名
nonebot_plugin_liteyukibot
标签
[{"label":"liteyuki","color":"#d0e9ff"},{"label":"轻雪","color":"#a2d8f4"}]
插件配置项
No response

已添加插件元数据nonebot-plugin-liteyukibot 0.1.1

虽然但是，你的插件依赖nb的驱动器和nb-cli？以及你的 bot 启动要新开 thread？

虽然但是，你的插件依赖nb的驱动器和nb-cli？以及你的 bot 启动要新开 thread？

是这样的，因为要创建一个事件循环(不过目前看来应该没啥问题，后续兼容性我会继续测试

已移除NoneBot驱动器依赖

已移除残留的requests，更换为aiohttp

authors: snowykami yanyongyu


text:
修复 UniqueConstraint 失效的问题

应该是同样的问题。
https://github.com/he0119/nonebot-plugin-wordcloud/pull/122

该安排 pre-commit.ci 了（

source: gharchive/pull-request

repo: noneplugin/nonebot-plugin-session


text:
Default trial court name isn't working outside of City of St. Louis

trial_court.cicuit isn't being set outside the City of St. Louis.  Maybe because in the block that sets it, outside of St. Louis it has to go get county_to_circuit to get trial_court.circuit, and then it doesn't have to go back to that block because it already has trial_court.county

check motion to continue interview order

https://github.com/nonprofittechy/docassemble-MOHUDEvictionProject/commit/0f88aafcdaf4b6d51ec2638592ba7b7dfd43ff91


text:
NSFS | NC | Improve Help Printings

Explain the changes

Improve help printings, continuing PR #7741 - add more changes according to new requirements and not just split the actions.

Issues: Fixed #7726

Please read the comments in the issue (and not just the original issue).

Testing Instructions:

Use the help option in `manage_nsfs, examples:

sudo node src/cmd/manage_nsfs bucket --help 2>/dev/null

sudo node src/cmd/manage_nsfs bucket <action> --help 2>/dev/null (replace <action> with add, update, delete, status, or list)

sudo node src/cmd/manage_nsfs account --help 2>/dev/null

sudo node src/cmd/manage_nsfs account <action> --help 2>/dev/null (replace <action> with add, update, delete, status, or list)

sudo node src/cmd/manage_nsfs account <action> --help 2>/dev/null (replace <action> with add, update, delete, status, or list)

sudo node src/cmd/manage_nsfs whitelist --help 2>/dev/null

[ ] Doc added/updated

[ ] Tests added

Will be in state "Ready for review" after:
(1) I'll get response in issue #7726.
(2) I'll merge PR that contains the data types #7756

repo: noobaa/noobaa-core


text:
Fix some bugs, minor cleanup & fix issue #1

Fixes #1
utility.go should be completely reworked, it's really inneficient, and hard to read & use.
or if not reworked, just use a struct, like so.
also, should use HLS instead of relying on DASH (ffmpeg supports HLS -> mp4) (https://stackoverflow.com/questions/33108105/converting-an-hls-m3u8-to-mp4)
type Data struct {
    Children []struct {
        Data struct {
            URLOverridenbyDest string `json:"url_overridden_by_dest"`
        }  `json:"data"`
    } `json:"children"`
} `json:"data"`

Hii @cmd777 Thanks a lot for your pointers and the contributions you've made. i'm excited!
yes, utility.go does seem hard to read. i didn't want to use struct becasue i thought it would be longer?
like making structs tags for all the fields. but i'm going to rework it and use structs. if possible, you could make the changes yourself and i would be happy to merge it!
andd i'm going to switch to using HLS, i never really bothered to research further on it because it seemed like a text file with contents i didn't understand until now.
Thanks for the stackoverflow link!

also, should use HLS instead of relying on DASH (ffmpeg supports HLS -> mp4) (https://stackoverflow.com/questions/33108105/converting-an-hls-m3u8-to-mp4)

Hi @cmd777 , so i tried download some videos from hls_url but the best quality of the videos turned out blurry

i didn't want to use struct becasue i thought it would be longer?
like making structs tags for all the fields.

Sometimes, structs can be larger, like this example
type Reddit struct {
	Data struct {
		Children []struct {
			Data struct {
				ID      string `json:"name"`
				Preview struct {
					VideoPreview struct { // struct names do not need to match
						HLS string `json:"hls_url"` // nor do struct element names, but the json still has to match.
					} `json:"reddit_video_preview"` // `json:"..."` names must match.
				} `json:"preview"`
			} `json:"data"`
		} `json:"children"`
	} `json:"data"`
}

Not all struct tags are required for it to work, and their name can be changed, except for the json:"" part.

so i tried download some videos from hls_url but the best quality of the videos turned out blurry

I just tried it out. On some videos, the width, height, and the bitrate seems to change. I did change the options a bit, to simply use ffmpeg -i ...m3u8 -c copy video.mp4, but it shouldn't be blurry.
As to why the options were changed, check out this comment.
for example,. from width 608 -> 404
from height 1080 -> 720
and from bitrate 4737863 -> 2367167
This only seems to happen to videos from gyfcat or imgur

Not all struct tags are required for it to work, and their name can be changed, except for the json:"" part.

ohhh, omg, i thought I'd have to write tags for all the fields. i understand what i have to do now, Thanks!

ffmpeg -i ...m3u8 -c copy video.mp4, but it shouldn't be blurry.

yeah, i did this too

This only seems to happen to videos from gyfcat or imgur

yes it seems so, i haven't tried it with videos on gfycat but i tried it with a gif/video with no sound and it got reduced

type Reddit struct {
	Data struct {
		Children []struct {
			Data struct {
				ID      string `json:"name"`
				Preview struct {
					VideoPreview struct { // struct names do not need to match
						HLS string `json:"hls_url"` // nor do struct element names, but the json still has to match.
					} `json:"reddit_video_preview"` // `json:"..."` names must match.
				} `json:"preview"`
			} `json:"data"`
		} `json:"children"`
	} `json:"data"`
}

Thanks for this!

type Reddit struct {
	Data struct {
		Children []struct {
			Data struct {
				ID      string `json:"name"`
				Preview struct {
					VideoPreview struct { // struct names do not need to match
						HLS string `json:"hls_url"` // nor do struct element names, but the json still has to match.
					} `json:"reddit_video_preview"` // `json:"..."` names must match.
				} `json:"preview"`
			} `json:"data"`
		} `json:"children"`
	} `json:"data"`
}

Thanks for this!

You're welcome. Just a heads up, I used the results from https://reddit.com/r/gifs.json to make that struct, and it will look different than a comments' json.

ohhh, omg, i thought I'd have to write tags for all the fields. i understand what i have to do now, Thanks!

Have a read at the golang docs about json, It's very useful https://pkg.go.dev/encoding/json
There is also a tool to convert json to go structs, but it's very outdated (eg, doesn't recognize struct arrays sometimes, and still uses interface{}) https://mholt.github.io/json-to-go/
You can also try experimenting with go json structs with either
https://xkcd.com/info.0.json (this is super simple, as it only consists of a few strings, ints.)
or https://json.org/example.html (if you do use this, which is a bit more complicated than xkcd, I highly recommend you use a JSON Formatter like this https://jsonformatter.org/json-pretty-print)

You're welcome. Just a heads up, I used the results from https://reddit.com/r/gifs.json to make that struct, and it will look different than a comments' json.

(>w<)
ohh, i thought it looked weird because reddit-dl doesn't take data from the video_preview tag

Have a read at the golang docs about json, It's very useful https://pkg.go.dev/encoding/json

okayy, I'll take my time to understand it properly

There is also a tool to convert json to go structs, but it's very outdated (eg, doesn't recognize struct arrays sometimes, and still uses interface{}) https://mholt.github.io/json-to-go/

Thanks, I'll try it out
i also found some other site we could use to covert json to structs but i haven't tried it out yet

this is what i have right now
type Reddit []struct {
	Kind string `json:"kind"`
	Data struct {
		Children []struct {
			Data struct {
				//MediaMetadata mediaMetadata `json:"media_metadata"`
				SecureMedia struct {
					Oembed      oembed `json:"oembed"`
					RedditVideo struct {
						FallbackURL string `json:"fallback_url"`
						HlsURL      string `json:"hls_url"`
					} `json:"reddit_video"`
				} `json:"secure_media"`
				CrosspostParentList crosspostParentList `json:"crosspost_parent_list"`
				IsRedditMediaDomain bool                `json:"is_reddit_media_domain"`
				URLOverriddenByDest string              `json:"url_overridden_by_dest"`
			} `json:"data"`
		} `json:"children"`
	} `json:"data"`
}

// for files shared from another domain i.e gfycat.com
type oembed struct {
	ProviderURL  string `json:"provider_url"`
	ThumbnailURL string `json:"thumbnail_url"`
}

// for cross posts
type crosspostParentList []struct {
	SecureMedia struct {
		RedditVideo struct {
			FallbackURL string `json:"fallback_url"`
			HlsURL      string `json:"hls_url"`
		} `json:"reddit_video"`
	} `json:"secure_media"`
	URLOverriddenByDest string `json:"url_overridden_by_dest"`
}

// would make chages to this later
//type mediaMetadata struct {
//Ymzg2Pr2Si0A1 struct {
//S struct {
//U string `json:"u"`
//} `json:"s"`
//} `json:"ymzg2pr2si0a1"`
//}

this is what i have right now

Why did you use pointers? They're mostly used to share data. Here, they are really not needed.
Also, you should probably export those structs (just capitalize the first letter, like: SecureMedia or CrosspostParentList)
as for Galleries (MediaMetaData) use this.
Gallery map[string]struct {
	P []struct {
		U string `json:"u"`
	} `json:"p"`
} `json:"media_metadata"`

and use a range loop over it
var r2 Reddit

for _, k := range r2[0].Data.Children[0].Data.Gallery {
	fmt.Println(k.P[len(k.P)-1].U)
}

Why did you use pointers? They're mostly used to share data. Here, they are really not needed.

check here -> https://stackoverflow.com/questions/18088294/how-to-not-marshal-an-empty-struct-into-json-with-go
i made some conditional statements to check if they're nil that's why i did that

as for Galleries (MediaMetaData) use this.

i cant use that because the struct tags are dynamic.
i figured out a way to do this but i'm not so sure if it's a good practice
check media_metadata  here -> https://www.reddit.com/r/neovim/comments/ygx031/html_treesitter_syntax_higlighting_gone.json

check here -> https://stackoverflow.com/questions/18088294/how-to-not-marshal-an-empty-struct-into-json-with-go
i made some conditional statements to check if they're nil that's why i did that

Ah, yeah. sorry. I was a bit tired

i cant use that because the struct tags are dynamic.
i figured out a way to do this but i'm not so sure if it's a good practice

json.RawMessage is exactly what the name is, json raw message, it still includes the dynamic tags.
however, if you use a map[string]struct
MMD map[string]struct {
	P []struct {
		U string `json:"u"`
	} `json:"p"`
} `json:"media_metadata"`

// ...

for _, k := range struct1[0].Data.Children[0].Data.MMD {
	fmt.Println(k.P[len(k.P)-1].U)
}

and then use VSCode and hover over k, you will see that it's a struct now
var k struct{P []struct{U string "json:\"u\""} "json:\"p\""}

and that blank identifier (_) would be the name of that dynamic tag, as if you reverse that for range
for k := range struct1[0].Data.Children[0].Data.MMD {
	fmt.Println(k)
}

it will only print those struct tags, and not gallery image urls

Ah, yeah. sorry. I was a bit tired

oh, there's no problemo hehe. take care...

however, if you use a map[string]struct

woww, i just tried it and it works!
good stuff you did right here :)
could you make a pr with the new changes?
gimmie a sec

could you make a pr if you're less preoccupied with the new changes?

Oops, was away. Sorry.

in the metadata, I'm only getting the images from the s["u"] tag not p, i chose this because the images are of the highest resolution

Oh yes, using the S struct is way better, since that's the source image, the P array contains resized images. I just copy pasted that from my code and rewrote it to use the last item in the list, which I thought would be the same as the source one, but turns out, it's not. It's similar in quality, but the source has a bit better quality.

[edit]
hey, i've modified it already. wouldnt have figured it out this soon without you. Thanks!

Glad you figured it out, and you're very welcome!

Oops, was away. Sorry.

there's no problemo :)

I just copy pasted that from my code and rewrote it to use the last item in the list, which I thought would be the same as the source one, but turns out, it's not.

yeah, i realized.

It's similar in quality, but the source has a bit better quality.

exactly!

Glad you figured it out, and you're very welcome!

hehe, xD

repo: noornee/reddit-dl


text: IMAGE


text:
React with Redux double backspace

The credit card formatter incorrectly removes one more character than it is supposed to. Eg:
init value = 1234*| (* being delimiter)
press backspace
returned value = 12|

The issue seems to occur using the React Cleave component with Redux. I am storing the rawValue in the state, { creditCardNumber: rawValue } . The value is set to state.creditCardNumber.
I was able to reproduce: https://jsfiddle.net/rL8onrdx/
The onInput(newValue) function is being called multiple times, as the owner.properties.initValue is not being updated after the first onInput runs and so in the componentWillRecieveProps function the
newValue !== owner.properties.initValue

Where the newValue is correctly 123 but the initValue is still 1234
After the second onInput runs the result is as shown above, however, the state's value is correctly 123

+1, I am also experiencing this issue.
This is gross, but seems to make the input field work:
https://jsfiddle.net/44g248db/

Basically, there is no need to bind state to value attribute for Cleave component.
The way it works: input value is controlled by Cleave component internally, when the data is changed, onChange event will be triggered. Then externally, you update the state with value or rawValue as you want.
I believe contentA here is what you want:
https://jsfiddle.net/nosir/Lz9mc17h/
Also contentB in above link is the only case you might use value: to set a default value for the component.

Thank you for the response @nosir, I'll let you know how this works out for me when I get back to it.

Okay, sorry for the long delay lol

More explains if you interested:
https://github.com/nosir/cleave.js/blob/master/doc/reactjs-component-usage.md#how-to-get-ref-of-the-input-field

Thank you nosir that worked well for me, the only thing I would say is that it would be nice to have a way of setting the initial raw value without firing the onChange.
This has resolved my original issue, so feel free to close. Ty

@Jafferwaffer 👍

authors: Jafferwaffer harjup nosir

license_source: bigquery


text:
add support and test for NIP-11 Relay Information Document

This PR adds support for NIP-11 Relay Information Document decoding. These properties will give clients all the necessary information a relay offers about its service.

Also disabled the "nesting" SwiftLint rule that says that types may only be nested to one level. With the json objects in the Nostr protocol spec, deeper nesting makes sense.

repo: nostr-sdk/nostr-sdk-ios


text:
logo proposal

HI, I @nostra13 I am a graphics designer, I am a graphics designer. I will like to know if you want me to create a new logo for your project.

Hey, why not :)

Ok, I will go and make a sketch and work on logo as soon as possible.

Thanks :+1:

@nostra13 after making different sketch I came up with this, you can make suggestions on any of the design and color.
I will make other sizes based on the one you choose.

@nostra13 here is a brief break down of what inspire the logo

@mlc @nostra13 @talklittle are you there?

@davidmind  Thanks for your efforts and explanation of design moves but it seems a little boring comparing to current logo :)

My thoughts about logo with bubbles: maybe it will be cooler to use stars (from small to larger) around center-pic and try other colors.

Oops i was trying to make it simple, but I will work on the star as you suggested with other colors.

@nostra13 this is what it turn out to be after making use of star on the final layout of the icon
also I try to give it a much brighter and cool color.

I like it more, definitely :) It reminds me something... maybe Chealse FC logo :) Nevermind.
Can you make samples on white background?
I think we can remove black crescent to simplify it)
Also I would appreciate if you try different options: squared/rounded background, with/without white circles near stars, different bg colors (solid/gradient/maybe other shades of green).

@nostra13 this is what I came up with

I think I have my favorite) Which one do you like?

If I am to choose I will choose number 2 or 4, which of it is your favorite?

I like 6/7 with solid green bg, probably #00673a.
Some suggestions (maybe final) to this option:

bg should be a perfect circle :)
make stars closer to edge (maybe cut out outer circle part)
centered pic should be perfectly aligned in the center
increase resolution:
- green bg circle - 72x72dp (288x288 px)
- whole image with transparent bg - 108x108dp (432x432 px)

@nostra13 have a quick look before I make it into transparent background

"make stars closer to edge" I meant like this

I made two different option for you to choose from
1

2

You make stars further from bg edge, not closer.

I just understand what you are saying, until you mention the background edge

Too close :) I showed the example earlier https://github.com/nostra13/Android-Universal-Image-Loader/issues/1340#issuecomment-484920037

What about now

I like it :+1:
Last step you can do - to make it perfect. If you wish:

make every star at the same distance from bg edge (now it's different)

rotate whole constellation clockwise a little bit to make beginning star and ending star aligned to center-pic
OR
rotate whole constellation counterclock-wise a little bit to make the biggest star in the vertical center

@nostra13 sorry I was a little bit busy this days, but I just check through your last comment I have made an ammendment. Check it out

I can see noticable disproportional gaps between stars (e.g. between 2nd and 3rd stars, between 6th and 7th stars, 11th and 12th). Gaps between stars should evenly decrease from the smallest to the biggest one.

Oops I must have missed that up, while trying to adjust the star. I just made an amendment though the space may look unequal, using smart guide everything is equal except you want to inspect yourself through the editable file.

Well, now I don't need a ruler to see that constellation isn't centered in the circle :)

At this point i think i give up i will have to close the issue, an element like star with a non proportional size is not easy to control. The bigger the size, the beginner the space it occupied. I think you can continue from where i stop. It seems you are more knowledgable than i am.

The previous logo was almost perfect (except gaps between stars). And last logo has some unexpected changes like whole constellation was moved to the left. And I can't ignore that because it can be seen with the naked eye. You as a designer should see it as well, don't you?
If you can share editable file please do it.

I will share the editable file later, the bigger the resolution. The bigger the space between the star. The more i keep editing, more problem keep surfacing that is because i tend to move the whole thing from the initial postioning.

Here is a link to an editable file
https://drive.google.com/folderview?id=1zlLRj6zVWOcQgRVTtGBhpcZjC-LvqQN8


text:
Add Google Scholar social icon

The icon is created from the glyph in Academicons.

Thanks!

authors: cartoonist not-matthias

repo: not-matthias/apollo


text:
恕我直言，你们的换行符居然是CRLF。。。

当然咯，对功能没啥影响，只是每次加入git的时候，都会出现一大堆类似：warning: CRLF will be replaced by LF in public/plugins/neditor/neditor.all.js的提醒

你是在windows下操作的吧？windows下git在checkout的时候会自动把换行符转为crlf。

我是在Linux下操作的啊，提示说的是CRLF被LF替换啊

@twilroad

authors: niefufeng twilroad zuohuadong

repo: notadd/neditor

license: mit


text:
Use cobra cli

Signed-off-by: zaihaoyin zaihaoyin@microsoft.com
Fix:
Fix #183 by using github.com/spf13/cobra to replace github.com/urfave/cli/v2, which is a cli package also used by oras-cli.
Compatibility:
According to the cli spec, there are two incompatible changes which are not well-supported by cobra:

It doesn't support multiple aliases, which will affect the user experience of notation push and notation pull.
Before this pr, when running notation push, you can use both -s or -f as an alias for --signature, as specified in spec.
Now, we don't have a -f flag as an alias. If running notation push --help, it will print the message below, which only supports -s as an alias for --signature:

notation push --help
Push signature to remote

Usage:
  notation push [reference] [flags]

Flags:
  -h, --help                help for push
  -p, --password string     password for generic remote access
      --plain-http          remote access via plain HTTP
  -s, --signature strings   signature files
  -u, --username string     username for generic remote access

It doesn't support string alias, which will affect the user experience of notation key add.
Before this pr, when running notation key add, we can use -pc as an alias for --pluginConfig:

notation key add --help
NAME:
   notation key add - Add key to signing key list

USAGE:
   notation key add [command options] [<key_path> <cert_path>]

OPTIONS:
   --default, -d                     mark as default (default: false)
   --id value                        key id (required if --plugin is set)
   --name value, -n value            key name
   --plugin value, -p value          signing plugin name
   --pluginConfig value, --pc value  list of comma-separated {key}={value} pairs that are passed as is to the plugin, refer plugin documentation to set appropriate values

Now we use a single char instead of a string as an alias. If running notation key add --help, it will print the message below, which use -c as an alias for --pluginConfig instead of -pc:
notation key add --help
Add key to signing key list

Usage:
  notation key add [key_path cert_path] [flags]

Flags:
  -d, --default               mark as default
  -h, --help                  help for add
      --id string             key id (required if --plugin is set)
  -n, --name string           key name
  -p, --plugin string         signing plugin name
  -c, --pluginConfig string   list of comma-separated {key}={value} pairs that are passed as is to the plugin, refer plugin documentation to set appropriate values

40 files seem a bit huge to me. I feel you could split it into 3 PRs, one for each cli set: notation, docker-notation and docker-generate.

authors: binbin-li chloeyin

repo: notaryproject/notation


text:
响应拦截器返回类型不灵活

在如下的例子中
import taroRequest from '@bucai/taro-request';
const request = taroRequest.create({
    baseURL: 'https://www.baidu.com',
    timeout: 6 * 1000
})

request.interceptors.response.use(
    response => {
        const res = response.data
        if(res.code===1)
            return res //ts 报错，类型不匹配
    }
)

响应拦截器不能返回res，而必须是res.data，这导致拦截器使用起来不灵活

在如下的例子中
import taroRequest from '@bucai/taro-request';
const request = taroRequest.create({
    baseURL: 'https://www.baidu.com',
    timeout: 6 * 1000
})

request.interceptors.response.use(
    response => {
        const res = response.data
        if(res.code===1)
            return res //ts 报错，类型不匹配
    }
)

响应拦截器不能返回res，而必须是res.data，这导致拦截器使用起来不灵活

这里解决也只能临时解决，在使用（post、get）还是没办法读取拦截器类型。
所以看看还是直接any？

fix: https://github.com/notbucai/taro-request/commit/a5583577ced282991c8c086399ecc9b229aac948

authors: CS-liujf notbucai

repo: notbucai/taro-request


text:
Add some glyph previews?

I am fascinated by this project and by writing systems in general. It would be very nice to be able to easily see some previews of the glyphs in each font family, without having to download every font. Is there such a feature that I've missed?
Thank you.

You could try https://notofonts.github.io/overview/ ?

Ooh. Nice!
I looked at that page but didn't click on anything. Maybe there could be a hint of the marvels that await those who click?
Thank you.

authors: robertf simoncozens


text:
Adddin new chains

This PR adds:

New networks: Phala, Equilibrium, Turing
Fix for typesBoundle for nodle-solochain

Phala

Spoiler!

Equilibrium

Spoiler!

Turing

Spoiler!

repo: nova-wallet/subquery-nova


text:
yarn build failed in windows

Are you reporting a bug?
Yes

Environment

react-static -v: 5.7.2
node -v: v8.7.0
yarn --version or npm -v: 1.1.0
Operating system: windows 10 x64
Browser and version (if relevant): chrome 63.0.3239.132 x64

Steps to Reproduce the problem
Base your steps off of any freshly installed react-static template!

react-static create an-project
make a route as like /foo/:param
yarn build

Then, I got an error E:\somepath\:param contains invalid WIN32 path characters.
Expected Behavior
Build successful

Any code example how you make a route?

Maybe this is a related issue https://github.com/nozzle/react-static/issues/206

@rohmanhm
For example in static.confg.js
getRoutes: () => {
  return [
    {
      path: '/foo/:param',
      component: 'src/some/component',
    }
  ];
}

This route can run successfully in dev mode, but failed when build.
I try it in centos (linux), both mode can be successful. But got an 404 error when refresh page in product mode.

You cannot have statically-exported dynamic route paths in a static website. You can however, use the <Route> component to handle dynamic routes in your app at runtime, but these routes will not be statically exported unless a route that uses them is defined in the static.config.js

Ok, thanks!

authors: rohmanhm tannerlinsley zjxpcyc

repo: nozzle/react-static


text:
Node6 compatibilty

Add babel stage-3 preset so that node >=v7.6 could use the async function.

I noticed one more thing. If you want to add a react lifecycle event, how
would you do that? All the components in the examples are not React Class
components, so I can’t add any lifecycle events there. Is this handled
by getSiteProps?
Thanks,
Tim
On October 11, 2017 at 2:38:25 PM, Tanner Linsley (notifications@github.com)
wrote:
Merged #28 https://github.com/nozzle/react-static/pull/28.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/pull/28#event-1288815911, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AANiDNvdZw5cRoLzC7yljWHQTcePnfdyks5srQshgaJpZM4P10ud
.

Just use a react class. :)
On Wed, Oct 11, 2017 at 12:22 PM Tim Khalif notifications@github.com
wrote:

I noticed one more thing. If you want to add a react lifecycle event, how
would you do that? All the components in the examples are not React Class
components, so I can’t add any lifecycle events there. Is this handled
by getSiteProps?
Thanks,
Tim
On October 11, 2017 at 2:38:25 PM, Tanner Linsley (
notifications@github.com)
wrote:
Merged #28 https://github.com/nozzle/react-static/pull/28.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/pull/28#event-1288815911, or mute
the thread
<
https://github.com/notifications/unsubscribe-auth/AANiDNvdZw5cRoLzC7yljWHQTcePnfdyks5srQshgaJpZM4P10ud

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/pull/28#issuecomment-335919780,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCY3v3va4Vggy2ilI0R34RFu-0Ghhks5srRV8gaJpZM4P10ud
.

You’re absolutely right. I don’t know what came over me ;-)
Thanks,
Tim
On October 11, 2017 at 6:11:54 PM, Tanner Linsley (notifications@github.com)
wrote:
Just use a react class. :)
On Wed, Oct 11, 2017 at 12:22 PM Tim Khalif notifications@github.com
wrote:

I noticed one more thing. If you want to add a react lifecycle event, how
would you do that? All the components in the examples are not React Class
components, so I can’t add any lifecycle events there. Is this handled
by getSiteProps?
Thanks,
Tim
On October 11, 2017 at 2:38:25 PM, Tanner Linsley (
notifications@github.com)
wrote:
Merged #28 https://github.com/nozzle/react-static/pull/28.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/pull/28#event-1288815911, or mute
the thread
<

https://github.com/notifications/unsubscribe-auth/AANiDNvdZw5cRoLzC7yljWHQTcePnfdyks5srQshgaJpZM4P10ud

.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/pull/28#issuecomment-335919780,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AFUmCY3v3va4Vggy2ilI0R34RFu-0Ghhks5srRV8gaJpZM4P10ud
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nozzle/react-static/pull/28#issuecomment-335963989,
or mute
the thread
https://github.com/notifications/unsubscribe-auth/AANiDMIaPtj__uzG-SlqkKUc3uXAr9mxks5srT0pgaJpZM4P10ud
.

authors: Nembus tannerlinsley


text:
Great tool, missing one thing -> select/search dependency bij name

First I would like to mention that I'm amazed by this tool - it's very easy to use and gives you exactly the info you need!
However, with large modules/projects the qraph gets so big, it's difficult to find a specific dependency.
So it would be appreciated if a 'search dependency by name' function would be added to the tool.
Or an (alphabetical) list of modules would be added on which a user could click, to focus the module in the graph.

The list is actually in the Graph tab.
The search/filter is tracked in:

#222

Until then, you can use ctrl-F to search using your browser feature.

OMG - missed that option completely (click to expand 'all modules' list) - but thanks, this is good enough for me!

authors: fregante ronaldhoek

repo: npmgraph/npmgraph


text:
ColdFusion and WordPress

I'm trying to iframe a coldfusion page onto a WordPress blog. The blog that I'm working with is:
http://nationwide.rayvisiondesign.com/Sell-My-Note/sellmynotequote3b/
The page that I'm trying to iframe in is:
http://www.nationwidesecuredcapital.com/wpsellmynotequote_1a.cfm
This doesn't seem to be working properly, I've tried testing the page in the PymViewer, and unless the page is full screen, the content isn't working responsively. Would appreciate any help to solve this issue and see what I'm doing wrong.
Thank you,
-Ray

There is something wrong with the parent pym.js file. See http://nationwide.rayvisiondesign.com/Sell-My-Note/pym.js -- there are a bunch of random bad characters.

authors: eads rayvision


text:
update hals for 0.9.0 (0.2.0) release

Bump PAC and minor dependencies and fix code for 0.9 release.
NOTE: TIMER3 and TIMER4 of the nrf528* MCUs now have separate RegisterBlock types and cannot be unified. I just commented them out for now, a better solution is welcome.

This should be good to go please check the Timer::Instance trait to see if it makes sense this way.

Looks good. If nobody else has any objections I'll go ahead and merge this tomorrow.

authors: almindor jonas-schievink


text:
manifest: PSA arch tests with increased timeout

This brings a change in the PSA arch tests where
we increase the timeout to 90 seconds for Nordic
devices. Since we run RSA key generation tests
this is necessary.
Signed-off-by: Georgios Vasilakis georgios.vasilakis@nordicsemi.no

The following west manifest projects have been modified in this Pull Request:

Name
Old Revision
New Revision
Diff

psa-arch-tests
https://github.com/zephyrproject-rtos/psa-arch-tests/commit/a81f9da287569f169d60026916952641b233faa8 (master)
https://github.com/zephyrproject-rtos/psa-arch-tests/pull/5
zephyrproject-rtos/psa-arch-tests#5/files

Note: This message is automatically posted and updated by the Manifest GitHub Action.

Closing since it is already merged by the upmerge.

repo: nrfconnect/sdk-zephyr


text:
Command 'REMEMBERFOREVER' is not a registered Redis command.

I don't know  this question should be feedback here，
because I am not sure  it is a problem with Predis, or a problem with laravel.
Description:
#config/database.php
//session storage
        'default' => [
            'host' => env('REDIS_HOST', '127.0.0.1'),
            'password' => env('REDIS_PASSWORD', null),
            'port' => env('REDIS_PORT', 6379),
            'database' => 10, //look this
        ],
        //菜单等数据，数据量比较小的可以放在这个数据库中
        'setting' => [
            'host' => env('REDIS_HOST', '127.0.0.1'),
            'password' => env('REDIS_PASSWORD', null),
            'port' => env('REDIS_PORT', 6379),
            'database' => 11, //look this
        ],
        //hash表，用来存储member表中用户数据
        'member' => [
            'host' => env('REDIS_HOST', '127.0.0.1'),
            'password' => env('REDIS_PASSWORD', null),
            'port' => env('REDIS_PORT', 6379),
            'database' => 12, // look this
        ],

The above configuration is just a different database item.
# code one
Cache::connection('setting')->rememberForever('admin.all_cate', function(){
            return $this->allCate();
        });

# code two
Cache::rememberForever('admin.all_cate', function(){
            return $this->allCate();
        });

code one ,If you use connection() to specify a database connection,  will be thrown an exception:
Command 'REMEMBERFOREVER' is not a registered Redis command.

However, remove the connection(), use the default, for example code two, everything is fine, very amazing

laravel 5.6
Predis ^1.1
redis 3.2.6

This issue is not related to Predis.
The connection() method of Laravel's cache API returns the current underlying connection set for a cache store as set in config/cache.php, not an object that we should use to change cache data. It does not take any argument.
To change the default Redis connection used for the cache, change the 'connection' directive for the 'redis' store in the 'stores' array in config/cache.php:
...
'redis' => [
    'driver' => 'redis',
    'connection' => 'setting'  // <-- here
],
...

Alternatively, define another cache store that uses a different connection:
...
'settings' => [
    'driver' => 'redis',
    'connection' => 'setting',
],
...

This uses the 'setting' Redis connection defined in config/database.php. We can switch to the new store manually by calling Cache::store('settings')->rememberForever(...).

Thanks,solved !
my bad
I am not familiar enough with laravel.
Thanks again!
Please close this issue

repo: nrk/predis


text:
cell_data: cell_type->name to name->cell_type?

I've been working with cell data a little bit recently and got somewhat annoyed by the fact that, right now, meshio organizes the data in a nested dict as, e.g.,
cell_data["triangle"]["density"] = ...

It gets a little tedious then to check which cell data items are present in the mesh since you have to go through all cell types, fetch the keys, compare them to the keys in the other cell types etc.
Of course, this organization makes it easy for meshes to define a cell data item on triangles and not quads, but really I have never seen this.
This is why I'm thinking about swapping the dict order to
cell_data["density"]["triangle"] = ...

Of course that'd need bumping to 4.* (which I'm not terribly opposed against though).
What do y'all think about that? I want to hear @tianyikillua, @gdmcbain, @clbarnes, @MuellerSeb, @keurfonluu.

By doing so, the list of available cell fields would be
cell_data_list = list(cell_data.keys())

which would be the same for point data
point_data_list = list(point_data.keys())

I always say yes to consistency.

I like this suggestion. It's a much more logical order for the mesh data.

I didn't have an opinion but the way that @tianyikillua puts it, that cell_data and point_data will have the same keys, is good.
In the same way that @nschloe has

been working with cell data a little bit recently

I'm thinking that since I discovered the new cell_sets, I'll be using them extensively. They should get the same swap, I suppose; there's less of an issue with breaking existing code there.

It makes more sense to me too.

I haven't interacted with cell data at all, but agree that consistency is good - I defer to you.
The only thing I'd add is wondering whether there's scope for replacing any level of the nested dicts with e.g. a dataclass, if you know the keys ahead of time. Of course we want to be able to represent arbitrary data for any given feature, but if it could be made any more introspectable, I'd be in favour of that. That would also help set the update apart from the previous implementation, rather than just switching the order of two string keys, which is hard to demonstrate.

I like dataclasses a lot and use them (and frozen dataclasses) whenever possible, but here (besides not yet being able to count on Python 3.7 for a while) I don't think we do know the keys in advance, not the fields (very application-specific) but also not the cell-types, assuming we don't want to insist on having all of the types (do we have dozens) with most being empty and fix that list of types (more might be desired in future).

On incrementing the meshio major version, another big breaking change on the horizon I think is reimplementing  MSH4.1. The initial version was hasty and basically coerced it back to MSH2. I suspect the fix is to use cell_sets (instead of cell_data[cell_type]["gmsh:physical"]).  I take this to correspond to the main design intent behind Gmsh's update; MSH4.1 implements tagged subsets of elements #290. I think that handling this in meshio is required to fix #524 and #614.
That will break a lot of user code so might need a new major version. Should the present proposal, which meets with general approval but doesn't seem all that urgent, be staged for the same major version release?

Yes I also think that the next major version should unify the notion of point / cell sets among formats. Maybe we should continue the discussion in another issue?
In quick, is your cell_sets designed as follows?
cell_sets = {
     "Top": {"line": [1, 2]},
    "Material A": {"quad": [0, 1, 5], "triangle": [1, 10]},
}

In quick, is your cell_sets designed as follows?

Yes, I think so: Dict[str, Dict[str, ndarray]], where the first key depends on the application, the second is the type of cell, and the value is an array of indices into cells[cell_type ].

Let's pursue the discussion in #619.

Yes. Ta.

Another thought about that:
As I have mentioned before in #183 it would be nice, if the cell order could be preserved!
The background of sorting cells by there type was the different number of nodes for different cell types, so they could not be put in one numpy array. So they were separated by their cell-type to have the same number of nodes to fill an 2D numpy array. This was an early decision, but unfortunately this was destroying the cell-order.
I think almost all mesh formats work in the following way:

define nodes with IDs
define cells with type and list of Nodes
define data (cell/node/field...) by IDs

If we could access the cell-ID, we wouldn't need to sort cell-data again by the cell-type. We could rather have one numpy array, where the first dimension corresponds to the cell ID.
The fun thing is, that there is an implicit cell-ID within each cell-type, which is used for the cell-data (since it's an numpy array, where again the first dimension corresponds with the cell-sub-ID from the specified cell-type).
TL;DR:
Having one numpy array per cell-data would be the ideal case in my opinion.
Therefore we would need the cell-ID from the mesh file, which is not preserved at the moment.

If we could access the cell-ID, we wouldn't need to sort cell-data again by the cell-type. We could rather have one numpy array, where the first dimension corresponds to the cell ID.

I have a common use-case that I don't see how to fit into that structure. I have triangles for the domain and lines for the boundary; e.g. this is what one gets from Gmsh. Many cell-data fields will only be defined on the triangles, not the lines. Would I have to put a dummy NaN value on the lines?

Thanks everyone for your input.
There are many good ideas here, and I think it's time to go ahead and introduce some breaking changes. The next release will be 4.0, I'm thinking about a month from now. If you have ideas (like the dataclasses or the cell ordering), please open a new issue. Copy-and-pasting from the comments here is completely fine of course.
I've already incremented the version requirement to 3.6, and will reorder the dict as suggested in the original comment here. (That's not to say that'll be the final data model for 4.0.)

I have a common use-case that I don't see how to fit into that structure. I have triangles for the domain and lines for the boundary; e.g. this is what one gets from Gmsh. Many cell-data fields will only be defined on the triangles, not the lines. Would I have to put a dummy NaN value on the lines?

So you are basically lucky, that the cell-data was divided by cell-type in that case.
What happens, if there are some cells left out in a cell-data component?
How does meshio handle that at the moment? @nschloe

Many cell-data fields will only be defined on the triangles, not the lines. Would I have to put a dummy NaN value on the lines?

There are different notions of what constitutes a "cell function". It commonly is treated as a function that associates a value to every cell. In meshio, it's theoretically possible to only keep values with a particular cell type,
cell_data = {"a": {"line": [0.5, 1.4, 3.13]}}

but this is probably not what you want. I think it makes sense to first think about tags/sets because this is what a "boundary" is.

but this is probably not what you want.

On the contrary.  I would indeed use something like cell_data["flux"]["line"] for the flux through the boundary integrated over each element.  This quantity is defined only on the boundary and not in the domain and therefore only on the lines and not on the triangles.
Similarly I might project a P1 or P2 solution on the domain to be uniform on each cell (‘P0’) and then I'd have cell_data["potential"]["triangle"].  This quantity is only defined in the domain and not on the boundary and therefore on the triangles and not on the lines.

I think it makes sense to first think about tags/sets because this is what a "boundary" is.

Yes, I do agree with this, but this feels a fair way away in the future.
My current thoughts are, that, say my domain consists of triangles, then the boundary should be tagged edges of these triangles.  These are called 'facets' in Wikipedia ‘Simplicial complex’ and scikit-fem and 'Face' in XDMF Model and Format (‘Attribute’).  I don't think this part of XDMF is yet supported by meshio:
https://github.com/nschloe/meshio/blob/ab6c1792795c9f9e18d8b9a25a960e6c7b6e007b/meshio/xdmf/main.py#L290-L294
The main reason though why I have cell_data defined on either "triangle" or "line" but not both is that this is what meshio.read returns for MSH2.2 Physical Surfaces (subdomains) and Physical Curves (parts of the boundary in a mixed boundary value problem), respectively.  These tags cell_data["gmsh:physical"]["line"] and cell_data["gmsh:physical"]["triangle"] are only defined on one or the other.
Sets would be better for both subdomains and parts of the boundary, but I don't have access to an implementation.  My Gmsh is not compiled against MED.

authors: MuellerSeb clbarnes gdmcbain keurfonluu nschloe tianyikillua

repo: nschloe/meshio


text:
turn off different tab sizes for each language

-- 缩进4个空格等于一个Tab
vim.o.tabstop = 4
vim.bo.tabstop = 4
vim.o.softtabstop = 4
vim.o.shiftround = true

-- 空格替代tab
vim.o.expandtab = true
vim.bo.expandtab = true

-- 新行对齐当前行
vim.o.autoindent = true
vim.bo.autoindent = true
vim.o.smartindent = true

基础设置如上所示，但是发现对于不同文件类型，比如yaml，一个tab就变成了2
请问，对于所有文件，我该如何设置，才能使tab size = 4

研究了一下，应该是被tabstop应该是被插件覆盖了，在 autocmds.lua 里添加一个自动命令可行
autocmd("FileType", {
  group = myAutoGroup,
  callback = function()
    --  print(vim.o.filetype) 根据类型设置
    vim.o.tabstop = 4
    vim.o.shiftwidth = 4
    vim.o.expandtab = true
  end,
})

authors: nshen uxfion

repo: nshen/learn-neovim-lua


text:
Consider bandwidth weight query options

Will we need to query any routers based on bandwidth statistics?  Investigate this further and add functionality to get_router_by_policy() as necessary.

Closing for now because it's non-specific. This will get pulled in as part of the NetStatus/Path selection master ticket soon.

repo: nskinkel/oppy


text:
client: Support response statuses

Based on and blocked by nspcc-dev/neofs-api-go#350

client package docs will be added in upcoming PR.

By the way, api-go/v2 library works great with this PR.
$ git diff ../go.mod
diff --git a/go.mod b/go.mod
index 392a50e..ba43d5b 100644
--- a/go.mod
+++ b/go.mod
@@ -9,7 +9,7 @@ require (
        github.com/hashicorp/golang-lru v0.5.4
        github.com/mr-tron/base58 v1.2.0
        github.com/nspcc-dev/hrw v1.0.9
-       github.com/nspcc-dev/neofs-api-go v1.30.1-0.20211117091542-2d70391e315f
+       github.com/nspcc-dev/neofs-api-go/v2 v2.11.0-pre.0.20211118144033-580f6c5554ff
        github.com/nspcc-dev/neofs-crypto v0.3.0
        github.com/nspcc-dev/rfc6979 v0.2.0
        github.com/stretchr/testify v1.7.0

The only change you need is to replace github.com/nspcc-dev/neofs-api-go/rpc with github.com/nspcc-dev/neofs-api-go/v2/rpc.

authors: alexvanin cthulhu-rider

repo: nspcc-dev/neofs-sdk-go


text:
Hide articles without Reviews from the home page

When articles have no reviews, we want to hide them from the front-end so that they will not be shown to users. Still, we want to keep the article metadata in the articles table, to prevent duplicates.
This case happens when users delete their review for an article with only 1 review (their own review).
Thanks to @coglebed for the idea!
@all-contributors please add @coglebed for ideas.

Addressing this issue would be a fix for #72 (clicking articles without reviews will lead to showing a review popup)

I agree, it's hide empty articles from the home page. What if the user found it from the search? Would the pop-up initiate immediately similar to how it is now? That works as a solution for now, but my intuition tells me that we will develop a slightly different protocol in the future

Yeah. Feel free to suggest another UX for a newly submitted article (on whimsical), or we can continue talking about this as well.

authors: coglebed nsunami

repo: nsunami/postreview-app


text:
Adding Titles

Hi,
I am unable to add title to the plots using the following code:
n, bins, patches=plt.hist(np.asarray(dummy_predictions_team), color = 'blue', edgecolor = 'black',
bins = int(30),density=True)
plt.title(i)
plt.show()

Am I missing something?

This code really isn't enough to debug your code but title is meant to be a string. Unfortunately this isn't a hydrogen issue as titles do work on plots in hydrogen. All I can say is ask for help over at plotly. They have a wonderfully active forum for help too. You could also refer to the plotly documentation for help too.

FYI, it's not a plot from plotly, but from matplotlib.
If you happen to customise style via plt.style.use, the title can appear like disappeared.
But in anyway, it's not the talk of Hydrogen.

authors: ahsen1402 aviatesk wadethestealth

repo: nteract/hydrogen


text:
Add inspector panel

A proper panel for code introspection. See https://github.com/nteract/hydrogen/pull/192

Dude, awesome.

authors: lgeiger rgbkrk


text:
Modified to add child tag

PR の目的

pteamの画面でアクションを作成する際に、Topictagが親タグの場合その子供のタグが選択できないバグを修正しました。

経緯・意図・意思決定

Topictagに親タグのみ選択されていても、アクション作成時に親と子供のタグ両方を登録できるようにしました。
条件分岐を行いvalidTagNamesに子供のタグを追加できるようにしました。

@mshim03
ループ外に処理を実装しました。
また変数名が重複していた部分に関しては、tag→presetTagに変更しました。

@mshim03
forEachの外に処理を記述し117行目に以下のコードを追加しました。
const presetTag = allTags.find((tag) => tag.tag_id === presetTagId);
validTagNames.add(presetTag.tag_name);

またEdit Topicでも同様にactionの設定ができるように、TopicModal.jsxにも同じ処理を付け加えました。

repo: nttcom/threatconnectome


text:
Reporting capabilities of AS path matching

Cheers,
seems I either misunderstand the path match reporting mechanisms or I need to investigate into enhancing/fixing this perhaps.
Background:
I send an UDPATE of one of our prefixes into the DFZ. For that prefix I did configure a path match of '$MYASN' in prefixes.yml.
The resulting report of this UPDATE is:

always just a single report, doesn't matter how many different paths via/to $MYASN do exist
${summary} is expanded to matchDescription + "on prefix $PREFIX 1 times"
${earliest} and ${latest} expanded
${pathNumber} and ${path} expanded (BUT always just to a single one eg. "Top 1 most used AS paths: [3356,$MYASN]")
no other expansions are possible, the above is the maximum possible to get out of it

My main use case is reporting me any occurence of $MYASN being suddenly reachable through major/transit-free ASNs, multiple times, in noncontinous fashion (leakages). But for testing purposes all what I do is matching on $MYASN without any regex.
What I would expect to see is all UPDATES matching the regex being reported. You could be able to see where a leak or any other regex match was seen, by ${peer} and also seeing the AS path of all those UPDATES spreading through the DFZ. You would be able to see the impact of that. Currently all you see is one PATH where the UPDATE matching the regex was seen, but not even from which peer.
What do you think, missing feature, wrong usage or bug? I'm out of clue for now, but continue to feel some love for BGPalerter, so would like to get more out of it.

Hi @jesk78,
By default, BGPalerter is instructed to report a single alert for each monitored issue.
This is the most common use case in order to reduce noise and make the alerts actionable.
(e.g. if you have a hijack you don't want to receive 600 messages, one for each peer detecting the hijack).
Which is more inline with the idea to inform you asap when something happens more than giving you a complete map of it (also because there is no way to define "complete").
For your use case tho, this default configuration is not ideal. What you could do:
Option 1:

Imagine it would be enough for you to receive a list of 50 paths used. Increase the  thresholdMinPeers parameter of monitorPath(here) to 50. Increase the showPaths value to 50 for the report of interest (e.g. here if you are using email).
With this solution, you will receive a cumulative alert as soon as you reach 50 peers reporting the same alert (and so also 50 paths). You will not receive any alert if the update doesn't reach 50 peers (which it would mean it's visibility is really limited). This is also what happens with the other monitoring.

Option 2:

Decrease notificationIntervalSeconds to something small enough (e.g. 1 second). Be aware that this means you will be receiving an alert every single time the path is matched. I would suggest to use another instance of BGPalerter for this type of monitoring in order to don't affect the other monitors.

Possible options which require changes to the code:
Option 1:

We could define a delay parameter which essentially prevents the alert to be sent immediately. The delay (in seconds) would allow the monitor to collect a set of paths. After such delay the paths are included in the alert, the alert sent and not repeated again before notificationIntervalSeconds expires. So imagine you would set the delay=30, after 30 seconds from the first received update you will receive an alert. The alert will contain Top X most used AS paths where X is the amount of path seen by BGPalerter in 30 seconds.

Option 2:

We define a new key for the path matching alert here. The first parameter of the publishAlert method is the key which is used to group together alerts and avoid duplicates. As you can see from the linked code, at the moment this parameter is the prefix matched. You could use for example the pathString instead (which it will be always different for each path). It would essentially behave like the Option 2 above without the need to run it on a separated instance to avoid other monitors to adopt the same behavior. You will receive an alert for each path matched. This is more an ad-hoc change if you are running the code.

Massimo, thanks for providing those details and also possible options.
The thresholdMinPeers options has - as you pointed out - some serious drawback which makes it not very suitable for this. In case of setting the notificationIntervalSeconds to 1 would that really mean that it would react really on every single message? Even if when multiple messages are received in a single second? I suspect that by setting it to 1 it will still miss events, while it will make some sort of sophisticated aggregation support required in the systems receiving them from BGPalerter (which is not really possible when using for example email, as in my case).
So if you ask me your suggested delay parameter to aggregate events into single alerts, makes a lot of sense for me - very beneficial in many situations, providing alerts with more granular information, helping to detect location and scope of your prefixes going ham.
I suppose that aggregating events into single alerts by using a timer is not something totally trivial to bring into the code. But anyway I will try to think about the feasibility for me patching this in.

The feature of the delay is not a bad idea indeed. Not sure how easy it is but I'll try to arrange something as soon as I have some time. Contributions are welcome.
In the meanwhile I would use the thresholdMinPeers set to a "reasonable value" (no idea which, I would keep it below 60 and tune it from there). While it is true that you will not receive alerts if you don't reach such threshold, it is also true that for your use case (especially leaking in tier1) you would easily have a visibility of more than 50 peers (which is a small fraction of the total available).

Yup, should be ok for that. But you never know. Just short inconsistency in policy with immediate fix (seen that) could mean only reaching a subset of those peers.

repo: nttgin/BGPalerter


text:
How to get the LOS matrix?

I want to get the judgment condition of whether there is LOS between two agents，and I notice that the video in 6.4 shows a Los matrix.
Can we get that matrix, or do you have other ways to judge?

Hi,
The LOS is reported in the /<unit_id>/nbr_odom_cloud. All neighbours that have line of sight to the unit_id will have the poses put in that pointcloud. The idx of the neighbour can be found in the intensity field.
https://ntu-aris.github.io/caric/#62-onboard-perception-data

repo: ntu-aris/caric


text:
Fixing bug where watch fails when etcd revisions are compacted

Check for errors when starting rest server

Adding validity period for root CA certificate

Retry Subnet Deletion on VSD if it fails the first time

@pdellaert #102 recreated

these changes are included in #103

repo: nuagenetworks/nuage-kubernetes


text:
VSD cluster failover stats command not using variable

I just did a VSD cluster failover using metro and after that my stats were failing.
I realized that the hostname variable was not replaced but used a input param for the command.
Program 'elasticsearch-status'
  status                            Status failed
  monitoring status                 Monitored
  last started                      Wed, 31 Mar 2021 13:02:39
  last exit value                   1
  last output                       ElasticSearch at hostvars[groups[vstats][0]][hostname] not available
                                    ElasticSearch status: FAIL
  data collected                    Wed, 31 Mar 2021 13:02:39

I think double {{ }} brackets are missing in that command, but didn't have a chance to test it yet
https://github.com/nuagenetworks/nuage-metroae/blob/118b0f9c29b6ec3bb66baf25f4457cc617cbb388/src/roles/vsd-cluster-failover/tasks/main.yml#L107

Sorry for the delay. Somehow I missed this. I will create a JIRA and have this fixed.

METROAE-420 has been created

Fixed in the dev branch. Will be available in the next release.

authors: bacastelli sgodbole2 toweber

repo: nuagenetworks/nuage-metroae


text:
Add "unless" and "restart" keywords.

This was something that @TheWitheredStriker wanted to add.
So i'm adding this issue as something that has to be done lol.

Taking up task in a few ;)

authors: TheNachoBIT TheWitheredStriker

repo: nucleus-lang/nucleus


text:
🛑 Secret Site BIS is down

In 7a51bd0, Secret Site BIS ($SECRET_SITE) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Secret Site BIS is back up in cf6f146.


text:
🛑 Secret Site BIS is down

In e2bb26f, Secret Site BIS ($SECRET_SITE) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Secret Site BIS is back up in 7fafc22.


text:
🛑 Difesa is down

In ed39ba6, Difesa (http://www.difesa.it/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Difesa is back up in d3754f6.


text:
🛑 Difesa is down

In 35cdfd8, Difesa (http://www.difesa.it/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Difesa is back up in 2f10cb4.


text:
🛑 Università e ricerca is down

In 39d2c3e, Università e ricerca (https://www.mur.gov.it/it) was down:

HTTP code: 403
Response time: 534 ms

Resolved: Università e ricerca is back up in d425b6c.


text:
🛑 Main Website is down

In e13dced, Main Website (https://binadarma.ac.id) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Main Website is back up in 2aaad35 after 41 minutes.


text:
Frequency caclulation seems wrong

Does this math add up? At the start of the module we have:
entity sdram is
generic (
-- clock frequency (in MHz)
--
-- This value must be provided, as it is used to calculate the number of
-- clock cycles required for the other timing values.
CLK_FREQ : real;
Then later on:
-- calculate the clock period (in nanoseconds)
constant CLK_PERIOD : real := 1.0/CLK_FREQ*1000.0;
But if for example we pass CLK_FREQ = 100.0 which is 100MHZ then the period in ns is calculated as 1/100*1000=0.00001ns
Did you meant to say instead:
constant CLK_PERIOD : real := 1000.0/CLK_FREQ;

Ahh PEBKAC PEMDAS, I was seeing imaginary parenthesys... 1/100 then *1000 works out fine.

repo: nullobject/sdram-fpga


text:
jsx

tl;dr - I am just playing with the idea of making jsx first-class, probably via pre_hook but if the implementation gets more complicated than I hope it to be then I'll probably make this a separate plugin.

Usage
require('Comment').setup({
    pre_hook = function(ctx)
        return require('Comment.jsx').calculate(ctx)
    end,
})

Why?

It's fun to play with treesitter.
I personally don't like the verbose integration with context-commentstring.
jsx is the only thing that is missing to make this plugin a masterpiece.
And lastly, one less plugin to install(?)

What's missing?
In its current state, it works but does have some issues regarding accuracy
~1. Can't comment/uncomment multiple attributes at once [^1]~ Fixed using workaround

Details

Actual

  this is a p tag

Expected

  this is a p tag

(Also when uncommenting, expecting // to be used instead of {/* */})

~2. Can't uncomment the following at once [^1]~ Fixed using workaround

Details

  {/*
 */}
  {/*
hello
 */}

(This is not a priority, as the syntax is already broken)

Actual

  // {/*
 */}
  // {/*
hello
 */}

Expected

hello

[^1]: Both of them are a non-issue if you comment/uncomment them individually
FAQ

Why pre_hook is needed?

Because everyone is not using jsx so if you need it then that's da way.

Is this going to be shipped with the plugin?

As I said it depends on the implementation. If it's small, simple, and covers most cases then I'll merge it.

Any other issues?

I don't use jsx that much, so if you find something feel free to comment. And to be clear I am not aiming for 100% accuracy but ~90%. So, there is a chance that some issue won't get fixed.

Can I use it? Is this stable?

Yes, you can definitely use it. And as you know JS is JS so this will always remain experimental.

For testing, if anyone interested
const Yoo = () => {
  return (

hello

 {
              return (

IDK

              );
            },
          }}
        >
          hello

{true ? "true" : "false"}

{true && "true"}

          {true && (

This is awesome

          )}

          {getUser({
            name: "numToStr",
            job: "making plugins",
          })}

  );
};

It seems this is blocked by the following upstream issues:

https://github.com/neovim/neovim/pull/15330 - To capture sibling comment or attribute nodes using the + quantifier
https://github.com/neovim/neovim/pull/17099 - To easily iterating over captured nodes

Excellent! Waiting for this 🥂

@kuntau It would be helpful if you can test this out and report any case where comments are not correct apart from the issues that are already listed :)

Previously mentioned issues are now fixed (workaround) so this is now usable (I am using it) but there might be some cases where different commentstring might get used. I am leaving this PR for further testing.
To be clear I am not aiming for 100% accuracy but ~90%. So, there is a chance that some issue won't get fixed.

I was trying this out, it seems that this doesn't trigger for .tsx files?  Works great for .js files though, though it seems that it comments individual lines rather than a block. Is that the expected behaviour?
https://user-images.githubusercontent.com/6487613/171071876-37a03f90-9361-4fb4-bcaa-b865c21fcc77.mp4

I was trying this out, it seems that this doesn't trigger for .tsx files?

Works for me though. Do you have tsx parser installed?

though it seems that it comments individual lines rather than a block. Is that the expected behaviour?
https://user-images.githubusercontent.com/6487613/171071876-37a03f90-9361-4fb4-bcaa-b865c21fcc77.mp4

I think you are pressing gc in this clip. Try with gb.

I wasn't aware that there's a tsx parser, I only had the typescript one installed.
Everything seems to work as expected, including gb and gc behaviour! Thank you!

seems has problem with Jsx Component with props(use gc)

@ecosse3 @ShiChenCong Nice catch! I'll try to fixing those issue.

@ShiChenCong Is that a self closing element in the image? Can you reply with the element that you are facing issue with, if that's ok.

@numToStr I've been using this PR for the last few days and have not noticed any weird behavior whatsoever. Seems to be working quite great in a React environment for me so far! Thanks for the hard work on this 😄

I can confirm the bugs that @ecosse3 has reported. It sometimes can't comment regular HTML tags correctly. for some reason if I remove the className it works!
https://user-images.githubusercontent.com/87268103/171988969-b9020f08-7bc3-48e3-8f42-becd4d00d2ca.mp4
Also:
https://user-images.githubusercontent.com/87268103/171989054-7c5ecfe8-4bc9-453c-8059-3f005586de2b.mp4
The jsx:
<NodeViewWrapper className="flex items-center justify-center image-uploader">
      {loading && (

      )}
</NodeViewWrapper>

@ahhshm I was able to reproduce the same.
My observation is that any element that has attributes on the same line is using wrong comment string. It doesn't matter whether it's a custom or native elements.

@numToStr  Sorry to reply so late, yes, It is self closing element

@ShiChenCong No problem. Now it should work with self closing element.

@ahhshm @ecosse3 I pushed a fix that should resolve the issue that you were facing before.

@numToStr Sorry for the late response.
It seems like updates have solved all of the previous problems. I just found a small bug: it can't uncomment opening fragment tags (in react) correctly:
https://user-images.githubusercontent.com/87268103/174428050-e2719393-6eb0-4c06-958f-73dc8772537b.mp4
The jsx (for testing):
    <NodeViewWrapper as="figure" dir="ltr" data-type="custom-image">
      {node.attrs.src && (
        <>
          <img
            src={node.attrs.src}
            alt="Image"
            className={`${node.attrs.src.startsWith("data:") && "blur-sm"}`}
          />
          <bdi>
            <NodeViewContent as="figcaption" className="text-center" />
          </bdi>
        </>
      )}
    </NodeViewWrapper>

@ahhshm hmmm...this also seems broken in context-commentstring. I'll try fix this.

Any update on this? I've been using this branch since it was created and it's working fine for me. I haven't encountered any specific bug and it seems pretty stable. Any plan to merge it into the main branch?
No pressure btw. I just want to know when I can remove branch="jsx" in my packer config.

@ahhshm I am really happy to hear that this is working without any major hiccups. As I said earlier, my main reason for holding this out is because

lack of + quantifier https://github.com/neovim/neovim/pull/19563 (this will also help in text objects 😋)
Improved Query:iter_matches() API https://github.com/neovim/neovim/pull/17099

Both would've helped in making the implementation robust and much nicer but it seems both PRs are kinda blocked, sadly.

For those who are still looking for a temporaty solution. You can check this ,https://github.com/JoosepAlviste/nvim-ts-context-commentstring#commentnvim

I'm getting this message every time I attempt to comment in jsx.

I believe I've configured the pre_hook properly:

Update:
Updating the pre_hook now shows the nil error everywhere, not just in JSX files.
I've tried to just call require on 'Comment.jsx' and it throws a not found error.
Please help.

This problem is also happening to me

Update:
Updating the pre_hook now shows the nil error everywhere, not just in JSX files. I've tried to just call require on 'Comment.jsx' and it throws a not found error.
Please help.

This is also happening to me.

Any news about this? I am getting [Comment.nvim] nill message when using this branch.

authors: CoderLadFahim ShiChenCong ahhshm cusxio kuntau lucasmarinb numToStr pierregoutheraud rick-yao smithbm2316


text:
Streamline API naming for Server* / *Callable

I just tried to get an overview of the server classes fingerprints (pynumaflow 0.7.0);

module
class_name
arg_name
arg_type

pynumaflow.mapper
MapServer
mapper_instance
MapSyncCallable

pynumaflow.mapper
MapAsyncServer
mapper_instance
MapAsyncCallable

pynumaflow.mapper
MapMultiprocServer
mapper_instance
MapSyncCallable

pynumaflow.reducer
ReduceAsyncServer
reducer_handler
ReduceCallable

pynumaflow.mapstreamer
MapStreamAsyncServer
map_stream_instance
MapStreamCallable

pynumaflow.sourcetransformer
SourceTransformServer
source_transform_instance
SourceTransformCallable

pynumaflow.sourcetransformer
SourceTransformMultiProcServer
source_transform_instance
SourceTransformCallable

pynumaflow.sourcer
SourceServer
sourcer_instance
SourceCallable

pynumaflow.sourcer
SourceAsyncServer
sourcer_instance
SourceCallable

pynumaflow.sinker
SinkServer
sinker_instance
SyncSinkCallable

pynumaflow.sinker
SinkAsyncServer
sinker_instance
AsyncSinkCallable

pynumaflow.sideinput
SideInputServer
side_input_instance
RetrieverCallable

reducer_handler stands out, suggesting rename reducer_instance.
Consider dropping Sync syntax altogether, since it is verbose and will lead to inconsistent syntax over time. For example ReduceCallable needs to be renamed to ReduceSyncCallable when ReduceAsyncCallable is implemented. The Server* class names follows this convention, but the *Callables don't.
AsyncSinkCallable stands out to MapSyncCallable/MapAsyncCallable/MapSyncCallable in verb ordering, suggesting consitent naming SinkAsyncCallable.

Message from the maintainers:
If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

You're welcome, thanks for considering this.
These are of course just nice-to-have breaking changes that you should wait and bundle with other API changes you plan.

repo: numaproj/numaflow-python


text:
Threading improvements in roadmap

Feature request

The Numba roadmap (here) doesn't include anything about the threading backend. I think we somehow just missed it. Example features to include:

Exposing thread id
Thread private variables
Concurrent containers (e.g. from TBB or upcoming parallel STL)
Scheduling policy

cc @seibert

authors: ehsantn stuartarchibald

repo: numba/numba


text:
Function compiled with parallel=True consumes more CPU but does not run faster

I've used numba to speed up a simple calculation. It made a great job, the only problem I noticed was that compiling parallel code did not speed up the function, while cpu usage went up from ~30% to 100% (4 core cpu).
Using conda:
numba                     0.55.0           py39hb8cd55e_0    conda-forge
Sample code:
import torch
import numpy as np
from numba import jit

# generate anchors
level_size = 16
Y, X = torch.meshgrid(torch.arange(0, 1024, 4), torch.arange(0, 1024, 4))
H, W = (0.5, 1.0, 2.0), (2.0, 1.0, 0.5)
ltrb_a = torch.concat([torch.stack((X-level_size*w/2, Y-level_size*h/2, X+level_size*w/2, Y+level_size*h/2), -1)[:,:,None,:] for h, w in zip(H,W)], -2)

# generate random objects
lt = torch.rand(100,2)*torch.tensor([[1024, 1024]])
wh = torch.rand(100,2)*torch.tensor([[1.5*level_size, 1.5*level_size]]) + torch.tensor([[0.5*level_size, 0.5*level_size]])
ltrb = torch.concat((lt, lt+wh), -1)

ltrb_a_cuda = ltrb_a.to('cuda')
ltrb_cuda = ltrb.to('cuda')

ltrb_a_np = ltrb_a.numpy()
ltrb_np = ltrb.numpy()

@jit(nopython=True, nogil=True, parallel=False)
def iou_jit(ltrb_a, ltrb):
	H, W, A, _ = ltrb_a.shape
	N, _ = ltrb.shape
	res_idx = np.zeros((H, W, A), dtype=np.int32)
	res_val = np.zeros((H, W, A), dtype=np.float32)
	for y in range(H):
		for x in range(W):
			for a, (l_a, t_a, r_a, b_a) in enumerate(ltrb_a[y,x]):
				best, bestid = 0, 0
				for idx, (l, t, r, b) in enumerate(ltrb):
					l_i = max(l_a, l)
					t_i = max(t_a, t)
					r_i = min(r_a, r)
					b_i = min(b_a, b)
					intersection = max(r_i-l_i, 0) * max(b_i-t_i, 0)
					area_a = max(r_a-l_a, 0.) * max(b_a-t_a, 0.)
					area = max(r-l, 0.) * max(b-t, 0.)

					iou = intersection / (area + area_a - intersection)
					if iou>best:
						best, bestid = iou, idx

				res_idx[y,x,a] = bestid
				res_val[y,x,a] = best
	return res_idx, res_val

@jit(nopython=True, nogil=True, parallel=True)
def iou_jit_par(ltrb_a, ltrb):
	H, W, A, _ = ltrb_a.shape
	N, _ = ltrb.shape
	res_idx = np.zeros((H, W, A), dtype=np.int32)
	res_val = np.zeros((H, W, A), dtype=np.float32)
	for y in range(H):
		for x in range(W):
			for a, (l_a, t_a, r_a, b_a) in enumerate(ltrb_a[y,x]):
				best, bestid = 0, 0
				for idx, (l, t, r, b) in enumerate(ltrb):
					l_i = max(l_a, l)
					t_i = max(t_a, t)
					r_i = min(r_a, r)
					b_i = min(b_a, b)
					intersection = max(r_i-l_i, 0) * max(b_i-t_i, 0)
					area_a = max(r_a-l_a, 0.) * max(b_a-t_a, 0.)
					area = max(r-l, 0.) * max(b-t, 0.)

					iou = intersection / (area + area_a - intersection)
					if iou>best:
						best, bestid = iou, idx

				res_idx[y,x,a] = bestid
				res_val[y,x,a] = best
	return res_idx, res_val

print("Time of iou_jit")
iou_jit(ltrb_a_np, ltrb_np)
%timeit -r 3 -n 20 iou_jit(ltrb_a_np, ltrb_np)
print("Time of iou_jit_par")
iou_jit_par(ltrb_a_np, ltrb_np)
%timeit -r 3 -n 20 iou_jit_par(ltrb_a_np, ltrb_np)

Results:

Time of iou_jit
93.8 ms ± 957 µs per loop (mean ± std. dev. of 3 runs, 20 loops each)
Time of iou_jit_par
93.6 ms ± 943 µs per loop (mean ± std. dev. of 3 runs, 20 loops each)

Thanks for the report. Perhaps take a look at the parallel diagnostics available, docs are here: https://numba.readthedocs.io/en/stable/user/parallel.html#diagnostics, that should show what is/is not parallelized with hints at why.
In the above there's also no prange (https://numba.readthedocs.io/en/stable/user/parallel.html#explicit-parallel-loops) used to declare an explicitly parallel loop so this code will largely be relying on parallelization of array expressions, which are harder to figure out in a somewhat involved example such as the above.
If the above were to be modified to not use torch and just use some dummy equivalent data it'll be easier to take a look at why the CPUs are running at 100% with no performance gain. Also, for the future, Numba has a discussion group that is great for this sort of question: https://numba.discourse.group/

Indeed, only np.zeros calls were targeted by the optimization, but still I think it is a bug that cpu utilization saturates especially since it is evident that no real work is done there.
================================================================================
 Parallel Accelerator Optimizing:  Function iou_jit_par,
C:\Users\kissak\AppData\Local\Temp/ipykernel_6536/938520053.py (49)
================================================================================

Parallel loop listing for  Function iou_jit_par, C:\Users\kissak\AppData\Local\Temp/ipykernel_6536/938520053.py (49)
-------------------------------------------------------------|loop #ID
@jit(nopython=True, nogil=True, parallel=True)               |
def iou_jit_par(ltrb_a, ltrb):                               |
	H, W, A, _ = ltrb_a.shape                                   |
	N, _ = ltrb.shape                                           |
	res_idx = np.zeros((H, W, A), dtype=np.int32)---------------| #0
	res_val = np.zeros((H, W, A), dtype=np.float32)-------------| #1
	for y in range(H):                                          |
		for x in range(W):                                         |
			for a, (l_a, t_a, r_a, b_a) in enumerate(ltrb_a[y,x]):    |
				best, bestid = 0, 0                                      |
				for idx, (l, t, r, b) in enumerate(ltrb):                |
					l_i = max(l_a, l)                                       |
					t_i = max(t_a, t)                                       |
					r_i = min(r_a, r)                                       |
					b_i = min(b_a, b)                                       |
					intersection = max(r_i-l_i, 0) * max(b_i-t_i, 0)        |
					area_a = max(r_a-l_a, 0.) * max(b_a-t_a, 0.)            |
					area = max(r-l, 0.) * max(b-t, 0.)                      |
                                                             |
					iou = intersection / (area + area_a - intersection)     |
					if iou>best:                                            |
						best, bestid = iou, idx                                |
                                                             |
				res_idx[y,x,a] = bestid                                  |
				res_val[y,x,a] = best                                    |
	return res_idx, res_val                                     |
--------------------------------- Fusing loops ---------------------------------
Attempting fusion of parallel loops (combines loops with similar properties)...
  Trying to fuse loops #0 and #1:
    - fusion succeeded: parallel for-loop #1 is fused into for-loop #0.
----------------------------- Before Optimisation ------------------------------
Parallel region 0:
+--0 (parallel)
+--1 (parallel)

--------------------------------------------------------------------------------
------------------------------ After Optimisation ------------------------------
Parallel region 0:
+--0 (parallel, fused with loop(s): 1)

Parallel region 0 (loop #0) had 1 loop(s) fused.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

---------------------------Loop invariant code motion---------------------------
Allocation hoisting:
No allocation hoisting found

Instruction hoisting:
loop #0:
  Has the following hoisted:
    $expr_out_var.35 = const(int32, 0)
    $expr_out_var.44 = const(float32, 0.0)
  Failed to hoist the following:
    dependency: $parfor_index_tuple_var.36 = build_tuple(items=[Var($parfor__index_28.204, <string>:2), Var($parfor__index_29.206, <string>:3), Var($parfor__index_30.208, <string>:4)])
--------------------------------------------------------------------------------

If I use prange in the outermost loop in the function, it works perfectly, 100% cpu utilization but now running really 4 times faster:

25.8 ms ± 1.01 ms per loop (mean ± std. dev. of 3 runs, 20 loops each)

The code without using torch:
import numpy as np
from numba import jit, prange

# generate anchors
level_size = 16
X, Y = np.meshgrid(np.arange(0,1024,4), np.arange(0,1024,4))
H, W = (0.5, 1.0, 2.0), (2.0, 1.0, 0.5)
ltrb_a = np.concatenate([np.stack((X-level_size*w/2, Y-level_size*h/2, X+level_size*w/2, Y+level_size*h/2), -1)[:,:,None,:] for h, w in zip(H,W)], -2)

# generate random objects
lt = np.random.rand(100,2)*np.array([[1024, 1024]])
wh = np.random.rand(100,2)*np.array([[1.5*level_size, 1.5*level_size]]) + np.array([[0.5*level_size, 0.5*level_size]])
ltrb = np.concatenate((lt, lt+wh), -1)

def iou(ltrb_a, ltrb):
	H, W, A, _ = ltrb_a.shape
	N, _ = ltrb.shape
	res_idx = np.zeros((H, W, A), dtype=np.int32)
	res_val = np.zeros((H, W, A), dtype=np.float32)
	for y in range(H):
		for x in range(W):
			for a, (l_a, t_a, r_a, b_a) in enumerate(ltrb_a[y,x]):
				best, bestid = 0, 0
				for idx, (l, t, r, b) in enumerate(ltrb):
					l_i = max(l_a, l)
					t_i = max(t_a, t)
					r_i = min(r_a, r)
					b_i = min(b_a, b)
					intersection = max(r_i-l_i, 0) * max(b_i-t_i, 0)
					area_a = max(r_a-l_a, 0.) * max(b_a-t_a, 0.)
					area = max(r-l, 0.) * max(b-t, 0.)

					iou = intersection / (area + area_a - intersection)
					if iou>best:
						best, bestid = iou, idx

				res_idx[y,x,a] = bestid
				res_val[y,x,a] = best
	return res_idx, res_val

iou_jit = jit(iou, nopython=True, nogil=True, parallel=False)
iou_jit_par = jit(iou, nopython=True, nogil=True, parallel=True)

print("Time of iou_jit")
iou_jit(ltrb_a, ltrb)
%timeit -r 3 -n 20 iou_jit(ltrb_a, ltrb)
print("Time of iou_jit_par")
iou_jit_par(ltrb_a, ltrb)
%timeit -r 3 -n 20 iou_jit_par(ltrb_a, ltrb)

Thanks for following up with a MWR. I can replicate near 100% use of all CPUs with the above if the OpenMP threading layer is in use, but not if TBB or workqueue is used. Are you using the OpenMP threading layer (you can find out which threading layer was chosen by adding import numba; print(numba.threading_layer()) to the end of your script)?
For reference, docs on threading layers: https://numba.readthedocs.io/en/stable/user/threading-layer.html

import numba; print(numba.threading_layer())
tbb

Still think it's a bug.

authors: akkiss stuartarchibald


text:
Move minimum LLVM version to 11.

Since Aarch64 is now fixed for LLVM 11 this can be moved.

this is blocked on producing an llvmlite in 0.37.0dev0 which contains the correct version of llvm via https://github.com/numba/llvmlite/pull/715

/azp run

Thanks for the patch!

authors: esc stuartarchibald


text:
Py3.11wip

Base on https://github.com/numba/numba/pull/8381
Summary:

adapt for major bytecode changes in py3.11
adapt for zero-cost exception changes

linux64 python3.11 testsuite status python runtests.py -m=4 --exclude-tags=long_running -vb
Ran 11166 tests in 3267.694s

FAILED (failures=69, errors=1082, skipped=681, expected failures=23)

I think i've stabilized it for older pythons. There just a failure due to the jinja template problem that is now fixed on main

Latest on python runtests.py -m=4 --exclude-tags=long_running -vb
Ran 11222 tests in 3337.570s

FAILED (failures=60, errors=708, skipped=568, expected failures=23)

The list of failing tests on the py3.11 branch will be tracked in this gist: https://gist.github.com/sklam/6b60df9a5bec25557189ef1387c82798
I cannot upload the full error log because it's too big (400+MB)

The only failure on Azure is ImportError: cannot import name 'environmentfilter' from 'jinja2' (/home/vsts/miniconda3/envs/azure_ci/lib/python3.8/site-packages/jinja2/__init__.py) which should be fixed by merging main (patched in #8549)

https://github.com/numba/numba/pull/8545/commits/bd4dd4fa8101d14532f3958501ac94a0a85ff221 is at
Ran 11222 tests in 2118.301s

FAILED (failures=49, errors=381, skipped=568, expected failures=23)

I'll stop adding to this PR so review is easier. Subsequent fixes will go into a different PR.

Last 3 commits were added to fix the CI testing.

I have addressed all review suggestions.

Thanks for all your efforts on this @sklam, I've marked this as ready to merge with knowledge that CI isn't going to pass yet. Patches from #8590, #8614 and #8621 continue this work.

authors: sklam stuartarchibald


text:
The "submit part" button shouldn't be hidden

The "submit part" button hides itself when the part is not dirty, as a hint that nothing will change when you submit.
This makes it impossible to submit "empty" answers which don't involve changing the initial state of the input widget - for example, an empty string or selecting none of the available choices. With the new custom part types, these become valid answers.
The "submit part" button should always be visible, and enabled. The student will get feedback if their answer can't be submitted, anyway.

Hi, can I work on this?

Hi @ryan-barrett , sorry for the slow reply - I've been on strike and then on annual leave.
Please do have a go at this and submit a pull request when you've got something I can look at.

authors: christianp ryan-barrett

repo: numbas/Numbas


text:
Factor Histogram Visualizer: add scale to y-axis

The histogram can be a bit tricky to interpret as no scale is shown on the y-axis. Such a scale should be given and/or there should be a way to see the count of values in each bin.

I was planning on adding that along with a mouse over feature. If you like I could take this issue and it should be finished in about a week in a half to two after finals are over.

You are welcome to take on this issue at any point. The protocol is that at such point as you start active work on it, you assign yourself to the issue, under "Assignees" at the top right. (If you don't see an "assign yourself" button there, just put a comment here in the discussion that you are working on it, and one of the maintainers will assign you.) Assigning yourself is an informal commitment that you will see it through to a PR. And if anyone else should happen to start work on this in the meantime, they would assign themselves. That way, we don't end up with either duplicated work by two people working on the same issue or an "orphaned" issue that someone was working on but got stalled. Thanks!

I can't assign it to myself. But I will take care of it.

OK, it's assigned to you. So nobody else will work on this until either you file a PR or let us all know that you're not going to be able to complete the issue. Thanks for your efforts!

Hi, I just submitted the pull request for this issue. However I don't have access to be able to link it to this issue.

All you need to do for that is just put the phrase "Resolves #NNN" on a line by itself in the description of a PR, and it auto-links. (I have just done that for your PR.) Thanks for filing, we'll take a look!

repo: numberscope/frontscope


text:
Plural of canvas

The plural of canvas is canvases, but Inflex.plurarlize returns canvas (and it's likely Inflex.singularize will return canva I haven't verified it yet)

I saw your PR and got it merged. Thanks again!


text:
[T5A3][W09-B3]Goh Qi Wei

Ready for review.

pls close the issue @qiwei24


text:
Car@leads

Car@Tinder is a desktop app for managing customer contacts, optimized for use via a Command Line Interface(CLI) while still having the benefits of a Graphical User Interface (GUI).
If you can type fast, Car@Tinder can get your contact management tasks done faster than traditional GUI apps.

Codecov Report

Merging #83 (d487463) into master (c36220c) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #83   +/-   ##
=========================================
  Coverage     72.15%   72.15%
  Complexity      399      399
=========================================
  Files            70       70
  Lines          1232     1232
  Branches        125      125
=========================================
  Hits            889      889
  Misses          311      311
  Partials         32       32

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 c36220c...d487463. Read the comment docs.

authors: codecov-io rajobasu


text:
Start a nupm package registry

Description

This adds a registry for nupm packages following a format proposed in https://github.com/nushell/nupm/pull/56.
I'm making a separate PR to allow testing https://github.com/nushell/nupm/pull/56 before merging it.

I'll merge this so that #56 can be tested.

aah i think i see what was happening :+1:

authors: amtoine kubouch

repo: nushell/nupm


text:
[Bug] Unexpected MODIFIER at 35, expected END

I'm trying to mock, but i got error
Unexpected MODIFIER at 35, expected END
Call Stack
 mustConsume
  vendors~main.iframe.bundle.js:1634:15
 parse
  vendors~main.iframe.bundle.js:1693:20
 stringToRegexp
  vendors~main.iframe.bundle.js:1846:27
 pathToRegexp
  vendors~main.iframe.bundle.js:1919:12
 match
  vendors~main.iframe.bundle.js:1766:26
 Faker/<
  vendors~main.iframe.bundle.js:2101:37
 Faker/<
  vendors~main.iframe.bundle.js:2132:26
 send/<
  vendors~main.iframe.bundle.js:1482:33

Here the code :
import { SectorBlueFilter } from 'core/components/BlueFilter/SectorBlueFilter'
import withMock from 'storybook-addon-mock'

export default {
  title: 'Ui/Form/sectorbluefilter/SectorBlueFilter',
  component: SectorBlueFilter,
  decorators: [withMock]
}

export const Default = args => <SectorBlueFilter {...args} />

Default.args = {}
Default.argTypes = {
  onChangeOption: { action: 'site / sector changed' }
}
Default.parameters = {
  mockData: [
    {
      url: 'http://localhost:10510/brain/sites/sectors?all=true',
      method: 'GET',
      status: 200,
      response: [
        {
          id: 8,
          name: 'Demo'
        }
      ]
    }
  ]
}

@xero88
This happens due to the port number in the URL. The faker method failed to parse URLs with the port number. I have labelled it as a bug. The fix will be in place soon.

@xero88 This issue is fixed in version 1.1.0. Closing this issue.

repo: nutboltu/storybook-addon-mock


text:
Uncaught P error

Hi,
I try to add addsense module in my app https://shirime.one and I get this error :
"adsbygoogle.push() error: Only one 'enable_page_level_ads' allowed per page."

my nuxt config :
'google-adsense': {
  id: 'ca-pub-6212158440227897',
  pageLevelAds: true,
},

Thanks ! When it's available I give you a feedback

@farnabaz Thanks, I have updated to the v1.2.1 but the problem persist :(

@jbty It is sad.
I will investigate the cause, thank you for quick reply.

Thanks for this module !

@jbty This should fix in 1.3.0-rc.1.
After investigating your application, I found the cause. I released a beta version 1.3.0-rc.1 to ensure correct functionality in real world.
Really appreciate if you can test the new beta version
npm i @nuxtjs/google-adsense@1.3.0-rc.1

@farnabaz I try this now

Nice jobs ! Everything work as exepted 🔥

authors: farnabaz jbty

repo: nuxt-community/google-adsense-module


text:
Handle prerelease constraint changed from ^3.0.0 to ^3.0.0-rc.9

Types of changes

[ ] Chore (a non-breaking change which is related to package maintenance)
[X] Bug fix (a non-breaking change which fixes an issue)
[ ] New feature (a non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Description

This PR allows module to use constraints like ^3.0.0-rc.9.
https://github.com/nuxt/framework/pull/7116
Checklist:

[ ] My change requires an update to the official documentation.
[ ] All TSDoc comments are up-to-date and new ones have been added where necessary.
[x] All new and existing tests are passing.

Hi, @Atinux please check for compatibility

Thanks! Let's shop that :rocket:

authors: chz lihbr

repo: nuxt-modules/prismic


text:
Overwrite content options is not working

package.json

{
  "devDependencies": {
    "@nuxtjs/tailwindcss": "^6.2.0",
    "nuxt": "3.0.0"
  }
}

i tried various settings. but overriding always doesn't work

nuxt.config.ts
export default {
  tailwindcss: {
    config: {
      content() {
        return ['./theme1/**/*.vue']
      }
    }
  },
}

is not working.

tailwind.config.js
export default {
  content() {
    return ['./theme1/**/*.vue']
  }
}

will throw the error. Cannot restart nuxt:  (tailwindConfig.content || []) is not iterable

the following settings are possible. but not formal

nuxt.config.ts
export default {
  hooks: {
    // is working
    'tailwindcss:config'(config: any) {
      config.content = ['./theme1/**/*.vue']
    },
  },
}

tailwind.config.js
export default {
  // is working, purge options have changed in Tailwind CSS v3.0.
  purge: [
    'test/*.vue'
  ]
}

what I need is overwrite not merge. can anyone help?

Why using a function for content?

@Atinux I refer to the document's
config/#merging-strategy

I didn't see an option in the source code of the module for content to be function. Moreover, since there are also usage of JSON.stringify to add templates, the function would get removed (though the module internally copies over the config according to my knowledge). But I've opened #592 as a draft fix for it if Atinux would provide feedback. 🙂

@jheng-jie can you check with 6.3.0?

@ineshbose  6.3.0 is working! thank you very much.
// nuxt.config.ts
{
  tailwindcss: {
    config: {
      content(origin: TailwindConfig['content']) {
        console.log('origin', origin)
        // overwrite
        return [
          './src/App.vue',
          './src/theme/_common/**/*.{vue,scss}',
          `./src/theme/${process.env.VITE_THEME}/**/*.{vue,scss}`,
        ]
      },
    },
  }
}

authors: Atinux ineshbose jheng-jie

repo: nuxt-modules/tailwindcss


text:
@font-face not used with fontshare provider

I am using the module with fontshare as a provider. When checking pageInsights it shows that @font-face is not being used. When adding fontain module it resolves the issue.

when using fontain

Operating System: Darwin
Node Version:     v20.14.0
Nuxt Version:     3.12.2
CLI Version:      3.12.0
Nitro Version:    2.9.6
Package Manager:  npm@10.7.0
Builder:          -
User Config:      devtools, future, modules, runtimeConfig, app, routeRules, devServer, build, fonts, tailwindcss
Runtime Modules:  @nuxt/eslint@0.3.13, @nuxtjs/tailwindcss@6.12.0, @nuxt/image@1.7.0, @nuxt/fonts@0.7.0, @nuxtjs/fontaine@0.4.3
Build Modules:    -

@samk-dev checking this out, it seems the problem is that you aren't using the font anywhere in your app. So by adding the CSS + specifying it should be preloaded, you're asking the browser to add a preload for a font that isn't needed. Maybe I'm misunderstanding - so please do let me know more details and I'll happily reopen.

authors: danielroe samk-dev

repo: nuxt/fonts