Markers with dynamic text.

How do i add dynamic text to the markers?

right now, you have two options

create dynamically icon image with text you want and use that image in marker
use info window to show additional dynamic text or other information. Remember when you use info window , as of now only one info window can be open at time across all markers on map

I hope this help

I am having error when i am trying to attach image:
ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'android' of undefined
     newImage = new Image();
     marker.icon = newImage;

I cant use windows. I need multiple markers with titles always visible.

Do not ask me why ;-)  but you need to do following to make it work on both ios and android, where path shown are image file you created. imageSource.fromFile is required for android , you can import imageSource from import * as imageSource from "tns-core-modules/image-source";
icon.src = '~/assets/markers/square.png';
icon.imageSource = imageSource.fromFile('~/assets/markers/square.png');
marker.icon = icon;

Thank You is working. But how can i add custom dynamic Text into each marker? I would like to achieve something like this:

@bori87 , You need to create dynamically image for each marker. your dynamic image creation need to have logic to create image from text you provide
check following example packages that may help you to understand it
https://www.npmjs.com/package/nativescript-bitmap-factory
https://www.npmjs.com/package/nativescript-textdrawable

Ok is working. Thank You.

Welcome.  Glad, I could help

@bori87 Could you please share the code you used to create the above result? I'm struggling with the arrow pointing downwards and scaling of the square based on size of text. Thanks!

I am using my custom images for markers then i am adding custom text on it. I had the same problems as you and decided to use this approach.
My code is more less like this:
import { ImageSource, fromFile, fromBase64 } from 'image-source';

  private getMarker(size: number) {
    const markerImage: ImageSource = fromFile(`~/assets/marker_${size}.png`);
    const markerPng = markerImage.toBase64String('png', 50)
    return BitmapFactory.asBitmap(markerPng);
  }

  private setMarker(args, offer, markersImg) {
    const fontSize = 24;
    const marker = new mapsModule.Marker();
    const digits = offer.priceForMap_.length;
    const markerImg = getMarker(digits);
    marker.position = mapsModule.Position.positionFromLatLng(offer.location.lat, offer.location.long);
    const bmp = BitmapFactory.create(markerImg.width, markerImg.height);
    const icon = new Image();
    const textTop = markerImg.height - 48;

    bmp.dispose(() => {
      bmp.insert(markerImg);
      bmp.writeText(offer.priceForMap_, `20,${textTop}`, {
        color: KnownColors.Black,
        size: fontSize,
        // name: 'Roboto'
      });

      const base64png = bmp.toBase64(BitmapFactory.OutputFormat.PNG, 75);

      icon.src = 'data:image/png;base64,' + base64png;
      icon.imageSource = fromBase64(base64png);
    });

    marker.infoWindowTemplate = 'pickupTemplate';
    marker.icon = icon;
    args.object.addMarker(marker);
  }

@bori87 Perfect, thanks!


basic vagrant start troubles

I am trying to run basic vagrant planemo-machine following http://planemo.readthedocs.org/en/latest/appliance.html#launching-the-appliance-vagrant
The Galaxy at http://localhost:8010/ is up (as well as the Codebox) but in the terminal I got this
https://gist.github.com/martenson/f788d03cf005501d1438
Also if I understand it correctly the /opt/galaxy/tools on Vagrant should be synced to the folder I run vagrant up from but it is not the case. I see only .vagrant folder in the root.
 That should fix the ssh problem and I wonder if it would fix the syncing also (I am hoping that the mount is working because ssh doesn't work - logic being that the client cannot log in and setup the needed mount with an ssh connection).

After applying https://github.com/galaxyproject/planemo/commit/6a5be66924b917886f0a50b22e4fd3882202164f none of the services will start and log will get stuck on repeating  default: Warning: Connection timeout. Retrying...

Really - can you vagrant destroy and then vagrant up again? If that doesn't help can you comment out the individual lines and let me know which one causes the problem.
I suppose I could do these tests myself and figure it out huh :).

I have been using vagrant halt previously. After vagrant destroy the Galaxy does start up but Codebox will not:
{
  "ok": false,
  "data": {},
  "error": "Could not run API request because user was not authenticated",
  "method": "/ide"
}

And the mounting will also fail:
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'planemo'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: tool_directory_default_1435160666858_79037
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 80 => 8010 (adapter 1)
    default: 9009 => 9009 (adapter 1)
    default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: <IP_ADDRESS>:2222
    default: SSH username: ubuntu
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if its present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
    default: /opt/galaxy/tools => /Users/marten/devel/training/tool_directory
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group ubuntu | cut -d: -f3` opt_galaxy_tools /opt/galaxy/tools
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g ubuntu` opt_galaxy_tools /opt/galaxy/tools

The error output from the last command was:

stdin: is not a tty
id: vagrant: no such user
uid= requires an argument (i.e. uid==<arg>)

I think the codebox problem is you need to use localhost:8010/ide/ not localhost:8010/ide - bonus points if someone can fix that for me.
It does seem like we are making progress though. I'll look into to mounting problems. Seems odd it is looking for a vagrant user.

Seems like original issue was solved, I'll create a new one for the /ide problem.


[Docs] Fix alignment of MeshSync Icon

Current State

Image is extremely Large
Desired State
Position the icon image in line to the MeshSync Heading

Contributor Guides and Handbook

📚 Instructions for contributing to documentation

Meshery documentation site and source

🛠 Meshery Build & Release Strategy
🎨 Wireframes and designs for Meshery UI in Figma
🙋🏾🙋🏼 Questions: Discussion Forum and Community Slack

I would like to work on this issue.

Hi, I'd like to contribute to this issue.

Can anyone please assign me this issue i can fix this i would love to work on this @leecalcote @Chadha93 @Nikhil-Ladha

is this issue, still open ?


Top/Bottom instead of left/right?

While SBS is the more common approach, the alternative is Top/Bottom, and it's relatively easy to do: instead of two images side by side, you stack them.
In video, this often results in higher resolution (the longer resolution is preserved fully and the smaller is cut in half (instead of the reverse), leading to greater overall resolution in pixels).
But on a more practical front:  if you are doing the usual '180' or 360 panorama', the ratio is 2:1 (twice as wide as tall), but if you stack 2 of them using T/B, then your final image (which is now 180 or 360 stereo panorama) is [magically] a perfectly square image with a ratio of 2:1 and then stacking is 1:2, leading to a 1:1 finally... Which if you think about, is ideal for generating and upscaling in SD.
Example usage:
https://renderstuff.com/tools/360-panorama-web-viewer/#panoramic-image-format
Free webbased viewer, just make sure your image host is supported.
Havent' yet looked at code, but hopefully the change from SBS to TB code would be pretty easy, and offer a new choice in the UI.
updated: So yes, looking at code , adding this feature should be pretty easy.  Will you take a PR for it?

Example of this in action:

With viewer, click on Stereo, and you can spin around.  If you have VR capable gear, you do immersive, and it's in 3d.  First attempt, very minor seam where it connects, and the left right separation might need some tweaks in the settings.  But totally working proof of concept.
This is entirely done inside A1111 with SD (and depth model, etc), full 360 rendered environment.

HI guys, very interesting stuff ongoing here.
let us collaborate a bit with my PanoramaViewer Extension.
https://github.com/GeorgLegato/sd-webui-panorama-viewer
I have added method to convert Equirect. => Cubemap (polyhedron net) so inpainting could be easiyl processed on nearly planar tiles.
and of course, the panorama viewer is attached into the Graiod Gallery viewer, so user can dream dpeth+prompt+x => 360 panorma and view it immediately "here".
Then, my extension add an dedicated Tab, which content pane is able to show 3d-panorama-Movies. So, if we can get animated depth => equi-movies, you can simply "send to Panorama Viewer"-Tab.

Also check Mickmumpitz's results of using a equirectangular maps in his new video :
https://www.youtube.com/watch?v=t-8I7EkIL8c

@scruffynerf that is really cool! What sort of prompt do you need to create 360 images?

there are some myths about howto generate 360panoramas using SD.
let me bust them:
1.) every model has been trained on equirectangular images. SO every model I tested gives you "bend" images using the prompt "360 full panoraama view" .
evidence here:

2.) if you wanna have a bit more control over your "bended image" usa the 360 Lora from civitai. You dont need then the prompt "360 full panorama"; instead you can get as many "curvey corners" as strong you prompt the <Lora:360...: 0:5>
3.) to use a Depth map does not "generate" a 360 equirectangular image; it is a depth map from an already existing (real) 360 image. Since the disturbance is given by the map, yes, it results in something.
4.) equirectangular has better resolution as cubemaps; but the suffer on their poles being warped into a single point often; this happen when the Lora or "360 prompt" is too weak. You can use my Panoramaviewer extension to convert equi to cubemap, fix the  poles by inpainting. You lose a bit resolution, actually need to upscale cubemap and then convert back to equi.
check my reddit profile for some tutorials about that.


npm publish

hi,
i noticed your module on github has been cleaned up a bit.
any chance you could npm publish and bump the version?
thx

This has been published as 0.1.0 but it will probably become 1.0.0 relatively soon barring any problems.

cheers.


oidc获取配置错误

版本：higress-2.0.0
请求时报这个错误，不知道怎么处理。
[oidc] Failed to obtain OpenID configuration, current OIDC plugin is not working properly

See discussion: https://github.com/alibaba/higress/discussions/1326


time period on the x axis

Hello,
I have one question regarding the x axis. I would like to present there time periods instead of exact dateTime points - explanation below:
with xAxisDates = [Monday, Tuesday, Wednesday, Thursday]
current behaviour of the chart:

               |-------------|-------------|-------------|
            Monday        Tuesday      Wednesday      Thursday

desired behaviour:
               |-------------|-------------|-------------|-------------|
                    Monday       Tuesday      Wednesday     Thursday

What is the best way to achieve this with your framework?
Best,
Marcin

For which kind of chart is this?

For scatter and line.

Ok, you could hide the default axis (by not passing it to the chart initialiser) and pass a different one which shows the ranges. In this axis the ranges would be normal values. You can use ChartAxisValueString similar to here for the values - and like in the example also add padding values to the left and right such that the labels appear positioned correctly. (instead of chartPoints.map{$0.x} you probably will pass a static array of values, or whatever else source you have for the weekdays).
For the dividers you can either use ChartPointsViewsLayer - which is a generic layer that will generate views based on a chart points array (you would pass the dividers positions as chart points) or adjust ChartDividersLayer to accept an array of axis values instead of only axes, and pass the corresponding axis values.

Great, your solution works just perfectly!
Thanks a lot for your help and for the great framework (the best I've ever seen for charts).
Cheers,
Marcin

Thanks! You were very quick. Glad you could solve it. Seems the generic solution has to wait ;)

Hi @marcinwlodarczyk,
I am also facing same issue. how did you resolved it. any help would much appreciated. Thanks

I add two different layers:

