Not getting DOM autocompletion

Installed tern for sublime text ,core javascript autocompletion works but DOM for methods like getElementById etc autocompletion is not available.Is this intentional?

Enable the 'browser' defs in your project configuration. See here for docs.

Okay thanks for the pointers now working like a charm. But autocompletion for addEventListener, onclick  etc still not available any config to be done for that or just create my own snippets for them?

Okay thanks for the pointers now working like a charm. But autocompletion for addEventListener, onclick  etc still not available any config to be done for that or just create my own snippets for them?

Can you show an example where you'd expect a completion for addEventListener but aren't getting it?

Can you show an example where you'd expect a completion for addEventListener but aren't getting it?

As shown in the screenshot

No available completion

My Tern.sublime-settings file:

My .tern-project file @ /tern-for-sublime/node_modules/tern

Previously thought some DOM methods working but were actually working due to other package but turns out all DOM methods are not working with tern !!!

As shown in the screenshot

No available completion

My Tern.sublime-settings file:

My .tern-project file @ /tern-for-sublime/node_modules/tern

Previously thought some DOM methods working but were actually working due to other package but turns out all DOM methods are not working with tern !!!

 Probably because you didn't actually put it in your project dir. If you're trying to create a system-wide config, create a .tern-config file in your home directory.

 Probably because you didn't actually put it in your project dir. If you're trying to create a system-wide config, create a .tern-config file in your home directory.

Yup got it working !!! Thought it might be a bug.Weird earlier es6 auto-complete working well and browser.json not getting picked up.Again,I don't know the implementation so anyways awesome job you've done with Tern and I loved your Eloquent book.Thanks!!

Yup got it working !!! Thought it might be a bug.Weird earlier es6 auto-complete working well and browser.json not getting picked up.Again,I don't know the implementation so anyways awesome job you've done with Tern and I loved your Eloquent book.Thanks!!


Improve NFT Rewards display on Pay button

Discussion:

https://discord.com/channels/775859454780244028/990055537615970384/995834602809724948
https://discord.com/channels/775859454780244028/990055537615970384/999558419679813742

Have started designing and doing basic usability testing on an improved version of the NFT rewards. Will report back with findings and designs tomorrow.

@strath-m awesome ser keen to see it.


Upgrading to the lastest version failed...

VS Code Version：

OS Version：

Windows 10 Professional, with 17134.345 (x86)
Steps to rep：
1）Click the most left corner icon to upgrade my vs.
2）Then an 'Update VS' occurs.
3）After 5~6 seconds, it pops up the error below:
——The file is in use by another process……

PS：I've downloaded the System version and it should be the latest one, but why should I still accept the upgrade? And what's the MOST diff between 'User Version' and 'System Version'?
I've also attached the logs for you :)
ErrorLog.zip

Yes, I suggest you switch to the system setup. The big difference is that it will install Code for all users in your system.


Dependency pinning vs ranges

👋 @webpro!
WDYT of using dependency ranges (e.g. ^) instead of pinned versions? I just opened https://github.com/blockprotocol/blockprotocol/pull/895 to test https://github.com/webpro/knip/issues/31 and noticed an extra instance of eslint in my yarn.lock. It’d be great if it could be deduplicated.

Yeah, also see #43. Just when I wanted to introduce tildes and/or carets I had a bad experience with a breaking change in a minor or patch update. Will look into it again, as I'm totally in favor of Knip being a good citizen in anyone's node_modules.

I've introduced semver ranges for dependencies in v1.6.1, let's see how this goes...

No more duplicate ESLint instance in https://github.com/blockprotocol/blockprotocol/pull/895, thanks! 🎉


chromedriver : Extract driver file only

Fixes #65
chromedriver 109+ now contains a license file in the zip.
BDI fails if more than one file is contained in the zip.
This PR alloes BDI to extract the file named 'chromedriver' only.

Hey @yblatti, I'm merging this to a separate branch to add some changes myself. I'll get this into main asap. Thanks for the PR

Hey @yblatti, I'm merging this to a separate branch to add some changes myself. I'll get this into main asap. Thanks for the PR

Hi, great news.
This is the opportunity to thank you for this so useful project ! :star2:


Request key not reactive in setup?

I have a very simple component:
export default defineComponent({
  name: "User",
  props: {
    "user_id": String
  },
  setup(props) {
    const {data, error} = useSWRV(`/api/user/${props.user_id}`, fetcher);

    return {
      data,
      error,
    };
  }
});

And in my Vue router, I am passing the user_id from the url fragment (/user/:user_id) via props: true.
According to my readings of the docs, once the user_id prop is updated (on navigation or manual URL change), so should the data. However, this doesn't happen.
(I can verify the prop is in fact being updated by setting up a watch that just prints it out when it changes; and changing the string interpolation syntax to a simple string concat makes no difference.)
I am using Vue v3.0.0, swrv v1.0.0-beta.4.
edit: It's definitely possible that I'm misunderstanding the Composition API which I'm learning at the moment, but I assume this would be a common use case, so I would definitely enjoy if this were mentioned in docs for people like me :)

Ah I see now, damn my rushed reading of the docs. All that's needed is to have a function as the key instead of a plain string. Solved!


more cross-platform make commands

The open command doesn't exist on Linux and other variants. This is a simple way that should work in all UNIXy environments, making the Makefile less OS X-centric

I guess appveyor timed out, it worked fine when I reran it on my appveyor account.

For some reason this doesn't work on Mac OS X. Not sure why...apparently other ppl ran into similar issues. :worried:

Really sorry for the delay @brad. Addressing this is a good idea, but this doesn't work for me either.
We did something similar in cookiecutter-pypackage, where@eliasdorneles came up with a really creative workaround that would work fully cross-platform: https://github.com/audreyr/cookiecutter-pypackage/pull/58

This issue seems to be resolved as per d5f3c044670f144cb55368087e22ef6a7104fe6b.
Let me know if that doesn't work for you! 🙇


feat: derivative of absolute value

Compute the derivative of the absolute value: deriv (|·|) x = SignType.sign x.

Could you also add results about DifferentiableOn, DifferentiableWithinAt, and so on? For an API model, you can look around DifferentiableOn.norm.

bors r+
Thanks a lot!


catch all exceptions in api.py Fetching data loop.

raise when it's a dangerous exception.

What exception did you get which is not yet catched?

sorry... going to fast with my commits...
I get this:
/!\ ERROR: <class 'asyncio.exceptions.TimeoutError'>

which I know, is printed by HA like this:
2021-04-09 17:40:20 ERROR (MainThread) [custom_components.google_home] Timeout fetching sensor data

later on, but I thought that way we can know where the timeout precisely comes from.
If you judge that unnecessary, please do not hesitate to discard that PR. I'll keep that change private ;-)

Also, one of my device is constantly in a timeout, maybe allowing to set the timeout as an option in the config flow could be helpful. but I guess that would be another PR!

