Get the modifier(s)

Not sure, how can I get the modifiers in the template? Ideally, I would like to specify in the docs which modifiers are used or filter out the functions that should only be available to the public.
something along with this:
{{ modifier }}

Surely there must be a better way?
{{#each astNode.modifiers }}{{modifierName.name}}{{/each}}

Hi @dimsome. Modifiers are not exposed currently. By "available to the public" do you mean you want to remove stuff that is onlyOwner or similar? That is interesting... In the meantime you could use an @custom:only-owner attribute and read it from the template using {{natspec.custom.only-owner}}. (Note: I'm actually not sure the dash works, if it doesn't an underscore should work.)


Is it possible to change the cursor shape?

In gnome-terminal, there is an option to customize the cursor shape. There is Block, I-Beam, and Underline. Is it possible to change the cursor shape with tcell?

It is not possible at present.  It might be possible to add this capability, if the terminal program has an escape sequence to permit it.  There aren't any standard sequences for this, but I don't know what gnome-terminal may or may not support beyond the standard escape sequences for xterm.  I would be somewhat, but not entirely, surprised if gnome-terminal allowed this to be set via escape sequence.

I'm closing  this as it was mostly just a question.


Network port comparison is always false

error: comparison is always false due to limited range of data type [-Werror=type-limits]
ERR_FAIL_COND_V_MSG(p_port < 0 || p_port > 65535, ERR_INVALID_PARAMETER, "The local port number must be between 0 and 65535 (inclusive).");

Thanks!


Bug in native datetime widget in playground

Prerequisites

[x] I have read the documentation;
[x] In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.

Description
There are two bugs:

The native datetime widget alters the displayed time after it's completely filled out
After the native datetime widget is filled out, attempting to alter the time results in unusual behavior. For example, if attempting to increment the hour by 1, it instead increments by 5.

It appears that once the datetime widget is filled out or altered, the datetime is immediately cast to UTC (which is expected per #496), but the date and time in the widget are not shown in local time, causing unexpected behavior.
Steps to Reproduce

Open playground and go to "Date & time" tab
Fill out the native datetime widget and notice that the time jumps several hours once you fill out all parts of the widget
Attempt to alter the time and notice that the displayed time isn't what you expect

Expected behavior
Date and time in the native datetime widget should be displayed in the user's local time.
Actual behavior
Date and time in the native datetime widget are being displayed in UTC.
Version
Whatever version is in the playground
Chrome: v59.0.3071.109
My current timezone is EST.

Same problem here.
Defaulting to "alt-datetime" format as a workaround for now.

Quite unfortunate as this bug makes datetime-local unusable.
fromJSONDate is incorrectly returning a GMT string for to the value property should be the local interpretation, something akin to
const pad = (p, n) => String(n).padStart(p, 0)

function fromJSONDate(jsonDate) {
  if (!jsonDate) {
    return ''
  }

  // required format of `"yyyy-MM-ddThh:mm" followed by optional ":ss" or ":ss.SSS"
  // this should be in the format of *local* time, not GMT

  const date = new Date(jsonDate)

  const yyyy = pad(4, date.getFullYear())
  const MM = pad(2, date.getMonth() + 1)
  const dd = pad(2, date.getDate())
  const hh = pad(2, date.getHours())
  const mm = pad(2, date.getMinutes())
  const ss = pad(2, date.getSeconds())
  const SSS = pad(3, date.getMilliseconds())

  return `${yyyy}-${MM}-${dd}T${hh}:${mm}:${ss}.${SSS}`
}

// paste in console to test
const jsonDate = new Date().toJSON()
console.log(jsonDate)
console.log(fromJSONDate(jsonDate))


cache miss when executing the code concurrently

When executing multiple cache requests for the same key "concurrently" using promise.all(..), the requests (for the same key) are executed due to a cache miss. Maybe we could stop the additional requests from being executed and return the cached values from the executed/first request.
something like:
import { createStaleWhileRevalidateCache } from 'stale-while-revalidate-cache'

const swr = createStaleWhileRevalidateCache({
  storage: window.localStorage,
})
const key = "ListId";
const load = async () => {
	return (await this.list.select("Id")()).Id;
};
const result = await Promise.all(
   [swr(key, load) , swr(key, load )]);

To support a use case where cache functions with the same key are run in sequence (or just be aware of one another) would require adding much more complexity to the library. Can you provide a good real world example of where this feature would be useful? The example you gave explains the issue but I am struggling to picture where you would want to do that. With this example you can easily in "user land" make the requests in the order you require to ensure the cache is set.

In my sample the load function is called in multiple async requests that are loaded concurrently using promise.all(..)
Based on the key we could check if the there's an active "load" action. If yes, wait until that is finished and continue. the waited request should just return the already cached data

I thought about this request more and it is not something I want to add to the library at this stage. This will add unnecessary complexity to the library as a whole for a very specific use case. It is also fairly simple to handle this logic outside the library.

You could await the first request before making the rest of the requests inside the Promise.all():

import { createStaleWhileRevalidateCache } from 'stale-while-revalidate-cache'

const swr = createStaleWhileRevalidateCache({
  storage: window.localStorage,
})
const key = "ListId";
const load = async () => {
  return (await this.list.select("Id")()).Id;
};

const result1 = await swr(key, load)

const [result2, result3] = await Promise.all(
  [swr(key, load), swr(key, load)]
);

You could add a fairly simple cache wrapper around it:

import { createStaleWhileRevalidateCache } from 'stale-while-revalidate-cache'

const swr = createStaleWhileRevalidateCache({
  storage: window.localStorage,
})

const requests = new Map()

async function cache(key, fn) {
  if (requests.has(key)) {
	// either return `previousRequest` here since it is cached in any case or pass it onto swr if you really want
    const previousRequest = await requests.get(key)
    return previousRequest
  }

  const request = swr(key, fn) // not awaiting it here
  requests.set(key, request)

  const result = await request
  requests.delete(key)

  return result
}

I haven't tested this, but conceptually it should work.

Thanks for the tips! nr 1 is not an option for me, the cached requests are deeply nested inside the sample load() function.

I see. Hopefully, the second option is something that you can build on.

I too falsely assumed multiple requests with the same key would be deduplicated, took me some time to discover this was not the case. I expected more people would need this feature, TanStack Query for example even lists request deduping in their motivation.
While the second option works perfectly for me, why would adding it into the library add unnecessary complexity? Isn't it just those couple lines you already posted or is there more to it I fail to see?

I will relook at this feature request. I see now that it could be beneficial to have auto-deduplication of function calls.
The code example I gave was very rudimentary and not necessarily production-ready. It lacks error handling and just testing in general.

v3.2.0 includes functionality to automatically dedupe any requests from the same instance of swr. If you're interested in the implementation, you can look at PR #35


Update local_tool_conf.xml

Add fgenesh_get_proteins.xml wrapper to the local_tool_conf.xml

Hi @mthang, could you please add the tool to this file as well? https://github.com/usegalaxy-au/infrastructure/blob/master/templates/galaxy/toolbox/filters/ga_filters.py.j2

Yes. I will do that. Thanks!


[Suggestion] Movable onclick window

The onclick window appears in the middle of my two monitors, it would be great if it was possible to set it manually as I would want it in the bottom right but still have the taskbar ontop.

Hi,
I want to add my support to this suggestion :)
Actually, it would be great if you can show the selector in two different modes, that can be configured in the settings tab :

1 mode where the selector is wrap in a task menu (like today) that popups when you click on the task bar icon, but that disappears when you clicks somewhere else :(
1 mode where the selector is wrap in a standard window (with the same dimensions than the standard task menu) that popups when you click on the task bar icon, but that leaves always open until you manually want to close it by clicking on the standars X button.
In fact for my usage, i have 2 screens : I like to keep some "dashboard" settings on my second screen, like a hardware monitor (temp, cpu usage, ...) and some Windows key-settings, like the possibility to see and switch my default sound output between my standard speakers, my headset or my spdif output to hi-fi.

Thank you for the consideration of this suggestion

it was a very nice feature idea, go try it out ;)


tabsize in style detector

Is it possible to change the default tabsize (8) to an other value. My sources use a tabsize of 4 and I can't get a usable result.

This drives me crazy! I cloned the code got it compiled but can't find where the tab size is set to 8. The Tabs of my source are interpreted as 8 (should be 4) and the rest goes totally wrong.

Hi @woko54,
Sorry for delay response, can you give me a text file, to reproduce your problem?
Kind regards,
Marina

DRV8825.txt
Thanks for answering. Here is a cpp source file I used for testing. Tabsize is 4.

It seems like your detection result is closer to LLVM style, TabWitdth value is specific for LLVM (more than Mozila, Google ...), default value is 8. If you want, you can adjust TabWitdth value from our Style Detector, and generate a clang-format file

Tell me if is something unclear, or if I didn't answer completely to your question
Kind regards,
Marina

The style should be "Microsoft", it will be the best match. I think the wrong tabsize is the cause for the wrong style.

We have applied format (default styles: Mozila, LLVM ...) on file and selected the smallest Levenshtein distance value, that is more closer to your file (seems to be LLVM in this case), the result can be influenced by another values too
Depends which algorithm you use to find the best match
In this case I don't see how setting a tab before detection will help, I need more information to understand this idea

When the detector has completed the sample (above), I see Tabs used in the left window with a size of 8, no tabs and an indention of 2 in the right (result) window. It does not look like it should do.


Typo on https://github.com/solliancenet/MCW-innovate-modernize-apps-with-data-ai/blob/master/Hands-on lab/Before the HOL - Innovate and Modernize Apps with Data and AI.md#requirements

The page https://github.com/solliancenet/MCW-innovate-modernize-apps-with-data-ai/blob/master/Hands-on lab/Before the HOL - Innovate and Modernize Apps with Data and AI.md#requirements
Typo: Install the Azure Machine Leraning SDK for Python.

Thank you.  We will correct this.


ResourceProperty name changed in V9.x

Hi Dennis,
I am running a compare of a v8.0 cell against v9.5 cell. I have successfully added resource J2CConnectionFactory per your instructions in issue #10, and this work extremely well.
I was also pleasently surprised that the resourceProperties collection of nested configIDs used by both Datasources and J2CConnectionFactories gets automatically added to the resources report.
But there's an issue:
The key names of resourceproperties for J2CConnectionFactory seem to have switched case between v8 and v9.5 !
In the old v8.0 cell, property key is called TranName, while in v9 it is called tranName, so the compare does not work well, as it finds unique properties in both cells, reporting every property twice.
So the question is, do you think it is safe to do a case-insensitive compare of the property key names? (not the values, though!)
Regards, Thomas

Hi Thomas,
Property names are entered by an admin.  Someone entered them
wrong either on v8 or v9.  This is not a bug in CCT.  CCT does exact name
match as, to my knowledge,  property names are exact name match.
Regards,
Dennis
Dennis Riddlemoser, Accelerated Value Specialist
World Wide IBM Software Accelerated Value Program
Phone:<PHONE_NUMBER>
Email<EMAIL_ADDRESS>Visit IBM Software Accelerated Value Program Online
From:   Thomas Hikade<EMAIL_ADDRESS>To:     IBM/websphere-cct<EMAIL_ADDRESS>Cc:     Subscribed<EMAIL_ADDRESS>Date:   07/10/2020 09:19 AM
Subject:        [EXTERNAL] [IBM/websphere-cct] ResourceProperty name
changed in V9.x (#12)
Hi Dennis,
I am running a compare of a v8.0 cell against v9.5 cell. I have
successfully added resource J2CConnectionFactory per your instructions in
issue #10, and this work extremely well.
I was also pleasently surprised that the resourceProperties collection of
nested configIDs used by both Datasources and J2CConnectionFactories gets
automatically added to the resources report.
But there's an issue:
The key names of resourceproperties for J2CConnectionFactory seem to have
switched case between v8 and v9.5 !
In the old v8.0 cell, property key is called TranName, while in v9 it is
called tranName, so the compare does not work well, as it finds unique
properties in both cells, reporting every property twice.
So the question is, do you think it is safe to do a case-insensitive
compare of the property key names? (not the values, though!)
Regards, Thomas
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Hi Dennis,

Property names are entered by an admin.

Unfortunately not in this case. Resource Adapters or MQ resources, and a few other resources do have a predefined set of resource properties with default values. You do not need to set most of them, but if you do, the case of those property names has changed in v9. And since the pre-exist, setting those will use the new key's name, of course.
But I realize that changing a compare operation is hazardous with possible unknown side-effects, so I found a workaround:
I changed the sort order for property keys to ignore case. This should be harmless, because I am not changing the data, just the display order.
So instead of
A
B
C
a
b
c

I now get properties display like this:
A
a
B
b
C
c

This makes comparing a lot of properties halfway easy again, as they are next to each other!
I will be proposing this change thru a PR hopefully today.


Allow containers to continue even if mount failed after live restore

This fix is a follow up to #29365. In #29365 a bug was fixed for docker exec -u user after live restore by remounting. However, #29365 will prevent containers from restored if mount failed.
In this fix, containers will be restored even if mount in that step failed. Some functionalities might be missing (like docker exec -u user) but at least it is possible to do certain operations like stop/restart/delete.
This fix is related to #29365.
See https://github.com/docker/docker/pull/29365#issuecomment-267329003 for related discussion.
/cc @thaJeztah @mlaventure
Signed-off-by: Yong Tang<EMAIL_ADDRESS>

Thanks @mlaventure. The PR has been updated.

LGTM

The issue is #29342 more helpful than the PR links

So the idea is you can live restore without the top rw layer? Why would this happen?

@justincormack do you want the description and commit message to be updated? (I moved this temporarily back to "code review")

@thaJeztah preferably, but that could happen in master later if necessary.

let me go ahead and merge this one; we can do a follow-up then 👍

@thaJeztah  @yongtang  Does this mean PR 29365 is given up，and docker exec -u xxxx will still remain the same error(unable to find user xxxx: no matching entries in passwd file
) ，except a mount failed log is reported?

@sandyskies PR https://github.com/docker/docker/pull/29365 fixes the issue where docker exec -u wasn't able to find the user. However, if docker would be unable to perform the mount, it would "error" and skip that container (so the container would not be visible in docker ps). This PR changes that to only produce an error, but still "register" the container, so that you can remove it (the behavior before https://github.com/docker/docker/pull/29365 was merged); again only if nothing else worked


seg faulting from cmd_begin_debug_utils_label

Hello!
This is likely a bug with my machine's driver, as mentioned in https://github.com/ash-rs/ash/issues/484, but just to exhaust all options:
While attempting to run a project of mine on a new machine, I ran into a segmentation fault that starts with a call to https://docs.rs/wgpu/latest/wgpu/struct.RenderPass.html#method.push_debug_group
Stepping through this I ended up with the following:
wgpu_hal::vulkan::command::{impl#2}::begin_debug_marker (self=0x555557401e78, group_label="global_light_shadow_1") at src/vulkan/command.rs:527
527                ext.cmd_begin_debug_utils_label(self.active, &vk_label);
(gdb) s
ash::extensions::ext::debug_utils::DebugUtils::cmd_begin_debug_utils_label (self=0x555557001500, command_buffer=..., label=0x7fffffec1590) at /home/algo/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.2+1.3.238/src/extensions/ext/debug_utils.rs:71
71            (self.fp.cmd_begin_debug_utils_label_ext)(command_buffer, label);
(gdb) s

Thread 1 "game-client" received signal SIGSEGV, Segmentation fault.
0x00007fffb78037d3 in ?? () from /usr/lib/libvulkan_intel.so

This is the second call to this function, after popping the previous label.
My vulkaninfo output: https://gist.github.com/AlecGoncharow/7904afdc730159b40a2e26e494e2be60

This is likely a bug with my machine's driver, as mentioned in https://github.com/ash-rs/ash/issues/484

Have you validated that the loaded function pointer in question - cmd_begin_debug_utils_label_ext - is NULL? Since you end up at a non-null address in the driver, that's likely to be a different issue.
However, the last comment there reports on a different issue, namely the address NOT being null but pointing to a driver function that segfaults internally. Can you provide a similar dump/disassembly? And since libvulkan_intel should come from Mesa, recompile the driver with debug symbols first? (and/or make sure debug symbols are available on your flavour of distro).

Closing this after not receiving any followup, there appears to be nothing actionable for ash.


Storage Chart shows LDAP ID instead of fullname or loginname

When I use storagecharts2 with the LDAP Backend it shows the long id instead of "User Name" or "loginname" for the Charts

can be closed, I am sorry, it was a misconfiguration in the LDAP Backend which led to this error

@Levanth can post here now closed what misconfiguration raise so other users when google-it can find and then solve it by own


ARROW-6040: [Java] Dictionary entries are required in IPC streams even when empty

Related to ARROW-6040.
Java's ArrowReader requires that dictionaries are sent in an IPC stream: https://github.com/apache/arrow/blob/master/java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowReader.java#L196-L200.
However, as noted in ARROW-6006, that is not required if the stream contains no values.

Codecov Report

Merging #4960 into master will increase coverage by 2.2%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master   #4960      +/-   ##
=========================================
+ Coverage    87.5%   89.7%    +2.2%
=========================================
  Files         998     667     -331
  Lines      141784   98627   -43157
  Branches     1418       0    -1418
=========================================
- Hits       124065   88478   -35587
+ Misses      17357   10149    -7208
+ Partials      362       0     -362

Impacted Files
Coverage Δ

cpp/src/arrow/extension_type.h
85.71% <0%> (-14.29%)
:arrow_down:

cpp/src/gandiva/function_registry_test.cc
87.23% <0%> (-12.77%)
:arrow_down:

cpp/src/parquet/arrow/reader.h
91.66% <0%> (-8.34%)
:arrow_down:

cpp/src/gandiva/precompiled/time.cc
90.62% <0%> (-6.57%)
:arrow_down:

cpp/src/arrow/array/builder_binary.h
92.38% <0%> (-4.79%)
:arrow_down:

cpp/src/arrow/array/builder_adaptive.h
93.75% <0%> (-3.13%)
:arrow_down:

cpp/src/arrow/array/builder_nested.h
97.61% <0%> (-2.39%)
:arrow_down:

cpp/src/arrow/json/converter.cc
90.05% <0%> (-2.25%)
:arrow_down:

cpp/src/gandiva/precompiled/arithmetic_ops.cc
36.11% <0%> (-2.13%)
:arrow_down:

cpp/src/arrow/array/builder_nested.cc
90.55% <0%> (-2.12%)
:arrow_down:

... and 429 more

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 38b0176...77f1438. Read the comment docs.

@tianchen92 thanks for the updates a couple of minor comments.

@tianchen92 thanks for the updates a couple of minor comments.

Any other comments on this PR?

+1, Thank you.


errored gate pearl reward

using ver 4.2.4
It was listed as one of the rewards, but because it said error ed, I chose not to select it. so I dont have a crash report to offer you

You need to report this issue to the individual modpack.


OOM on preserve_distances for mnist

Hey all,
I'm having trouble running preserve_distances on mnist because pymde tries to allocate 1000Gb of RAM. Is that to be expected? Thanks
Mar 22 10:57:27 PM: Sampling 50000000 edges
Mar 22 10:57:32 PM: Computing 50000000 distances
 RuntimeError: [enforce fail at CPUAllocator.cpp:67] . DefaultCPUAllocator: can't allocate memory: you tried to allocate<PHONE_NUMBER>00 bytes. Error code 12 (Cannot allocate memory)
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-17-f2ac8e7c8297> in <module>
----> 1 z = pymde.preserve_distances(X_train, verbose=True).embed()

~/anaconda3/envs/tfumap/lib/python3.7/site-packages/pymde/recipes.py in preserve_distances(data, embedding_dim, loss, constraint, max_distances, device, verbose)
    106
    107     graph = preprocess.generic.distances(
--> 108         data, retain_fraction=retain_fraction, verbose=verbose
    109     )
    110     edges = graph.edges.to(device)

~/anaconda3/envs/tfumap/lib/python3.7/site-packages/pymde/preprocess/generic.py in distances(data, retain_fraction, verbose)
     50     if _is_data_matrix(data):
     51         return data_matrix.distances(
---> 52             data, retain_fraction=retain_fraction, verbose=verbose
     53         )
     54     else:

~/anaconda3/envs/tfumap/lib/python3.7/site-packages/pymde/preprocess/data_matrix.py in distances(data, retain_fraction, verbose)
     79         # and/or the number of features is large.
     80         delta = (
---> 81             (data[edges[:, 0]] - data[edges[:, 1]])
     82             .pow(2)
     83             .sum(dim=1)

RuntimeError: [enforce fail at CPUAllocator.cpp:67] . DefaultCPUAllocator: can't allocate memory: you tried to allocate<PHONE_NUMBER>00 bytes. Error code 12 (Cannot allocate memory)

Decreasing max_distances by 1-2 orders of magnitude allows me to embed, but the embeddings don't seem to capture much structure.

Thanks for trying out PyMDE!
As you've seen the max_distances parameter can be used to control the number of distances that will be preserved/sampled. If your features are very high-dimensional, computing the original distances can take a lot of RAM. The current implementation tries to compute all these distances at once (see line 81 in the stack trace you pasted); in a future version we can batch this computation, to minimize the chances that an OOM occurs.
It looks like you're working an original (dense?) data matrix.  What's the size of this matrix?
In our experience the preserve_distances method can capture coarse global structure, but does not always capture fine local structure (such as clusters of similar items). It's possible that the number of distances you're computing is too small for anything interesting to arise. You might also check that the original data has been preprocessed so that the original distances are actually meaningful (e.g., you might consider standardizing the data before passing it to preserve_distances).
If you can share your code/data (eg, as a Python notebook), I'd be happy to work with you towards getting a better embedding.

I should mention: the Euclidean distance (which is what preserve_distances uses to compute the original distances, when you give it an original data matrix) is not a good global metric on images, but it is a good local one (which is why preserve_neighbors works well for MNIST).
In particular, two images with large Euclidean distance might be similar, e.g., if one is a translation or rotation of the other, but two images with small Euclidean distance are surely similar.
For this reason it's not entirely surprising that preserve_distances would not work well on MNIST. If you really wanted to preserve original distances globally for image datasets, it might be interesting to experiment with other notions of original distance, such as the Earth-mover's distance. The preserve_distances method does not yet have support for other distance functions, but if you compute the distances yourself, you could create your own MDE problem that was designed to preserve them.
Another option is to compute a k-nearest neighbor graph of MNIST, and pass that graph to preserve_distances. When given a graph, preserve_distances will use the shortest-path metric as the original distance. This might yield a more interesting embedding. I can give you code that does this.

Thanks @akshayka I'd be interested in the shortest path metric if you have code!

@timsainb , sorry for the delay!
I put together a notebook showing how to use the shortest path metric, w/MNIST as the example: https://colab.research.google.com/drive/1JTmy55IFRcdeAPLXS_Sk69j52R-5KvDQ?usp=sharing
Using a small subset of MNIST, and using the most basic loss function (a quadratic) to preserve shortest paths, I get the following embedding, which seems reasonable

The preprocessing functions used in that notebook are documented here: https://pymde.org/api/index.html#preprocessing
It could be fun to play around with the parameters in that notebook, to explore how different preprocessing steps / different distortion functions affect the embedding. Let me know if you have any questions!

Thanks, I'll play around with it. Awesome paper/repo!