First that defines the beginning of the time frame, the end and the dividers on the bottom
Array<NSDate>(startDate.stride(through: endDate.dateByAddingTimeInterval(timeInterval), by: timeInterval))
where startDate is 00:00 of some day and endDate is 00:00 of the last day

    static func make(innerFrame innerFrame: CGRect, xAxis: ChartAxisLayer, yAxis: ChartAxisLayer, axis: ChartDividersLayerAxis, linesColor: UIColor, linesWidth: Float, start: Float, end: Float) -> [ChartLayer] {         let dividersSettings = ChartDividersLayerSettings(linesColor: linesColor, linesWidth: CGFloat(linesWidth), start: CGFloat(start), end: CGFloat(end))         return [ChartDividersLayer(xAxis: xAxis, yAxis: yAxis, innerFrame: innerFrame, axis: .X, settings: dividersSettings)]     }

Second that defines labels where the first element is shifted by 12 hours which will give me the label in the middle of the day
Array<NSDate>(startDate.dateByAddingHours(12).stride(to: endDate, by: timeInterval))

    static func make(chartFrame chartFrame: CGRect, yModel: ChartAxisModel, dates: [NSDate], chartSettings: ChartSettings, labelSettings: ChartLabelSettings, xAxisDateFormatter: NSDateFormatter) -> [ChartLayer] {         let labels = dates.map {             return ChartAxisValueDate(date: $0, formatter: xAxisDateFormatter, labelSettings: labelSettings)         }         let xModelForLabels = ChartAxisModel(axisValues: labels)         let coordsSpaceForLabels = ChartCoordsSpaceLeftBottomSingleAxis(chartSettings: chartSettings, chartFrame: chartFrame, xModel: xModelForLabels, yModel: yModel)         return [coordsSpaceForLabels.xAxis]     }


translated README.md into french language

Proposed changes
Summarize your changes here to communicate with the maintainers and make sure to put the link of that issue
Types of changes
What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

[ ] New feature (non-breaking change which adds functionality)
[ ] Bugfix (non-breaking change which fixes an issue)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] Documentation Update (if none of the other choices applies)

Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

[x] I have read the CONTRIBUTING doc
[ ] I have signed the commit for DCO to be passed.
[ ] Lint and unit tests pass locally with my changes
[ ] I have added tests that prove my fix is effective or that my feature works (if appropriate)
[ ] I have added necessary documentation (if appropriate)

Dependency

Please add the links to the dependent PR need to be merged before this (if any).

Special notes for your reviewer:
finally my french AP classes has done some work 😂

@uditgaurav @prithvi1307  please review and merge!

@prithvi1307  docker-build-backend is failing

@prithvi1307  please review again!


Creating custom serializer

Hello!
Do you plan to implement possibility to use custom serializer in RatchetTransportProvider.
I need to switch off JsonSerializer.

There are no plans to implement the ability to have a serializer that can insert a raw encoded JSON string into the JSON string of the message.
It is possible to serialize arguments and options/details in just about any JSON supported way by either using the JsonSerializable interface or by creating the a php data structure to match what you want to be encoded.


Fixed #999 - Right Justified Right Fields in Dialogs with Inputs

Description
I added CSS to right justify the input in labels for the dialog box.
Related Issue
Fixes #999. Input is now right-justified.
Motivation and Context
Fixes #999.
How Has This Been Tested?
Originally, the fix affected ALL dialogs, but I changed it to only affect dialogs and labels with inputs. This was tested on Windows 11, Chrome.
I am currently unsure of other forms of dialog boxes, but the two that I tested were;
File -> Load Example
Edit -> Set Geometric Parameters
Screenshots (if appropriate):

Please take a look at the new changes. I've added specific CSS styles to only affect certain items. Please let me know if you want me to go the other route of adding a specific class for this instead.
Before

After


IZPACK-1406:  Preorder dynamic variables according to references among them at compile time

This is an implementation of IZPACK-1406:
At the moment, there are dynamic variables saved as lists of a DynamicVariable list for one variable name, without considering references among them (unresolved values ${...} as part of a variable defintion) referring to another dynamic variable. To make the resolving as most complete as possible, dynamic variables are resolved in a limited number of cycles.
To optimize this, there could be done the following changes:

Analyze the direct value references between variables and pre-order them at compile time using a directed graph and breadth-first search, so that the variables dependent on "others" are shifted after the "others". The result is a pre-ordered list of dynamic variables compiled-in to the installer. Cycles should not be a problem, there should been left unresolved variables in this case (example: a={b}, b={a} -> a=={b}, b=={b} ).
Simplify the DefaultVariables implementation by relying on pre-ordering of the dynamic variables as provided by the list compiled in. This means especially resolving them in one cycle instead of repeating resolving several times. This could also improve the performance of variable resolution especially for installers having a big set of variables accessing files.
During compiling, there could be overgiven a List<DynamicVariable> instead of Map<String, List<DynamicVariable>> to the installer as serialized object.

This has one more positive side effect when there are dependencies of kind variable -> condition -> variable: Conditions depending on dynamic variable values are set effectively immediately and thus can have influence on the further progress of refreshing.
In the previous implementation, the whole progress run in local caches, such conditions have been set effectively at the end, but could not influence the progress of evaluating variables during the different (unpredictable number of) cycles.
This fixes also some complex problems in real world installers for me.
Refreshing dynamic variables is more transparent now.

The latest update fixed all open issues for me and added also a fix for IZPACK-1260.
@Helpstone Can you please check this once more?

Closing this, my latest changes have been merged to https://github.com/Helpstone/izpack/tree/IZPACK-1406_with_conditions and we'll expecting a brand-new pull request from there.


TypeError: TimesFmBase.init() got an unexpected keyword argument 'context_len'

import pandas as pd
import numpy as np
import timesfm as tf

# Carica il file CSV
df = pd.read_csv("file.csv", parse_dates=["Datetime"])
df = df.set_index("Datetime")

# Configurazione del modello
tfm = tf.TimesFm(
    context_len=128,  # Contesto massimo (modificabile)
    horizon_len=5,    # Orizzonte di previsione
    input_patch_len=32,
    output_patch_len=128,
    num_layers=20,
    model_dims=1280,
    backend="gpu",    # Cambia in "cpu" se necessario
)

I receive back:

TypeError: TimesFmBase.init() got an unexpected keyword argument 'context_len'

despite is the standard instruction were officially given . Thanks

WE have moved to using TimesFM Hparams. Please see https://github.com/google-research/timesfm?tab=readme-ov-file#usage


High Score Log

High Score Log
User Story
AS A coding boot camp student
I WANT to take a timed quiz on JavaScript fundamentals that stores high scores
SO THAT I can gauge my progress compared to my peers
Acceptance Criteria
GIVEN I am taking a code quiz
WHEN the game is over
THEN I can save my initials and score

This has been completed


[WIP] Translate HPA page to bahasa

On this PR, I'll translate HAP page to Bahasa. Here I breakdown it to a few parts base on subtitles.

[x] Horizontal Pod Autoscaler
[ ] How does the Horizontal Pod Autoscaler work?
[ ] API Object
[ ] Support for Horizontal Pod Autoscaler in kubectl
[ ] Autoscaling during rolling update
[ ] Support for cooldown/delay
[ ] Support for multiple metrics
[ ] Support for custom metrics
[ ] Support for metrics APIs
[ ] Support for configurable scaling behavior
[ ] Selanjutnya

/assign
/assign @wahyuoi
/cc
/cc @wahyuoi

Related to #20111

/cc @danninov
/cc @qbl

/uncc @phanama
/uncc @wahyuoi
/unassign @phanama
/unassign @wahyuoi

@girikuncoro most of your review already fixed, please recheck again

/check-cla

@ecojuntak all good thanks! can you squash your commit into 1 commit with good message before getting this in?

@ecojuntak are you able to squash commits before this gets merged?
(if that doesn't make sense, help is available)

@ecojuntak if it's not easy to fix the commits, can you simply raise new PR with latest change?

Closed because creating new PR #21989


Add unit test project.

I've added project with unit test using .net core 2.0 and xunit regarding issue #2
Tests are really simple but I hope you will make use of it anyway.
I've changed one thing in your code - instead of List TagsConverter now casts to IEnumerable.
Feel free to comment!

Thanks for this 👏 I will have a look today

For a first cut, this is awesome. Appreciate it. Thanks! :)

Agree, it's nothing fancy.
I can work on coverage though. If you want to unit test some part of code just create an issue or contact me via email.

Preferably all parts of the code need to be tested. I'm quite held up at work to put any more hours into this but if you have some time, you're more than welcome to send more PRs 😄

Is it ok if in the process I do some refactoring? It's your code and your project so I don't want to interfere too much

Its open source for a reason 🙌
As long as it makes sense, I'm OK with it.


Include node stats in output report

Pull Request (PR) description
This is a rebased version of #59
I verified it and can assure that it restores the functionality of the catalog-diff-viewer.
This Pull Request (PR) fixes the following issues
Fixes #57

thanks for the fix!


Added pulsar batching and chunking sample

Added pulsar batching and chunking sample

Ok, thanks. I will do the suggested changes.


Git Fetch Fails with RPC Error and Invalid Index-Pack Output

Expected behavior: The fetch operation should complete successfully without errors.
Git version: git version 2.43.0
Repository URL: https://github.com/RTimothyEdwards/open_pdks
Operating System: Ubuntu 20.04 LTS
Error:
error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
error: 4471 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
error: 28 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

@proppy  please solve this error