@vlebourl First of all you have to use pre-commit and make sure that everything passes if you want your PR to be reviewed. 😄 See  [Contributions.md](https://github.com/leikoilja/ha-google-home/blob/master/CONTRIBUTING.mdl.
Second, this just print there error. We still need a way to handle it. But first we need to understand why it is happening with some device and not others.

We shouldn't actually catch generic Exception. Instead we need to list exceptions which we're expecting to get. Everything else should go to the top level and be reported as a bug.


[Site] Fixed Features Page

Signed-off-by: Nikhil Sharma<EMAIL_ADDRESS>Description

Fixed Features Page styling
Linked Get Started button to a correct section in docs for users to read more about it

Screenshot

Notes for Reviewers

Took reference of PR's made for features page in meshery.io
Let me know if there are any other changes we can make.

Signed commits

[x] Yes, I signed my commits.

Again, LGTM ! Thanks @NikhilSharma03

Eat, Sleep, Make PR, Repeat :rofl:


About processing video

Your work is amazing. I tried it on few sample images and it work well in term of both speed and accuracy. Then, I tried to modify it for addressing face detecting in video file, but the processing time for each frame was so long. Can you provide me code for running with video, or any suggestions about it?
This is what I tried ("txt" format for github's supporting):
video.txt

Hi,
i have used your video.py file for live detection in usb (lap spec 4GB RAM) , i got 27 to 30 fps. Thanks for your file

Hello, I would like to ask how did you solve this problem. thank you！


how to train my own darasets?

how to get det1.npy ,det2.npy?
how to train my own darasets?
thanks

Npy files are in ./align. You can get the faces extracted from the process and the way on how to train depends on your model.


Filter on single dict?

The leopards library is brilliant.
Question: Currently it seems the library only operates on a list. Can it operate on a single dict? Then it could be used to efficiently read and parse large jsonl files
Something like:
filter = {'name__contains':"k", "age__lt":20}

with open(filename, "r") as f:
    for raw_line in f:
        d = loads(raw_line.strip())
        if Q(d, filter):
            # keep value

Sorry, I just saw this, I had crazy few days
What if you write it like this
filter = {'name__contains':"k", "age__lt":20}
with open(filename, "r") as f:
for raw_line in f:
d = loads(raw_line.strip())
if len(list(Q([d], filter)))>0:
# keep value

Sorry, I just saw this, I had crazy few days
What if you write it like this
filter = {'name__contains':"k", "age__lt":20}

with open(filename, "r") as f:
    for raw_line in f:
        d = loads(raw_line.strip())
        if len(list(Q([d], filter)))>0:
            # keep value

Sure, that works! Seems like parsing JSONL is a perfect use case for your library, would be nice to either work on a single value or even process a file directly.

The problem is that the Q needs an iterable object, and in dict, the iterable will be the dict keys, so it will be confusing to the library.
Reading files is out of scope, but the plan is to write a document to show how to read/parse different file types.


Clarify whether assistance support includes security patches

On our release support policy page, we outline the different levels of support we offer for CockroachDB releases. It is not currently clear from this page whether we will continue to offer security patches for releases in the "assistance support" window. We should add a bullet that indicates that we do still offer critical security fixes to all releases in the support window, including releases in the "assistance support" window.

Yes


PowerToys v0.86.0: replacing keyboard keys not working in new release

Microsoft PowerToys version
0.86.0
Installation method
Microsoft Store
Running as admin
Yes
Area(s) with issue?
Keyboard Manager
Steps to reproduce

remapping the key "" to "Ctrl" failed though it was working on previous releases
✔ Expected Behavior
when pressing "" on wireless keyboard i want the keyboard to map this key to right control (Ctrl)
❌ Actual Behavior
Powertoys keep writing "" and the mapping function is not working
Other Software
No response

I'm seeing the same issue: I'm trying to disable Caps Lock with Keyboard Manager, but it's not working anymore

/bugreport

Attaching zipfile. Some more info: if the PowerToys window is minimized to the system tray the setting of cap lock to "disable" has no effect. If the either the quick access or the full setting window is open, the disable does work.
PowerToysReport_2024-12-27-11-09-17.zip


Release config for CD

Is there anything else that this pull request does than move elsa endpoint from the main config to the integration config.


[Concurrency] Disallow global actor annotations on stored properties of structs

They don't make sense because stored properties of structs have the
isolation of their enclosure values. Fixes rdar://70881253

@swift-ci please smoke test and merge

@swift-ci please smoke test


Settings: searching a setting should reveal it also on the right hand side

Steps to Reproduce:

have enough settings that you can scroll some out of view
search for settings

=> only the left hand side reveals the settings
Wouldn't it make sense to also reveal the setting on the right hand side if found?

They get revealed when you try to navigate by pressing Enter.
Agreed to reveal the first match immediately.

@sandy081 I had no idea one could do that, thanks!
I've usually been triggering Find Next only to get the search bar to show up. Perhaps it should show up also on Find -- if one wants to find something on the left side there's already the other ginormous search bar available.

@fabiospampinato Not sure if I understand. May I know which Find Next action you are talking about?

@sandy081 I'm talking about the Find Next action available in the command palette, which triggers editor.action.nextMatchFindAction, which makes the search bar show up:

@fabiospampinato command+f focuses Search bar from left / right hand side editors.

@sandy081 yes, but I'm talking about the search bar for the right side:

As I mentioned I didn't know that Enter could be used to navigate results.

@fabiospampinato I am Confused 😕 . Lets get terminology in sync. I call the big Search bar as Search bar and the small one in the right hand editor Find widget.

From Left hand side editor or right hand side editor, if you type cmd+f, the big Search bar gets focussed.

If you want to override the above behaviour and open Find widget when you type cmd+f in the right hand side editor, you can do following
Open Keybindings.json from Keybindings editor and add following entries
 {
    "key": "cmd+f",
    "command": "-settings.action.search",
    "when": "inSettingsEditor"
  },
  {
    "key": "alt+cmd+f",
    "command": "settings.action.search",
    "when": "inSettingsEditor"
  }

@sandy081 Alright. What I'm saying is that before knowing that I could use Enter in the Search bar for searching on the right side,  I used to trigger Find Next while the right side was in focus, in order to get the Find widget to show up, so that I could perform a search on the right side.
Basically this:

Instead of this:

Thanks for the suggestion but that would make cmd+f inconsistent, because if triggered from the right side you get a Find widget but if triggered from the left side it does nothing, and I don't like that.

Ok. Good that you can use the Search Bar for both editors.

Actually it turns out I can't. If I search for tab.activeBorder, which is one of the settable colors, the whole workbench.colorCustomizations block gets highlighted instead, so I still have to search in it manually or fallback to the "Find Next" trick I mentioned.


add_discordant_edge error when ruuning reconstruct

Hello,
I am running reconstruct using Nanopore long read data and getting the following error:
It works fine for most data, but I got the error with certain data.
Traceback (most recent call last):
  File "~/CoRAL/src/CoRAL.py", line 145, in <module>
    reconstruct_mode(args)
  File "~/CoRAL/src/CoRAL.py", line 23, in reconstruct_mode
    infer_breakpoint_graph.reconstruct(args)
  File "~/CoRAL/src/infer_breakpoint_graph.py", line 1656, in reconstruct
    b2bn.build_graph()
  File "~/CoRAL/src/infer_breakpoint_graph.py", line 1037, in build_graph
    self.lr_graph[amplicon_idx].add_discordant_edge(bp[0], bp[1], bp[2], bp[3], bp[4], bp[5], lr_count = len(bp[-1]), reads = bp[-1])
  File "~/CoRAL/src/breakpoint_graph.py", line 199, in add_discordant_edge
    raise Exception("Breakpoint node must be added first.")
Exception: Breakpoint node must be added first.

Below is the script:
## Python v3.10.14
## CoRAL v1.0.0

./CoRAL/src/CoRAL.py reconstruct \
--lr_bam ONT.bam \
--cnv_seed CN6_SEEDS.bed \
--output_prefix sample \
--cn_seg cncf.bed \
--log_fn sample \

I noticed that in the build_graph function, there was a case where 2nd bp in self.new_bp_list was included in split_int and the 1st bp was not included, and this seemed to be the cause of the error.
It seems that the error can be avoided by changing the script as follows.
However, I am worried that this may affect the analysis results.
Is anyone else dealing with this kind of issue?
Here is modified code: src/infer_breakpoint_graph.py.
	def build_graph(self):
		"""
		Organize the identified discordant edges into a list of breakpoint graphs, stored in lr_graph
		Each graph represent a connected component of amplified intervals, i.e., amplicon
		"""
		# Split amplified intervals according to discordant edges
		split_int = dict()
		for bpi in range(len(self.new_bp_list)):
			bp = self.new_bp_list[bpi]
			for ai in range(len(self.amplicon_intervals)):
				seg = self.amplicon_intervals[ai]
				if (bp[0] == seg[0] and seg[1] < bp[1] < seg[2]) or (bp[3] == seg[0] and seg[1] < bp[4] < seg[2]):
					if bp[2] == '+':
						try:
							split_int[ai].append((bp[1], bp[1] + 1, bpi, 1, '+'))
						except:
							split_int[ai] = [(bp[1], bp[1] + 1, bpi, 1, '+')]
					if bp[2] == '-':
						try:
							split_int[ai].append((bp[1] - 1, bp[1], bpi, 1, '-'))
						except:
							split_int[ai] = [(bp[1] - 1, bp[1], bpi, 1, '-')]
					if bp[5] == '+':
						try:
							split_int[ai].append((bp[4], bp[4] + 1, bpi, 4, '+'))
						except:
							split_int[ai] = [(bp[4], bp[4] + 1, bpi, 4, '+')]
					if bp[5] == '-':
						try:
							split_int[ai].append((bp[4] - 1, bp[4], bpi, 4, '-'))
						except:
							split_int[ai] = [(bp[4] - 1, bp[4], bpi, 4, '-')]
				#if bp[3] == seg[0] and seg[1] < bp[4] < seg[2]:
				#	if bp[5] == '+':
				#		try:
				#			split_int[ai].append((bp[4], bp[4] + 1, bpi, 4, '+'))
				#		except:
				#			split_int[ai] = [(bp[4], bp[4] + 1, bpi, 4, '+')]
				#	if bp[5] == '-':
				#		try:
				#			split_int[ai].append((bp[4] - 1, bp[4], bpi, 4, '-'))
				#		except:
				#			split_int[ai] = [(bp[4] - 1, bp[4], bpi, 4, '-')]

Thanks

It appears that  the error can be avoided by simply commenting out the Exception.
src/breakpoint_graph.py
	def add_discordant_edge(self, chr1, pos1, o1, chr2, pos2, o2, sr_count = -1, sr_flag = 'd', \
				sr_cn = 0.0, lr_count = -1, reads = set([]), cn = 0.0):
		"""
		Add a discordant edge to the graph.
		"""
		if (chr1, pos1, o1) not in self.nodes or (chr2, pos2, o2) not in self.nodes:
			logging.debug("#TIME " + '%.4f\t' %(time.time() - global_names.TSTART) + "### Exception Breakpoint node must be added first. Continue::" + str(chr1) + ":" + str(pos1) + " " + str(o1) + "  " + str(chr2) + ":" + str(pos2) + " " + str(o2) )
			#raise Exception("Breakpoint node must be added first.")
		else:
			ld = len(self.discordant_edges)
			self.nodes[(chr1, pos1, o1)][2].append(ld)
			self.nodes[(chr2, pos2, o2)][2].append(ld)
			if (chr1, pos1, o1) in self.endnodes:
				self.endnodes[(chr1, pos1, o1)].append(ld)
			if (chr2, pos2, o2) in self.endnodes:
				self.endnodes[(chr2, pos2, o2)].append(ld)
			self.discordant_edges.append([chr1, pos1, o1, chr2, pos2, o2, sr_count, sr_flag, sr_cn, lr_count, reads, cn])


How does one unenroll a device that was enrolled using the deployment script?

Hi, how does one unenroll a device that was enrolled using the deployment script?  Thanks.

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

ID: 4273a259-c3c7-dca7-6353-954068d740a7
Version Independent ID: 1084ea77-95c4-4e4a-da6c-f4d8668f9ebf
Content: Enrolling devices in Windows Analytics (Windows 10)
Content Source: windows/deployment/update/windows-analytics-get-started.md
Product: w10
Technology: windows
GitHub Login: @jaimeo
Microsoft Alias: jaimeo

@officedocsbot assign @e0i

@RNCRyan
The issues section of this repository is intended for product documentation issues only.
Please consider opening a product support ticket by the following link below for your question so that it gets answered quickly.
Windows 10 Support
Thank you.

@officedocsbot close


Clickable graphs [feature request]

Making graphs clickable at various points to intuitively narrow down a search would be convenient. I have no idea how easy/difficult this is, but putting it in here to see if you like the idea.
Two currently obvious places:

with treemaps, clicking on a rectangle would apply an additional filter of the account clicked on, going to a page as if the account was clicked
with bar graphs used in monthly plots, clicking would apply an additional filter of the month clicked on, to the existing account

I created a new branch called clickable-graphs where I implemented three things:

In line charts you can now zoom by dragging a rectangle over the desired zoom area
In bar charts you now can click on individual bars to filter for that month (all bar charts show months right now)
In tree maps the label is now better clickable and leads to the corresponding account

@redstreet Can you test the changes? Do they work for you and as you expect?

Already merged into master.

Treemaps work great! The bar and line charts work nicely too. A couple suggestions:

line charts: works fine, but in terms of expectations, if I zoom in, I expected a time filter to be applied to the entire current view - including the table and the remaining charts. Instead, the line chart time axis gets out of sync with the table data and the remaining graphs

bar charts: it would be nice if these were also zoomable by dragging a rectangle just like line charts. Also keeps the user experience consistent

@redstreet Thanks for the feedback!

Line charts now also set the time filter.
Bar charts do the same. With Bar charts there is a bit of fuzziness, because the JavaScript-library beancount-web uses for the chart-zoom-feature does not support Bar charts natively, so I had to code it myself.

One piece of feedback here: when I click to zoom or select on a bar chart or treemap, and when the page subsequently reloads with the new filter, I'm left seeing the line chart. If it's easy to put the user back on the same chart (bar or treemap) rather than return them to a line chart, it would make for a smoother experience.


[MRG] Save name attribute of Epochs.

Closes https://github.com/mne-tools/mne-python/issues/4012

Does this fix the mailing list issue?

I dug up their problem, it is like this:
FYI, I have my evokeds built in a conditions list loop, where the actual evokeds are stored as keys in a dictionary.
Something like this:

for condition in conditions:
    epochs[str(condition) + '_epochs'] = mne.Epochs(params...)
    evoked[str(condition) + '_evoked']= epochs[str(condition) + '_epochs'].average()
    evoked_list.append(evoked[str(condition) + '_evoked'])

mne.write_evokeds(fname_evoked, evoked_list)

I'm pretty sure I was able to reproduce it.

why do we need .name and .comment attributes?

I suppose that's an usage issue. If you want to name the epochs, it should be passed as a parameter.

As in mne.Epochs(params..., name=condition).

I've never seen anyone using name=condition
maybe it was YAGNI from the start...

I suppose that's an usage issue. If you want to name the epochs, it should be passed as a parameter.

I don't think so -- epochs[key].average() should give a reasonable evoked.comment regardless of (or maybe integrating) what epochs.name was. We just need to add to the averaging function in BaseEpochs that it needs to pass a reasonable comment to the Evoked constructor. It could be something like 0.1 * aud_l + 0.9 * aud_r if there were 10% aud_l trials and 90% aud_r trials in the average, and just aud_l if there are only aud_l trials in the average.
I also doubt people were really using epochs.name, given that it wasn't saved. I don't feel strongly about fixing or removing it. @agramfort you favor removal?

Codecov Report

Merging #4031 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #4031      +/-   ##
==========================================
+ Coverage   86.02%   86.02%   +<.01%
==========================================
  Files         350      350
  Lines       63307    63312       +5
  Branches     9654     9654
==========================================
+ Hits        54459    54467       +8
+ Misses       6163     6161       -2
+ Partials     2685     2684       -1

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 8c88601...7deccaf. Read the comment docs.

yes I would remove with proper deprecation and try to have meaning full
.comment attribute automatically

The way I see it is that epochs is a dictionary, since Epochs does not support item assignment. If you do have an instance of Epochs with reasonable event_ids, it propagates to evoked as you suggest.

@jaeilepp can you clarify? I'm not sure what you're saying

The code snippet says epochs[str(condition) + '_epochs'] = mne.Epochs(params...). In this context it looks like epochs is a dict not an instance of Epochs.
If you would do epochs = mne.Epochs(params..., name=...) the name would become the comment in evoked. If you have dict as the event_id, doing epochs['name'].average() the 'name' will become the comment. See the tests I added.

Ahh, I see what you mean. I missed that in their code.
It sounds like @agramfort prefers removing .name. Once we do that, you'll probably need to do some logic like I outlined above to set the condition name for Epochs(...).average(), then.

with the current code when I read an epo.fif file I get the deprecation warning. So for example by running the tuto plot_object_epochs.py I get the warning. We should not have deprecation warnings in the doc.
also name is deprecated to be it's weird to get:
In [15]: epochs['Auditory'].name
Out[15]: 'Auditory'

if it's deprecated is should not be used anymore.
am I missing something?

I'm not sure what you mean. I get no warning when running plot_object_epochs.

also name is deprecated to be it's weird to get:
In [15]: epochs['Auditory'].name
Out[15]: 'Auditory'

We should probably leave name as a private attribute at least. It is used to propagate the selection to evoked.comment.

I would fully deprecate the .name attribute and to propagate the .comment I
would add a .comment to Epochs so there is no naming ambiguity.
wdyt?

I think name should still be there for 0.14 to allow standard deprecation cycle.

yes ok but you should get a deprecation when trying to access the .name
attribute

We should probably leave name as a private attribute at least. It is used to propagate the selection to evoked.comment.

Can you move the logic for computing this string to .average, or is ._name / ._comment going to be used other places, too?

It also needs to work for standard error, so really the logic should go in _compute_mean_or_stderr

I would make name a property that uses a new comment attribute and throws a warning when you access it so we can then deprecate it safely
Clear ?

Like this? I don't understand what you mean by comment attribute.

can you check that you don't get any warning the examples or tests due to
this?

Now the warning should only come in the tests when reading a file with name saved.

I'm confused, I thought the attribute was never saved (prior to this PR at
least)?

LGTM +1 for merge

@agramfort feel free to merge if you're happy

pushed a tiny fix  + updated what'new
let's merge when CIs are happy

Fine with me, whoever sees it green first feel free to merge


sync function signatures get garbled in the output

Dart sync functions are garbled in the generated output because of a badly generated signature:
https://github.com/JeroMiya/xamarin.flutter/blob/master/FlutterSDK/src/Foundation/Diagnostics.cs#L1092-L1094
    private Iterable<string> _WordWrapLine(string message, List<int> wrapRanges, int width, int startOffset = 0, int otherLineOffset = 0)
sync
*
{

Looks mostly correct except for the extra "sync *" output before the opening brace.

Fixed in https://github.com/JeroMiya/xamarin.flutter/pull/42


There should be a way to add a model to the store without it being isNew

const newTodo = store.add('todos', {})
const notNewTodo = store.add('todos', { id: 1 })

$> newTodo.isNew
=> true
$> notNewTodo.isNew
=> true

There's no way to add a model to the store without it being isNew

Wasn't able to repro this in tests, so I'm going to close this


Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=<IP_ADDRESS>

Describe the bug
Starting my app I get this output and then it dies:

Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

This has worked with .NET Core 2.1 but fails with 2.2. Lots of other things have changed, I have no details on those.
What does that error mean? I'm not using this namespace, it must be something that runtime needs and has added. I know nothing about that.
To Reproduce
Sorry, no details available, it's a complex application in pre-production that is now not running. It uses EF Core.
Expected behavior
No error
Additional context
A self-contained publishing works. So it must be a problem with the installed .NET Core runtime. I guess installing the runtime on a production system is a bad idea anyway. I'm going to clean up my workflow and only use self-contained builds in the future to avoid such errors.
dotnet --info:
.NET Core SDK (gemäß "global.json"):
 Version:   2.1.400
 Commit:    8642e60a0f

Laufzeitumgebung:
 OS Name:     ubuntu
 OS Version:  16.04
 OS Platform: Linux
 RID:         ubuntu.16.04-x64
 Base Path:   /usr/share/dotnet/sdk/2.1.400/

Host (useful for support):
  Version: 2.2.2
  Commit:  a4fd7b2c84

.NET Core SDKs installed:
  2.0.3 [/usr/share/dotnet/sdk]
  2.1.4 [/usr/share/dotnet/sdk]
  2.1.400 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.0.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Sorry, no details available, it's a complex application in pre-production that is now not running. It uses EF Core.

You're going to have a make an effort to give us a repro (unless somebody else is aware of a known issue here).


summary_api can't enable (KubeletVersion: "v1.2.0-36-g4a3f9c5")

(dlv) p info
k8s.io/heapster/metrics/sources/summary.NodeInfo {
k8s.io/heapster/metrics/sources/kubelet.Host: k8s.io/heapster/metrics/sources/kubelet.Host {
IP: "<IP_ADDRESS>",
Port: 10250,
Resource: "",},
NodeName: "origin-master.tacy.com",
HostName: "origin-master.tacy.com",
HostID: "origin-master.tacy.com",
KubeletVersion: "v1.2.0-36-g4a3f9c5",}
https://github.com/kubernetes/heapster/blob/master/metrics/sources/summary/summary.go#L129 return false
"alpha" > "36"

@timstclair when summary api was introduced?

That check is accurate, the summary was introduced in v1.2.0-alpha.8 (v1.2.0 was the first stable release that included it). I believe semver just does a lexicographical comparison for everything after the -. It looks like you're trying to build a custom version of the Kubelet? If so, a simple fix would be to just add a custom tag (e.g. v1.2.0-patch-foo), so long as it's ordered after alpha it should work. Alteranatively, you could just rebase on a new release (e.g. 1.2.1).

Thanks @timstclair!
@tacy could you please try what @timstclair proposed? I'm closing this, please reopen in case it won't help.


Process aborted by std::terminate()

Just a HTTP 401 error causes abnormal process shutdown from the library.
I don't understand the whole design yet, but I assume that it is a little bit too rough.
https://github.com/zeroxs/aegis.cpp/blob/391457cd748fc429003b5127e31ae0acad5a8a4d/include/aegis/impl/core.cpp#L655-L660
Do you have difficulties in restoring the state, for example?
https://github.com/zeroxs/aegis.cpp/commit/44e4c4529705f549f30251a0f69631a246080ab7

I've been having these too and been unable to pin them down. If you're sure it's caused by a http 401 i could easily duplicate this issue, and i'll have a look into fixing it :-)

can you please have a play with the library and confirm if this is fixed? I reverted a PR which could potentially have caused this by regression, the promise code seems a little hairy and fragile and the fix for that caused other knock-on issues.


x/build/maintner: be confident that returned GerritCL.Status always has one of documented values

GerritCL.Status is documented as:
// Status will be "merged", "abandoned", "new", or "draft".
Status string

We want clients of maintner API to be confident in that statement, and not have to doubt it by adding their own "if cl.Status is something else" checks (which is annoying to have to do).
This issue is to verify/confirm that's the case. I believe it is, but @bradfitz asked me to file this in CL 107296:

@bradfitz: Can you file a separate issue about that and I can investigate and ask the Gerrit team if needed?

@bradfitz, the comment at https://github.com/golang/build/blob/1cecfeb6894c2cbcf619a03313fdf731306caee5/maintner/gerrit.go#L599-L603 says:
// The Go Gerrit site does not really use the "draft" status much, but if
// you need to test it, create a dummy commit and then run
//
//     git push origin HEAD:refs/drafts/master

I tried that just now, and got:
$ git push origin HEAD:refs/drafts/master
Counting objects: 6, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (6/6), 835 bytes | 417.00 KiB/s, done.
Total 6 (delta 3), reused 0 (delta 0)
remote: Resolving deltas: 100% (3/3)
remote: Processing changes: refs: 1, done
To https://go.googlesource.com/build
 ! [remote rejected] HEAD -> refs/drafts/master (private changes are disabled)
error: failed to push some refs to 'https://go.googlesource.com/build'

So, should we still support draft status? In the entire maintner corpus right now, there are only 2 CLs that have "draft" status:
draft: go.googlesource.com/build 38720
draft: code.googlesource.com/gocloud 11714

Both of them show 404 in Gerrit UI for me:

https://go-review.googlesource.com/c/build/+/38720
https://code-review.googlesource.com/c/gocloud/+/11714

Also, Gerrit API docs at https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#change-info say that the ChangeInfo.Status field can only have these values:
The status of the change (NEW, MERGED, ABANDONED).

I need to decide how to handle "draft" status here, and given how unhelpful draft CLs are, the best option seems to be to ignore them.
It might be better to do that in maintner so that all of its clients don't have to filter out draft CLs themselves. Unless you think there's some use for them?


Want to add images in about.md with markdown

Hi, first of all great theme!
I want to add images to a post (in this case the about.md file) other than using the images array provided in the header.
My goal is to integrate images in the text.
I used the following without success:
![Alt text](../assets/images/banner.png)
{{< figure src="../assets/images/banner.png" title="banner" >}}
<img src="../assets/images/banner.png">

I tried using absolute path, relative path.
When I am using an image from arandom source from the internet the image is rendered. However, if I try using an image like the already existing banner.png rendering fails?
What am I doing wrong? ;)
BR and Thx
Phil

