How do i center thumbImage on top of step?

Ask your Question
Is there any way to center the thumbImage above each step?
At the moment based on which side it is of the slider (right or left based on middle value) it is tilting on that side. See images below.
I cant seem to find any information on how to center the thumb based on the active step.
This is my code :
        <Slider
          minimumValue={minValue}
          maximumValue={maxValue}
          step={step}
          tapToSeek
          value={getValue()}
          onValueChange={(e) => handleChange(e)}
          onSlidingComplete={(e) => handleChange(e)}
          minimumTrackTintColor={Colors.default.lime}
          maximumTrackTintColor={Colors.default.lime}
          style={{ zIndex: 1 }}
          thumbImage={require('../../assets/images/sliderThumb.png')}
        />
        <View
          pointerEvents="none"
          style={{ justifyContent: 'space-between', flexDirection: 'row', top: -25, zIndex: 2 }}
        >
          {options.map((i, index) => {
            return (
              <View style={{ alignItems: 'center' }}>
                <SliderTrackMark key={index} isTrue={getValue() === i} />
                <Paragraph style={{ marginTop: 20, textAlign: 'center' }}>{i}</Paragraph>
              </View>
            );
          })}
        </View>

Hello @MattinNajafi, sorry for late response.
The thumb is centered on each step by default on every platform, and it's centering is directly handled by the native implementation of each platform.
Can you make sure your additional background (the components you use to render the fancy track and steps indicators) are correctly positioned?
If you wish, I can happily take a look into that, but I would require some extended repro of yours, as for the snippet you included there are parts I can't directly utilize.
Let me know please!

Hi @BartoszKlonowski! No worries :)
I am creating an array of all options doing this:
 const options = Array.from({ length: maxValue / step + 1 }, (_, index) => index * step);
In the provided example(the images) i show the values are:
 const options = Array.from({ length: 7 / 1 + 1 }, (_, index) => index * 1);
The rest you can see in the codesnippet i wrote in the initial question.
I am wondering if this has to do with the size of number being different since 1 takes less space than 0 for instance.
Do you know another way of creating step indicators?

Well, regarding your code explanations: I don't see where the options are actually used in your snippet you posted, and I still don't know what <SliderTrackMark/> and <Paragraph/> components are composed of, so I won't be able to repro it. I also don't have images/sliderThumb.png you use, and I don't know if it's positioned correctly in the image.
Regarding other ways of step indicator: there already is a question #240, it contains just one answer, so I don't know how much of a help would it be, but please get familiar with it and let me know if it helps. If it won't then maybe we will figure something out regarding your snippet.

Sorry for not being clear.
This is <SliderTrackMark/>
export default function SliderTrackMark({ isTrue }: TrackMarksProps) {   return isTrue ? (     <View style={styles.outerTrue}>       <View style={styles.innerTrue} />     </View>   ) : (     <View style={styles.outer}>       <View style={styles.inner} />     </View>   ); } const styles = StyleSheet.create({   outer: {     width: 10,     height: 10,     borderRadius: 10,     backgroundColor: Colors.default.lime,     justifyContent: 'center',     alignItems: 'center',   },   outerTrue: {     width: 10,     height: 10,     borderRadius: 10,     backgroundColor: Colors.default.primaryBtn,     justifyContent: 'center',     alignItems: 'center',   },   inner: {     width: 7,     height: 7,     borderRadius: 7,     backgroundColor: Colors.palette.primary.dark,   },   innerTrue: {     width: 7,     height: 7,     borderRadius: 7,     backgroundColor: Colors.default.primaryBtn,   }, });
Regarding <Paragraph/> its just a styled <Text> component which is imported from react-native.
Im using options to map out each number that is created with the line of code i send before. So for instance the for the image that i sent first, options in that example is = [0,1,2,3,4,5,6,7]
I dont know if this helps you to understand the issue more. But i thinks its pretty clear now :) Let me know if you need something more to look into this.

Looks like everything I need, I will prepare myself some repro in rn-slider-repro-app.
Thank you for the patience!

iOS is also affected. From what I can see this is the matter of the width of the image. Native platforms try to keep the whole image inside the range of the slider's track. This results in the offset between the image's center point and the step point.

Thank you for doing this. Will help out a lot in future, i dont know if this is the straight way to implement steppers but if you have anything other in mind or any other way that would be awesome.