@gowreddysuresh :  This is not a problem that is correctable in the PDK.
You may wish to use volare (https://github.com/efabless/volare) to install a pre-built PDK instead of trying to download and build and install the PDK from source material.

@RTimothyEdwards  sky130 pdk was installed successfully using volare but when it is coming to install gf180mcu it is showing this error
(myenv) vlsi@vlsi:~/gits$ volare enable --pdk gf180mcu 0fe599b2afb6708d281543108caf8310912f54af
Version 0fe599b2afb6708d281543108caf8310912f54af not found locally, attempting
to download…
Downloading common.tar.zst… ━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━━━━━  40% 0:06:10
The read operation timed out
please solve this  error

@proppy please give an update on this issue

@gowreddysuresh: as @RTimothyEdwards commented, this is likely due to communication issue between your computer and github server (this applies to downloading the PDK sources as well as using volare, because it relies on github for artifact storage).
I would suggest to attempt to run the same commands on a cloud server environment (aws, azure or gcp) to verify this hypothesis.
@RTimothyEdwards I think this can be closed as it's not really something that can be "fixed" in open_pdks.

can i get an update because i am having the same problem as @gowreddysuresh


src/loopfilter.rs: Deduplicate w/ generics

One small thing (can be resolved later): cargo fmt doesn't really do a good job on loop_filter, do we disable it and format this fn by hand?

One small thing (can be resolved later): cargo fmt doesn't really do a good job on loop_filter, do we disable it and format this fn by hand?

I don't think we should format it by hand.  That'd be really annoying.  What about increasing the line length?  Also, sometimes adding parentheses convinced rustfmt to format it much nicer, like for the many additions that get put on one line each.


feat(tagsInput): Option not to validate an "untouched" control

Add an option for the user to set avoid validation on untouched control.
Closes #784.

Coverage increased (+0.001%) to 99.78% when pulling a0320112c2651d1f2f3f10cb7ccb839a8b11aff3 on alivraghi:no-validation-on-untouched-field into f2e4b7207beb8e87d3685c432195413fa910c2b0 on mbenford:master.

This feature is must, kindly approve pull request.


Better to use %APPDATA%\marks for %MARKSPATH%?

Since %APPDATA% is a more appropriate place to keep a user's program information, do you think it's worth using %APPDATA%\marks for the %MARKSPATH%?
I may be picky, but I find it irritating that my %USERPROFILE% gets increasingly cluttered with .appname folders that I don't need to see in my user files. I'd much rather that sort of data is hidden in %APPDATA%, and I believe this is closer to Windows convention.
I'm happy to make the changes and do a PR if you are open to the idea.

Makes sense to me. Maybe it's even better to use %LOCALAPPDATA% than %APPDATA%, with the loss of XP support. But then again, who still uses XP nowadays...
Note that, in the meantime, you can easily override %MARKPATH% or %HOME% to whatever you want in the System Properties (user or system scope).

%APPDATA% on Vista+ points to %USERPROFILE%\AppData\Roaming which is used for application data that should "roam" to other computers; in Windows 8+ this is expanded to include the Microsoft Account cloud syncing. Rather than being obsoleted from Vista+, it's still in use but points to a different path.
%LOCALAPPDATA% is new to Vista+, and points to %USERPROFILE%\AppData\Local which is used for machine-specific application data. I'd suggest that in the case of jump, the roaming appdata is appropriate.
I'll pop over a PR in a bit. And get round to trying out jump :-P

I suggested %LOCALAPPDATA% because I really think that marks shouldn't be shared between computers through your MS Account or AD/LDAP profile. You mark a local folder which maybe doesn't exist on another machine. Another case : "foo" on machine A points to C:\foo, and "foo" on machine B points to C:\bar\foo. I clearly don't want my marks to be synced and/or overriden between my laptop and my desktop.

After some reflection, I decided to stay as close as possible to the original ZSH plugin, but feel free to fork.


Enhancement: Switching between Chat View and MindMap View

What features would you like to see added?
The concept of Enhancement in this project is great and I really like it.
I hope that my proposal in below is in line with the concept and will contribute to further enhancement of the project.
When using AI chat tools like ChatGPT for brainstorming new content ideas (such as novel or comic storylines), I've encountered some inconveniences:

Only a limited number of specific ideas can be generated at once.
Increasing the number of ideas tends to simplify the content of those ideas.
It's difficult to compare multiple ideas side by side on a single screen.

Personally, I think "MindMap" are well-suited to address these issues. Therefore, I suggest adding a MindMap view.
More details

Pressing the "Switch to MindMap View" button while the chat screen is open will switch the view from chat to a MindMap.
When the MindMap view is open, pressing the "Switch to Chat View" button will change the MindMap back to the chat screen.
Each node in the MindMap will contain two messages:

The root node will contain only one "user message."
Other nodes will each contain one "assistant message" and one "user message," in that order.

Forms will be placed on each node in the MindMap to accept input from the user.
Enlarged nodes will also contain a form, from which users can send messages.
It is possible to receive multiple assistant messages in response to a single user message.
User messages entered into forms on multiple nodes can be sent in parallel.
The MindMap can be zoomed in and out as a whole, and nodes can be moved around for rearrangement.
Clicking on a node with a mouse or tapping on it on a smartphone screen will enlarge the node for a closer view.
Pressing the ESC key or the Close button will close the enlarged node view (the data entered in the form will be synchronized and remain in the form of the node before it was enlarged).

These features are already implemented in a branch of the forked repository below.
https://github.com/ryohei-kamiya/LibreChat/tree/feat-mindmap
For the implementation of MindMap, ReactFlow (https://reactflow.dev/) was used.
Remaining Issues

The feature that allows returning multiple responses to a single request currently only functions with OpenAI's API. This capability has not been extended to other APIs.

I've adapted existing APIs to deliver 'n' responses when the 'n' parameter is included in a request. If 'n' is not specified or set to 1, the system will return a single response.

Separating APIs based on differing response formats might be more logical, but such a division would significantly impact the frontend. To maintain efficiency and minimize extensive changes, I have maintained the current implementation strategy.

The challenge of implementing a streaming response for multiple messages with OpenAI's API led to a design where all messages are returned simultaneously after generation. A specification that allows for multiple reliable streams would be ideal if feasible.

The button for toggling between views is located in the top left corner, which may not be the most optimal position. If a better location is identified, the button should be relocated.
The state management for each MindMap node, particularly for submissions, has become complex.
To keep changes to the existing code base to a minimum, I replicated existing frontend files under new names and applied modifications to these copies. This approach nearly doubled the number of frontend files. Redundant code needs to be reduced.
I aim to give users the ability to adjust the number of responses per request in the MindMap view, which is currently fixed at three. Introducing a button on the MindMap node headers for adjusting the response count is a good idea, but the complexity it adds to state management has prevented its implementation.
Keeping up with the rapid development and frequent updates of the original repository, integrating new changes is a huge challenge for me. The last update included was 5730028b8389100b98cf6e8823b2d66dc0edc9f0, and subsequent updates must be merged.
Sending images from MindMap nodes sometimes causes responses to be truncated. The reason for this issue remains unclear.
In the current setup, dispatching multiple requests concurrently can result in some responses not being displayed on the screen. Reloading the browser reveals the missing responses. Despite recognizing this issue, I haven't identified a straightforward fix, so the problem persists.
The functionality has been tested using a browser(Chrome), but I haven't write any test code.

Which components are impacted by your request?
UI
Pictures
https://github.com/danny-avila/LibreChat/assets/2719533/aa5caddd-d7cb-4b27-b070-f56ab80d66dc
↓ Long version
https://drive.google.com/file/d/1fbcVebsAGbZpgwUy3Ledyfubx6GtoWa0/view?usp=sharing
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Wow, incredible work, thank you for sharing! This is one of the most comprehensive forks I've seen. Thank you for taking the time to dig into the code and making something truly unique. I will like to try it out and maybe make a video about it on YouTube, so others are aware and can provide feedback on what you've made.
There is a lot to digest here, and I hope to address all your points. For now, these 2 points stand out to me:

The challenge of implementing a streaming response for multiple messages with OpenAI's API led to a design where all messages are returned simultaneously after generation. A specification that allows for multiple reliable streams would be ideal if feasible.
To keep changes to the existing code base to a minimum, I replicated existing frontend files under new names and applied modifications to these copies. This approach nearly doubled the number of frontend files. Redundant code needs to be reduced.
In the current setup, dispatching multiple requests concurrently can result in some responses not being displayed on the screen. Reloading the browser reveals the missing responses. Despite recognizing this issue, I haven't identified a straightforward fix, so the problem persists.

When I refactored a lot of the frontend code to the "new" (11/06/23) style of ChatGPT, I changed a lot of the conversation/submission logic for the very purpose of multiple streams/responses at once.
I apologize that I haven't gotten around to multiple streams yet, as I think this could've simplified your approach and had some of your desired effects already.
In other words, streaming multiple responses should be more than possible without much introduction of code or addition of files anywhere in the current codebase. This is made possible by the recoil atom families the app now uses which allows many of the states to be handled on an index basis. A way to handle multiple server-sent events in one view is yet to be implemented but is one example of something that would need to be introduced.
In conclusion, the mind map feature should be tackled when I've added multiple response streaming. The work you've done so far can mostly be used as reference when the update is in place, because I foresee under 20 files worth of changes for adding multiple response streaming on my end (and this is a conservative estimate, as could be lower).
I can't merge your current work without a considerable amount of testing, and even then, the redundant code would bloat the frontend bundle size more than I can allow. Due to my limited time and current focus on the project, this is not currently feasible for me to address personally.
My last point is that the core use case for LibreChat is for the user accustomed to a simpler, familiar interface. As an AI enthusiast, I am open to features like MindMap, and integrating more knowledge-graph-like features is a strong personal desire, but it would need to be far more segmented than it currently is. In an upcoming update, I am introducing an optional "side panel", maybe enabling of the feature can live there.
I highly recommend you join the discord channel so we can communicate in real-time, this is highly encouraged for anyone making significant contributions: https://discord.librechat.ai


goo.gl

Hi, looking for assistance.
in the provisioning app provided with my Eddystone beacons, I have the option to input:
Url - eg - facebook
url scheme - eg 01= https://www.
Url encoded - eg 00 = .com/
Name - eg myFirstEddystoneUrl
My questions are:
How do I set it for .gl or .ly etc.
Where do i place the the rest of the url eg. https://goo.gl/dMa9YA

Which app are you using?
That would be a very strange limitation on the beacon app if that was the case.
I would almost recommend using eddystone-UID and registering with Google if it's going to prevent you from using certain URL's.


ScrollView does not respect pointerEvents: "box-none"

Environment
React Native Environment Info:
  System:
    OS: macOS High Sierra 10.13.6
    CPU: x64 Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz
    Memory: 93.03 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.3.0 - ~/.nvm/versions/node/v10.3.0/bin/node
    Yarn: 1.6.0 - ~/.yarn/bin/yarn
    npm: 6.1.0 - ~/.nvm/versions/node/v10.3.0/bin/npm
  SDKs:
    iOS SDK:
      Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
  IDEs:
    Android Studio: 3.1 AI-173.4819257
    Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.4.1 => 16.4.1
    react-native: 0.56.0 => 0.56.0
  npmGlobalPackages:
    react-native-cli: 2.0.1

Snack uses React Native 0.55.4
Description
When applying box-none as pointerEvents prop on ScrollView I understood that I would be able to click through the ScrollView to any underlaying components if its child container did not fill the ScrollView. This does not appear to work. I can click the child container elements as expected but not the underlaying content.
Reproducible Demo
https://snack.expo.io/HkE9LeVw7

I can confirm this does not work on 0.56

I can confirm this does not work on 0.57.1

I'm having the same issue on 0.57.5

In case someone is searching for a workaround, you can put the underlying container inside the ScrollView as the first child. Then, set stickyHeaderIndices={[1, 0]} on the ScrollView and use the margin on the foremost container to create the same effect.

@buzzb0x would you mind expanding on this a bit. Using stickyHeaderIndices in the parent scroll view breaks pointerEvents: none on child views.

@buzzb0x  How does your margin solution differ from @jjenzz solution regarding the disability to apply pointerEvents="none"?
@barnesheaton How does the pointerEvent on the View inside the ScrollView work if ScrollView doesn't support pointerEvents on itself?
Is there any chance you could post a code snippet to show how you got it to work for yourself?

Frankly the behavior was too hacky to maintain. I ended up changing my UI plans, which is very frustrating… Any Facebook product can definitely be marked as not reliable.

I too was about to change my UI plans and then I found react-native-touch-through-view

I was able to repro this on 0.59 with the example in the snack.

The same problem, any estimate?
@TheSavior why it is low-priority? UI pattern above is very popular nowadays

@barnesheaton Could you share example? I can't make it work


Device did not appear with the intermediate firmware

Hi, having trouble flashing some tuya smart switches I purchased from ebay. The following is a link to the switch.
(1/2/3gang) https://www.ebay.com.au/itm/Smart-Home-WiFi-Touch-Light-Wall-Switch-Panel-For-Alexa-Google-APP-1-2-3-Gang/174338811133?ssPageName=STRK%3AMEBIDX%3AIT&var=473534553974&_trksid=p2057872.m2749.l2649
(4 gang) https://www.ebay.com.au/itm/Smart-WiFi-Touch-Switch-RF-Wall-Light-Panel-1-2-3-4-Gang-With-Alexa-Google-Home/363092177851?ssPageName=STRK%3AMEBIDX%3AIT&var=632304674396&_trksid=p2057872.m2749.l2649
I have all gang iterations (1,2,3,4) in the house that need to be flashed, but currently I'm flashing the 2-gang version.
What I believe is happening, is that once the first smartconfig is sent out, the device exits pairing mode and thus the smartconfig packets are resent. A side note, the switches I tried this on no longer connect to tuya.
logs:
smarthack-mqtt.log
smarthack-psk.log
smarthack-udp.log
smarthack-web.log
smarthack-wifi.log
Thanks for your replies in advance.

https://github.com/ct-Open-Source/tuya-convert/issues/483

Indeed @ortegafernando is correct, this is the new patched firmware from Tuya, #483.


A very simple net to colorize B&W photos designed for deep learning beginners

We use a very simple model for colorizing B&W photos:

Following is the result using only 179 train samples, no transfer learning, no data augmentation

inputoutput

To get a better result, simply increase the number and size of train samples, but which will take much more time to train
Following is the result using 645 train samples:

inputoutput

https://github.com/microic/niy/blob/master/examples/colorizing_photos

Cool!


Add support for Rocket FromParam

This PR adds support for using UUIDs as URL parameters in Rocket.
Example usage:
src/main.rs
#![feature(plugin)]
#![plugin(rocket_codegen)]

extern crate rocket;
extern crate uuid;

use uuid::Uuid;

#[get("/hello/<id>")]
fn hello(id: Uuid) -> String {
    format!("Hello, {}!", id)
}

fn main() {
    rocket::ignite().mount("/", routes![hello]).launch();
}

Cargo.toml
[package]
authors = ["Linus Unnebäck<EMAIL_ADDRESS>name = "uuid-rocket-example"
version = "0.1.0"

[dependencies]
rocket = "0.1.5"
rocket_codegen = "0.1.5"

[dependencies.uuid]
git = "https://github.com/LinusU/uuid"
rev = "b2e3f49"
features = ["rocket"]

Thanks for the PR! It seems to me though that the optional dependency should perhaps be going the other way?

optional dependency should perhaps be going the other way?

I'm a bit new to Rust and don't really understand what you mean here, would you mind elaborating :)

Oh sorry, sure! What I mean is that instead of uuid having an optional dependency on rocket doing it the other way around: having rocket with an optional dependency on uuid.

Aha, yeah I was actually thinking about this. I didn't find any good place to read up on how this is usually done, and best practices on it...
I'll submit a pull request to them as well, and see what thoughts they have :)

Ok!

Oops, didn't mean to close

Looks like this is available in rocket_contrib already. https://api.rocket.rs/rocket_contrib/struct.UUID.html

Cool! I guess that we can close this one then :)


gradfilter_ema for Keras/Tensorflow

Any change Keras/Tensorflow version of code to be added?

Feel free to use my implementation for tensorflow's function API.
Just replace
model = tf.keras.Model(inputs=inputs, outputs=outputs)
with
model = Grok_Fast_EMA_Model(alpha=0.99, lamb=5, inputs=inputs, output=outputs)
If there are any implementation errors please notify me. Thx!!!
class Grok_Fast_EMA_Model(tf.keras.Model):
def init(self, alpha=0.99, lamb=5.0, *args, **kwargs):
super().init(*args, **kwargs)
self.grads = [tf.Variable(tf.ones_like(var), trainable=False) for var in self.trainable_variables]
self.alpha = alpha
self.lamb = lamb
def train_step(self, data):
    # Unpack the data. Its structure depends on your model and
    # on what you pass to `fit()`.
    x, y = data

    with tf.GradientTape() as tape:

        y_pred = self(x, training=True)  # Forward pass
        # Compute the loss value
        # (the loss function is configured in `compile()`)
        loss = self.compute_loss(y=y, y_pred=y_pred)

        if self.optimizer is not None:
            loss = self.optimizer.scale_loss(loss)

        # gradfilter ema from the grok fast paper and github https://github.com/ironjr/grokfast?tab=readme-ov-file
        trainable_vars = self.trainable_variables
        gradients = tape.gradient(loss, trainable_vars)

        updated_gradients = []
        for i in range(len(trainable_vars)):
            if gradients[i] is not None:
                current_gradients = tf.convert_to_tensor(gradients[i])
                self.grads[i].assign(self.grads[i].value() * self.alpha + current_gradients * (1 - self.alpha))
                updated_gradients.append(current_gradients + self.grads[i] * self.lamb)
            else:
                updated_gradients.append(gradients[i])
    # Update weights
    self.optimizer.apply_gradients(zip(updated_gradients, trainable_vars))
    # Update metrics (includes the metric that tracks the loss)

    for metric in self.metrics:
        if metric.name == "loss":
            metric.update_state(loss)

    return self.compute_metrics(x, y, y_pred, loss)


new synonym for beta catenin destruction complex

I came across a pub that used an alternative name for
the beta-catenin destruction complex.  Perhaps this
would be a suitable synonym.
GO:0030877 'beta-catenin destruction complex'
proposed synonym: 'beta-catenin degradation complex' as
used in PubMed:12183362
-Doug
Reported by: doughowe
Original Ticket: "geneontology/ontology-requests/1483":https://sourceforge.net/p/geneontology/ontology-requests/1483

thanks www.movied.org


Only add @canonical_cluster_id if not nil to commands

This PR fixes #97.
We can convert some functions using capture3 to pipeline_rw that results in cleaner code:
args = []
args.push("--clusters=\"#{@canonical_cluster_id}\"") if defined?(@canonical_cluster_id)

Open3.pipeline_rw([sinfo_cmd, *args], "wc -l", "uniq", "grep gpu:", "egrep idle", "wc -l") {|i, o, wait_threads|
  puts o.read
}

Instead of how it's currently done:
o, e, s = Open3.capture3("#{sinfo_cmd} #{ "--clusters=\"#{@canonical_cluster_id}\"" if defined?(@canonical_cluster_id) } -N -h -a --Format='nodehost,gres:#{gres_length}' | uniq | grep gpu: | wc -l")

if s.success?
  @available_gpu_nodes = o.to_i
else
  # Return stderr as error message
  @error_message = "An error occurred when retrieving available GPU nodes. Exit status #{s.exitstatus}: #{e.to_s}"
  0
end

It's not clear how to implement the same level of error checking though. Food for thought.

As for the comment on pipeline_rw vs capture3 for the long single string commands, another approach would be to do the parsing of the sinfo output in Ruby instead. For example gres length is currently calculated using:
 o, e, s = Open3.capture3("#{sinfo_cmd} #{ clusters_arg } -o '%G' | awk '{ print length }' | sort -n | tail -1")
 @gres_length = o.to_i

with Ruby that would be
 o, e, s = Open3.capture3("#{sinfo_cmd}  #{ clusters_arg } -o '%G'")
 @gres_length = o.lines.map(&:strip).map(&:length).max

And for
o, e, s = Open3.capture3("#{sinfo_cmd}  #{ clusters_arg } -N -h -a --Format='nodehost,gres:#{gres_length}' | uniq | grep gpu: | wc -l")
@available_gpu_nodes = o.to_i

you might do something like
o, e, s = Open3.capture3("#{sinfo_cmd}  #{ clusters_arg } -N -h -a --Format='nodehost,gres:#{gres_length}'")
@available_gpu_nodes = o.lines.uniq.grep(/gpu:/).count


Question - Server Side Rendering

Quick verification reg. server side rendering.
Looking at the implementation of the urlQueryConfig it's clear the Singleton holds a single reference to the history object.
Due to that, any aysnc rendering on the server could mix up queries from different requests causing chaos.
This library is not designed to work with server side rendering. Right?
Does that imply I should avoid it for some reason? Caring about the query on the first server side render? I can see many use cases for that.

Good question. I haven't tested it. I think this library should still work in a "read-only" mode without history if you're using react-router (i.e. location ends up in this.props). I believe if the location is not found in the history, it will next try to read from the props of the component, which should be fine in this case.
When I have some time I will work on a server-side rendering example.

@pbeshai Thanks.
For future reference relevant code around the mentioned scenario here


Allow getting Input "axis" and "vector" values by specifying multiple actions

Implements https://github.com/godotengine/godot-proposals/issues/519
In a nutshell, this PR allows shortening this:
var walk = WALK_FORCE * (Input.get_action_strength("move_right") - Input.get_action_strength("move_left"))

To this:
var walk = WALK_FORCE * Input.get_axis("move_right", "move_left")

And this:
var velocity = Vector2(Input.get_action_strength("move_right") - Input.get_action_strength("move_left"),
		Input.get_action_strength("move_back") - Input.get_action_strength("move_forward")).clamped(1)

To this (add , false for no length limiting):
var velocity = Input.get_vector("move_right", "move_left", "move_back", "move_forward")

Some discussion remains on what to do with the deadzones for get_vector. @groud Let me know what you think the best approach is for this. As it is now, it behaves exactly like the above code claims, which many Godot projects already use.
Minimal test project: InputGetAxisTest.zip

So, my idea is that the get_vector function should have, instead of a p_limit_length argument, an argument to determine the shape of the output. This would be either "Circle" or "Square".
When selecting the "Square" mode, the values are not clamped, and the deadzones also should be square shaped:

When in the "Circle" mode, the value should be clamped and the deadzones should be circle-shaped:

Note that, since we have one deadzone for each action, I think we should like, stretch the deadzone on each half axis to make things consistent. Here an example where the up deadzone is greater than other deadzones:

In any case, the circle deadzone requires you to access the underlying raw values for each action. The value returned by get_action_strengh() being modified by the deadzone value, it cannot be used here to transform the deadzone in a circle.
As a final note, I think we should have negative and positive arguments order reversed. It's quite weird, when the API is written in the a left to right language to have to type "right" first and "left" second.They are literally in the reverse order considering their position in the code line.

@groud What is the correct way to get the raw input amount and deadzone amount for a particular action? There doesn't seem to be an API for this, and the deadzone truncation is very deep.
Input::get_action_strength gets values from action_state populated by _parse_input_event_impl which calls InputEvent::get_action_strength which calls InputEvent::event_get_action_status which calls either InputEventAction::get_strength() or InputMap::_find_event which calls InputEvent::action_match which is overridden in many places but for joypads it clamps the value returned from InputEventJoypadMotion::get_axis_value()
Should I add an API for this to Input or InputEvent or Input::Action or InputEventAction or InputMap? I don't want to make spaghetti code to fix this. Also, I noticed Input::_handle_deadzone is a completely unused declaration in the header.

Yep, that's why it's a tricky problem. We may require the user to set the deadzones to zero then add a custom deadzone on top of it, but I really don't like this idea as it is not an obvious behavior.
Instead, I believe that we should store a "raw_strength" along the "strength" in the input map, so that we can make our custom computations in the get_vector() function. This requires some changes here and there but it should not be that hard to implement I believe (basically, it's copying what we do with the strength value but without applying the deadzone)

I think the behavior is good now. I tested it with a Steam controller and it works nice. The first commit by itself is a "just a wrapper over get_action_strength" implementation, and the last 2 commits change this to handle deadzones nicely as described above. Note that currently it uses the deadzone value from the positive X action only. I think implementing a stretched circle would be way overcomplicated and wouldn't actually provide any real world benefit.
What remains is to decide on what order the arguments should be. The current order of (positive, negative) was mostly for similarity with subtracting two get_action_strength values, but indeed it does look confusing especially for right/left. I asked on Discord and there were no strong opinions. I would like community feedback on this, but I think we probably will change it to (negative, positive) as you suggest, I just don't want to change it and then change it back again :P

Note that currently it uses the deadzone value from the positive X action only. I think implementing a stretched circle would be way overcomplicated and wouldn't actually provide any real world benefit.

That is exactly what I wanted to avoid. This is doing a quite unpredictable thing behind the user back. If we don't provide a per half axis deadzone (with such a stretched circle), then we should ask the user, in the get_vector() function, to provide the deadzone override.

What remains is to decide on what order the arguments should be. The current order of (positive, negative) was mostly for similarity with subtracting two get_action_strength values, but indeed it does look confusing especially for right/left. I asked on Discord and there were no strong opinions. I would like community feedback on this, but I think we probably will change it to (negative, positive) as you suggest, I just don't want to change it and then change it back again :P

I agree, let's ask for more opinions on this then.

@groud I made the negative/positive change and I think this is ready for review now.
As for the deadzone, now it can either be manually specified, or if a negative value is passed in (default is -1) it will be calculated automatically from the average of the action deadzones. A deadzone of zero would disable the deadzone.

Thanks!


RFC: mut (x, y, ..) and mut [x, y, ..] pattern shorthand

🖼 Rendered
📝 Summary
This RFC aims to improve ergonomics by allowing you to write:
// tuples:
let mut (x, y, z) = foo;

// arrays:
let mut [a, b, c] = arr;

💖 Thanks
To @scottmcm, @varkor and others for their review and interesting discussions.

While this is (mostly) not a problem any more due to the default match bindings, I think that these rules should aplpy to ref and ref mut as well. It seems inconsistent otherwise.

@clarcharr So the reason why I didn't add that was the default match bindings you mention.
I'm a bit wary of adding syntactic sugar just for the sake of consistency if there won't be anyone who uses it.
Likewise I opted not to allow mut Person { age, name } or mut Foo(x, y) even tho an argument could be made that it would be more consistent to allow that.
However, I don't mind it personally, and if there is consensus within the lang team and within the community, I will certainly add it.

Hmm, I'm torn about this statement

Likewise I opted not to allow mut Person { age, name } or mut Foo(x, y) even tho an argument could be made that it would be more consistent to allow that.

On the one hand I like the restriction to "special" types (tuples & arrays), but at the same time patterns nest, so you can still have let mut (i, Person { age, name }) = ..., at thus the meaning of this needs to be defined anyway, at which point maybe it'd be better to just do the broader change.

@scottmcm

Hmm, I'm torn about this statement
[...]
On the one hand I like the restriction to "special" types (tuples & arrays), but at the same time patterns nest, so you can still have let mut (i, Person { age, name }) = ..., and thus the meaning of this needs to be defined anyway, at which point maybe it'd be better to just do the broader change.

Yeah; I'm torn about this as well, and you make a fine argument. Trying to restrict patterns, like the one you've mentioned, which we might consider unidiomatic will probably just cause hazards for the future. It might be easier wrt. complexity to just do the broader change.
I look forward to the community and the lang team's guidance to make me untorn =P

This doesn't look common enough to me to meet the threshold on a language addition.
But we can actually estimate the effect on the crates.io ecosystem by writing a deny-by-default lint and running it through crater.
If a pattern has by-value bindings and all of them are mut then we have a hit. (Combining multiple lets into one tuple let would be kinda cheating, IMO, since it's a stylistic choice.)

By the way, how mut affects by-reference binding, does it make the references mutable?
mut (ref x, ref mut y)

<=>

(mut ref x, mut ref mut y)

<=>

(ref x, ref mut y)
let mut x = x;
let mut y = y;

Currently we don't have syntax to do this directly in the pattern.

@petrochenkov

But we can actually estimate the effect on the crates.io ecosystem by writing a deny-by-default lint and running it through crater.

Sounds like a nice idea. Would you mind taking a crack at it?

By the way, how mut affects by-reference binding, does it make the references mutable?

I think the interpretation you described is reasonable and is in line with the RFC as currently specified.

Just a heads up, we should probably use permalinks to code instead, so the links remain correct even after the code changes in later commits:

diff_with: https://github.com/bluss/rust-itertools/blob/8be531516fa53551f48747657e0be1c1aeb964bb/src/diff.rs#L46-L48
FormatWith: https://github.com/bluss/rust-itertools/blob/8be531516fa53551f48747657e0be1c1aeb964bb/src/format.rs#L54-L57
minmax_impl: https://github.com/bluss/rust-itertools/blob/8be531516fa53551f48747657e0be1c1aeb964bb/src/minmax.rs#L54-L66
add_scalar, sub_scalar, mul_scalar: https://github.com/bluss/rust-itertools/blob/8be531516fa53551f48747657e0be1c1aeb964bb/src/size_hint.rs#L25

@blaenk Fixed; Thanks!

This grep catches the common case for this feature. Some matches are false positives but still there seems to be hundreds of lines of code that could really use this, only in the ~600 crates searched.

What about structure destructuring:
let mut { foo, bar } = value;

@sergeysova That pattern { foo, bar } is not legal, so you'd have to do mut MyType { foo, bar }. However, I intend to introduce unnamed structs (with named fields) in another RFC soon.

Can macros expand to patterns?

However, I intend to introduce unnamed structs (with named fields) in another RFC soon.

Update:
I wrote up some plans around this, but they didn't really pan out well;
so it looks like I won't write that RFC after all.

The more I look at this, the more it feels like an unusual special case that requires a double-take when reading code.
When you already have a tuple or slice, it doesn't feel that onerous to have to write mut on the individual elements you want to capture and support subsequent mutation of.
And I don't think we should encourage the use of tuples to cram multiple lets into one, which I think this would encourage.

This seems a bit fraught to me. If it were done then I'd vote to do it very conservatively, and make sure it's as uniform and regular as we can make it--nobody likes special cases. let mut (mut x, y) should be an error, as should let mut (ref x, y). Minimizing the potential for subtle and surprising interactions should be the goal. Though truth be told, even though I understand that there we can find code that would benefit from this, I'm not sure it really is common enough that it pulls its weight, especially not if it introduces special cases and makes the pattern grammar harder to learn.

An update... With https://github.com/rust-lang/rust/pull/63945 the compiler now has appropriate parser recovery:
fn foo() {
    let mut [x, y] = 0;

    let mut (x, y) = 0;
}

results in:
error: `mut` must be attached to each individual binding
 --> src/lib.rs:2:9
  |
2 |     let mut [x, y] = 0;
  |         ^^^^^^^^^^ help: add `mut` to each binding: `[mut x, mut y]`
  |
  = note: `mut` may be followed by `variable` and `variable @ pattern`

error: `mut` must be attached to each individual binding
 --> src/lib.rs:4:9
  |
4 |     let mut (x, y) = 0;
  |         ^^^^^^^^^^ help: add `mut` to each binding: `(mut x, mut y)`
  |
  = note: `mut` may be followed by `variable` and `variable @ pattern`

error[E0529]: expected an array or slice, found `{integer}`
 --> src/lib.rs:2:9
  |
2 |     let mut [x, y] = 0;
  |         ^^^^^^^^^^ pattern cannot match with input type `{integer}`

error[E0308]: mismatched types
 --> src/lib.rs:4:9
  |
4 |     let mut (x, y) = 0;
  |         ^^^^^^^^^^ expected integer, found tuple
  |
  = note: expected type `{integer}`
             found type `(_, _)`

error: aborting due to 4 previous errors


ensure we only have a single h1 on the page

There's already an h1 further up the page, we shouldn't have another
here

@soupdragon99 if this looks good could you merge?


Release 1.8.0

Fix #130
Move PowerShell Profile customizations to a PowerShell module on the $env:PSModulePath
Fix #75
Write PowerShell profile customizations to $Profile.CurrentUserAllHosts

@oifland kitchen verify passes. This is ready to be merged.

Once this is released, I want to test out the upgrade experience before we tweet. = )

Fair enough
On Wed, May 11, 2016, 11:05 PM Orion Ifland<EMAIL_ADDRESS>wrote:

Once this is released, I want to test out the upgrade experience before we
tweet. = )
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/Nordstrom/chefdk_bootstrap/pull/131#issuecomment-218668079


Синтаксическая ошибка в имени файла, имени папки или метке тома.

I dont know what is this, but it doesnt work, have an idea?

Hmm, on root of other drive it still dont working.

You have to set pyinstaller path inside generator.py, and make sure you
have installed pyinstaller on your system using pip
On Sun, 27 Dec, 2020, 11:57 am DogyGamer<EMAIL_ADDRESS>wrote:

Hmm, on root of other drive it still dont working.
[image: image]
https://user-images.githubusercontent.com/33190076/103165201-44423680-4847-11eb-9181-7bafc8fc95f0.png
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/PushpenderIndia/KratosKnife/issues/2#issuecomment-751432082,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANORYIRYISBNBBVJZQCQE63SW3HV7ANCNFSM4VKRPVHQ
.

I'd recommend copying all builder files & folders to your C:\ drive where Python is located, as opposed to the D:\ drive. You never know, it might just work out

I'd recommend copying all builder files & folders to your C:\ drive where Python is located, as opposed to the D:\ drive. You never know, it might just work out

your python39 must be root dir c
and also the kratos files
change in generator.py the dir of pyinstaller
that´s all
my test.exe is 8.6mb big !!!

pyinstaller.exe is in scripts of your python folder

You have to set pyinstaller path inside generator.py, and make sure you have installed pyinstaller on your system using pip
…
On Sun, 27 Dec, 2020, 11:57 am DogyGamer, @.***> wrote: Hmm, on root of other drive it still dont working. [image: image] https://user-images.githubusercontent.com/33190076/103165201-44423680-4847-11eb-9181-7bafc8fc95f0.png — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#2 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANORYIRYISBNBBVJZQCQE63SW3HV7ANCNFSM4VKRPVHQ .

Thanks =)