@PhilEndr
Files in the asset folder are processed by hugo and renamed.  Look at the example below in my public folder
public/images
├── about_hucad548a36c746548e4169d30041223ab_460485_3000x0_resize_box_3.png
├── about_hucad548a36c746548e4169d30041223ab_460485_800x418_fill_box_center_3.png
├── banner_hu3e75864d8ed91e38e53620f375b9d21f_93854_800x418_fill_box_center_3.png <<==== banner renamed

I referenced the image like this in markdown and it worked
![alt text](/images/banner_hu3e75864d8ed91e38e53620f375b9d21f_93854_800x418_fill_box_center_3.png)

I'm not sure that the filename would be constant between builds.  I suggest making copies of the images and adding them to the static and referencing them from there.
Images in static will not be touched in builds.

Hi @PhilEndr, do you still have that issue?

it is also important to say, to create a corresponding subfolder in static for the page  - and put the pictures in there

[!WARNING]
This project is currently not being actively maintained.
Please do not create new issues on GitHub.


feat(GroupTheory/Submonoid/Units): Add Submonoid.units and related definitions and lemmas.

The subgroup of the type of units added in this PR is something we have in other guises, which are somewhat less useful for some forms of working. The intention is to provide different options depending on how you want to think about the group of units in a submonoid.