@MattinNajafi, I found out that in the case of my repro of your implementation (see the PR from rn-slider-repro-app linked to this issue) there is paddingHorizontal required to force the thumb to be exactly at the center of each step:
      />
      <View
        pointerEvents="none"
        style={{
          justifyContent: "space-between",
          flexDirection: "row",
          top: -25,
          zIndex: 2,
          paddingHorizontal: 11,
        }}
      >
        {options.map((i, index) => {
          return (
            <Fragment key={index}>

I'm still on figuring why in my case it's 11, but beside that your implementation looks totally correct.
In fact, as soon as I'll figure out the formula to calculate the padding, I might use your implementation to provide the Slider with some official component to render the steps indicator.
Of course let me know if you don't mind me using it as an inspiration :)

No worries. Do whatever you want, thanks for keeping up the good work. Let me know if there is anything i can do to help out.

Alright, @MattinNajafi, I think I mostly got this!
I've managed to create a Slider with steps marker, where thumbImage is exactly centered on each step. Also, The offset of default thumb is reduced a lot, although for only few steps (less than 5 I observed) the offset may still be a bit observed - I'm still working on that.
Please find the full implementation in the PR: BartoszKlonowski/rn-slider-repro-app#42, where your initial example is somehow refactored.
Also, I'm still working (which can be seen in the linked PR) on making that implementation a base for customizing the step indicator. I'm almost there, polishing the API now and hunting down some bugs, so please expect the ready customized Slider with steps indicator released as v4.5.0 on 1st of September.
Let me know if you have some findings, comments, concerns or anything. Any feedback is more than welcome!


Can't get into Settings

I installed the extension and wanted to configure the settings.
When I opened the VSCode settings and searched for "Stories", it could not find the extension "Stories" in the Settings.
So I am not able to configure the extension.
Reinstalling did not fix the problem either.

There is no longer any settings

Thank You

@benawad how to login? or use the stories?

@WarenGonzaga when you press record story it'll prompt you
Check the readme on how to view the stories

@benawad got it! You may now close this hehe


Flatten sealed attributes with C# binding to external component?

Reading through the changes to the DOM attributes in React 16, I think it makes sense for the attributes classes to be sealed:
https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html
In React 16 any unrecognized attributes will be passed through unchanged to the DOM element, not just the data- and aria- ones they supported before. Hence if the class is extended and passed into a lower level component without first being 'cleaned' (ie: using the spread operator to remove the custom props), those props would end up in the DOM elements which is not what you want.
So given that, we don't really have a clean solution for implementing the wrapper I am working on for the React Number Format component. I am thinking maybe a reasonable solution for the C# wrapper which would make it a little different to the Javascript version, would be to make the InputAttributes a property in the props itself? So something like this:
		[ObjectLiteral]
		public class Props : ReactDomElementAttributes<HTMLInputElement>
		{
			public InputAttributes Attributes { private get; set; }
			public string MyCustomProp { private get; set; }
		}

So to use it, you would create a separate class for the real input attributes and fill in the rest of the attributes for the class itself separately. The problem then is that before it is passed to the real implementation, we would need to pass it through some code to flatten the structure. But I am not sure how we can link this into the constructor call? I currently have this for the constructor:
		[Template("React.createElement(NumberFormat, Bridge.React.fixAttr({props}))")]
		public NumberFormat(
			Props props)
		{
		}

But rather than calling Bridge.React.fixAttr() I could pass it through my own function to 'flatten' the attributes. The question then is, is it possible to output some custom Javascript for the flattening, or can I write my flattening code as a helper in C# and somehow have the wrapper call that?

Did you get a chance to test this? The comment in the code says "As DomElementsAttributes is an [ObjectLiteral]" but type param T is not constrained to being a DomElementsAttributes. I guess that the reason for this is that T is not necessarily a DomElementsAttributes since it's a new kind of props class that has one property that is derived from DomElementsAttributes and then one another property that isn't. You could make this implement an interface that has these two properties but that might feel like jumping through hoops just to appease the type system that is supposed to be helping us. Maybe an alternative would be to write a clone method that takes the DomElementsAttributes props (instead of the NumberFormat.Props class) and the property to set and what value it should get. Like this:
public static class ReactComponentHelpers
{f
    public static T CloneAndSet<T>(T source, string overwritePropertyName, object overwritePropertyValue)  where T : DomElementsAttributes, new()
    {
		// As DomElementsAttributes is an [ObjectLiteral], there is no Bridge state-tracking funny
		// business to worry about when cloning it - it's just a simple JavaScript object
		var clone = new T();
		if (source != null)
		{
			foreach (var propertyName in GetOwnPropertyNames(source))
				clone[propertyName] = source[propertyName];
		}
		clone[overwritePropertyName] = insertPropertyValue;
		return clone;
    }
}

.. then you would call that from the constructor (and then call fixAttr on the result) -
[Template("React.createElement(NumberFormat, Bridge.React.fixAttr(MyNamespace.NumberFormat.FlattenProps({props})))")]

I have checked the generated code but not had a chance to test it just yet. The way I wrote mine, I pass in a new property structure to override the original one as it clones it, so I can update multiple props at the same time.

Yes, I did make NumberFormat props sealed in my implementation for the reasons we discussed.


Publish to pip

This tool looks very useful, thanks for creating it! Would you consider publishing it to pip to make install simpler?

Hey Felix,
good to read you again after such a long time :)
Yes - I definitely consider publishing it to pip. I am going to start the process next week 😃
Best
Hilko

Packaged 🎉
https://pypi.org/project/fotoparadies/
Hope it works :-)

It does. 👍 Thank you very much!


Partially Revert "Address TODOs related to Python 2 (#18874)"

This reverts commit 451b8b8783a19c5405d0d4fb3cc57e68757d9a42.
What does this PR do?

Motivation

Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
[ ] If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Continued in https://github.com/DataDog/integrations-core/pull/18888


TSV descriptions for Setting and Reaching Targets

The mobile app statements are going to be 'setting and reaching targets' in 1.0.2, we havne't had  stab at these yet.
Do we have an idea of what these should include?

anticipating the future: discriminate between a self-assert claim "I reached target" from an authority "X reached target". I suppose setting could also account for autonomous target-setting being different to agreed (student + tutor) target-setting.

From call: This will be co developed with self regulated learning etc in Jisc. Not high prority, but think through flow and have a stab at inputs for the purpose of the discussion.

Created, scope to be decided at a later date


Student Management (updatet readme and demo)

Fixes
#526

Description
Studentmanagement

Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[x] New project (non-breaking change which adds functionality)

How Has This Been Tested?

Tech Stack used:
JAVA

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have included a README.md file
[x] My project follows this structure: Domain Folder/ Project Name Folder/ Project files and Readme.md files
[x] I have added demonstration in the form of GIF/video file
[x] I am a GSSoC'22 Participant

this is also my article written by in gfg.
https://www.geeksforgeeks.org/crud-operations-in-student-management-system-in-java/

@heet-kumar

@DragonUncaged I have tried to talk with Technical team lets hope so reply comes in your favour then it will be good for you.

This article was written by himself so Don't make this plag @heet-kumar


added 500 days of summer, ratatouille, and the devil wears prada quotes

My first open source contribution so please ping me if I did something wrong.
In reference to #3

@jpark799 your branch has conflicts, pls resolve and pr again

@NikhilNamal17 Should be good now. Please ping me if there's still issues, thanks!

@jpark799 congratulations on your first pr.


Add limitation information related to domain names

Note: if the the name given to the AADDS instance is not owned by the organization, it will be not possible to create the external DNS record, for example if the domain name is the default .onmicroft.com, there is no way of creating the DNS record as it is owned by Microsoft.

@Arkthos : Thanks for your contribution! The author(s) have been notified to review your proposed change.

This is rather redundant since you can't generate signed certs for the onmicrosoft.com domain anyway, which is clearly called out in the pre-reqs. That's why the tutorial only shows self-signed certs for testing and creating a local hosts entry. There's no expectation you'd create a DNS record for the self-signed onmicrosft.com domain.


[Question] Disable shim

I really love the pyenv + virtualenv, but I'm not a shim fan.
Are there a way to disable it?

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/31500951-question-disable-shim?utm_campaign=plugin&utm_content=tracker%2F282009&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F282009&utm_medium=issues&utm_source=github).

pyenv will just work fine without having pyenv-init. Try prepending ~/.pyenv/bin to your PATH and manage PATHs to pythons in ~/.pyenv/versions by youself.

Thanks @yyuu

@robsonpeixoto
What's your impression/feedback?

@blueyed it's don't work well, because a script can't set a environment variable =/
I miss something like the pythonz locate 2.7.11. Read more here: https://github.com/saghul/pythonz#print-the-path-to-the-interpreter-of-a-given-version

@robsonpeixoto "pyenv prefix ${version}" could be the thing you're looking for.

Thanks @yyuu


fix: Updated Readme. Added MIT Licencse Badge.

Related Issue
Issue #1837
Description
Added MIT License Badge in the readme file.
Screenshots

@SaketKaswa20 I believe that I have not assigned to you for the issue. We follow the first come first serve rule in open source project. It means if a particular issue already assigned by maintainer then the person can create the PR, if random person creates the PR we will consider it as a invalid.
Thanks for understanding.

Can you assign me this issue then?


changed removals and additions of packages

gparted only on Silverblue
KDE keeps kde-connect, kfind, kcharselect

learned something ;D git is still confusing

gparted only on Silverblue KDE keeps kde-connect, kfind, kcharselect

FYI, gparted is a different tool from gnome-disk-utility. They are unrelated.


No data will be received if the program is opened for a long time

The program is running normally. After half a month or sometimes a very short period of time, no data comes, I am sure that the monitored database has changed.

In addition, I found a problem. If the number to int64 in the program exceeds 20, an exception will be reported. My current approach is to convert it to String


Feature: M2 sequences

Additional groundwork for texture animations.
Please note that this PR includes commits from #126. We should ensure that PR is merged before tackling this PR.
Many (possibly even most) texture animations are part of global sequences rather than being set up as traditional animations. This PR adds support for global sequences to the M2 animation manager.

Nice! I don't think GitHub is clever enough to realize that some of these commits are now already on master. Should we try and fix that or just go ahead and merge this?

Yeah, cherry-picking apparently produces new commits (which I guess makes sense), and GitHub doesn't seem to reconcile that with the master branch.

:tada:


Enhanced the README.md & Fixed the Action Workflow

Hello 💙
In this PR, I have done the following:

Enhanced the README.md file by aligning the example code snippet to the latest package version with a note to clarify the update. 📖
Fixed the GitHub Action Workflow to verify every commit. ✅

Thanks 🙏🏻
Moaz El-sawaf

Awesome, thx!

You're welcome 🙏🏻❤


500 error on /api/saml/auth: Can't create duplicate variable contentOriginal

Hi - Just starting out with the boxyhq/mock-saml Docker image, so it may be a configuration error:
When I go to the app's (mapped to port 8000) login page, I'm redirected to the SAML container's (mapped to port 4000 login page:

After changing the ACS link to my local app instance; clicking 'Sign In' yields an 'Error in getting SAML response' error, and the console reports a 500 Error at the container's /api/saml/auth endpoint, followed up with a js Syntax Error: [Error] SyntaxError: Can't create duplicate variable: 'contentOriginal' which looks like it's in a versioned login.js file:

From the documentation, I believe I have everything set up properly (but happy to provide additional details if it would be helpful) - any help appreciated.

You seem to be going to the IdP login page of Mock SAML, for SP login use the SP metadata details from api/saml/metadata

thx @deepakprabhakara  - shouldn't the SP (the app) be sending the login request to the IdP (Mock SAML container), the user logs in, then the SAML container sends the SAML payload back to the SP, then redirecting back to the main SP page..? the screenshot of the login page is on localhost:4000

That's correct, Your app (SP) sends SAML request to Mock SAML who then logs user in and sends SAML response back to the SP. But you are ending up in the IdP login screen instead of SP login screen of Mock SAML for some reason. Please check that your SAML request is using the correct SSO URL (api/saml/sso).

Ok - thanks for the quick reply @deepakprabhakara  - I'll take a look at the settings in the SP & update the ticket if I make progress.

Ah - I think it might be erroring on the cert:
Compiled /api/saml/auth in 46ms (147 modules)
 ⨯ Error: error:1E08010C:DECODER routines::unsupported
    at Sign.sign (node:internal/crypto/sig:128:29)
    at []mock-saml/node_modules/xml-crypto/lib/signature-algorithms.js:31:32
    at RsaSha256.getSignature (/[]/mock-saml/node_modules/xml-crypto/lib/types.js:52:20)

I generated the certs with ed25519 not rsasha256

That did it! thx @deepakprabhakara  - I created the ssh keys using the commands in the comments in the .env.example file and that bounced me back to the app after logging in using the IdP at 4000 - I think my only request would be to surface the commands to create the ssh key from the .env.example file into the README.md just so users are aware of which algorithm to use.

That makes sense, we'll add it to the docs. cc: @niwsa


Have RR subchannels retry connecting

Fixes #11643

[trickle] No significant performance differences

[microbenchmarks] No significant performance differences

[trickle] No significant performance differences

[microbenchmarks] No significant performance differences

[trickle] No significant performance differences

[microbenchmarks] No significant performance differences

[trickle] No significant performance differences

[microbenchmarks] No significant performance differences

I'm curious what the status of this is.
Is there anything I could do to help move this along?

I think we're waiting for #12829 to be merged before we pick this up again.

#12829 was merged!
(￣▽￣)/‧★"'*-.,_,.-*'"*-.,_☆


Updating hadoopJava and pig jobtypes to allow solo-server installation

Adding dependency to needed for execution of az-hadoop-jobtype-plugin jobtypes
Adding classpath to Pig home needed for execution of HadoopPig jobs
Updating some common*.properties to make it easier to install jobtypes on a solo-server
Adding documentation to help set up a solo-server with the hadoopJava and pig jobtypes

Thanks for the patch. I will look at it shortly.


changed tradier accountID type from int to string

Changed the dataType of the Account ID for Tradier from an 'int' to a 'string' due to the changes made in the API by tradier.

Fixes #520


[parler] Add new extractor

IMPORTANT: PRs without the template will be CLOSED
Description of your pull request and other information

I've added a new extracter for Parler, a social media site where a number of news making videos have been posted. Including it here will be a service to journalists and open-source researchers.
Fixes #
Template

Before submitting a pull request make sure you have:

[x] At least skimmed through contributing guidelines including yt-dlp coding conventions
[x] Searched the bugtracker for similar pull requests
[x] Checked the code with flake8 and ran relevant tests

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[x] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[ ] Fix or improvement to an extractor (Make sure to add/update tests)
[x] New extractor (Piracy websites will not be accepted)
[ ] Core bug fix/improvement
[ ] New feature (It is strongly recommended to open an issue first)

Okay. I think I did all that.

Okay. I think all that is done now too.

As far i can see in the api response, you can extract view_count, thumbnail, comment_count from there. You can set fallback title, description  from the og:* in the webpage

It also possible to get comments when the user log in and have required cookie (parler_auth_token)

Sometimes, it include video that served from other service (eg: youtube). Here's one of them: https://parler.com/feed/f23b85c1-6558-470f-b9ff-02c145f28da5. In this link, the api provide title and video information located in long_link instead in video or video_data

I've added the thumbnail, view_count, comment_count and repost_count. Thanks for pointing that out.
The script does not currently collect the webpage, where we'd find the og tags. Do you think making that additional request should be done here? I'm not clear on the library's philosophy about balancing the number of requests it sends.
If you think it's a requirement, I'll look at adding the youtube support later.

The script does not currently collect the webpage, where we'd find the og tags. Do you think making that additional request should be done here? I'm not clear on the library's philosophy about balancing the number of requests it sends.

It's your call on whether it's worth it. If it's only a fallback, I personally wouldn't include it

@pukkandan, I've made the changes you've requested.
Re: the og tags. Since, as with Twitter, this site doesn't have a clear distinction between a title and a description, only a single block of posted text, I don't see a need to chase down the HTML.
Re: youtube embeds. If there's an established idiom for this kind of "second-hand" videos, I'm happy to implement it via copy pasta from another extractor. But, seeing as this my first feature addition, I'm reluctant to invent a new pattern myself.

Re: youtube embeds. If there's an established idiom for this kind of "second-hand" video, I'm happy to implement it via copy pasta from another extractor.

Once you extract the youtube URL, return self.url_result(yt_url, YoutubeIE). Core code will handle the rest

Thanks, @pukkandan. I've added support for YouTube URLs as well as a test.

Thank you for hanging in for all the changes here.

A backport has been proposed in youtube-dl https://github.com/ytdl-org/youtube-dl/pull/31144

In future, if you wish to implement a PR in both projects, I recommend that you try youtube-dl first. I port all code merged to upstream to yt-dlp periodically (generally before the next release). Code ported like this is treated as "legacy" and so no additional review is made even if it doesn't strictly adhere to our coding conventions. So in total, it will be a lot less work for you


Forge Script could not estimate Gas

So I am forking olympus, and using forge scripts to deploy it.
It says transaction could not estimate gas, when deploying too many events. I comment them out and it works.
How can I not get this error? Would rather not change the olympus codebase.
It also uses my Ethereum to deploy all contracts, my when it reaches the fail point it does not revert

Please don't open issues unrelated to the book in the book repository

could please elaborate a bit more on the issue you're facing from reading this it's not perfectly clear to me I'm afraid

So I am forking olympus, and using forge scripts to deploy it.

on arbitrum?

It says transaction could not estimate gas, when deploying too many events. I comment them out and it works.

what's the error? what command?

It also uses my Ethereum to deploy all contracts, my when it reaches the fail point it does not revert

what's the fail point? it succeeds but there should be an error?

Going to close this as stale.
@MiguelBits if you can answer @mattsse's questions and provide a repo we can clone/run to reproduce that would be great, and we can reopen


Fastnum decimals integration

I've announced a new fast, exact precision decimal numbers crate fastnum.
The current integration with SQLx is implemented in the fastnum crate itself under the feature flag sqlx and
works fine only for PostgreSQL.I would like to move it inside SQLx. Can I expect on your help in PR review  and
reserved feature flag in sqlx à la fastnum?

My disposition is the same as https://github.com/launchbadge/sqlx/issues/3487#issuecomment-2332906362
See the linked comment for discussion on how jiff is integrating with the ecosystem as an example to follow.


Fix bugs, streamline code, and enforce the usage of the Welford algorithm

Hi @hoanganhngo610, I have checked your code and found some problems. They are mostly related to how you were using var: we don't need to create new var objects, just update the existing ones. It is fixed now.
During the process of reading and understanding your code, I took the freedom to make some improvements:

shortening variable names (minimalism is our focus) as long they still kept their meaning
removing redundant portions of the code (buffer, initialize, and get the closest micro cluster)
ensuring that things the user should not access are private

I also removed some one-line micro-cluster properties that could be accessed directly in the code.
Please, let me know if you have any questions. In my preliminary tests, the algorithm is working as expected.

@smastelini Thank you so much for taking time refactoring the code! I don't think there should be any other problems that should be tackled, as such, I will close and merge this pull request!


Address performance

It seems after extended use of the test demo, it becomes increasingly slower. Need to add a destructor to all entities to free resources better.

Resolved in v0.2.0 release


chore(github): update issue template with new github feature

Codecov Report

Merging #291 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #291   +/-   ##
========================================
  Coverage    90.03%   90.03%
========================================
  Files           29       29
  Lines         1324     1324
========================================
  Hits          1192     1192
  Misses         132      132

Continue to review full report at Codecov.

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

codecov 好像真的炸了


Shortcuts overlap

Describe the bug
The shortcuts for the different labels can have the same shortcut as many of the root shortcuts. Like "s", which is also the shortcut for "skip".
To Reproduce
Add a certain amount of labels to config.xml.
Expected behavior
The root shortcuts of labelstudio should be locked.
Screenshots

Environment (please complete the following information):

OS: any
Label Studio Version: 0.8.0

@tristanratz Thank you for your report, it's well known issue. We are working on a new shortcut system, it will be overhauled.

For now the hotkey for skipping task is ctrl+space (not good for Mac users though). And I checked another hotkeys — they don't clash with available symbols for labels' hotkeys. So that's not an issue anymore.
But we are working on better hotkeys anyway.

For now the hotkey for skipping task is ctrl+space (not good for Mac users though). And I checked another hotkeys — they don't clash with available symbols for labels' hotkeys. So that's not an issue anymore.
But we are working on better hotkeys anyway.


Fix replace slash on custom icon

Questions
Answers

Description?
I'm coming with a little fix. When we upload a custom image, Mime type is checked via a PS method.We need to pass full path of file. __PS_BASE_URI__ is replaced by project directory. Ok but sometimes, that constant is equal to / so we replace all / by project directory on /modules/blockreassurance/views...With that fix, we check only first occurence of / on that string.

Type?
bug fix

BC breaks?
-

Deprecations?
-

Fixed ticket?
Fixes #25458

How to test?
See description

Hello @matthieumota
With this PR using 1.7.7.x and 1.7.8.x branch I found two issue :
1- Can't save a new block https://drive.google.com/file/d/1OHlpY5g-2TPriMwImpo-Qi6kbrUAB9h8/view
2- Edit page is not displayed https://drive.google.com/file/d/15cCJbYxO4-eE_i8abnuKZWsqfOqJevw-/view

@sarahdib Maybe it is related to other code. Can we see error stack ?

@matthieumota  This bug appear only with the pr, see the console

@sarahdib I think it is related to other code. Error mean to be in JS.

Hello @matthieumota
We can't approve this pull request because we found regression :
1- Can't save a new block https://drive.google.com/file/d/1OHlpY5g-2TPriMwImpo-Qi6kbrUAB9h8/view
2- Edit page is not displayed https://drive.google.com/file/d/15cCJbYxO4-eE_i8abnuKZWsqfOqJevw-/view
@khouloudbelguith test this PR and found the same bug
When we create a block :

When we edit a block :

Those bug is not reproduced without this PR.

Hello @sarahdib i agree @matthieumota.
Just install the dev and you can't edit block, it's the same for my PR  https://github.com/PrestaShop/blockreassurance/pull/277
Block don't work, i just added some class

Blocked by https://github.com/PrestaShop/PrestaShop/issues/26531

https://github.com/PrestaShop/PrestaShop/issues/26531 was merged 1 month ago so this PR is not blocked anymore
@matthieumota apologies for the time it took could you please rebase the PR ?

@matthieumota the bug looks similar to https://github.com/PrestaShop/PrestaShop/issues/28264 that I fixed in https://github.com/PrestaShop/blockreassurance/pull/393 what do you think ?

Hi @matthieumota ,
Since we had no news from you for more than 30 days, I will follow our guidelines and I'll close this pull request as it seems stale.
Feel free to ping me to reopen or open another one if you think it's still relevant 😉
Thanks!


Enable more of the google features we previously had

Has no use case in present or upcoming work, so closed without doing. Apart from the integration for sheet auth, but there is a separate issue for that.


Ajax PUT call returning Turbolink.clearCache() in response. See the below description for details

I have enabled turbolink in my ROR app. now if i open http://localhost:3000/about two times in different tab  by copy pasting the URL, then Ajax call which i put on the button inside about page is giving me
Turbolinks.clearCache()
Turbolinks.visit("http://localhost:3000/about", {"action":"replace"})

instead of proper response, because of which my flow is breaking.
can anyone help me with it..?

Hey @SK-CSE,
That behavior is expected if your controller action is returning a redirect and is explained here. Is it safe to say that the controller action for your PUT request is redirecting (via redirect_to or redirect_back, most likely) back to the about page?

@welearnednothing  in the response of PUT request i am sending render json: { data: @data, current_time: Time.zone.now }
let's suppose i opened same link in 4 times in different tabs, let's say : tab1, tab2, tab3, tab4 then all even number tabs like tab2, tab4 is sending desired response but all odd tabs like tab1 and tab3 is sending
Turbolinks.clearCache() Turbolinks.visit("http://localhost:3000/about", {"action":"replace"})

@SK-CSE When you say the even numbered tabs would work and the odd ones wouldn't, I'm missing something. Why would some tabs return different responses? Since these requests are in response to a PUT request, it sounds like, per the link above, that Rails and Turbolinks are doing what they're supposed to do.
In your original post, you say "my flow is breaking". Can you clarify what you're expecting to happen form a user perspective and what is actually happening? And/or any other info you provide that would help me understand the problem you're having. Thanks!

@welearnednothing when i say "my flow is breaking" means I am using the response sent by the server and based on that I am showing and hiding few elements, but since i am getting Turbolinks.clearCache() Turbolinks.visit("http://localhost:3000/about", {"action":"replace"}) on odd number tab let's say tab1 tab3, on those tabs if I make PUT requests then i am unable to show or hide elements which i am doing based on my server response. while my tab2 tab4 which I opened by copy-pasting the same URL work fine as i am getting my server response on those tabs

@SK-CSE Copying/pasting a URL into your browser is a GET request - so you're comparing the results of a GET (read) versus that of a PUT request (write). By default in Rails, these won't even hit the same controller actions. So we may be comparing apples and oranges, here.
That said, the response you're getting only makes sense if you're using redirect_to in your controller, but is not what you should be getting if you're not redirecting and only rendering. Are you certain the correct controller action is being called and are you certain you're not calling redirect_to anywhere in the controller action being called?

@welearnednothing PUT request is triggered when clicking a button which we get when we render the web page, so i don't think copy pasting urls will not affect it. in the response of PUT request i am sending render json: { data: @data, current_time: Time.zone.now } from backend but on all odd tabs like tab1 tab3 I'm getting Turbolinks.clearCache() Turbolinks.visit("http://localhost:3000/about", {"action":"replace"})

@SK-CSE are you able to post a minimal reproduction app? It really helps when trying to debug issues like this.

Closing as inactive


What I need for Live Stream and Static Image via http?

Hello,
I've a GoPro HERO3 and I would like to obtain the following:

URL to get a Live Stream
URL to get a Static Image

How can I obtain what above?
Actually I've installed succesfully the goprohero library. I'll test this evening how con connect the board to the GoPro WiFi.
Thanks!
Simon

Hi, @xefil.
There is a special install section for the Live Stream Image Capture. First make sure you've read through that.
Afterwards, you should be able to use the image() method.
As for the video, this library doesn't expose a video method directly, but you could copy the image() method (source) and let the whole stream pass through instead of taking a single frame. You should also be able to connect to the camera video stream directly from something like VLC. The URL is stored here in the code.
Hope that helps!

Hello @joshvillbrandt ,
Thanks for the fast answer.
I've read the doc but cannot figure out how to work with.
Well, from a Windows PC I'm able to connect to the GoPro and play the stream via VLC.
So, the GoPro works.
The board on which I would like to see the content is a little ARM board without web interface.
I was able to connect to the GoPro (WiFi) from the board and then i can ping the GoPro.
I've taken a look on the doc, but even with the 'goproctl' command I cannot contact it. In example:
~# goproctl <goproSID> <goproWiFipassword> power off Traceback (most recent call last):   File "/usr/local/bin/goproctl", line 23, in <module>     network = Wireless(args.interface) AttributeError: 'Namespace' object has no attribute 'interface'
my network:
`
ifconfig
enx00e140401eb1 Link encap:Ethernet  HWaddr 00:e1:40:40:1e:b1
inet addr:<IP_ADDRESS>  Bcast:<IP_ADDRESS>  Mask:<IP_ADDRESS>
inet6 addr: fe80::2e1:40ff:fe40:1eb1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:4 errors:0 dropped:32 overruns:0 frame:0
TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5066 (5.0 KB)  TX bytes:65345 (65.3 KB)
eth0      Link encap:Ethernet  HWaddr 02:d1:0b:02:4f:13
inet addr:<IP_ADDRESS>  Bcast:<IP_ADDRESS>  Mask:<IP_ADDRESS>
inet6 addr: fe80::d1:bff:fe02:4f13/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:3049 errors:0 dropped:0 overruns:0 frame:0
TX packets:2027 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:448875 (448.8 KB)  TX bytes:412960 (412.9 KB)
Interrupt:117 Base address:0x8000
lo        Link encap:Local Loopback
inet addr:<IP_ADDRESS>  Mask:<IP_ADDRESS>
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING  MTU:16436  Metric:1
RX packets:279 errors:0 dropped:0 overruns:0 frame:0
TX packets:279 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:62945 (62.9 KB)  TX bytes:62945 (62.9 KB)
`
The goal, as described, is to obtain two URL to get the content, one for image, one for stream.
For the images, as soon I'm able to get an image from the GoPro, I could copy it with a script on a page that is served via Apache. But I need to get the image.
For the stream, I've no idea how to convert the stream to something via URL... one step at time ;-)
Thanks for your help!
Simon

This repo build on the wireless library. Does that arm board match one of the supported environments in the wireless library? (Check out the "Description" section at that link.)

I'm using NetworkManager and nmcli is there as command:
~# ps -edaf | grep -i netw
root       588     1  0 18:22 ?        00:00:05 /usr/sbin/NetworkManager --no-daemon
root      2276   588  0 18:25 ?        00:00:00 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /var/run/dhclient-enx00e140401eb1.pid -lf /var/lib/NetworkManager/dhclient-e46daf25-0078-4e15-98a6-ab5e5ad3c8e9-enx00e140401eb1.lease -cf /var/lib/NetworkManager/dhclient-enx00e140401eb1.conf enx00e140401eb1
nobody    2287   588  0 18:25 ?        00:00:00 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var/run/NetworkManager/dnsmasq.pid --listen-address=<IP_ADDRESS> --cache-size=0 --conf-file=/dev/null --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq --conf-dir=/etc/NetworkManager/dnsmasq.d
# type -p nmcli
/usr/bin/nmcli

About the permissions, actually I'm running the commands as root, so should be able to do everything.
Ideas?

Hello @joshvillbrandt ,
I've compiled the whole from github and now I can connect to the gopro via goproctl passing the interface name. Can I get a picture from the camera via the goproctl ?
Thanks, Simon


fixed update calls delete #5

fix breaking bug for r 0.2.1

fixed bug

now updates and doesn't delete!


Why not broadcast buffers?

https://github.com/open-mmlab/mmdetection/blob/8732ed96a85163fc4fb6d36b52ff3c3d25172611/tools/test.py#L153
broadcast_buffers=False makes BN buffers different on each GPU. Why not set to True?

The initial buffers are the same for each device if a pretrained checkpoint is provided.
It is a common practice that broadcast_buffers is set to False for distributed training. If you care about it, SyncBN will sync running mean and var among devices.


Not Using Babel for Webpack Config

After added react on rails with webpacker lite to a Rails 4.2 app, webpacker lite appears not to be using babel which throws an error on the webpack config.
11:57:05 client.1 | const { resolve } = require('path'); 11:57:05 client.1 |       ^ 11:57:05 client.1 |  11:57:05 client.1 | SyntaxError: Unexpected token { 11:57:05 client.1 |     at exports.runInThisContext (vm.js:53:16) 11:57:05 client.1 |     at Module._compile (module.js:373:25) 11:57:05 client.1 |     at Object.Module._extensions..js (module.js:416:10) 11:57:05 client.1 |     at Module.load (module.js:343:32) 11:57:05 client.1 |     at Function.Module._load (module.js:300:12) 11:57:05 client.1 |     at Module.require (module.js:353:17) 11:57:05 client.1 |     at require (internal/module.js:12:17)

Turns out I needed to upgrade Node.js.


parse streams from function config

thanks for building this!
instead of having a separate config object in custom, why not just parse the streams from the per-function event configuration (like this one)?

Hi @mvayngrib
Our initial attempt was like what you have suggested, however, we encounter a problem in relate the function with a local DynamoDb table by provided Arn / cloud formation fn. If you have any idea, please advise. Cheers.


Small documentation clarification

Add a note that Beemo only outputs logs to the actionlog channel when it detects a raid, otherwise it is quiet.  This is an attempt to reduce the number of 'is it working?' doubts from users.

Feel free to wordsmith it any way you like : )


Add tests for SSE-C,SSE-S3 encryption

This is blocked on https://github.com/minio/minio/pull/6488 and Mint update to run server with MINIO_SSE_MASTER_KEY env set

@harshavardhana , yes it can be reviewed.

ping @aead

Marking this as blocked until an environment variable is introduced to run SSE-S3 tests similar to the one in minio-dotnet

@vadmeste and @aead, can you reapprove - added a env variable ENABLE_KMS to run SSE-S3 functional tests only when kms is set up


Contents of clipboard

Is there a way to include the contents of the clipboard in a message? Or could this feature be added?
My use case is a multi-action in Streamdeck that selects my browser window, copies the URL, and then I want to paste it into a message for a bot.

Sorry for the slow response.
Interesting use case. I guess to implement that it'd need to have some sort of message template where placeholders get replaced when the message is being built to post to the webhook.
I'll look into it on the weekend; to be honest I haven't touched this code in a long time but it has been getting more attention lately so maybe I need to actually maintain it? 😅


Make official Docker image build from source

Docker Hub allows you to create Automated Builds from source: https://docs.docker.com/docker-hub/builds/
It also allows to create different image tags from git tags & branches.
By making the image build via an AB, you give the resulting image verifiability and auditability. Also, the build is fully automatic. You can have the latest image tag build from HEAD and individual image tags from git's release tags.
Some people avoid non-verifiable (manually uploaded) images due to security & traceability reasons.
Docker search command clearly displays AB:
$ docker search ghostunnel
NAME                   DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
squareup/ghostunnel    A simple SSL/TLS proxy with mutual authent...   1
crewjam/ghostunnel                                                     0
pataquets/ghostunnel   ghostunnel                                      0                    [OK]
shkrid/ghostunnel                                                      0
apiaryio/redis-tls     Built from https://github.com/square/ghost...   0

That's pretty neat, wasn't aware of this feature. I just set this up for the squareup/ghostunnel repo on Docker Hub, let me know if something is missing.

Awesome! Thanks for the quick reply.
Also deleted my own AB (using go get) from Docker Hub.
Thank you.


how can I cross compile clspv in x86 for risc-v

It failed when i add this codes.

Could you add the log of the failure?
My guess is that it failed regarding llvm tablegen. We are cross-compiling clspv for ChromeOS, here is how we do it:
First, what you need to do is to build tablegen with your local compiler (no cross compilation).
Have a look at what is done in build_host_tools here.
And then, you just need to keep what you have added plus what is here
If the failure is not related to llvm tablegen forget about everything above obviously.


V4 [DOC] modal and tooltip & popover

Hi
On this page
https://v4-alpha.getbootstrap.com/components/modal/#tooltips-and-popovers
the 2 examples with the tooltips and popover dont work (safari)
i can open the modal and close. But if i click on the button to show the popover or tooltip  i can not close the modal and must reload the page to exit of the modal ...
Thanks

oups sorry already noticed


Idea: Get stage localisation from asset pack for stage striking app

Some games now have access to localisation data for some languages, namely for game title, character name and stage name. As such, it would probably be a good idea to add support for those localisations in the localised stage striking app (While keeping en as the default)

Should be done in 4.7


Facing an issue to design my own robot implementation

I am trying to clone the current mBot implementation to design my own robot implementaion and facing difficulty in modifying web/html files because I couldn't find the source code in my repository.Hope you will help me with this.

Robot related properties, like visual names, capabilities etc are defined server side in the properties. For mBot you can find the properties here. You can change the robot.real.name, if you want. Simply rebuild the system, restart the server and you should see the changes on the website.
All robot related properties are stored in projects together with the source code. For Arduino like systems we have one project, RobotArdu, so that all Arduino like systems can reuse code easily.


center position of whole form

How to force "white container" (https://demos.creative-tim.com/material-bootstrap-wizard/wizard-book-room.html) to be centered no matter of col-offset and of screen width? And how to determine maximum width of the same "white container"?

Hi, @karaspr! Thank you for using our products. You can put margin: 0 auto; on the div.
Regards,
Dragos


What is the "menu" key?

It is not clear to me what "menu key" means in the context of this event handler.
Is this the context menu key, the alt key, or something else? Does it vary by platform?
Thanks!

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

ID: 2a583f7b-36b2-b642-23ef-263cf1a400a7
Version Independent ID: 254bfe21-f0bb-9d8b-ba33-9e59dbf01bf5
Content: CorePhysicalKeyStatus.IsMenuKeyDown Field (Windows.UI.Core) - Windows UWP applications
Content Source: winrt-api-build/xml/Windows.UI.Core/CorePhysicalKeyStatus.xml
Product: uwp
Technology: winrt-reference
GitHub Login: @jwmsft
Microsoft Alias: jimwalk

This is clarified on the Keyboard events overview:

The Alt key is represented by the VirtualKey.Menu value.

But I think it makes sense to document it here as well, or link to the main page.

API topic has been updated with the suggested detail. Thanks!


Storage Actuator Base causes texture of adjacent block faces to become see through

Describe the bug
When you place a Storage Actuator Base next to a block it causes the adjacent block face to stop rendering and become see-through. See Screenshot.
To Reproduce
Steps to reproduce the behavior:
Place a Storage Actuator Base (Note: not a Dimensional Storage Actuator) next to a solid block like Stone or Cobblestone.
Expected behavior
The texture of the adjacent block face should remain visible.
Screenshots
https://i.imgur.com/FbDuLNG.png
System (please complete the following information):
occultism-1.16.5-1.0.12
Windows 10
MC 1.16.4
Forge 35.1.36

are you using optifine by chance?

No not using optifine or any shaders, nothing that'd really change the visuals of vanilla items.


503 UAEX “”UNAVAILABLE:upstream connect error or disconnect/reset before headers

Bug description
When ServiceA connecting ServiceB we are seeing 503 UAEX “”UNAVAILABLE:upstream connect error or disconnect/reset before headers
Affected product area (please put an X in all that apply)
[ ] Networking
Steps to reproduce the bug
Install istio 1.1.2 connect SvcA to SvcB using host and port .
Version (include the output of istioctl version --remote and kubectl version)
Istio 1.1.2
How was Istio installed?
Regular deployment not with helm
Environment where bug was observed (cloud vendor, OS, etc)
K8 version 1.13.4
Additionally, please consider attaching a cluster state archive by attaching
the dump file to this issue.

Please add more details. See https://github.com/istio/istio/wiki/Troubleshooting-Istio on how to collect this.
Without your config we have no way of debugging this


Display problem when importing a workflow saved on a screen with another resolution

Hello,
If I load a previously saved workflow with a screen with a specific resolution onto another screen with a different resolution, the blocks are moved and the arrows point to white.
After analyzing a bit, I realized that it is the reaarangeMe() call in the flowy.load function that is the problem.
If I comment on this reaarangeMe(), everything looks good.
Is this normal? What is the purpose of this call?

The problem is not related to the screen resolution but to the dimensions of the canva

I am having the same issue. I've tried setting specific pixel values, vh/vw, percentages, as well as keeping the canvas dimensions the same regardless of window size, as well as responsive. Could you elaborate on the issue's relation to canvas dimensions?

I'm having the same problem, whenever I import it is with the wrong assembly, does anyone have any suggestions?

Just fixed it with the new updates (also fixing some other issues related to canvas positioning and offsets).


Remove the link to the unused page in the side menu

This is a Bug Report

Problem:
In the left side menu, there is a link "検索結果" ("search result" in English), but this link shows a page that has no meaning.
Screenshot:

Proposed Solution:
Remove the link. For that purpose, delete the search.md in the content/ja/docs directory. There is sitemap.md in the same directory, which is also not used (see https://kubernetes.io/ja/docs/sitemap/), so we can delete it.
These files do not exist on the directory of the other languages: content/en/docs and content/ko/docs. I assume that they are the old files.
Page to Update:
https://kubernetes.io/ja/docs/home/

/language ja

/triage accepted

/assign

/close


Handle EOFException during VR Health Check

Description
VR health check throws EOFException due to malformed/Invalid JSON.
Addresses issue: https://github.com/apache/cloudstack/issues/3893
Types of changes

[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] New feature (non-breaking change which adds functionality)
[X] Bug fix (non-breaking change which fixes an issue)
[ ] Enhancement (improves an existing feature and functionality)
[ ] Cleanup (Code refactoring and cleanup, that may add test cases)

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

Packaging result: ✖centos6 ✔centos7 ✔debian. JID-974

@blueorangutan test

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

Trillian test result (tid-1154)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 29551 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3919-t1154-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_certauthority_root.py
Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
Smoke tests completed. 80 look OK, 0 have error(s)
Only failed tests results shown below:

Test
Result
Time (s)
Test File

Changes lgtm, some further improvements advised. Let's test them now.
@blueorangutan package

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

Packaging result: ✖centos6 ✔centos7 ✔debian. JID-989

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

Packaging result: ✖centos6 ✔centos7 ✔debian. JID-990

@blueorangutan test

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

Trillian test result (tid-1177)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 28522 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3919-t1177-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_nic.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Smoke tests completed. 79 look OK, 1 have error(s)
Only failed tests results shown below:

Test
Result
Time (s)
Test File

test_01_nic
Error
53.41
test_nic.py

Anybody testing? @PaulAngus @Pearl1594 @borisstoyanov @andrijapanicsb

I can, if I'm told how to reproduce the original bug (once I tried this some time ago, I couldn't reproduce it - but I know it's a valid issue)

it's a rare case, perhaps @PaulAngus can advice who was able to see/reproduce it @andrijapanicsb @DaanHoogland

Merging this.


Edit Layers - Finish - how to define an event?

help me, how to track the event when the button is pressed? Thank!

You can use the event pm:actionclick but if you want to know when the Edit Mode is disabled I suggest you to use the event pm:globaleditmodetoggled:
map.on('pm:globaleditmodetoggled', (e)=>{
   if(e.enabled === false){
      // Your code
   }
});

https://github.com/geoman-io/leaflet-geoman#actions
https://github.com/geoman-io/leaflet-geoman#edit-mode

Thank!!! Tell me how to find out which polygon has been updated?
map.on('pm:globaleditmodetoggled', (e)=>{
		if(e.enabled === false){
			e.layer.on('pm:update', ({ layer }) => {
				/* ? */
				console.log('This landfill has been updated.', layer);
				/* ? */
			})
	   }
});

you have no reference to the layer in the event pm:globaleditmodetoggled, use this:
map.on('pm:create',(e)=>{
// add event to layer when it is drawn
  e.layer.on('pm:update',(x)=>{
    console.log(x);
  })
})

you have no reference to the layer in the event pm:globaleditmodetoggled, use this:
map.on('pm:create',(e)=>{
// add event to layer when it is drawn
  e.layer.on('pm:update',(x)=>{
    console.log(x);
  })
})

Unfortunately, this does not work if I have loaded the polygons from the database.
This works - if polygons were created and modified.
And if the polygons were counted from the database (ajax, geojson ...), then for these polygons, the event does not occur.

You add the the polygons anywhere to the map and there you need to add the listener pm:update to the layer. If you don't understand, please share your code as snippet, online demo or as .txt file

You add the the polygons anywhere to the map and there you need to add the listener pm:update to the layer. If you don't understand, please share your code as snippet, online demo or as .txt file

	var polygonLayer = L.geoJSON(null, {
			polygonToLayer: function(feature,latlng){
				return new L.polygon(latlng, {
				  title: '111'
				})
			}
		});

	function ShowPolygon() {
		$.ajax({
				url: "getpoligon.php",
				type: "POST",
				data: {},
				async: false,
				success: function(result){
						if (result.features !== null){
							polygonLayer.addData(result);
							layerPoligonGroup.addLayer(polygonLayer);
						}
					}
				}
		);
	};

ShowPolygon();

Add to to L.geoJSON the event:
var polygonLayer = L.geoJSON(null, {
			polygonToLayer: function(feature,latlng){
				return new L.polygon(latlng, {
				  title: '111'
				})
			}
		});

polygonLayer.on('pm:update',(x)=>{
      console.log(x);
    })

function ShowPolygon() {
...

Falke-Design, thank you friend! Things are good! I like leaflet-geoman. This is the best library for editing polygons!

Add to to L.geoJSON the event:


Add lightweight migrations to CoreData stack

In Swift
coordinator.addPersistentStoreWithType(NSSQLiteStoreType,
 configuration:nil,
 URL:self.storeURL,
 options:NSMigratePersistentStoresAutomaticallyOption:true,
     NSInferMappingModelAutomaticallyOption:true)

https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreDataVersioning/Articles/vmLightweightMigration.html#//apple_ref/doc/uid/TP40004399-CH4-SW1

I'm unsure about this, as it will lead to potentially missing data locally.
Think of this scenario:

User has an app with model version X
You add a new field Y to your model, entries will have some values for Y
You release a new version of the app with model version X+1
User gets updated entries during sync, but still has the old app. Values for Y can't be stored
User updates their app, but since they already synced, they'll be missing the values for Y

Our recommendation for this has been wiping any local data if you change the data model and perform a fresh sync, potentially shipping a prepopulated DB to reduce the fetch time. I think https://github.com/contentful/vault (the Android equivalent of this library) even deletes the local DB automatically if the schema version changes.

This makes sense.  Some migration needs to happen, but the case you've laid out makes lightweight migrations impossible.

It's a good point, though, we need to at least document this better.

We are forcing a clearing of the local DB prior to when a lightweight migration would occur.
In our CoreDataManager subclass:
lazy var modelChanged:Bool = {
    guard NSFileManager.defaultManager().fileExistsAtPath(self.storeURL.path!) else { return false }
    do {
        let sourceMetadata = try NSPersistentStoreCoordinator.metadataForPersistentStoreOfType(NSSQLiteStoreType, URL:self.storeURL)
        return
            !self.managedObjectModel.isConfiguration(nil, compatibleWithStoreMetadata:sourceMetadata)
    } catch let error as NSError {
        print("model changed error \(error)")
    }
    return false
}()

After instancing our CoreDataManager ( var manager ) subclass:
if manager.modelChanged {
    do {
        try manager.managedObjectContext?.deleteAllObjects()
    } catch let error as NSError {
        print("erase all error \(error)")
    }
}

Thanks for sharing, I think other customers have done something similar. I will make sure to add a note on this to our documentation and will also consider making this either default or an optional, but included behaviour of CoreDataManager itself.


Please add LICENSE files to your packages! :)

There is no license file in any of the packages, nor is there one at the top level of the repository. It would be ideal to have the license added to each package (I think newer versions of Lerna do this automatically on publish). This is usually based on the LICENSE at the top of the repo. Having a license file will help users audit their dependencies. Thanks!

Thanks for request.
I am going to complete and finish all bugs and feature requests at the
start of next week.
On Thu, Jan 3, 2019 at 00:08 Ben Wiley<EMAIL_ADDRESS>wrote:

There is no license file in any of the packages, nor is there one at the
top level of the repository. It would be ideal to have the license added to
each package (I think newer versions of Lerna do this automatically on
publish). This is usually based on the LICENSE at the top of the repo.
Having a license file will help users audit their dependencies. Thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tuchk4/storybook-readme/issues/108, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AE5wg9b6n3TrXIoS5J-w6iUa44H94ySRks5u_Tv_gaJpZM4ZnXAg
.


JDK compatibility to 1.7

Excerpt From: Schalk Cronjé. “Idiomatic Gradle Plugins.”

Just setting the sourceCompatibility and targetCompatibility properties in the script to 1.6 will not be enough. The Java and Groovy plugins have to be told to recognise these properties.

See: https://github.com/grails/grails-core/issues/10884

I will make this plugin JDK7 compatible but be aware that things might break for people further down the line because WebDriver 3.x is JDK8 only and Geb 2.x is JDK8 only. I do not ever intend to make Geb 2.x JDK7 compatible. So, if you want to keep the whole setup JDK7 compatible we would need not only to change this plugin but also point people to use it with Geb 1.1.1 and WebDriver 2.x.

Sergio,
After looking into this and thinking about it I decided that I will not commit to making this plugin Java 7 compatible.
Setting the target compatibility is easy enough but to be serious about it I would need to also verify that the plugin will actually work when used with Java 7. This can be only achieved by running the tests using that JDK as there are at least two situations where the tests would pass on Java 8 with target compatibility set to 1.7 but the plugin would still fail for the end users of the plugin on Java 7:

if I used a class that has been introduced in Java 8
if any dependencies of the plugin were compiled with target compatibility higher than 1.7

Currently, the tests for the plugin are using a Ratpack based fixture which makes them Java 8 only. I have no motivation to change them to support running them using Java 7 given that I personally don't use this plugin with Java 7, given that Java 7 is more than 2 years past its EOL and given that by the look of things Gradle will cease support for running builds using Java 7 in the next major version.
If you have a hard requirement for Java 7 compatibility I'd suggest you do not use this plugin.


Import google.protobuf.Timestamp.proto

What is the best way to import this type in my proto?
Just adding the import it fails with file not found.
Should I include a directory? or do I have to clone the google protobuf repo to get it?

Just found this https://github.com/stepancheg/rust-protobuf/blob/9e2c75c5514658ef1036a2e42d13f44eb41ddb14/protobuf-codegen-pure/src/lib.rs
// TODO: these include don't work when publishing to crates
const RUSTPROTO_PROTO: &str = include_str!("../../proto/rustproto.proto");
const ANY_PROTO: &str = include_str!("../../proto/google/protobuf/any.proto");
const API_PROTO: &str = include_str!("../../proto/google/protobuf/api.proto");
const DESCRIPTOR_PROTO: &str = include_str!("../../proto/google/protobuf/descriptor.proto");
const DURATION_PROTO: &str = include_str!("../../proto/google/protobuf/duration.proto");
const EMPTY_PROTO: &str = include_str!("../../proto/google/protobuf/empty.proto");
const FIELD_MASK_PROTO: &str = include_str!("../../proto/google/protobuf/field_mask.proto");
const SOURCE_CONTEXT_PROTO: &str = include_str!("../../proto/google/protobuf/source_context.proto");
const STRUCT_PROTO: &str = include_str!("../../proto/google/protobuf/struct.proto");
const TIMESTAMP_PROTO: &str = include_str!("../../proto/google/protobuf/timestamp.proto");
const TYPE_PROTO: &str = include_str!("../../proto/google/protobuf/type.proto");
const WRAPPERS_PROTO: &str = include_str!("../../proto/google/protobuf/wrappers.proto");
Any idea how to solve this when using crate. Workaround is fine too.

Yes, passing a path to a directory with protobuf .proto files is a possible workaround.
Proper solution is yet to be implemented, and at the moment, it is not clear what it should be.
There are basically three ways to invoke codegen:

using system protoc binary. It has .proto files bundled
using protoc binary from protoc-bin-vendored crate. This crate has only binary, and doesn't have any .proto files bundled google .proto files resolving won't work
using pure codegen

Even with pure codegen will (and should) have bundled google .proto files, it is not clear what to do with option 2 (protoc-bin-vendored crate). Well, maybe protoc-bin-vendored crate should also bundle .proto files. Or maybe the crate which launches codegen with bundled protos should have .proto bundled, and unpack them somewhere before invoking vendored protoc.
But generally, yes, there's a inconsistency between using system protoc and pure codegen, and it need to be fixed somehow.

OK, bundled protoc now includes .proto files (2a67ef99e6dc1791dbc3633761879a9e49c8f780).
It's time to fix pure codegen I think.

Fixed in master, now need to port it to the stable branch.

OK, I don't know if it was broken or not, have I fixed it or not, but in the latest version of rust-protobuf there's an example (link) which uses google's proto files, that example is compiled with both pure rust and protoc-based codegens.

https://github.com/stepancheg/rust-protobuf/blob/9e2c75c5514658ef1036a2e42d13f44eb41ddb14/protobuf-codegen-pure/src/lib.rs#L264-L276 Are these the only external sources that support import? What if a proto which is from https://buf.build, do i have to download all the related protos in local include path?


Create codeql-analysis.yml

Status
READY/IN DEVELOPMENT/HOLD
Description
A few sentences describing the overall goals of the pull request's commits.
Deploy Notes
Notes regarding deployment the contained body of work.  These should note any
db migrations, etc.
Todos

[ ] Code builds clean without any errors or warnings
[ ] Using approved terminology
[ ] Added corresponding Documentation
[ ] Added unit tests

Hey @chrisotto6,
Something went wrong with the build.
TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.
View build log
TravisBuddy Request Identifier: 02681f90-18a9-11eb-86f8-31dd4df69769


shebang prefixed paths break relative urls

If I don't disable shebangs with Iron.Location.configure({useHashPaths:false}), then hrefs with fragment anchors get broken :
A click-me anchor will now route to website/#tasks instead of website/#!currentpath/#tasks

Might be related to #180


ArrayIndexOutOfBoundsException on attempt to reconnect

Defect
We observed one of our Nats clients in our production enviroment flooded log with the following exceptions.

First 40 minutes it was throwing the following exception during publish() call (messages consumption was healthy):

java.lang.IllegalStateException: Output queue is full 5000
	at io.nats.client.impl.MessageQueue.push(MessageQueue.java:124)
	at io.nats.client.impl.MessageQueue.push(MessageQueue.java:110)
	at io.nats.client.impl.NatsConnectionWriter.queue(NatsConnectionWriter.java:209)
	at io.nats.client.impl.NatsConnection.queueOutgoing(NatsConnection.java:1353)
	at io.nats.client.impl.NatsConnection.publishInternal(NatsConnection.java:765)
	at io.nats.client.impl.NatsConnection.publish(NatsConnection.java:733)

Then both publishing and consumption didn't work for another 40 minutes till service was terminated. At this time log was flooded with the following exceptions (each time with the same last destination index and byte index):

java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: arraycopy: last destination index 175759 out of bounds for byte[131555]
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:205)
	at io.nats.client.impl.NatsConnection.tryToConnect(NatsConnection.java:380)
	at io.nats.client.impl.NatsConnection.reconnect(NatsConnection.java:254)
	at io.nats.client.impl.NatsConnection.closeSocket(NatsConnection.java:583)
	at io.nats.client.impl.NatsConnection.lambda$handleCommunicationIssue$3(NatsConnection.java:541)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ArrayIndexOutOfBoundsException: arraycopy: last destination index 175759 out of bounds for byte[131555]
	at java.base/java.lang.System.arraycopy(Native Method)
	at io.nats.client.impl.NatsConnectionWriter.sendMessageBatch(NatsConnectionWriter.java:147)
	at io.nats.client.impl.NatsConnectionWriter.run(NatsConnectionWriter.java:188)
	... 5 common frames omitted

Our client configuration:
        Options options = new Options.Builder()
                .servers(natsBootstrapServers.addresses)
                .errorListener(errorListener)
                .connectionTimeout(Duration.ofSeconds(5))
                .maxReconnects(-1) // -1 = Infinite
                .connectionName(getHostName())
                .pingInterval(Duration.ofSeconds(2))
                .build();

We don't have a reproduction scenario yet.
Versions of io.nats:jnats and nats-server:
nats server v 2.7.4
jnats v 2.14.1
OS/Container environment:
adoptopenjdk/openjdk11:jdk-11.0.8_10-alpine
Steps or code to reproduce the issue:
Expected result:
Actual result:

Linux core version 5.4.170

@scottf "message consumption was healthy" means that messages receiving was NOT interrupted on the service, only publishing didn't work.
Incoming/outgoing messages have average size of ~1KB. Max size is not metered, I think it's below 50KB.

Is the consumption on the same connection as the production? I'm trying to understand why you noted consumption. I recognize that something bad is happening when publish is stopped because of a full output queue, but am really trying to understand how the queue got full in the first place.

Yes, consumption is on the same connection as the production.

but am really trying to understand how the queue got full in the first place.

It was the problem of exactly this affected instance. Other instances of the same service were consuming and publishing
without problems. I guess this might be a result of race condition.

I also encountered this exact issue. I did not manage to capture a stack trace, somehow it got swallowed, not sure why.
Relevant version numbers:

jnats 2.14.0
server 2.8.0

@scottf, I have been looking into the code and I believe I've found what goes wrong in NatsConnectionWriter.sendMessageBatch (related to the ArrayIndexOutOfBoundsException):

The exception gets thrown when the sendBuffer has a smaller size, so the current message doesn't fit.
In the logic for resizing the sendBuffer, there is a check if it's the first item, if so the buffer is re-sized. Otherwise the buffer is sent, and we reset the sendPosition.

However, I believe two things go wrong for the following piece of code in NatsConnectionWriter.sendMessageBatch:
while (msg != null) {
    long size = msg.getSizeInBytes();

    if (sendPosition + size > sendBuffer.length) {
        if (sendPosition == 0) { // have to resize
            this.sendBuffer = new byte[(int)Math.max(sendBuffer.length + size, sendBuffer.length * 2L)];
        } else { // else send and go to next message
            dataPort.write(sendBuffer, sendPosition);
            connection.getNatsStatistics().registerWrite(sendPosition);
            sendPosition = 0;
            msg = msg.next;

            if (msg == null) {
                break;
            }
        }
    }

    // ... use System.arraycopy, etc.
}

if msg == null we break out of the loop (which is correct), but if there is a message than the resizing of the sendBuffer isn't checked. That will cause the System.arraycopy(...) to throw an error, since the buffer can't accommodate the size of the new message. Changing this into a continue instead of the if + break would work, then the resizing check would happen for this message and this should be fixed.

Something that I find a bit curious though, why the msg = msg.next; is happening. Let me explain my train of thought:

There is a msg and we get its size.
This message has sendPosition != 0 and the buffer doesn't have enough space.
We can't resize the buffer currently, since there is still data in there. So we write the buffer and record the stats.
The sendPosition is reset to 0, and we can now re-use the buffer.

But, why does the msg = msg.next happen, I believe we wouldn't send the current message since it isn't contained in the original sent buffer?
Using a continue and not overwriting the msg with the next should fix both of these issues. Do you agree with this, or am I missing something?
while (msg != null) {
    long size = msg.getSizeInBytes();

    if (sendPosition + size > sendBuffer.length) {
        if (sendPosition == 0) { // have to resize
            this.sendBuffer = new byte[(int)Math.max(sendBuffer.length + size, sendBuffer.length * 2L)];
        } else { // else send and go to next message
            dataPort.write(sendBuffer, sendPosition);
            connection.getNatsStatistics().registerWrite(sendPosition);
            sendPosition = 0;

            // go back to the start of the loop, to ensure we check for resizing the buffer again
            continue;
        }
    }

Created a PR for this in advance :)

Ok I think I see it now. We advance the msg to the next, but never send the one that would have been too big for the buffer. It probably doesn't happen much because of how often we run this code and the default buffer is plenty big, but on cases where the buffer was made small this can happen a lot.

Yeah, I believe changing this into the continue would solve this, by ensuring the re-size is checked again and that one message isn't lost.

@igor-komar There is a fix in the main branch and should be available in 2.16.1-SNAPSHOT on sonatype

Small update from my end. Have not been able to reproduce this error reliably (if at all) on our setup.. Seems like it takes a really long time to get into this state, or is just "luck".
However, will update our jnats version to 2.16.1-SNAPSHOT soon. The issue should be fixed then.

Another update, we've updated to version 2.16.1 yesterday and are still encountering this issue sadly.

Will add the errorListener option, so we can inspect the full stacktrace.

Well you did find and fix that issue. I wonder if I should just switch to using the ByteArrayBuilder which just automatically expands and uses ByteBuffer under the covers.

@scottf Got a full stacktrace this time:
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: arraycopy: last destination index 65643 out of bounds for byte[65536]
	at java.base/java.util.concurrent.FutureTask.report(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.get(Unknown Source)
	at io.nats.client.impl.NatsConnection.tryToConnect(NatsConnection.java:381)
	at io.nats.client.impl.NatsConnection.reconnect(NatsConnection.java:254)
	at io.nats.client.impl.NatsConnection.closeSocket(NatsConnection.java:584)
	at io.nats.client.impl.NatsConnection.lambda$handleCommunicationIssue$3(NatsConnection.java:542)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: arraycopy: last destination index 65643 out of bounds for byte[65536]
	at java.base/java.lang.System.arraycopy(Native Method)
	at io.nats.client.impl.NatsConnectionWriter.sendMessageBatch(NatsConnectionWriter.java:145)
	at io.nats.client.impl.NatsConnectionWriter.run(NatsConnectionWriter.java:186)
	... 5 more

However, before this it seems like messages can't be sent anymore at all:
java.util.concurrent.CompletionException: java.util.concurrent.CancellationException: Future cancelled, response not registered in time, likely due to server disconnect.
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
    at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(Unknown Source)
    at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
    at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source)
    at io.nats.client.support.NatsRequestCompletableFuture.cancelTimedOut(NatsRequestCompletableFuture.java:31)
    at io.nats.client.impl.NatsConnection.lambda$cleanResponses$6(NatsConnection.java:957)
    at java.base/java.util.concurrent.ConcurrentHashMap.forEach(Unknown Source)
    at io.nats.client.impl.NatsConnection.cleanResponses(NatsConnection.java:953)
    at io.nats.client.impl.NatsConnection$2.run(NatsConnection.java:455)
    at java.base/java.util.TimerThread.mainLoop(Unknown Source)
    at java.base/java.util.TimerThread.run(Unknown Source)
Caused by: java.util.concurrent.CancellationException: Future cancelled, response not registered in time, likely due to server disconnect.
... 7 common frames omitted

Not quite sure what's the root cause. It seems like something is going wrong even prior to the out of bounds.

What can I do do reproduce this?

Not sure how to reproduce it yet. Currently trying to dig through the logs to get more clarity.
Looking a bit more in the logs for a timeline:

UTC 19:36:57, messages start piling up
UTC 19:37:16, first sign of a CancellationException
UTC 19:43:11, first sign of a ArrayIndexOutOfBoundsException

Our way of "reproducing" this so far was running it for a day or two until it eventually goes into this state, but that isn't really a reliable way :sweat:


DUID-LL Generator fix

Timestamp is not used for DUID-LL , only the mac address. There is some confusion in the RFC3315 doc. Section 9.4 states that DUID-LL should be the link layer address in canonical form, as described in RFC2464. That doc shows the link-layer part of the DUID would be  xx:xx:xx:ff:fe:xx:xx:xx, however, looking at 'in use' examples of DUID-LL the additional ff:fe centre pair are not used, so I've not added them for Opnsense.

       case '2': //LL - NO TIMESTAMP: Just 03:00:01:00: + Link layer address in canonical form, so says RFC.
            $mac = get_mac_address(getenv('REMOTE_ADDR'));
            $type = "\x00\x03\x00\x01";

Just 03:00:01:00:
or
Just 00:03:00:01 ???

Typo in my comment.. sorry, I'll correct that, It is the latter.

Nice catch, thanks!


PowerToys Tray Icon sometimes disappear when restored from sleep

Microsoft PowerToys version
0.84.1
Installation method
PowerToys auto-update
Running as admin
Yes
Area(s) with issue?
General
Steps to reproduce
Let the system go into sleep mode...
✔ Expected Behavior
The icon does not diappear.
❌ Actual Behavior
Sometimes the icon disappears when the system is recovered. Powertoys process is still running in background.
(the icon is not the awake icon)
Other Software
No response

/dup https://github.com/microsoft/PowerToys/issues/34148


Run CI jobs if yarn.lock changes

This PR:

[X] Enables CI jobs for when yarn.lock changes.

Good catch. Thanks!


Make blahp requirement binary package specific (SOFTWARE-3623)

@timtheisen this reminds me that if we ever get that blahp unification done, the HTCondor packaging should probably build the blahp

LGTM. Should I merge, or do you want @timtheisen to take a pass at it too?

One approving review works for me :)


ShowRainbow block is broken - sets all white

The ShowRainbow block in the neopixel library seems to have broken in the last 3 weeks.
Simplest repeatable failing test: https://makecode.microbit.org/_aupazuXU3HiH

Expected Behaviour: Pressing button A should distribute a rainbow across the LEDs.
Actual Behaviour: Pressing button A sets all pixels white.

Further testing: If I switch to JS mode, open explorer, and change pxt.json to use “github:microsoft/pxt-neopixel#v0.6.2” instead of the 0.6.4 or 0.6.3 versions, the rainbow function behaves correctly again.
Test Platform:  Chrome 67.0.3396.62  and Safari 11.1, both on OSX 10.13.4

(While this block is not a primitive and arguably not essential, we find it is a very useful quickstart for our younger kids experimenting with neopixels before they progress to their own custom patterns.)

Fixed. Thank you for reporting,


Get long-lived token dance in this lib

Hi, first of all thanks for this lib. Looks like can make my life easier : ). I have an idea on mind that requires to allow users to schedule when they want to publish content on their IG accounts. I see you explained long-lived tokens in the readme.
I guess that is the kind of tokens I want to use. But reading through Facebook docs looks like the time these long-lived tokens are valid is also limited (like 60 days). And also can be expired by any reason at any time.
What I'm think that could be done is a token dance like this:
1. User authorise my app with required permissions for publishing in their IG account
2. I get the User Access token and with this token I get the long-lived token
3. I can do schedule publishing at any time after user authorised my app