[BUG] Wasm file build

When we run npm run build, sometimes the wasm files inside the build/ folder are not being overwritten but instead the new binary content is appended to the old files.

@Thykof we should try to reproduce this, and check what happens

I never experienced this, and we are compiling all the time. Since November the compiling process has changed.
@ASAPSegfault can you provide more context?


Fix inconsistent quotes in UPL-1.0

Replace non-ASCII quotes with ASCII quotes to

match line 38: the "Software"
match line 60: PROVIDED "AS IS"
match the license authors version at https://oss.oracle.com/licenses/upl/
match the spdx version at https://spdx.org/licenses/UPL-1.0.html

For reference, see related discussion on straight vs. curly quotes on #784. In particular, this change had originally been proposed there, albeit with a weaker rationale :)

Thanks @tomjmech and also to you @waldyrious for your earlier suggestion -- I had not realized at the time UPL-1.0 here was out of sync with the upstream/SPDX versions!


[BUG] - Allegra time locking scripts appear to not be respected

Internal
Summary
When spending from a script address in the Allegra era, the script appears to not be respected when specifying the ADA to only be spendable after a particular slot.
Steps to reproduce
Steps to reproduce the behavior:

Follow instructions within scripts/shelley-allegra/mkfiles.sh to create an allegra era node cluster
Send some ADA to a script address as follows:
Example script:

{
    "scripts": [
        {
            "keyHash": "966e394a544f242081e41d1965137b1bb412ac230d40ed5407821c37",
            "type": "sig"
        },
        {
            "slot": 15000,
            "type": "after"
        }
    ],
    "type": "any"
}

cardano-cli transaction build-raw \
  --fee 0 \
  --allegra-era \
  --tx-in $(VALIDTXIN)#0\
  --tx-out $(SCRIPTADDRESS)+450000000\
  --out-file script_address_tx_body

#create witness
cardano-cli transaction witness \
  --tx-body-file script_address_tx_body \
  --signing-key-file example/addresses/user1.skey \
  --testnet-magic 42 \
  --out-file tx_witness

#assemble
cardano-cli transaction assemble \
  --tx-body-file script_address_tx_body \
  --witness-file tx_witness \
  --out-file send_to_script_address_tx

#submit
cardano-cli transaction submit \
   --cardano-mode \
   --testnet-magic 42 \
   --tx-file send_to_script_address_tx

Spend from the script address

cardano-cli transaction build-raw \
    --allegra-era \
    --fee 0 \
    --tx-in $(VALIDTXIN)#0 \
    --tx-out $(ADDRESS)+450000000\
    --out-file spendScriptTxBody

cardano-cli transaction witness \
  --tx-body-file spendScriptTxBody \
  --signing-key-file $(SCRIPTADDRESSSIGNINGKEYFILE) \
  --testnet-magic 42 \
  --out-file key_witness