This PR came out of this Zulip chat. https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/Submonoid.20units
The discovery of the Galois connection currently mentioned in the todo has convinced me this is a useful construction which we should have. I have further work which depends on this but I want to focus on this PR first.

Can you please merge master here?

bors r+


feat: OpenID Connect Federation 1.0

covers https://github.com/italia/eudi-wallet-it-python/issues/52
this branch contains the federation features that must be integrated in the trust evaluation methods of the backend
tasks:

[ ] resolve issue #52
[ ] unit tests (see mocked responses examples: https://github.com/italia/spid-cie-oidc-django/tree/main/spid_cie_oidc/entity/tests)

The test files to be migrated in this project are the ones listed below
mocked responses
Allows to use the http client for requesting several EC and ES and collecting the trust chain we desire for tests.
https://github.com/italia/spid-cie-oidc-django/blob/main/spid_cie_oidc/authority/tests/mocked_responses.py
this is required as it is, just remove the django refs/deps
https://github.com/italia/spid-cie-oidc-django/blob/main/spid_cie_oidc/entity/tests/test_09_trust_chain.py
this requires the file trust_chain_operations.py (TO BE MIGRATED and integrated with the storage interface)
https://github.com/italia/spid-cie-oidc-django/blob/main/spid_cie_oidc/authority/tests/test_02_trust_anchor_intermediary.py#L272


Documentation: Collation Jonathan

Edited author to show correct collation

Coverage remained the same at 92.789% when pulling 8fcce1a82e7451d7362f914253f75578d6d60585 on nahtanojmil:Collate into 6dcfb4630675d2e395222b30bf7c25cfcf9709e6 on CS2103AUG2017-T16-B2:master.


Update Composer dependencies (2024-07-30-00-18)

Visual regression test passed!
View the visual regression test report


Finding It Hard To Sniff Traffic Using Charles With Android Because Of Android Security Measures

Hey Guys,
So I'm trying to sniff traffic into the Instagram app on my android phone using Charles to find an API and build a new feature into the private API but I can't sniff in because of some android security measures. Have any of you experience this before. I really need helping to bypass this. Thank you

+1.
I was able to do this about a year ago. But now it is not working.

@ckm100 @dilame you need to decompile and recompile apk with proxy, otherwise use iphone

@ckm100 you can use old apk version. 10.3.0 is the last one without this protection.

@IvanMMM Thanks for the suggestion. I have tried it out and it worked.

@IvanMMM @dilame You have any idea how to get the location and gender of an Instagram user. I'm trying to build that feature and need some ideas. I'm just wondering how Instagram manage to build that feature for the business account. Thanks


ND4J protobuf version: incompatible with hadoop-hdfs

hadoop-hdfs 2.2.0 uses protobuf 2.5.0
ND4J uses protobuf 3.4.0
The simplest solution here is probably to shade ND4J's version, for internal use.
These appear to be incompatible. For example, when both are on the classpath:
https://gist.github.com/AlexDBlack/5dacba5af2183a233d42deba9a5af4a8

Looking at this again: it might not be quite so simple: we've got a whole lot of TF Java code here - https://github.com/deeplearning4j/nd4j/tree/master/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf
This would need to be either renamed, or (ideally) we use an external hosted library (that can be shaded)...

Looking at this again: it might not be quite so simple - we use the protoc-jar-maven-plugin, which generates a bunch of sources in nd4j-api
https://github.com/deeplearning4j/nd4j/blob/master/nd4j-backends/nd4j-api-parent/nd4j-api/pom.xml#L37-L79
Note that these generated sources are excluded in git: https://github.com/deeplearning4j/nd4j/blob/master/.gitignore#L261-L262
However, these generated sources reference the maven protobuf dependency directly. For example, the AllocatorMemoryUsed class:
public  final class AllocatorMemoryUsed extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.AllocatorMemoryUsed)
    AllocatorMemoryUsedOrBuilder {
private static final long serialVersionUID = 0L;
  // Use AllocatorMemoryUsed.newBuilder() to construct.
  private AllocatorMemoryUsed(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private AllocatorMemoryUsed() {
    allocatorName_ = "";
    totalBytes_ = 0L;
    peakBytes_ = 0L;
    liveBytes_ = 0L;
    allocationRecords_ = java.util.Collections.emptyList();
    allocatorBytesInUse_ = 0L;
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private AllocatorMemoryUsed(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();

Thus, to shade our version of protobuf, we would also need to somehow get the protoc-jar-maven-plugin to directly use the shaded dependencies instead. Reading the notes here, I don't believe this is possible already: https://github.com/os72/protoc-jar-maven-plugin
That said that this may well be possible with (essentially) a find + replace on com.google.protobuf to say org.nd4j.shade.protobuf on the generated sources...

It would also cause problems for anyone trying to use/extend those
definitions from outside ND4J...


Expose epoll errno on eventfd read and write failure

Motivation:
Exposing the errno let's Java code handle the errors more precisely
Modification:

Make eventFDRead throw a ChannelException rather then RuntimeException
Make eventFD writes also throw with the errno
Add a NativeChannelException, to keep the exception type for reads and
writes

Result:
Better handling of native errors

Factored out of https://github.com/netty/netty/pull/9187

@carl-mastrangelo I think we can just close this and apply https://github.com/netty/netty/pull/9192 ... I added you as co-author FTW :)


Confidence Scores no longer add to 1 in 3.2-preview.2

Looking to see if this is a regression. Issue  for tracking purposes (MS internal only)

What is the behavior in 2022-04-01-preview? Can we enable it again?


ToC and schema map

Acrolinx Scorecards
A minimum Acrolinx score of 80 is required.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
AcrolinxScore
LowestCategoryScore
Issues
Scorecard
Processed

enterprise-graph/schema-map-concepts.md
75
48
30
link
:white_check_mark:

enterprise-graph/toc.yml

link
:warning:

More info about Acrolinx

Install Acrolinx locally for VSCode
False positives or issues

OPS Build status updates of commit 0729597:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

enterprise-graph/toc.yml
:x:Error

Details

enterprise-graph/toc.yml

[Error] W:\wo3u-s\enterprise-graph\toc.yml is not a valid TOC File: W:\wo3u-s\enterprise-graph\toc.yml is not a valid TOC file, detail: (Line: 43, Col: 5, Idx: 1298) - (Line: 43, Col: 6, Idx: 1299): While parsing a block mapping, did not find expected key..
[Error] W:\wo3u-s\enterprise-graph\toc.yml is not a valid TOC File: W:\wo3u-s\enterprise-graph\toc.yml is not a valid TOC file, detail: (Line: 43, Col: 5, Idx: 1298) - (Line: 43, Col: 6, Idx: 1299): While parsing a block mapping, did not find expected key..
[Error] Unable to load file 'toc.yml' via processor 'ExperimentalTocDocumentProcessor': W:\wo3u-s\enterprise-graph\toc.yml is not a valid TOC File: W:\wo3u-s\enterprise-graph\toc.yml is not a valid TOC file, detail: (Line: 43, Col: 5, Idx: 1298) - (Line: 43, Col: 6, Idx: 1299): While parsing a block mapping, did not find expected key..
[Error] Unable to load file 'toc.yml' via processor 'TocDocumentProcessor': W:\wo3u-s\enterprise-graph\toc.yml is not a valid TOC File: W:\wo3u-s\enterprise-graph\toc.yml is not a valid TOC file, detail: (Line: 43, Col: 5, Idx: 1298) - (Line: 43, Col: 6, Idx: 1299): While parsing a block mapping, did not find expected key..

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Acrolinx Scorecards
A minimum Acrolinx score of 80 is required.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
AcrolinxScore
LowestCategoryScore
Issues
Scorecard
Processed

enterprise-graph/schema-map-concepts.md
75
48
30
link
:white_check_mark:

enterprise-graph/toc.yml
100
100
0
link
:white_check_mark:

More info about Acrolinx

Install Acrolinx locally for VSCode
False positives or issues

OPS Build status updates of commit fc4ef02:
:warning: Validation status: warnings

File
Status
Preview URL
Details

enterprise-graph/toc.yml
:warning:Warning

Details

enterprise-graph/schema-map-concepts.md
:white_check_mark:Succeeded

enterprise-graph/toc.yml

Line 0: [Warning] Invalid file link:(~/enterprise-graph-overview.md).

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Added Federico Maggi as a Community Stars

Hi Anders
Thank you for merging Rond. We would like to add the developer who maintains the repo as a Community star to foster the innovation around OPA and RBAC services. We had his permission to add to the list.
Bye

That makes us two then :)


Xbox One gamepad "View" button is not detected on android 12+

Godot version
3.5.1 stable
System information
Android 12 - Samsung A12
Issue description
On android 12+, the "view" button doesn't work.
Steps to reproduce
Create a new Godot Project and assign an action to view button (select-playstation, "-" button on switch). Export and install on android (I tested on Android 12) It's the only button that doesn't work.
Minimal reproduction project
No response

Does the same button work in other Android games? Does it work on desktop platforms?

@Calinou yes, the button is working in other games, and is working in old godot version (I tested in a game made with godot 3.3.3). On PC platforms there are no problems

@dannygaray60
Hey, could you please try the bug I reported for android?
This bug needs to be checked.
https://github.com/godotengine/godot/issues/67127

@Torguen on Android 12 and with a Xbox One Gamepad (2nd gen, without Share button) the axis works fine. #67127

Tested in Godot 4.0 stable + Android 13. The view button doesn't works

Any way to patch this?

Tested with Android13 and Xbox Series X controller, have the same issue in Godot4.2 beta1...

Tried with Godot 3.6beta5 and the result is the same... however the "share" button is detected, but show this error:
E 0:08:20.811   joy_button: Index p_button = -38 is out of bounds (JOY_BUTTON_MAX = 128).
  <C++ Source>  main/input_default.cpp:888 @ joy_button()

But with the "view" button nothing happens. Is this a problem of godot or SDLmapping list?


Introduce @flatten annotation

closes #623
This PR introduces the @flatten annotation.
Usage
The @flatten annotation can only be applied to:
Case Classes: Flatten fields of a nested case class into the parent structure.
Immutable Maps: Flatten key-value pairs of a Map[String, _] into the parent structure.
case class A(i: Int, @flatten b: B)
case class B(msg: String)
write(A(1, B("Hello"))) // {"i":1, "msg": "Hello"}

case class A(i: Int, @flatten map Map[String, String])
val map = Map("a" -> "1", "b" -> "2")
write(A(1, map)) // {"i":1, "a":"1", "b": "2"}

Nested flattening allows you to apply the @flatten annotation recursively to fields within nested case classes. This results in all fields from the nested structures being merged into the top-level JSON.
case class Outer(msg: String, @flatten inner: Inner)
case class Inner(@flatten inner2: Inner2)
case class Inner2(i: Int)

write(Outer("abc", Inner(Inner2(7)))) // {"msg": "abc", "i": 7}

The Reader also recognizes the @flatten annotation.
case class A(i: Int, @flatten b: B)
case class B(msg: String)
read("""{"i": 1, "msg": "Hello"}""") // The top-level field "msg": "Hello" is correctly mapped to the field in B.

For Map, during deserialization, all key-value pairs in the JSON that do not directly map to a specific field in the case class are attempted to be stored in the Map.
If a key in the JSON does not correspond to any field in the case class, it is stored in the Map.
case class A(i: Int,@flatten Map[String, String])
read("""{"i":1, "a" -> "1", "b" -> "2"}""") // Output: A(1, Map("a" -> "1", "b" -> "2"))

If there are no keys in the JSON that can be stored in the Map, it is treated as an empty Map.
read("""{"i":1}""")
// Output: A(1, Map.empty)

If a key’s value in the JSON cannot be converted to the Map’s value type (e.g., String), the deserialization fails.
read("""{"i":1, "a":{"name":"foo"}}""")
// Error: Failed to deserialize because the value for "a" is not a String, as required by Map[String, String].

Limitations

Flattening more than two Maps is not supported. Flattening multiple Maps feels awkward to support because, when deriving a Reader, it becomes unclear which Map the data should be stored in.
Type parameters do not seem to be properly resolved in the following scenario:

 case class Param[T](@flatten t: T)
object Param {
   implicit def rw[T]: RW[Param[T]] = upickle.default.macroRW // compile error when this function is called to derive instance
  implicit val rw[SomeClass]: RW[Param[SomeClass]] = upickle.default.macroRW // works
}

When using the @flatten annotation on a Map, the key type must be String. (Allowing user-defined case classes as keys introduces a high risk of key conflicts, so I’ve restricted it to String.) Also, only immutable.Map is supported. This makes derivation of Reader simpler.

Implementation Strategy
Writer Derivation
From my understanding, deriving a Writer for a case class involves implementing a dispatch function that iterates through each field of the case class. In the existing implementation, the Writer is generated in the deriveClass method by processing the information of each field in the type T being derived.
this.writeSnippetMappedName[R, Int](ctx, upickle.default.objectAttributeKeyWriteMap("i"), implicitly[upickle.default.Writer[Int]], v.i);
this.writeSnippetMappedName[R, upickle.Nested](ctx, upickle.default.objectAttributeKeyWriteMap("n"), implicitly[upickle.default.Writer[upickle.Nested]], v.n);
ctx.visitEnd(-1)

When deriving a Writer, the above snippet shows how the visit function is invoked for each field, passing the corresponding field’s Writer as an argument. If the field is a Map or a case class and needs to be flattened, additional processing is required:

For case classes, Instead of delegating to the Writer of the nested case class, the visit function should be called directly for each field in the nested case class. For example:

this.writeSnippetMappedName[R, upickle.Int](ctx, upickle.default.objectAttributeKeyWriteMap("integerValue"), implicitly[upickle.default.Writer[upickle.Int]], v.n.integerValue);

For Map, Iterate through all key-value pairs in the Map, calling visit for each pair:

mapField.foreach { case (key, value) =>
  this.writeSnippetMappedName[R, $valueType](
    ctx,
    key.toString,
    implicitly[${c.prefix}.Writer[$valueType]],
    value
  )
}

Reader Derivation
Deriving a Reader is more complex, especially with support for Map, as it introduces several edge cases. A Reader is essentially a Visitor for JSON, as I understand it. The process involves three main steps:

Mapping read keys to indices.
Storing the read values in variables corresponding to the indices.
Constructing the case class instance from the read values after traversal.

To support flattening, additional steps were required in these stages:

Mapping Keys to Indices:
Flattened fields must be accounted for in the key-to-index mapping. For example:

case class A(@flatten b: B)
case class B(i: Int, d: Double)

// Without flattening
key match {
  b => 0
  _ => -1
}

// With flattening
key match {
  i => 0
  d => 1
  _ => -1
}

Allocate storage for flattened fields, similar to step 1, but extended to account for flattened structures.
Modify the class construction logic to recursively handle flattened fields.

Special Case for Maps:

Since Map must capture all key-value pairs not corresponding to a specific field, I implemented logic to handle this:

If a key’s index is -1 and the field is a flattened Map, the key-value pair is stored in a ListBuffer within the Reader.
These pairs are used during class construction to populate the Map.

Differences Between Scala 2 and Scala 3
In Scala 2, macros generate the entire Reader and Writer from start to finish. Before calling wrapCaseN, the macro recursively traverses the type being derived and constructs a tree containing all information including the flattened fields. This tree is then used when deriving the Reader or Writer.
In Scala 3, macros do not generate the entire Reader or Writer but instead focus on the specific parts needed for method implementations. Therefore, the approach used in Scala 2, where the entire type is analyzed and a tree is preconstructed, cannot be applied. The derivation process must handle flattened fields incrementally, as macros in Scala 3 operate at a more granular level.

@nox213 this looks great. Could you update the PR description with a summary of the implemented semantics, with examples, as well as a summary of the implementation strategy? That would make the PR much easier to review and merge

Sure, I’ll tag you when I’m ready.

@lihaoyi I polished the code a little and updated the PR.

@nox213 at I high level, would it be possible to implement this without the case class Field refactor? If we could preserve the existing method signatures mostly-in-place, we could add forwarders and maintain binary compatibility which would allow us to release this without a breaking major version

I guess more generally I'd like to see whether we can land this without breaking binary compatibility

I think this could work:

currentKey/storeToMap variables can be made binary compatible by moving them from the upstream trait into the various downstream impls

The macro changes could be made binary compatible by leaving the existing macros in place but deprecated, and just making a Macros2 class containing all the new implementations

For the Scala 2 vs Scala 3 approach, could we use the Scala 3 approach in Scala 2 as well? It's best to keep the two implementations mostly consistent, so future changes can be done more easily across both versions

case class Param[T](@flatten t: T)
object Param {
   implicit def rw[T]: RW[Param[T]] = upickle.default.macroRW // compile error when this function is called to derive instance
  implicit val rw[SomeClass]: RW[Param[SomeClass]] = upickle.default.macroRW // works
}

Can this be fixed by making it implicit def rw[T: RW]?

When using the @flatten annotation on a Map, the type of key must be String. (Allowing user-defined case classes as keys introduces a high risk of key conflicts, so I’ve restricted it to String.) Also, only immutable.Map is supported. This makes derivation of Reader simpler.
@flatten is only allowed to immutable.Map. This makes derivation of Reader simpler.

How hard would it be to generalize this to other collection types and key types?

One use case for other collection types would be to support Seq[(String, T)] or LinkedHashMap[String, T] for cases where people want to preserve ordering
uPickle already supports non-String map keys via https://com-lihaoyi.github.io/upickle/#JSONDictionaryFormats, so it would be nice if we could be consistent here as well when flattening out maps

Left some high level comments. It's a pretty invasive change so I expect it will take some time to discuss the changes, first at a high-level and then down to the lines of code being changed, just to set expectations.

@lihaoyi  Thanks for your review.

Can this be fixed by making it implicit def rw[T: RW]?
I'm not sure whether it's possible. I will investigate more on it.

How hard would it be to generalize this to other collection types and key types?
I believe this is doable. For other collection types, I could store the type of collection that is flatten and then use that type to construct it from Reader. For keys, I didn't do it because I thought that's not the use cases. I will try this.

For the Scala 2 vs Scala 3 approach, could we use the Scala 3 approach in Scala 2 as well? It's best to keep the two implementations mostly consistent, so future changes can be done more easily across both versions
Sure, I will use the Scala 3 approach in Scala 2 (no case class Field).

The challenging part seems to be bincompat. Would the best approach be to implement @flatten without changing the existing function signatures then? And if changing the function signatures is unavoidable, the next best option would be to keep the existing functions (marking them as deprecated) and implement separate macros (e.g., a new Macro class in Scala 2). In this case, would it make sense to introduce a conditional branch in specific functions to decide whether to call the deprecated macro or the new one? For example, determining this based on the presence of the @flatten annotation. Did I understand this correctly?
One thing I’m curious about: as I understand it, macro code is only called internally, so I assumed it would be safe in terms of bincompat. However, can even functions that are not called externally impact bincompat?

For bincompat, we could leave the existing Macros file completely untouched and just make a new copy Macros2 that we use going forward. No need to conditionally branch on the presence of @flatten, the new code works great. We just need to leave the old code in place for bincompat in case anyone downstream is using it (probably nobody, but good to be careful in preserving bincompat anyway)

I believe this is doable. For other collection types, I could store the type of collection that is flatten and then use that type to construct it from Reader. For keys, I didn't do it because I thought that's not the use cases. I will try this.

I think what you would need to do is take the type of the collection, resolve the Reader for it, and use that Reader instance at runtime in order to construct the collection from the individual key-value pairs
For keys, I think you should be able to do the same thing: take the type, resolve the Reader, and use the Reader to construct the key objects from the JSON keys and then pass those to the collection Reader

Thanks for your explanation and tips.
To summarize the direction I need to take for the changes:

For Scala 2, keep the existing Macros.scala unchanged and create a new Macros2.scala to apply the modifications (for bincompat), and the new code will use Macros2.scala.
Move the definitions of currentKey and storeToMap from the upstream trait to the downstream implementation (for bincompat).
Update the implementation to support flattening for collection types other than immutable.Map.
Allow Map to have key types other than String.
For the Scala 2 macro implementation, aim to follow a design as similar as possible to Scala 3, without using case class Field.

In the current Scala 2 implementation, all the information necessary for derivation (e.g., symbols, types, mappedName, etc.) is generated upfront and passed to wrapCaseN for construction. If I were to adopt an approach similar to Scala 3, wrapCaseN would instead start with just the type being derived and then call a function to fetch the field information for that type.

Is this the right direction to proceed?
Lastly, for Macros2.scala, would it be better to apply private or [package] private as much as possible if those restrictions can be applied?

@nox213 yes that's right. Making the new macros package private would indeed help, though some of the supporting runtime APIs may need to remain public so we won't be able to privatize everything

Okay, I will work on this.

@lihaoyi
I have some questions regarding bincompat of Scala3.

I modified types of some fields(construct, visitor0) in CaseClassReader3. Do you have some ideas to keep bincompat? Is it okay to make a copy of CaseClassReader3 like CaseClassReader3V2 and use it instead?
In macros, is it okay to maintain bincompat by just keeping old methods and making them deprecated?

@lihaoyi I have some questions regarding bincompat of Scala3.

I modified types of some fields(construct, visitor0) in CaseClassReader3. Do you have some ideas to keep bincompat? Is it okay to make a copy of CaseClassReader3 like CaseClassReader3V2 and use it instead?

Making a copy should work

In macros, is it okay to maintain bincompat by just keeping old methods and making them deprecated?

Yes leaving the old methods deprecated should work as well

@lihaoyi
77a882e
This is the change that move storeToMap and currentKey to downstream trait. Since storeToMap should be used in visitValue, I had to overwrite this function in downstream trait. What do you think of making a copy of ObjectContext.scala instead so that we don't need to define visitValue separately for scala 2 & 3.

@nox213 I don't quite understand what you are asking

If I define storeToMap not inside of  BaseCaseObjectContext but inside of the trait that is generated by macro codes, I have to override visitValue as well.

Okay, I will keep it as it is

@lihaoyi
I made Scala2 macros works with Iterable[(Key, Value)] (removing restrictions to only work with Map and String keys). But I ran into one problem when I worked on Scala 3: the stricter quote system does not allow me to use the same approach with Scala 2.
First, for deriving a Writer of collection with non-string key, I did like below for Scala 2.
val writeKey = if (keyType =:= typeOf[String]) q"key" else q"upickle.default.write(key)(implicitly[${c.prefix}.Writer[$keyType]])"
                q"""
                  $select.foreach { case (key, value) =>
                  this.writeSnippetMappedName[R, $valueType](
                    ctx,
                    $writeKey,
                    implicitly[${c.prefix}.Writer[$valueType]],
                    value
                    )
                  }
                """

Basically, I summoned Writer[Key] and called upickle.default.write with that Writer to convert key value to string.
But this doesn't work for Scala 3 since quote of Scala 3 do not allow me to generate such a code. Scala 3 requires that all elements referenced in the quote are valid and resolvable in the scope of the quote itself if I understood correctly. Do you have some ideas that convert key to string without calling write?
'{
                ${select.asExprOf[Iterable[(keyTpe, valueTpe)]]}.foreach { (k, v) =>
                  ${self}.writeSnippetMappedName[R, valueTpe](
                    ${ctx},
                    upickle.default.write(key)(summonInline[keyWriterTpe]), // this doesn't compile
                    summonInline[writerTpe],
                    v,
                  )
                }
              }

@nox213 I'm not actually sure on the Scala 3 side. @jodersky do you have any ideas how this can be done with Scala 3 metaprogramming?

What I tried was that
val writeRef = Ref(Symbol.requiredMethod("upickle.default.write"))
          (keyTpe0.asType, valueTpe0.asType, keyWriterTpe0.asType, valueWriterTpe0.asType) match {
            case ('[keyTpe], '[valueTpe], '[keyWriterTpe], '[valueWriterTpe]) =>
              val typeAppliedWrite = TypeApply(writeRef, List(TypeTree.of[keyTpe]))
              val snippet =
                if (keyTpe0 =:= TypeRepr.of[String])
                 ... // be ommitted
                else
                  '{
                      ${select.asExprOf[Iterable[(keyTpe, valueTpe)]]}.foreach { (k, v) =>
                        ${self}.writeSnippetMappedName[R, valueTpe](
                          ${ctx},
                          ${Apply(
                              Apply(
                                typeAppliedWrite,
                                List('{k}.asTerm, '{-1}.asTerm, '{false}.asTerm, '{false}.asTerm)
                              ),
                              List(
                                '{summonInline[keyWriterTpe]}.asTerm
                              )
                            )
                            .asExprOf[String]},
                          summonInline[valueWriterTpe],
                          v,
                        )
                      }
                    }

I used requiredMethod to access the method symbol out of the scope. But the error was that
[error]     |               Found:    (upickle.Flatten.KeyClass.rw :
[error]     |                 upickle.default.ReadWriter[upickle.Flatten.KeyClass])
[error]     |               Required: Api.this.Writer[upickle.Flatten.KeyClass]

Those two types are treated as different type because of their path is different. I got stuck at this point.

@lihaoyi

case class Param[T](@flatten t: T)
object Param {
   implicit def rw[T]: RW[Param[T]] = upickle.default.macroRW // compile error when this function is called to derive instance
  implicit val rw[SomeClass]: RW[Param[SomeClass]] = upickle.default.macroRW // works
}

Can this be fixed by making it implicit def rw[T: RW]?

I misunderstood your comment. I tested with your fix but it still doesn't work.
  object FlattenTestWithType {
    implicit def rw[T: RW]: RW[FlattenTestWithType[T]] = upickle.default.macroRW // compile error
  }

I’ve pushed the changes to support collections other than Map (iterable flattening is now possible) so far. a07839d

I just saw your ping now. Let me know if there's still something I can help with

@jodersky Thanks, could you check theses comment, comment?
Basically, I tried to make flatten annotation works for collections that has non-string key. To support it, I need to generate code that calls functions defined in upickle.default which lie outside the scope from macros.scala.

Sure! Would be happy to merge it first
Give me some time to properly review it. Still probably need @jodersky 's help to look through some of the scala 3 macro stuff, and I'll give it a pass as well

I read through and think it looks reasonable.
One request: can we have some tests for the edge cases and failure modes of @flatten? Some I can think of:

What if the flattened field itself contains a field which collides with the enclosing case class?
Can we flatten two fields in a single case class list?
If we flatten two fields in a case class, what if they have fields which collide?
What if we @flatten a field whose type type that cannot be flattened?
What if we @flatten a collection of invalid type (e.g. doesn't contain a string key?)

I don't really have any opinion on the exact semantics in these situations, but regardless of what we choose we should have unit tests asserting their success or their failure and error message

What if the flattened field itself contains a field which collides with the enclosing case class?
If we flatten two fields in a case class, what if they have fields which collide?

It fails with following errors. Before process the flatten annotation, macro checks whether there are duplicated mappendName.
[error] /Users/devsisters/repos/upickle/upickle/test/src/upickle/MacroTests.scala:225:48: There are multiple fields with the same key.
[error] Following keys are duplicated: x.
[error]     implicit val rw: RW[Bar] = upickle.default.macroRW
[error]                                                ^
[error] one error found

Can we flatten two fields in a single case class list?

Yes, this is possible, but my implementation only supports flattening multiple case classes and a single collection at a time.

What if we @flatten a field whose type that cannot be flattened?

[error] /Users/devsisters/repos/upickle/upickle/test/src/upickle/MacroTests.scala:221:48: Invalid type for flattening: Int.
[error]     implicit val rw: RW[Foo] = upickle.default.macroRW
[error]                                                ^
[error] one error found

What if we @flatten a collection of invalid type?

This also fails with an same error above.
I added a few more tests to cover the parts that were not addressed by the tests I had previously created (2eb1ab8).

@lihaoyi While adding some tests, I thought of a case where a collection could lead to runtime collisions. For example:
case class Foo(i: Int, @flatten m: Map[String, String])

If m = Map("i" -> "value"), there would be a key collision, but this can only be detected at runtime. Referring to the behavior of the Rust library linked in the issue, here’s how it handles such cases:
When writing, it generates JSON like this:
{"i": 1, "i": "value"}

And when reading it back, it fails with an error like:
Error("duplicate field `i`", line: 1, column: 16)

On the other hand, if the map field appears first, like this:
case class Foo(@flatten m: Map[String, String], i: Int)

The generated JSON would look like this:
{"i": "value", "i": 1}

In this case, when trying to read it back, it would result in a runtime error while attempting to convert "value" to an integer.
In upickle, it behaves almost the same except for the first case.
When it reads,
{"i": 1, "i": "value"}

my implementation produces Foo(1, Map.empty).
However, making it raise an error when there are duplicate keys at runtime seems doable.

Do you think it would be better to raise an error in such cases rather than silently succeeding?
A runtime key collision can cause an error when reading a value and attempting a type conversion. Would it be acceptable to keep this behavior? I currently can’t think of a better way to handle it.

I think the current behavior for the case you mentioned is reasonable, but would it be possible to make it raise an error on write? That would probably be more intuitive to users than generating JSON a dictionary with duplicate keys

I made it raise an error on write an added an failure test case as well. (e4071f6)
X upickle.MacroTests.runtimeCollision 26ms
  java.lang.Exception: Key collision detected for the following keys: i, s
    upickle.Flatten$Foo$$anon$67.write0(MacroTests.scala:221)
    upickle.Flatten$Foo$$anon$67.write0(MacroTests.scala:221)
    upickle.core.Types$Writer.write(Types.scala:143)


Do exec-slurp and exec-slurp-all benefit from tighter resource control?

I wrote the following code because my janet fibers started crashing due to lack of pipes and files. I think garbage collector doesn't close pipes fast enough.
If pipes aren't closed, a long-running process will run out of pipes and files.
If I run the functions below in ev/with-deadline to prevent zombie processes from blocking janet, I still need to kill the zombie processes with os/proc-kill. Otherwise, I see zombie processes abandoned by janet.
(defn slurp
  ``
  It executes args with `os/spawn` and throws an error if the process returns with non-zero exit code.

  If the process exits with zero exit code, this functions returns standard output of the process.

  If there is any error, to prevent zombie processes, the spawned process is killed.

  Regardless of errors, the spawned process is going to be closed for resource control.
  ``
  [& args]
  (with [proc (os/spawn args :xp {:out :pipe})]
    (try
      (let [[out] (ev/gather
                    (ev/read (proc :out) :all)
                    (os/proc-wait proc))]
        out)
      ([err f]
        (try
          (os/proc-kill proc)
          ([_]))
        (propagate err f)))))

(defn slurp-all
  ``
  It executes args with `os/spawn` and returns a struct which has the following keys.

  * `:out` - the standard output of the process
  * `:err` - the standard error of the process
  * `:exit-code` - the exit code of the process`

  If there is any error, to prevent zombie processes, the spawned process is killed.

  Regardless of errors, the spawned process is going to be closed for resource control.
  ``
  [& args]
  (with [proc (os/spawn args :p {:out :pipe :err :pipe})]
    (try
      (let [[out err ec]
            (ev/gather
              (ev/read (proc :out) :all)
              (ev/read (proc :err) :all)
              (os/proc-wait proc))]
        {:out out :err err :exit-code ec})
      ([err f]
        (try
          (os/proc-kill proc)
          ([_]))
        (propagate err f)))))

I'm a bit worried about pipe buffer. If ev/with-deadline detaches the functions above from a zombie process, ev/read may not fully drain the pipe buffer. Does os/proc-kill drain pipe buffer?

If you are worried about draining the pipe buffer in case of timeout, I recommend first setting up a buffer for stdout and start ahead of time, and then replacing (ev/read out :all) with (ev/read out :all my-buffer). That works for me to see the output of Ls even after timeout

My looming theory is that there is no global pipe buffer. Each pipe has its own local buffer.
If I close the pipe, the pipe buffer goes away with the pipe. Thus, it should be sufficient to close the pipe or the spawned process because os/proc-close closes process pipes.
However, linux has a limit on the number of open file descriptors for each process. Thus, I should close pipes when I'm done.

My estimation is that these functions will take care of zombie processes and any pipe issues properly.
(defn slurp
  ``
  It executes args with `os/spawn` and throws an error if the process returns with non-zero exit code.

  If the process exits with zero exit code, this functions returns standard output of the process.

  If there is any error, to prevent zombie processes, the spawned process is killed.

  Regardless of errors, the spawned process is going to be closed for resource control.
  ``
  [& args]
  # This closes proc along with its pipes. If pipes are not closed, janet will run out of file descriptors.
  (with [proc (os/spawn args :xp {:out :pipe})]
    (try
      (let [[out] (ev/gather
                    (ev/read (proc :out) :all)
                    (os/proc-wait proc))]
        out)
      ([err f]
        (try
           # If ev/with-deadline wraps this function and causes it to throw an error,
           # the spanwed process is probably a zombie process and should be killed.
          (os/proc-kill proc)
          ([_]))
        (propagate err f)))))

(defn slurp-all
  ``
  It executes args with `os/spawn` and returns a struct which has the following keys.

  * `:out` - the standard output of the process
  * `:err` - the standard error of the process
  * `:exit-code` - the exit code of the process`

  If there is any error, to prevent zombie processes, the spawned process is killed.

  Regardless of errors, the spawned process is going to be closed for resource control.
  ``
  [& args]
  # This closes proc along with its pipes. If pipes are not closed, janet will run out of file descriptors.
  (with [proc (os/spawn args :p {:out :pipe :err :pipe})]
    (try
      (let [[out err ec]
            (ev/gather
              (ev/read (proc :out) :all)
              (ev/read (proc :err) :all)
              (os/proc-wait proc))]
        {:out out :err err :exit-code ec})
      ([err f]
        (try
          # If ev/with-deadline wraps this function and causes it to throw an error,
          # the spanwed process is probably a zombie process and should be killed.
          (os/proc-kill proc)
          ([_]))
        (propagate err f)))))


Skip fit in Pipeline if dataset is empty

If the result of a produce method is an empty dataset, the next primitive should not be called.

This change ended up being discarded


Could you provide code to draw with ResNet?

Hello! What a nice job! Could you provide code to draw with ResNet? Thank  you

I have tried but get bad result.


Workspace - Settings instead of General Settings on workspace avatar tooltip

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Go to NewDot
Login
Create workspace
Hover over workspace name or workspace avatar

Expected Result:
Tooltip should say General Settings
Actual Result:
Tooltip says Settings
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

Version Number: <IP_ADDRESS>
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
https://expensify.testrail.io/index.php?/tests/view/3483604
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~0136206e8bdbda80cd
Upwork Job ID:<PHONE_NUMBER>812098560
Last Price Increase: 2023-06-05

Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace - Settings instead of General Settings on workspace avatar tooltip
What is the root cause of that problem?
Its missing General Settings in localization file, and its using workspace.common.settings which is Settings in Tooltip.
https://github.com/Expensify/App/blob/fe67d69c9043734486c6a639a0d3ba66d5440a04/src/pages/workspace/WorkspaceInitialPage.js#L169C55-L179
https://github.com/Expensify/App/blob/fe67d69c9043734486c6a639a0d3ba66d5440a04/src/pages/workspace/WorkspaceInitialPage.js#L187-L194
What changes do you think we should make in order to solve the problem?
Add workspace.common.generalSettings in localization file
workspace: {
    common: {
        card: 'Cards',
        workspace: 'Workspace',
        edit: 'Edit workspace',
        delete: 'Delete workspace',
        settings: 'Settings',
        generalSettings: 'General settings',

and use it in Tooltip
<Tooltip text={props.translate('workspace.common.generalSettings')}>

What alternative solutions did you explore? (Optional)
N/A

Sure, if that's what the test says!

Okay @lanitochka17 - could you update the test you found this in please?

@twisterdotcom Please attached TR link https://expensify.testrail.io/index.php?/tests/view/3483604. If we need update, please send request for TR update. Thank you

Sorted: https://github.com/Expensify/Expensify/issues/289510


Remove sha1 and base64 functions

Having sha1 requires dependency on OpenSSL when it is not necessary. A filesystem library should ONLY provide the basic functionality to traverse folders, and provide means to read/write to file streams. Nothing more.
Hash/base64 etc. can, and should, be provided outside the library.

I personally like the base64 functionality. Just my two-cents.


Update README.md with one MOOC and a bunch of books

Hello,
I was wondering if you would consent to adding the MOOC and books that I have added to the respective lists on your page.
Thanks for your consideration.

Thanks!


weighted kappa evaluation added

The official "weighted quadratic kappa evaluation score" could be printed after each test is done(the function quadratic_kappa on the last).

This code is specific to the kaggle challenge; I'm not going to merge this.


Allow running a backup slurmctld

This splits setting up slurmctld from the generic service config. Thus
generic service tasks can be run on one node as before, and the
slurmctld tasks can run on both the slurmctld master and backup nodes.

Looks cool!
Have not had time to look deeper or test this myself. Travis/automatic testing is failing with what looks like an ordering issue (it tries to start slurmdbd but it's not installed yet):

TASK [ansible-role-slurm : start and enable slurmdbd] **************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Could not find the requested service slurmdbd: cannot enable"}

We have it running locally, but yeah, I think I see what's happening.
(I just quickly scanned the travis logs and didn't spot that one and thought it was just some unrelated failure. I need to improve my travis-foo, or is there some way to get rid of all the irrelevant junk?).

Yeah it's ugly, haven't looked at it because I guess I got used to it.
There must be a way to get most of the non-ansible things hidden by default, like the building a docker image output, ansible -m setup output and the bottom journalctl and systemctl status which sometimes is useful but rarely is..

OK found some way to "fold" most of the output 1, but can't hide the things that are done
In the meantime/until next PR you can search for "TEST:" in the logs and press "search backwards" to find the last TEST: that started. I've added these "echo TEST: ..." into the test-in-docker-image.sh to help with finding the things that script does. One can also search for "with 1" to find commands that "exited with 1".

Argh, this gets hairy.  Is there some ansible best practice for handling this kind of cross-node ordering issues? Currently there is the "delegate_to" stuff in service.yml, but I can't help thinking it's cludgy, and the more service stuff one wants to run anywhere else than the install node the worse it gets..
I imagine we're not the first to run into these kinds of issues, consider some webapp where you have a bunch of DB servers, another bunch of, say, memcached/redis servers, and yet another bunch of frontend web servers, and whatnot, and you have to setup them in the correct order..

My brain hurts every time I look at this role.
I can't see another way besides delegate_to.
ansible-examples use delegate_to in several of their examples 3
Is your cludginess feeling around that we basically duplicate tasks with these?
when: slurm_accounting_storage_host != ansible_hostname

It's possible to omit module parameters 1, there are at least one 2 open ansible issues about doing this with task attributes too.
The slurm seems to work on our test cluster after I added |default(omit) like below on a task attribute. If I comment out the conditional it succeeds and delegates it to io-install (itself).
As you actually delegate the task to a different machine, would you be able to test if this |default(omit) works for your setup? (--check should work so should be fairly safe).
for one of the tasks:

-    delegate_to: "{{ slurm_accounting_storage_host }}"
+    delegate_to: "{{ slurm_accounting_storage_host|default(omit) }}"
     when: slurm_accounting_storage_host != ansible_hostname
     notify:
      - restart munge

TASK [ansible-role-slurm : copy in munge key to slurm_accounting_storage_host too if it is different than the service node] ***
Tuesday 21 February 2017  16:17:31 +0200 (0:00:00.497)       0:00:27.091 ******
ok: [io-install.fgci.csc.fi -> io-install]

After a bike ride,  still need the task but to execute it on a list/hash? of hosts where some are with delegate_to - so a with_items?

Not sure what we can do about the delegate_to. One thing one could improve to the CI/travis is to make "ssh $containername" also work. As for the failure in this role, I did some git magic and took the branch in your fork and put it in "75/ha" branch in this repo and modified it: https://github.com/CSC-IT-Center-for-Science/ansible-role-slurm/commit/13d4368eb18f6dfe57c77c26fe68a1ca4269db4a
travis now passes, the changes I made are:

dbd.yml is again before service.yml (is there a reason why you moved it after service.yml?)
the sacctmgr "create cluster" command is after slurmctld is started in slurmctld.yml

Sorry, I've been busy with other things and haven't had time to look into this so much.
Anyway, I put dbd.yml after service.yml because slurmdbd needs munge, and service.yml creates the munge key etc.

Same here,
this role doesn't start slurmdbd until service.yml - this where we have ended up using delegate_to.
This is how I see the workflow for a site like yours where the service nodes are not all on the service node.
Do you see/experience a scenario where this doesn't work?
The tasks in common.yml and dbd.yml I think should work without any of the other task files.
1 ansible-playbook for only slurm_accounting_storage_host - dbd.yml
set up mysql, install slurmdbd but do not start/enable slurmdbd
2 ansible-playbook for only configure slurm_service_node - service.yml and slurmctld.yml*
sets up munge, installs slurmctld, starts/enables slurmdbd, copies in munge.key, starts slurmctld, creates slurm cluster with sacctmgr
3 ansible-playbook for only configure slurm_backup_controller - slurmctld.yml
copy in munge key, installs slurmctld, starts/enables slurmctld
4 configure compute/submit nodes - compute.yml and submit.yml

Hmm, yeah, makes sense.
(I'd like to eventually split up dbd.yml into a separate part for slurmdbd and mysql), in order to allow setting up a HA slurmdbd as well. But I'll worry about that later...)

Closed this in favor of #78
If no objections I'll merge that and proceed with some testing, I guess I should/need to setup an actual multi slurmctld cluster.

When slurm_backup_controller wasn't defined two conditionals broke, changed those in https://github.com/CSC-IT-Center-for-Science/ansible-role-slurm/commit/6b6309284bfe0f67d45c3d338cdb51223d951663


Some simple arg doc string fixes

This removes some unnecessary indefinite articles from the start of argument doc strings and fixes the arg doc string for run-prepared's --interactive flag.

--set-env has the same issue in rkt/prepare.go. Also, should Documentation/subcommands/prepare.md and Documentation/subcommands/run.md be updated too?

Thanks for the catch @alban.


Description not visible in preset via normal means

Description
Placing a description on your preset won't show in the menu to choose presets from if placed in .minecraft/mods/config/terraforged/presets. Only presets that are directly placed in the TerraForged .jar file will have their description visible.
How to reproduce
Preset with no description visible

Create a preset with a description
Place the preset in .minecraft/config/terraforged/presets
Refresh the TerraForged customization screen and hover over your preset, you won't see the description you placed inside your preset

Preset with description visible

Create a preset with a description
Place the preset in .minecraft/mods/TerraForged-1.15.2-0.1.2.jar/presets
Refresh the TerraForged customization screen and hover over your preset, you will see the description you placed inside your preset

Additional information
None.

It's for built-in presets only


Question: Is it possible to alter the EventIndicators based on the calendar event?

Hi!
We're still enjoying your great plugin.
Is it possible to have different Event indicator colors, depending on the calendar event type? E.g. if you have scheduled a meeting, we might want to have a red indicator dot, but if your free, we want a green dot.
Is this possible in the current version of the plugin?
Thanks!

Hi @marcustindab
Have you checked the AdvacncedPage Calendar?
I'm not sure whether this functionality is enough but there is a sample how to setup EventIndicator color from code

Works wonders! Thanks a lot!


Fix global (static) constructor priority so that OpenBLAS gets initialized before other libraries.  Other unit test AIX fix.

Fix global (static) constructor priority so that OpenBLAS gets initialized before other libraries.  Other unit test AIX fix.

Please include this is 0.3.27

@martin-frbg Do you have any tentative date for 0.3.27 release?

March 31 (see Milestones tab on the Issues page)


Question: How to Set Single Selection Item?

Is it possible (in a easy way) to create a single selection list using LastAdapter? I would like to have a list of items and be able to set an item as selected. Whenever the user selects another item, the first item should be deselected and the new item selected.
Thanks!

Library appears abandoned. Closing due to inactivity.


fix: RadarChart tick and graph point scale do not match

Fixes an issue where RadarChart tick and graph point scale do not match.
If a point has a value of 15 and a tick line has a value of 15, I would expect the point to fall on the line. This was not always the case.
The values in tick titles did not always match with the values of the points on the graph because

points were drawn assuming the graph center = 0
tick title values assumed that the graph center = (minValue - ((maxValue - minValue) / tickCount))

This commit resolves this issue by changing the scaling factor applied to points when they are drawn so that they match the scale of the tick lines.
New unit tests have been added and existing tests that used the incorrect scaling have been updated.
Resolves #1078

Examples

Before
After

Points: [15, 20, 20]
Points: [15, 20, 20]

Before
After

Points: [20, 20, 20]
Points: [20, 20, 20]

Before
After

Points: [30, 20, 10]
Points: [30, 20, 10]

This branch has some conflicts. Please resolve them


Create fast ( < 15 minutes) pipelines

Building takes max 10 minutes on CI VMs, much longer on GitHub host-only VMs
So currently post commit tests themselves are 30 min on CI VMs
python_api_unit_tests  - 18.5 mins
tt_metal + dtx + tensor + some ops CPP tests - 5 mins
doctest unit tests - <1 min
gtest unit tests - 0.5min
doxygen docs check - 10s
profiler post commit - 5.5 mins
Calculations from example pipeline run: https://gist.github.com/tt-rkim/c49b54ee11e01292d9418173d9b60750

Closing in favor of #4957


Increase/decrease counter depending on direction

Is it possible to increase or decrease counter depending on the direction the object is crossing the line? For example how many cars are in the parking garage or people in the theater?

To my knowledge it not possible to decrease the counter, as the traking ID is not that consistant.
The way I approched it, is by having two simultanius counters (short distance appart). That makes it possible to identify the direction from the time log (also gives you speed, if you place them cleaberly, and know the excat distance between the tracker lines).

I think it doesn't matter if the ID is consistent when the car is parked because what @pacmanii seems to be interested here is the absolute value of how many cars crossed the line in one direction or the other. In my opinion this use case should work pretty well with opendatacam.
@shams3049 solution is clever, but I think we could do simpler as the tracker: https://github.com/opendatacam/node-moving-things-tracker does estimate the bearing of the moving object for each position.  With this bearing info and the counting lines coordinates, you can compute at which angle the object is crossing the line and then operate the counting logic the way you want.
Right now it's a bit hard to access the bearing data in the API from the counter history, as you need for every object of the counter history: https://opendatacam.github.io/opendatacam/apidoc/#api-Recording-Counter_data to fetch the tracker history and find the bearing of this object at that time: https://opendatacam.github.io/opendatacam/apidoc/#api-Recording-Tracker_data .
One thing that we should do is to expose this bearing info in the counter API: https://opendatacam.github.io/opendatacam/apidoc/#api-Recording-Counter_data , so it's easier to write your own logic on top of opendatacam.
But I also think this feature could also use to be in the integrated in opendatacam , be able to parameter a counting line. By default it would be the actual behaviour of counting in both direction, but we could also add unidirectional counting lines, have a line that count in one direction and decrease in the other ... There is a bit of UX thinking to do here in order to keep things simple..,

I'm working on adding this feature to OpenDataCam, it is almost done, here is a quick screencast of how it works:

Re-reading this issue, I think we could add another "mode" along with bidirectional and unidirectional , which would be this increase / decrease request, that we can only do with the API right now .. but I'm not sure of the icon to have for this, any idea @b-g ?
Also let me know of any improvements you can think of.. will provide a build to test it later this week 😉

Thinking a bit more on this increase / decrease, it would mean two icons to specify which side is increasing and which side is decreasing, something like:

But I'm sure @b-g can come with something a bit cleaner

@tdurand I like this feature the most.

@tdurand All I want to test is if we have lines on top of each other(perpendicular), can we detect traffic flow in diffrent direction: forexample: at a traffic light crossing.

from what I understand from your use case it should be possible in two ways with this feature:

Draw two lines with unidirectional counting (for each direction)
Draw a bidirectional line, and then filter one side or the other thanks to the new attributes in the raw data of the counter

Will release something testable by the end of the week

After thinking it over, we decided not to add the specific increase / decrease mode, an only provide the three "modes" explained on the video:  bidirectional & unidirectional both side.. We don't want to overload the core of opendatacam with lots of features and prefer to rely on the API for people to build their own use cases. Also this increase / decrease mode could be solved by drawing two unidirectional lines and compare both counters.

Quick bonus feature done this morning, being able to save / import counting lines configuration from json file directly in the UI (previously only possible via API). cc @b-g  😉

@tdurand MEGA! 🙏 :)

closing this one, let's gather feedback in #184


Roller shutter is not recognized

HomeKit does not recognize  my Qubino Roller shutter. I have attached my device list from Zway.
devices.txt

The shutter is device 22.


ApiTest. owner does not see the space after deleting the access

added api test for an issue https://github.com/owncloud/ocis/issues/4127
test added to expected failures

:boom: Acceptance test localApiTests-apiSpaces-ocis failed. Further test are cancelled...