This would be the happy path.
The non-happy paths are 2 on what I see:
Long-lived token is about to expire
In this case always before using your lib I check expire date of the long-lived token I have stored. If is less than a day I rerequest server-to-server for a new long-lived token. And all is good
Long-lived token is invalidated or expired before expire date
For some reason the token I have stored is made invalid. In this case when I'm going to use your lib the request will throw an API error saying the token is not expired. In this case I read you can rerequest a new token with an expired token. In this case what I was thinking was to store on my side the publishing failed and let the user know about it. Do you think there is a better idea here?
My question
Anyway. Those are my problems. Maybe I end up doing all of some of that. My question for you is if doing the rerequest dance for a long-lived token when using your lib would be interesting to be added to this code? Or do you think is better to do each one on our apps?
Not asking for you todo. Asking if you think it could be interesting and maybe I could contribute : )
Again, thanks for your work!

Hey @andresgutgon , thanks for your interest!
First of all, let me just clarify that the "Long-Lived Token" expiration date depends on the type of token. If you generate a page token from a long-lived user token, it has no expiration date (check the last sentence on the section "Get a Page Access Token" on https://developers.facebook.com/docs/pages/access-tokens/).
Now, this token does not apply to every use case, of course, it only applies when you simply want to retrieve info about your own pages and not when you have an app that might access many users info, and that even seems to be your use case. So with this in mind, to answer your question:

I see this potentially happening to a lot of people and this library does aim to reduce the work of developers integrating with Instagram
I haven't tested the "rerequest a new token with an expired token", but I'm assuming it works in a straightforward way
I think most of the retry/refresh logic should be done on the app's side but the ability to request a new token could definitely be added here

So all in all, if you are up for it, I'm super happy to review the Pull Request. As you probably have seen, I work on this lib in batches, which is when I have a few days off from work, so I don't expect to have time to implement it myself any time soon, especially since I don't have an app ready to test this, I only have some page token for my own Instagram pages

First of all, let me just clarify that the "Long-Lived Token" expiration date depends on the type of token. If you generate a page token from a long-lived user token, it has no expiration date (check the last sentence on the section "Get a Page Access Token" on https://developers.facebook.com/docs/pages/access-tokens/).

Oh! I totally missed this sentence!
So if I do the oauth dance between me <-> the_user <-> Instagram(aka Facebook) I get a user access token.
In that moment I can do another dance 😂   to get the Instagram/Facebook PAGE_ID that the user wants to connect. Here I have a question. When the docs talk about "page". Are they referring to "Facebook page", "Instagram business account" or both? If they refer to the Instagram business account I guess I could to what is said in that paragraph in behalf of user with their "user-access_token" couldn't I?
I mean this part

If I recall correctly, the page token I'm referring to needs to be connected to a Facebook App.  Perhaps by using the API Explorer this will be clearer. I think I'll also add this API Explorer to the docs
So if you are the administrator of a page (an Instagram business/creator page, connected to a Facebook page), you can create a Facebook App and you can use that to create a page token for that page, and that page token is the one that can be extended to have no expiration
This means that if you have an app where users have to log in, you'll never be able to generate a page token for them, only a user token. This is a bit confusing even for myself, as my use case for this lib was not to create an app that is open to other users 😅

This means that if you have an app where users have to log in, you'll never be able to generate a page token for them, only a user token

Ok yes, this is my use case. Is not only for myself. Is for anyone using the site and login with Facebook

I think I found how to get long lived tokens (Almost forever tokens) for a page:
https://developers.facebook.com/docs/facebook-login/access-tokens/refreshing/#get-a-long-lived-user-access-token
It implies 2 calls:

First exchange a user-short-lived token by a user-long-lived-token (~60 days)
With that user-long-lived-token ask for user pages and get the page-long-lived-token

I think the strategy to make an app that can be used for any user would be to do this token dance and store that page-long-lived-token in the DB. This you can for example create an Instagram post on a cron job on behave of the user that authorised you to do it.

Closed as #69 adds a request to get long lived tokens


[libsndfile] Update to 1.2.0

[libsndfile] Update to 1.2.0

What does your PR fix?
Updates libsndfile to the latest upstream. Patches from previous port version 1.1.0 were removed (merged to upstream).

Which triplets are supported/not supported? Have you updated the CI baseline?
No changes.

Does your PR follow the maintainer guide?
Yes.

Yes.

All features test pass on x86-windows x64-windows and x64-windows-static.


Adding ablility to query AS information endpoint (bgp_routes)

addressing issue #4

Any chance this will get merged soon? I'm looking for this functionality.

Merged. Thanks for the PR! Will post here when we get it released to PyPI


Make CLI test support multi-processing

Support passing --num_proc to CLI test.
This was really useful recently to run the command on pubmed: https://huggingface.co/datasets/pubmed/discussions/11

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@huggingface/datasets, feel free to review this PR so that it can be included in the next release.


Terminal should not bind Ctrl K - or any other Ctrl key

The terminal in visual studio code should not be entitled to bind any control keys for it's own purposes. I may be mistaken but this seems such poor design it is a bug (Ctrl-K no longer works in bash nano sessions etc.)

ctrl+k is bound to clear the terminal on Windows only and it can be disabled by either unbinding the workbench.action.terminal.clear keybinding or by removing the clear command from terminal.integrated.commandsToSkipShell.

Is it possible to view / link the design doc? What other control keys can I expect to not be working now or in the future due to this "philosophy"?

Thank you for workaround and for taking another look. I think a good rule is that a terminal should respect at minimum all ASCII codes. I suppose the copy and paste overrides seem like a good idea but even there I think the native windows command line has it right and uses right click for paste so ctrl-v aka SYN is unmolested.

@nitrologic well yeah, it comes down to what we think users would expect to happen. ctrl+p is an example where it's skipped on Linux and Windows because it's such a prominent keybinding and it would suck if that didn't work. The good thing is that it's always possible to change the behavior in the setting (which will improve eventually when we action #19770).

Also copy/paste behavior is copied from the most popular terminals on each platform:

Windows:

ctrl+c when there is a selection copies
ctrl+v pastes
right click to copy/paste based on selection

Linux

ctrl+shift+c/v
middle click to paste PRIMARY clipboard

macOS

cmd+c/v

And everything is configurable so you could bring the right click behavior to macOS if you wanted to for example, with the exception of the PRIMARY clipboard as it's OS-specific.


chore(main): release pixels 0.5.0

:robot: I have created a release beep boop
0.5.0 (2024-04-24)
Features

pixels: refactor Modal sizes + update tailwind variants (8f80363)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/fuf-stack/uniform/releases/tag/pixels-v0.5.0 :sunflower:


Add initialisation tests.

My idea is: we add a test file that only tries to import dLux. I believe that this is worth doing because it will simplify the output of the automated tests, which we can set to stop running if this fails.

I have achieved this, but the tests are designed to run on linux and it will raise an error if the device is not linux. I figured this was OK since it is mainly to halt the automated testing if these tests fail. The only reason that this is specific to linux is that it uses rm -r. We could remove this and then it would be fine. @LouisDesdoigts I'm tagging you for an opinion.

The test should run on all Unix system by default (same as Jax) and have been running on my Mac. Where is this rm -r command?

It is in the test_initialisation.py file at the very bottom. It is just cleaning up the dLux.egg-info and build dirs.

Where is the test_initialisation.py file? I can't seem to find it

It should be in the wavefront-tests branch.


ImportError: module 'pycodestyle' has no attribute 'break_around_binary_operator'

All of a sudden I keep getting a flake8-related error when using Atom and the corresponding linter plugin. Apparently pycodestyle was updated to version 2.4.0 at some point, and now doesn't have the attribute break_around_binary_operator anymore. Is there anything that can be fixed in this plugin, or is the source of the problem somewhere else?

It sounds like that error is coming from flake8 itself, are you able to run it from the CLI?
This provider is basically just a thin wrapper around running that for you.

You are right, thanks! This is a flake8 issue, which is already reported here and here.


repeat this dialog not working

Describe the bug
Main Dialog calls sub dialog. Sub dialog shall be repeated, but it doesn't. The main dialog is continued.
The logic is fine, based on testing with "Reponse" funtion -> see "Debug Standort False". I see the output, but as said, no dialog repeating is initated.
Thanks for helping.
Version
v2.0.0
Browser

[X] Edge

OS

[X] Windows 10

Expected behavior
As user confirms he wants to change his already set location (red marking), the dialog shall be repeated and choosing the other way on the left (green marking").
Screenshots

Hi @tamasschmolcz Can you please make sure that your Set a Property inside the false branch of =dialog.confirmed is set to number?

Show code should give you something like:
"property": "user.setLocation",
"value": 0

Not
"property": "user.setLocation",
"value": "0"

@dmvtech THanks, that was indeed the issue...it is all about the details! ;)
But now I am wondering, is it possible to restart the "whole" dialog? It is actually only repeating the red part. "Begin a new dialog" does not work, as I cannot select the current one. Otherwise I need to find an other approach.

it is all about the details! ;)

Indeed! 😆

But now I am wondering, is it possible to restart the "whole" dialog within the same dialog? It is actually only repeating the red part. "Begin a new dialog" does not work, as I cannot select the current one. Otherwise I apply a workaround using an additional dialog as a trigger for this one.

I'm not sure I'm following. In your initial branch, you are checking user.SetLocation equals 1. But in your false branch (red square), if also falling the false path there, you are setting user.setLocation to 0. The dialog will then get repeated, starting at the very top. The check will see if it equals zero (in which it doesn't), then will follow the false branch again. Do you want to set user.setLocation to 1 in the confirmation prompts 'false' path? When I was using your previous example (and 0), it worked fine for me.
I'm going to go ahead and close this as the initial issue was resolved.
The Microsoft Bot Framework team prefers that how to questions be submitted on Stack Overflow. The official Bot Framework Github repos are the preferred platform for submitting bug fixes and feature requests.

@dmvtech I think I got the "issue" - the "always prompt" flag was set to false, so I could not see the right part. ;-)