cardano-cli transaction witness \
  --tx-body-file spendScriptTxBody \
  --script-file $(SCRIPTFILE) \
  --testnet-magic 42 \
  --out-file script_witness

cardano-cli transaction assemble \
  --tx-body-file spendScriptTxBody \
  --witness-file key_witness \
  --witness-file script_witness \
  --out-file spendMultiSig

cardano-cli transaction submit \
   --cardano-mode \
   --testnet-magic 42 \
   --tx-file spendMultiSig

The transaction will be accepted into a new block before slot 15000 even though the script specifies spending to only be allowed after slot 15000

Expected behavior
The node should reject the transaction
System info (please complete the following information):

OS: Ubuntu
Version: 20.04
Node version: cardano-node 1.24.0 - linux-x86_64 - ghc-8.10
git rev db55a0c4cc94797875edfd416a21453b7a070c90
Cli version: cardano-cli 1.24.0 - linux-x86_64 - ghc-8.10
git rev db55a0c4cc94797875edfd416a21453b7a070c90

The time locking script is also not respected if we timelock before the current slot number. We can spend the UTxO at the script address in this case (when we shouldn't be able to).

Closing for now as "type": "any" allows the UTxO to be spent regardless of time locking

Yep, our mistake. Any vs all mixup.


start event not triggered

Hi,
I'm having a script.js file with the following code …
$(window).load(function(){
    $('body').addClass("page");

    Pace.on('start', function() {
        alert('start') // not fired
    });

    Pace.on('done', function() {
        alert('done') // fired!
    });
});

Pace is properly loaded (the latest version). The "done" event is triggered and the alert fired. However it seems "start" is never fired. I tried with the other events: "hide" and "done" work, the rest doesn't.
Did I miss something here? What do I have to set in order have the start event fire?
I want my header and footer to be loaded immediately, and my content-area to be preloaded. Is there a trick to do that? I thought of using the "start" event to show those element immediately!

I have the same problem!


Node Group Regex

This fix changes the regex check for the environment name for Node
Groups to that which is specified in
https://docs.puppetlabs.com/puppet/latest/reference/lang_reserved.html#environments

Send pull to https://github.com/puppetlabs/prosvcs-node_manager please.


C1202 on MSVC, probably on every sizeof(T) >= 256 class

your library is superb! Having that kind of "reflection light" is handy in so many places!
I was going to make an experimental Config class, which can be reflected for Serialization to file or visualisation etc. At some point my MSVC compiler reports error C1202 when trying to call pfr::for_each_field on that class object. After some investigation it seems to appear when the reflected class reaches 256 Bytes. I.e. I can get this error by either adding more members or by increasing the size of each member.
The attached example has 2 defines, if you set one of them, MSVC (VS2017 15.6.2) will emit C1202.
I hope I didn´t make an error, since I´m not sure if my Cfg Templates do actually fit the requirements. I´m afraid its a compiler limitation w/o workarround...
All I can tell is, if it compiles it works as expected. If you are interested to look into this and need more info please let me know. Thanks!
pfr_C1202.zip

I've added the test and it passes the checks after the PR #29.
Could you please double check that the problem is gone?

Sorry, the notification went into Spam.
I downloaded the develop branch cf3094e, and repeated the test.
It still fails in my Visual Studio 2017 15.8.8 (X86 Mode) with C1202 if the size gets 256.
Do I need to do something else to get the patch?
BTW: In error_pfr_c1202.cpp you need to uncomment line 28 to make the error appear.
Greetings,
Andreas

I updated the testcode as follow:
#define BOOST_PFR_USE_CPP17 1
#include <boost/pfr.hpp>
#include <array>
#include <stdint.h>

struct BigStruct
{
   std::array<uint8_t, 255> arrayMember{}; // commit 6f35c87 -> OK
   //std::array<uint8_t, 256> arrayMember{}; // commit 6f35c87 -> C1202
};

int main()
{
    BigStruct st;

    boost::pfr::get<0>(st);
}

Tests against (commit 6f35c87), the results:
Visual Studio 2017 15.9.9 -> /std:c++latest
std::array<uint8_t, 255> -> OK
std::array<uint8_t, 256> -> C1202
Visual Studio 2017 15.9.9 -> /std:c++latest /permissive-
====================> Boost.PFR: Types with user specified constructors (non-aggregate initializable types) are not supported. boost\pfr\detail\fields_count.hpp	210
Visual Studio 2019 RC -> /std:c++latest (with /permissive or /permissive- or without)
====================> Boost.PFR: Types with user specified constructors (non-aggregate initializable types) are not supported. boost\pfr\detail\fields_count.hpp	210

Full Build Log VS2019 RC
  >------ Alle neu erstellen gestartet: Projekt: magic_get_fix, Konfiguration: x64-Debug (Standard) ------
  Cleaning... 2 files.
  [1/2] C:\PROGRA~2\MIB055~1\2019\PROFES~1\VC\Tools\MSVC\1420~1.274\bin\HostX64\x64\cl.exe  /nologo /TP  -IF:\TEMP\magic_get_fix\. /std:c++latest /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\error_pfr_c1202.dir\error_pfr_c1202.cpp.obj /FdCMakeFiles\error_pfr_c1202.dir\ /FS -c F:\TEMP\magic_get_fix\error_pfr_c1202.cpp
  FAILED: CMakeFiles/error_pfr_c1202.dir/error_pfr_c1202.cpp.obj
  C:\PROGRA~2\MIB055~1\2019\PROFES~1\VC\Tools\MSVC\1420~1.274\bin\HostX64\x64\cl.exe  /nologo /TP  -IF:\TEMP\magic_get_fix\. /std:c++latest /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\error_pfr_c1202.dir\error_pfr_c1202.cpp.obj /FdCMakeFiles\error_pfr_c1202.dir\ /FS -c F:\TEMP\magic_get_fix\error_pfr_c1202.cpp
F:\TEMP\magic_get_fix\boost\pfr\detail\fields_count.hpp(210): error C2338: ====================> Boost.PFR: Types with user specified constructors (non-aggregate initializable types) are not supported.
   Please report this issue to the github along with the structure you're reflecting.

F:\TEMP\magic_get_fix\boost\pfr\detail\sequence_tuple.hpp(116): error C2672: "boost::pfr::detail::sequence_tuple::get_impl": keine übereinstimmende überladene Funktion gefunden
F:\TEMP\magic_get_fix\boost\pfr\detail\sequence_tuple.hpp(114): error C2784: "T &boost::pfr::detail::sequence_tuple::get_impl(boost::pfr::detail::sequence_tuple::base_from_member &) noexcept": Vorlage-Argument für "boost::pfr::detail::sequence_tuple::base_from_member<0,T> &" konnte nicht von "boost::pfr::detail::sequence_tuple::tuple<>" hergeleitet werden.
  F:\TEMP\magic_get_fix\boost/pfr/detail/sequence_tuple.hpp(52): note: Siehe Deklaration von "boost::pfr::detail::sequence_tuple::get_impl"
  ninja: build stopped: subcommand failed.
Alle neu erstellen fehlgeschlagen.

We are not done yet...
I figured in "/fpermissive-" the root cause of compilation failure is an issue determining the field count. With the following patches (workarrounds?) it works:
template <class T, std::size_t Begin, std::size_t Middle>
constexpr std::size_t detect_fields_count(size_t_<Begin>, size_t_<Middle>, int) noexcept {
	constexpr std::size_t next_v = (Begin + Middle) / 2;
	using next_t = size_t_<next_v>;
    return detail::detect_fields_count<T, Begin, next_v>(size_t_<Begin>{}, next_t{}, 1L);
}

template <class T, std::size_t N>
constexpr std::size_t detect_fields_count_greedy(size_t_<N>, size_t_<N>) noexcept {
    return detail::detect_fields_count_greedy_remember<T, N>(size_t_<N>{}, 1L);
}

-> Notice the explicit template paramteres for std::size_t, otherwise it wouldnt select the
" -> enable_if_constructible_helper_t<T, N>" versions. IMO it looks like a compiler bug and there is an issue extracting "N" from size_t_<N>.
Visual Studio 2017 15.9.9 + workarround -> /std:c++latest
std::array<uint8_t, 255> -> OK
std::array<uint8_t, 256> -> C1202
Visual Studio 2017 15.9.9 + workarround  -> /std:c++latest /permissive-
std::array<uint8_t, 255> -> OK
std::array<uint8_t, 512> -> OK
std::array<uint8_t, 513> -> C1202
Visual Studio 2019 RC + workarround  -> /std:c++latest /permissive-
std::array<uint8_t, 255> -> OK
std::array<uint8_t, 512> -> OK
std::array<uint8_t, 513> -> C1202

As a last note, I experimenting a bit on a fork for now:
https://github.com/andj1210/magic_get/tree/msvc_improvements
C1202 was caused by make_index_sequence. Reducing the maximum assumed fields count made C1202 go away therefore. The sizeof(T) seems to be uncritical now.
I´m not sure to miss something, since you already pointed to a commit which change the index / integer sequence.
For unreasonable large field counts there are other problems (288 fields seems to be the next "magic" wall), but thats irrelevant IMO and needs further checking.

I've added a CI run with /permissive- (it fails right now).
I've tried to apply @andj1210 workarounds but avoided the if constexpr as it does not work in C++14. Unfortunately the CI build with /permissive- still fails.

Fixed in https://github.com/apolukhin/magic_get/commit/82658caf7c283fdf843f815904e32f8dc93c9d89
Now the library works on CI with /permissive-

Thanks everyone for the investigations, tests and fixes!


Pod Overhead Problem

When i was reading https://kubernetes.io offical document  Pod Overhead section
I encountered a problem that confused me
This line describes that the scheduler adds the
requests and the overhead and then looks for a node has 2.25 CPU and 320 MiB of memory available.
https://github.com/kubernetes/website/blob/afc1a7112382170fce647aecbf98c2ca0847cf88/content/en/docs/concepts/scheduling-eviction/pod-overhead.md?plain=1#L104-L105
But actually the sample yaml file content is:
https://github.com/kubernetes/website/blob/afc1a7112382170fce647aecbf98c2ca0847cf88/content/en/docs/concepts/scheduling-eviction/pod-overhead.md?plain=1#L58-L80
https://github.com/kubernetes/website/blob/afc1a7112382170fce647aecbf98c2ca0847cf88/content/en/docs/concepts/scheduling-eviction/pod-overhead.md?plain=1#L47-L50
It adds limit and overhead equals 500m(the limit cpu of busybox-ctr) + 1500m(the limit cpu of nginx-ctr) + 250m(the fixed cpu overhead) = 2500m(2.25 CPU)
Therefore, these two are contradictory before and after.
I want to know which is the basis for scheduling, depends on (limit+overhead) or (request+overhead) ?

/language en

/sig node

/sig docs
/sig node

/kind support

Hi, @virtualss
I think the correct behavior of the scheduler is to add the requests and the overhead, not the limits and the overhead when looking for a node that can run a pod.
This is consistent with the Pod Overhead feature description and the Kubernetes Enhancement Proposal for this feature.

If you specify 'limits' but omit 'requests', k8s treats that 'limits' as the 'requests' but won't treat the Pod as Guaranteed QoS.
The calculation 500m + 1500m + 250m = 2250m = 2.25 CPU, which is correct.
/close


[BUG] Replica stuck in buggy state with status.currentState is error and the spec.desireState is running

Describe the bug
A Longhorn volume has replica count 1. The volume is trying to attach however, the replica has status.currentState is error and the spec.desireState is running. This prevent the Longhorn manager pod to start the replica: code. Also, the engine has not running yet so the replica.spec.failedAt has never been set. The result is that the replica is stuck and volume is stuck in attaching state.

 Longhorn should stop the replica and clear the replica.status field before attempting to start it again.
Log or Support bundle
More details can be found at
https://suse.slack.com/archives/C03GV5T0P55/p1656538367100689
Environment

Longhorn version: 1.2.4
Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version: v1.19.8, RKE

Have not tested yet but an idea to reproduce:

Create a volume of 1 replica
Somehow mess up the engine binary on the host but still make sure that it passes the liveness probe of the engine deamonset
Attach the volume and see the behavior

Workaround:

Scale down the workload
Manually reset the spec.nodeId to "" by kubectl edit volumes.longhorn.io <VOLUME-NAME> -n longhorn-system to detach the volume
Scale up the workload

@PhanLe1010 Need to backport to 1.3.1 and 1.2.5. Thanks.

Test steps:
Goal: Make sure that Longhorn retries to attach the volume when the replica failed to start
Steps:

Create a volume of 1 replica. Let's say the replica is on node01

Artificially simulate the replica launching failure by somehow messing up the engine binary on the host but still make sure that it passes the liveness probe of the engine deamonset

Edit the engine-image-xxx daemonset and replace this rediness probe:        readinessProbe:
          exec:
            command:
            - sh
            - -c
            - ls /data/longhorn && /data/longhorn version --client-only

by        readinessProbe:
          exec:
            command:
            - sh
            - -c
            - ls /data/longhorn

SSH into the node01, cd into longhorn engine binary directory (e.g., /var/lib/longhorn/engine-binaries/rancher-mirrored-longhornio-longhorn-engine-v1.2.4) then rm longhorn && touch longhorn && chmod +x longhorn

Attach the volume to node02

Verify that: Longhorn tries to attach volume but fail to launch replica -> Longhorn detaches volumes -> try attach ... The cycle repeat

Delete the engine-image-xxx pod on node01 so that Longhorn redownload the engine binary and replace the fake one we created in the step 2 above

Verify that volume successfully attached

@PhanLe1010 I Followed the test steps to verify this issue, but somehow I'm unable to get the expected result.
Is anything wrong in the following steps?
(1) install longhorn master-head (longhorn-manager 70203d6)
(2) create a volume of replica count = 1, the replica is on node-01
(3) kubectl edit daemonset engine-image-ei-b907910b -n longhorn-system to:
readinessProbe:
          exec:
            command:
            - sh
            - -c
            - ls /data/longhorn

(4) ssh into node-01, then execute:
sudo su -
cd /var/lib/longhorn/engine-binaries/longhornio-longhorn-engine-master-head/
rm longhorn && touch longhorn && chmod +x longhorn

verify the engine image has been modified:
ls -al
# -rwxr-xr-x 1 root root    0 Jul 25 07:21 longhorn

(5) attach the volume to another node node-02, the volume eventually stays in detached / faulted state, no repeating cycle:
test-1 | Volume | longhorn-volume-controller | Normal | 18 minutes ago | 18 minutes ago | Detached | volume test-1 has been detached
test-1-r-c4daaafc | Replica | longhorn-replica-controller | Normal | 18 minutes ago | 18 minutes ago | Stop | Stops test-1-r-c4daaafc
test-1-r-c4daaafc | Replica | longhorn-replica-controller | Normal | 18 minutes ago | 18 minutes ago | Start | Starts test-1-r-c4daaafc
test-1 | Volume | longhorn-volume-controller | Normal | 22 minutes ago | 22 minutes ago | Detached | volume test-1 has been detached

(6) delete the engine-image-xxx pod on node-01 so that Longhorn re-download the engine binary
kubectl delete pod engine-image-ei-b907910b-g6mpp -n longhorn-system
verify the engine image has been re-downloaded and back to normal on node-01:
ls -al
-rwxr-xr-x 1 root root 29465584 Jul 21 14:10 longhorn

(7) the volume still in detached / faulted state, no re-attaching happened.
test-1 | Volume | longhorn-volume-controller | Normal | 30 minutes ago | 30 minutes ago | Detached | volume test-1 has been detached
test-1-r-c4daaafc | Replica | longhorn-replica-controller | Normal | 30 minutes ago | 30 minutes ago | Stop | Stops test-1-r-c4daaafc
test-1-r-c4daaafc | Replica | longhorn-replica-controller | Normal | 30 minutes ago | 30 minutes ago | Start | Starts test-1-r-c4daaafc
test-1 | Volume | longhorn-volume-controller | Normal | 33 minutes ago | 33 minutes ago | Detached | volume test-1 has been detached

the support bundle:
longhorn-support-bundle_ad517fcf-d1a7-44da-8d02-50f172516c48_2022-07-25T07-50-42Z.zip

Thanks @yangchiu for the reporting.
It was a problem in the test steps. I have updated the test steps. Could you try again?
The problem was the volume has never been attached before. Therefore, the replica.spec.healthyAt field has never been set. As the result, the auto salvage logic doesn't kick it and volume stuck in detached and faulted

Verified passed on master-head (longhorn-manager 70203d6) by following the test steps.


Improve performance of Relationships parent

Theme:
Speed up Capture.perf_capture_timer (142s)
by speeding up MiqAlert.target_needs_realtime_capture? (105s)
by speeding up "alert detection" (105s)
by speeding up "get tags for a vm and it's parents" (100s)
by speeding up "get parents" (~50% time, 80% queries)
Goal of this PR:
Speed up the time it takes to lookup a vm's parents by making it quicker to query ancestors/relationships. This speeds up parent_blue_folder and parent_resource_pool
https://bugzilla.redhat.com/show_bug.cgi?id=1346988
https://bugzilla.redhat.com/show_bug.cgi?id=1346999
TL;DR
19% faster, 26% fewer objects, 17% fewer queries, 30% fewer rows returned.
before

ms
bytes
objects
queries
query (ms)
rows
comments

139,250.5
439,519,495*
146,637,247
82,206
44,212.9
101,046
before

1,773.5

11
863.0
11,045
...Metric::Targets.capture_infra_targets

444.8

202
134.9

..Metric::Capture.calc_targets_by_rollup_parent

106.5

80
21.0

..Metric::Capture.calc_tasks_by_rollup_parent

101,671.1

60,223
29,461.1
90,000
..Metric::Capture.filter_perf_capture_now

7,350.9

5,221
5,908.7
10,000
...SELECT "taggings"."id" AS t0_r0, "taggings"."taggable_id" AS t0_r1, "taggings"."tag_id" AS t0_r2, "ta

4,896.8

10,000
3,701.4
25,000
...SELECT "relationships".*

10,203.7

30,000
6,794.4
30,000
...SELECT  "relationships".*

4,701.8

10,000
3,002.7
20,000
...SELECT "ems_folders".*

2,307.0

5,000
1,666.4
5,000
...SELECT "resource_pools".*

35,133.3

21,684
13,716.2

..Metric::Capture.queue_captures

Memory usage does not reflect 71,630,466 freed objects.

after

ms
bytes
objects
queries
query (ms)
rows
comments

112,703.9
245,611,833*
108,651,445
57,206
36,877.4
71,046
after

1,828.7

11
877.2
11,045
...Metric::Targets.capture_infra_targets

441.7

202
132.4

..Metric::Capture.calc_targets_by_rollup_parent

112.1

80
24.1

..Metric::Capture.calc_tasks_by_rollup_parent

74,396.0

35,223
22,228.2
60,000
..Metric::Capture.filter_perf_capture_now

6,055.6

5,221
3,984.9
10,000
...SELECT "taggings"."id" AS t0_r0, "taggings"."taggable_id" AS t0_r1, "taggings"."tag_id" AS t0_r2, "ta

3,879.3

10,000
2,511.9
20,000
...SELECT "relationships"."ancestry"

6,282.9

10,000
5,148.0
10,000
...SELECT  "relationships".*

3,627.2

5,000
2,496.6
15,000
...SELECT "ems_folders".*

2,382.3

5,000
1,719.6
5,000
...SELECT  "resource_pools".*

35,785.4

21,684
13,598.4

..Metric::Capture.queue_captures

Memory usage does not reflect 52,462,392 freed objects.

I tried to cut out cruft from tables. let me know if you need more info

Can you expand on the OP description a bit...those number are meaningless to me without context (e.g. is that 142s total time or 142s faster but what percentage is that)
Do you have some benchmarks for "Speed[ing] up the time it takes to lookup a vm's parents"?

Overall code-wise looks good, but would like some benchmarks to justify it better.

Thanks for the numbers @kbrock .  Sounds good.  Only thing left is my comment on separate method and getting the tests to go green

@Fryguy added scopes and cleared up dumb bug I introduced in fixing up cops

@kbrock I see you made a lot more changes after I gave a :+1:,  and started moving more stuff around...the code was good as is, but now I have to re-review in light of all the new changes...were they necessary to move for this PR?

@Fryguy I'm sorry. The only changes that I think I made are related to your comments.

added a filtered scope per your suggestion
removed filtered helper method from specs per your suggestion
removed assignment_mixin.rb flat_map refactor that was unrelated, unnecessary, and was breaking the tests.

testing:
I ran for >10,000 Vms, with the old method and the new method. and they returned the same value. (not conclusive, but a little reassuring)
Though the Vms probably had the same parent lineage anyway

@kbrock If you remove the parent_blue_folder commit, then this would be fine to merge...that particular commit has issues that could probably be done in a separate PR.
I assume the numbers in the OP are without that commit?  If so, they seemed good to me without that parent_blue_folder commit.

status: extracged 10299, and probably discuss again the blue folder stuff with @Fryguy

majority of the meat has been extracted.
What remains is moving parent_blue_folder over to using scopes. This reduces 8 (12 rows) queries to 3 (6 rows) and shows most of the benefit

@Fryguy is there any legwork I can do on my side to make this easier to merge?
Or anything to extract to a separate PR?
thnx

@kbrock Would like to sit down with you to understand this one like we did last time.  I liked that last time we came to nice elegant answer that covered all use cases, and I have a feeling the same thing will happen here.

WIP until I rebase and produce numbers again


Quicklook does not work correctly in dual pane mode

Describe the bug
Quicklook does not work correctly in dual pane mode.
To Reproduce
Steps to reproduce the behavior:

Go to two separate directories in dual pane mode.
Click on an image (or file) in the first pane and press space.
See that nothing opens with Quicklook, and the focus changes to the first item.
Click on an image in the second pane and press space.
See that Quicklook opens.
Press space again, and see that Quicklook won't close. This is because the focus has changed back to the first pane.

Expected behavior
Quicklook will work as expected.
Screenshots
https://user-images.githubusercontent.com/8879244/106363145-c1544600-62f4-11eb-9030-88fbb6b8e30f.mp4
Desktop (please complete the following information):

OS Version: Windows 10 2004 21301.1000
App version: v<IP_ADDRESS>

This has been partially fixed (I think in part thanks to #3465), but still has issue where the focus will switch back to the primary pane after pressing space to open quicklook in the secondary pane.
https://user-images.githubusercontent.com/8879244/107568991-c8613b00-6bb5-11eb-9b86-7d96c77c9f27.mp4

Still an issue in <IP_ADDRESS>

Still an issue in <IP_ADDRESS>

Still an issue in <IP_ADDRESS>

Fixed in <IP_ADDRESS>


Support informal NO_COLOR standard

details are here: https://no-color.org/
basically, I think we should honor the NO_COLOR=1 env var convention and nix any ANSI color on the terminal when this value is set and nonempty. Once we've done so, we should submit a PR here to add ourselves to the list of projects that support

I am ready to tackle this.
Please ping me if the team wants to add --color auto/always/never/ and respect NO_COLOR env var.

I am ready to tackle this.
Please ping me if the team wants to add --color auto/always/never/ and respect NO_COLOR env var.

@azzamsa sure, we'd accept a PR for this

It turns out that Iroh-CLI uses the Colored under the hood, which supports NO_COLOR out of the box. You can check out its features here: https://github.com/colored-rs/colored?tab=readme-ov-file#features.
The current version of Iroh-CLI already respects the NO_COLOR environment variable, thanks to Colored.

When NO_COLOR is not set:

When NO_COLOR is set:

If my assumption is correct, then will open a PR here https://github.com/jcs/no_color

Nice!  I guess this can be closed then.  Feel free to re-open if that's a mistake though.


Create: 1993-operations-on-tree.java

File(s) Modified: 1993-operations-on-tree.java
Language(s) Used: Java
Submission URLs:  https://leetcode.com/problems/operations-on-tree/submissions/1162419458

Hello, @MHamiid
Can you please have a look at the PR?


Problem: sharing memory between backends

While we can use DSM/DSA or something similar, it's still painfully difficult: managing named segments, translating pointers, etc.
Wouldn't it be great to have a shared address space, in anticipation of Postgres switching to the thread model?
Solution: add the concept of "omni memory" to omni
This omni memory is allocated in the postmaster and is typically equal to the size of physically available RAM, or omni.omni_memory_size configuration parameter.
On Linux, if configured (sysctl vm.overcommit_memory set to 1), we can significantly overcommit. On macOS, it seems to work out of the box (I was able to overcommit to the tune of 50TB)
Omni then provides an API to reserve chunks of memory, as well as iterate over them. Currently, chunk release API is a no-op because it's a very simple allocation scheme: a bump allocator. It can't free. This is rather temporary so we don't have to focus on something more complex.

[ ] Any issues I am missing here?
[ ] Should this replace/merge with the shared memory API? The "chunks" were meant to be big areas, like arenas, perhaps.

In order to avoid unnecessary on-demand paging, perhaps it would be worth to move page allocation metadata to the front.
It's worth considering making shared memory allocations page-aligned so that we can still mark the overarching chunk as PROT_NONE and then mprotect individual page-aligned chunks however we'd like.
This further illustrates the segmentation between omni memory being the simple memory pages provider and shared memory API being the reference counting, module-aware allocator.


Error when sending only bcc emails

send_smtp_email = sib_api_v3_sdk.SendSmtpEmail(
bcc                   = self.send_to,
html_content    = self.content,
sender              = self.sender,
subject             = self.subject,
params             = self.params
) # SendSmtpEmail | Values to send a transactional email
when i try to senf a transactional email with only bbc recipients, the api throw me this error
"Uncaught exception: Invalid value for to, must not be None"

Hi @Esequiel378
This is the expected behaviour and you should pass the recipients in To field as well. Only then the same email will be sent to the recipients mentioned in BCC list.
Thanks


Typo fix: "Requirments" -> "Requirements"

(Seems like the GitHub editor also modified the white space on the last line.)

Thanks!


chore: Move IDE header to ADS/Templates

Description
Extracting out our IDE Header component into ADS for better usability.
ADS Templates are shallow components built using opinionated ADS which provide "slots" to place other business logic components inside it. It reduces the work of using ADS by providing pre built UI components
Fixes #37607
Automation
/ok-to-test<EMAIL_ADDRESS>:mag: Cypress test results

[!WARNING]
Tests have not run on the HEAD 2ec019bebf017528817b835cf553ea54598fbaa1 yet
Thu, 21 Nov 2024 06:19:33 UTC

Communication
Should the DevRel and Marketing teams inform users about this change?

[ ] Yes
[ ] No

Summary by CodeRabbit
Release Notes

New Features

Introduced IDEHeader, IDEHeaderSwitcher, and IDEHeaderTitle components for enhanced header functionality.
Added ListItemContainer and ListHeaderContainer for improved layout in the Entity Explorer.

Documentation

Added documentation for the IDEHeader component to provide usage guidelines and examples.

Bug Fixes

Updated tests for the HeaderSwitcher component to ensure proper functionality and state management.

Chores

Consolidated import statements for better organization across various components.

/build-deploy-preview

/build-deploy-preview

/build-deploy-preview

/build-deploy-preview skip-tests=true


CX Reflected_XSS_All_Clients @ website/pictures/upload.php [master]

Reflected_XSS_All_Clients issue exists @ website/pictures/upload.php in branch master
The application's <?php embeds untrusted data in the generated output with echo, at line 1 of website\pictures\upload.php. This untrusted data is embedded straight into the output without proper sanitization or encoding, enabling an attacker to inject malicious code into the output.
The attacker would be able to alter the returned web page by simply providing modified data in the user input _SERVER, which is read by the <?php method at line 1 of website\pictures\upload.php. This input then flows through the code straight to the output web page, without sanitization.
This can enable a Reflected Cross-Site Scripting (XSS) attack.
Severity: High
CWE:79
Vulnerability details and guidance
Checkmarx
Lines: 83

Code (Line #83):
  <form enctype="multipart/form-data" action="<?=h( $_SERVER['PHP_SELF'] )?>" method="POST">

Issue still exists.

Issue still exists.


[REQUEST] Filter catalogue games by having download options or not

Is your feature request related to a problem? Please describe.
Having to browse games, but having games that don't have download options showing up.
Describe the solution you'd like
Some toggleable control that only shows catalogue games that do have download options.
Describe alternatives you've considered
No response
Additional context
No response

+1

It is a planned feature

This, absolutely this, same thing with the Home page. I have over 10000 download links in my list and half of the Home page is games that have no download options.

Done in 3.1.0


fix: Block end date#309

Description
Added minimum date = start date to dashboard date picker, and gaps patterns page.
I changed the DatePicker component to accept minDate.
The dates before the start date are enabled for the end-date-picker.
screenshots

@amabelleS I'll merge it


Update catalog to sync repos using sync

I've tested this using a test branch job (https://ci.openshift.redhat.com/jenkins/job/test_branch_origin_service_catalog_test/), but copied the parameters from another job and am unsure how pull requests will change there.
(This supercedes https://github.com/openshift/aos-cd-jobs/pull/1513)

If the parent origin job handles merging PRs for origin, then I think this is good.

@stevekuznetsov This has already been pushed. Things appear to be working and my tests to ensure the repos are being synced worked too, but I have no idea how the code is automagically synced at this point.

The log for the clonerefs tool should be uploaded, or if you grep for that tool name in the job log you will see the steps.

This is the tool: https://github.com/kubernetes/test-infra/blob/master/prow/cmd/clonerefs/README.md


Expose the reflector upload process in the app

Is your feature request related to a problem? Please describe.
Many publishes end up with unavailable blobs because people think that when the tx is confirmed in the blockchain, everything is done.
Describe the solution you'd like
A progress bar or some sort of alert for when all blobs have been sent to the reflector. I know the reflector is not meant to be permanent but in reality it is the backbone of the LBRY data network and I don't think there's any reason to be ashamed of it.
Describe alternatives you've considered
There is some material in the publishing FAQ about this but nobody reads that. I've also tried commenting on broken uploads before but in the absence of a notification system the publisher wouldn't necessarily get the message.

Thanks for filing. I don't know if we'll get to it by the time we replace reflector, and we'll need: https://github.com/lbryio/lbry-sdk/issues/2271

In the meantime, maybe we can just add a warning to keep the app open on the publish success page, especially with larger files.

I like that
On Wed, Sep 4, 2019 at 2:34 PM Thomas Zarebczan<EMAIL_ADDRESS>wrote:

In the meantime, maybe we can just add a warning to keep the app open on
the publish success page, especially with larger files.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/lbryio/lbry-desktop/issues/2780?email_source=notifications&email_token=AAMBKOXLZWHTAV5V3K5MCEDQH4NDLA5CNFSM4IO2D33KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD52EOLA#issuecomment-527714092,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMBKOXUQNPKFD5L5WENMH3QH4NDLANCNFSM4IO2D33A
.

--
Dr Brendon J. Brewer
Department of Statistics, The University of Auckland, New Zealand
Ph: +64 27 500 1336
Web: https://www.brendonbrewer.com/