Long lines in code blocks should not wrap

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

Action Performed:

Open app
Send few long lines of code in chat

- name: Decrypt Botify GPG key
        run: cd .github/workflows && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output OSBotify-private-key.asc OSBotify-private-key.asc.gpg
        env:
          LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}

Expected Result:
Long lines in code blocks should not wrap
Actual Result:
Long lines in code blocks wrap
Workaround:
unknown
Platform:

Where is this issue occurring?

Web
Desktop App

Version Number: 1.1.33-3
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:
Issue reported by: @roryabraham
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1643397896087709
View all open jobs on GitHub

Triggered auto assignment to @tylerkaraszewski (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

Hello, Is this the expected result?

If yes, I will post a proposal.

@sobitneupane  May be you can wait till issue is triaged.

Triggered auto assignment to @jboniface (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

Seems fine, probably straightforward.

posted here: https://www.upwork.com/jobs/~016dd77f2c8c2b27d0

Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (Exported)

Triggered auto assignment to @NikkiWines (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

Hello, Is this the expected result?

@sobitneupane
Yes that's the expected result. Excited for your proposal!

Proposal
Create new  PreRenderer.js  for HTMLRenderers. Inside:
const PreRenderer = ({TDefaultRenderer, ...props}) => {
    const scrollRef = useRef(null);

    function onScroll(e) {
        scrollRef.current.scrollLeft += e.deltaX;
    }

    useEffect(() => {
        scrollRef.current.addEventListener('wheel', onScroll)

        return function cleanup() {
            scrollRef.current.removeEventListener('wheel', onScroll);
        };
    }, []);

    return (
        <ScrollView ref={scrollRef} horizontal style={props.style}>
            <TDefaultRenderer
                {...props}
                style={{ flexGrow: 1, flexShrink: 1, padding: 10 }}
            />
        </ScrollView>
    );
};

/src/components/HTMLEngineProvider/HTMLRenderers/index.js :
 14    img: ImageRenderer,
+15    pre: PreRenderer,

https://user-images.githubusercontent.com/51112870/152656522-bbbcc63f-685a-4e00-b772-946eea641450.mov

@NikkiWines sorry, I can't review this one. I'm not well 🤒

Taking over from @rushatgabhane as C+.
@sobitneupane I am interested to hear your proposal.

bump -- any updates on this? it looks like we have a proposal without definitive response.  cc @parasharrajat / @NikkiWines

Oh, I see. I am not assigned to it. That's why.  @jboniface Please assign me as C+. Thanks.
I like @Viacheslav80 's proposal. Please use the Class component. we don't use hooks.
cc: @NikkiWines
:ribbon: :eyes: :ribbon:  C+ reviewed

📣 @parasharrajat You have been assigned to this job by @jboniface!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖

Please ignore the above message. I am assigned as C+. and here is my review.

Agreed with @parasharrajat, @jboniface can you hire @Viacheslav80 for this job, please?

@jboniface Done.

Sorry, but I don't have time to look for the right solution to the problem anymore.
@parasharrajat. Please find the best solution and be free to use these developments

This issue has not been updated in over 15 days. @NikkiWines, @parasharrajat, @jboniface eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

Oops - looks like this needs some labels updated

old post expired, new post here https://www.upwork.com/jobs/~0166d837401b37414a ; bounty raised to $500

Hi, you stated that the problem persists, but the users above have provided some sample solutions, are you want to achieve a different result than they stated?
I worked on it and developed a horizontal scroll feature for code blocks only. I am attaching sample images for both desktop and web. If is it the desired result then we can talk about it.
-WEB-

-Desktop-

@orkunkarakus Thanks for the proposal.

are you want to achieve a different result than they stated?

We are fine you can pick from their solution and complete it. Only thing is that solution should work on all platforms (Supported platforms can be found on Readme.md).

@orkunkarakus Thanks for the proposal.

are you want to achieve a different result than they stated?

We are fine if you can pick from their solution and complete it. Only thing is that solution should work on all platforms (Supported platforms can be found on Readme.md).

I also completed the development for mobile platforms. I sent the picture of the working state of the web and desktop in my previous message. Now I am attaching the IOS video
https://user-images.githubusercontent.com/61627150/159162873-9ca49ade-2f54-42df-9d82-97c666b072c0.mp4

Great. Let see your approach now. What are proposing in terms of technical changes?

First of all, we only need to add the scroll feature to the component in the web and desktop part. But the real problem is on the mobile platform. Because the message component on the mobile platform is under LongPressHandler and Pressable. Scrollviews below these components have a problem because the LongPressHandler detects the scrolling movement during scrolling, not the scrollview. Therefore, we need to process the scroll movement on the code block messages into the scrollview. This was my approach and this approach solved the problem without damaging LongPressHandler functions.

Did you face this issue https://github.com/Expensify/App/pull/7814#pullrequestreview-890173323?
How will you fix it?
It would be great to have some psuode code as well. Thanks.

Did you face this issue #7814 (review)? How will you fix it?
It would be great to have some psuode code as well. Thanks.

If by content you mean message container, no I did not face this issue. But if by content you mean code block message, yes there was a scroll problem in code blocks scrollview but I solved.
LongPressHandler and Pressable components were left untouched. Only the RenderHTML.js file has been changed.
pseudocode
if platform "android"||"ios"
if pan gestures on scrollview
determine responder is code blocks scrollview not parent (LongPressHandler or Pressable)
else
scroll it

Great, it seems it will do the trick. But I think I was not clear enough. I am expecting some technical changes in the proposal that specifically address code in our codebase. This is an important step in the proposal review process.
It would be really helpful if you can do explain your changes as well.
e.g

determine responder is code blocks scrollview not parent (LongPressHandler or Pressable)

You should explain this part. There are many ways to solve a problem, and this is very important to see how exactly are you going to do it. Unless we are happy with the code changes you will do, the proposal is not finalized even though it is working. So I would suggest you take a look at some existing issues and proposals to improve your proposal.
You already have a working solution, I just need to see how you are planning to implement it.

Great, it seems that will do the trick. But I think I was not clear enough. I am expecting some technical changes in the proposal that specifically address code in our codebase. This is an important step in the proposal review process.
It would be really helpful if you can do explain your changes as well. e.g

determine responder is code blocks scrollview not parent (LongPressHandler or Pressable)

You should explain this part. There are many ways to solve a problem, and this is very important to see how exactly are you going to do it. Unless we are happy with the code changes you will do, the proposal is not finalized even though it is working. So I would suggest you take a look at some existing issues and proposals to improve your proposal.
You already have a working solution, I just need to see how you are planning to implement it.

Unfortunately, my job is to solve problems, not explain how I solved it. I've said everything I had to say. After that, it's up to you, do you want a clean and working solution with videos and images already proven or not?

No worries. Thanks for proposing a solution.

updating the price to $1000

increased to $2000

increased to $4,000

No worries. Thanks for proposing a solution. I know we have a different process but this is necessary for various reasons. If you want to know about the process, see CONTRIBUTING.md.

I've read it CONTRIBUTING.md, but I don't understand exactly what you want. If you tell me exactly where you want me to describe it, I can explain it to you.

determine responder is code blocks scrollview not parent (LongPressHandler or Pressable)

Gesture Responder System in react native has some variables that we use to fix these problems. When we define this variable on the scrollview, our problem is solved.

PROPOSAL
We must create a new Renderer to deal with <pre> tags:
https://github.com/Expensify/App/blob/6c53be1ea7a022e8a5e788cc7e7efd62c4573474/src/components/HTMLEngineProvider/HTMLRenderers/index.js#L9-L13
add:
pre: PreRenderer

Create our component PreRenderer.js(I used CodeRenderer.js as a basis for comparison):
import React from 'react';
import _ from 'underscore';
import htmlRendererPropTypes from './htmlRendererPropTypes';
import CodeFence from '../../CodeFence';

const PreRenderer = (props) => {
    const defaultRendererProps = _.omit(props, ['TDefaultRenderer']);

    return (
        <CodeFence
            TDefaultRenderer={props.TDefaultRenderer}
            defaultRendererProps={defaultRendererProps}
            key={props.key}
        />
    );
};

PreRenderer.propTypes = htmlRendererPropTypes;
PreRenderer.displayName = 'PreRenderer';

export default PreRenderer;

Then create our component folder(CodeFence) with index.js:
import React from 'react';
import {ScrollView} from 'react-native';
import codeFencePropTypes from './codeFencePropTypes';

class CodeFence extends React.Component {
    constructor(props) {
        super(props);

        this.onScroll = this.onScroll.bind(this);
    }

    componentDidMount() {
        this.scrollViewRef.addEventListener('wheel', this.onScroll);
    }

    componentWillUnmount() {
        this.scrollViewRef.removeEventListener('wheel', this.onScroll);
    }

    onScroll(e) {
        this.scrollViewRef.scrollLeft += e.deltaX;
    }

    render() {
        const TDefaultRenderer = this.props.TDefaultRenderer;
        return (
            <ScrollView ref={el => this.scrollViewRef = el} horizontal>
                <TDefaultRenderer
                    // eslint-disable-next-line react/jsx-props-no-spreading
                    {...this.props.defaultRendererProps}
                />
            </ScrollView>
        );
    }
}
CodeFence.propTypes = codeFencePropTypes;
CodeFence.displayName = 'CodeFence';
export default CodeFence;

and codeFencePropTypes.js:
import PropTypes from 'prop-types';

const codeFencePropTypes = {
    TDefaultRenderer: PropTypes.func.isRequired,
    defaultRendererProps: PropTypes.object.isRequired,
};

export default codeFencePropTypes;

RESULTS

PROPOSAL
import React from "react";
import { useWindowDimensions, Platform, ScrollView } from "react-native";
import PropTypes from "prop-types";
import { RenderHTMLSource } from "react-native-render-html";

const propTypes = {
  /** HTML string to render */
  html: PropTypes.string.isRequired,
};

// We are using the explicit composite architecture for performance gains.
// Configuration for RenderHTML is handled in a top-level component providing
// context to RenderHTMLSource components. See https://git.io/JRcZb
// The provider is available at src/components/HTMLEngineProvider/
const RenderHTML = (props) => {
  const { width } = useWindowDimensions();

  if (Platform.OS === "web") {
    return (
      <ScrollView>
        <RenderHTMLSource
          contentWidth={width * 0.8}
          source={{ html: props.html }}
        />
      </ScrollView>
    );
  }
  return (
    <ScrollView>
      <View onStartShouldSetResponder={() => true}>
        <RenderHTMLSource
          contentWidth={width * 0.8}
          source={{ html: props.html }}
        />
      </View>
    </ScrollView>
  );
};

RenderHTML.displayName = "RenderHTML";
RenderHTML.propTypes = propTypes;
RenderHTML.defaultProps = {};

export default RenderHTML;

Result
I sent the result videos in my messages above.
This is the working code. Have a nice day

@mateusbra Are you following the discussion above https://github.com/Expensify/App/issues/7497#issuecomment-1073273718> Do you think your proposal covers that issue?
Thanks for sharing the details @orkunkarakus. I will check it.

@orkunkarakus, I tested it on Android Simulator and it is not working for me. It also blocks the Contextmenu of the message. And, I don't think that adding the ScrollView to the whole RenderHTML instance is a good approach.

@parasharrajat because i give you a wrong old code sorry.
This is the right code. I tested again and its working ios and android correctly.
import React from 'react';
import { useWindowDimensions, View } from 'react-native';
import PropTypes from 'prop-types';
import { RenderHTMLSource } from 'react-native-render-html';
import { ScrollView } from 'react-native-gesture-handler';

const propTypes = {
    /** HTML string to render */
    html: PropTypes.string.isRequired,
};

// We are using the explicit composite architecture for performance gains.
// Configuration for RenderHTML is handled in a top-level component providing
// context to RenderHTMLSource components. See https://git.io/JRcZb
// The provider is available at src/components/HTMLEngineProvider/
const RenderHTML = (props) => {
    const { width } = useWindowDimensions();
    if ((props.html || '').includes('<pre>')) { //only code blocks
        return (
            <ScrollView horizontal>
                <View onStartShouldSetResponder={() => true}>
                    <RenderHTMLSource
                        contentWidth={width * 0.8}
                        source={{ html: props.html }}
                    />
                </View>
            </ScrollView>
        );
    }
    return (
        <RenderHTMLSource
            contentWidth={width * 0.8}
            source={{ html: props.html }}
        />
    );
};

RenderHTML.displayName = 'RenderHTML';
RenderHTML.propTypes = propTypes;
RenderHTML.defaultProps = {};

export default RenderHTML;

Simulation Videos
https://user-images.githubusercontent.com/61627150/163843711-e86f6810-93db-43d2-b616-21505a88cef5.mov
https://user-images.githubusercontent.com/61627150/163843744-0cc0d4bf-3453-4860-a441-74a5943140ac.mp4

@mateusbra Are you following the discussion above https://github.com/Expensify/App/issues/7497#issuecomment-1073273718 Do you think your proposal covers that issue?
It doesn't cover this issue, I'll try to update my proposal when I have time. Thank you.

@orkunkarakus This will make the whole message scrollable including tags other than code blocks.

Also, It sometimes does not work. It open the LHN(Home page) instead of scrolling the widget. What do you suggest to improve it?

@orkunkarakus This will make the whole message scrollable including tags other than code blocks.

Hi, i refactored the code. This code only scrolls code blocks.
import React from 'react';
import { useWindowDimensions, View } from 'react-native';
import PropTypes from 'prop-types';
import { RenderHTMLSource } from 'react-native-render-html';
import { ScrollView } from 'react-native-gesture-handler';

const propTypes = {
    /** HTML string to render */
    html: PropTypes.string.isRequired,
};

// We are using the explicit composite architecture for performance gains.
// Configuration for RenderHTML is handled in a top-level component providing
// context to RenderHTMLSource components. See https://git.io/JRcZb
// The provider is available at src/components/HTMLEngineProvider/
const RenderHTML = (props) => {
    const { width } = useWindowDimensions();
    if ((props.html || '').includes('<pre>')) { //only code blocks
        return (
            <>
                <RenderHTMLSource
                    contentWidth={width * 0.8}
                    source={{ html: props.html.split("<pre>")[0] }}
                />
                <ScrollView horizontal>
                    <View onStartShouldSetResponder={() => true}>
                        <RenderHTMLSource
                            contentWidth={width * 0.8}
                            source={{ html: `<pre>${props.html.split("<pre>")[1].split("</pre>")[0]}</pre>` }}
                        />
                    </View>
                </ScrollView>
                <RenderHTMLSource
                    contentWidth={width * 0.8}
                    source={{ html: props.html.split("<pre>")[1].split("</pre>")[1] }}
                />
            </>
        );
    }
    return (
        <RenderHTMLSource
            contentWidth={width * 0.8}
            source={{ html: props.html }}
        />
    );
};

RenderHTML.displayName = 'RenderHTML';
RenderHTML.propTypes = propTypes;
RenderHTML.defaultProps = {};

export default RenderHTML;

Simulation Videos
https://user-images.githubusercontent.com/61627150/164083730-12851010-597e-40e5-b41c-05d4178b3312.mp4

Also, It sometimes does not work. It opens the LHN(Home page) instead of scrolling the widget. What do you suggest to improve it?

Yes sometimes there is a problem, it going back to previous screen. I don't know if we can find a solution to it. Maybe we can stop all other gestures on the screen while the code block is scrolling, but I don't think it will be a good solution.

Thanks for the updates. Few points in the code.

First of all, we don't need to modify the code in RenderHTML as proposed. RenderHTML accepts the custom renderers which should/can be used for the purpose.
Also, while scrolling the code block on the web, the context menu opens. which it should not.

Also, It sometimes does not work. It opens the LHN(Home page) instead of scrolling the widget. What do you suggest to improve it?

We will have to find a solution to this. Looking forward to substantial solutions.

First of all, we don't need to modify the code in RenderHTML as proposed. RenderHTML accepts the custom renderers which should/can be used for the purpose.

Okay. We return to our previous code.

We will have to find a solution to this. Looking forward to substantial solutions.

We need to use onResponderMove and onResponderRelease handlers. These handlers determine its user in scrollview and scrolling or not thus we can turn off or turn on the navigator gesture with a context variable.

While scrolling the code block on the web, the context menu opens. which it should not.

i will take a look

@parasharrajat, hi how are you. i worked on the code and let's go over the items you mentioned one by one

First of all, we don't need to modify the code in RenderHTML as proposed. RenderHTML accepts the custom renderers which should/can be used for the purpose.

Yes, you are right about that. Therefore, I removed my changes in the renderHTML file and created a custom model render file for the code blocks. In this way, only code blocks can be scrolled and at the same time more functional code is created.

While scrolling the code block on the web, the context menu opens. which it should not.

I want to talk about this topic. There are two context menus in the web and desktop versions. One that opens with a longpress and the other that opens at a hover instant. In the web and desktop versions, there is no need for a menu that opens with longpress, only the menu displayed with hover is sufficient. In this way, we solve the problem of opening the context menu while scrolling by holding the scroll track.
Hovered context (Need it Desktop and Web Versions)

Long Press context (No need in desktop and web versions)

@orkunkarakus This will make the whole message scrollable including tags other than code blocks.

Only Code Blocks Scroll Feature

Also, It sometimes does not work. It opens the LHN(Home page) instead of scrolling the widget. What do you suggest to improve it?

We will have to find a solution to this. Looking forward to substantial solutions.

I haven't faced this issue after my last major updates.
I take test videos of all platforms and add them below. If the solution to the problem is ok for you, I can send my proposal to here. My proposal is already open in upwork too.
If you have any questions feel free to ask.
I'm waiting to hear from you, have a nice day.
Simulation videos
https://user-images.githubusercontent.com/61627150/164953349-aa26c0b7-1482-401f-9c0c-b9c142611e28.mov
https://user-images.githubusercontent.com/61627150/164953354-d97cad29-7faf-44ea-b606-be121c8620f6.mp4
https://user-images.githubusercontent.com/61627150/164953522-b44daf24-bf64-4e6b-8dae-c68221e7cccf.mov
https://user-images.githubusercontent.com/61627150/164953513-ac8d2506-e7b5-4b4c-b9c2-45d9907348db.mov

Thank you @orkunkarakus for the detailed post.

Long Press context (No need in desktop and web versions)

Correct. But it should open on right-click.
Sounds like you have fixed all the issues. Do you mind sharing the technical details?

Thank you @orkunkarakus for the detailed post.

@parasharrajat You're welcome.

Long Press context (No need in desktop and web versions)

Correct. But it should open on right-click.

Right click still works. Only long press is disabled on hoverable platforms.
Right click video.
https://user-images.githubusercontent.com/61627150/164992447-b7965635-12d4-4ead-8de3-400dcd948d58.mov

Sounds like you have fixed all the issues. Do you mind sharing the technical details?

Sure, The "react-native-render-html" library has a feature that allows us to render html tags with custom components.
( Explained in this page [Library documentation] https://meliorence.github.io/react-native-render-html/docs/guides/custom-renderers )
I wrote a custom render component for our code block tag using this feature. This custom render component includes the ScrollView component of the "react-native-gesture-handler" library. At the same time i used to "onStartShouldSetResponder" prop provided by the Gesture Responder System in the scrollview. This prop determine the responder is scrollview while scrolling, not the long press.

If the solution to the problem is ok for you, I can send my proposal to here.

Should I consider the above post as a proposal or do you want to share something else? It seems that you are still waiting on that.

If the solution to the problem is ok for you, I can send my proposal to here.

Should I consider the above post as a proposal or do you want to share something else? It seems that you are still waiting on that.

if it is ok for you, you can consider it is a proposal.

Ok, considering that the @orkunkarakus mentioned that he fixed the scrolling issue without compromising other features, I am fine with @orkunkarakus 's proposal for the issue.
cc: @NikkiWines
:ribbon: :eyes: :ribbon:  C+ reviewed

Yep, I agree - this proposal looks good. @jboniface could you hire @orkunkarakus for this role, please?

PR is created. @parasharrajat
cc: @NikkiWines

@orkunkarakus I just noticed one thing that I forgot to mention during the PR review.
when we are scrolling the chat list via wheel and mouse comes over the code block, the scroll is blocked.
As the regression period is still active, could you please submit a PR to fix that?
The expected behavior would be when the user is scrolling horizontally, only then code block should scroll and scrolling chat should not be blocked via code block while scrolling vertically.
Steps:

Open any chat.
Send a message would code block as per the issue or use an old message in the history.
Send a few more messages.
Use a touchpad or mouse wheel to scroll the chat message list.
As soon as the cursor comes over the code block, the scroll is blocked.

@orkunkarakus I just noticed one thing that I forgot to mention during the PR review. when we are scrolling the chat list via wheel and mouse comes over the code block, the scroll is blocked.
As the regression period is still active, could you please submit a PR to fix that? It should be a small fix.
The expected behavior would be when the user is scrolling horizontally, only then code block should scroll and scrolling chat should not be blocked via code block while scrolling vertically.
Steps:

Open any chat.
Send a message would code block as per the issue or use an old message in the history.
Send a few more messages.
Use a touchpad or mouse wheel to scroll the chat message list.
As soon as the cursor comes over the code block, the scroll is blocked.

@parasharrajat Since the update is currently in staging, should I create a new branch from staging or through the old merged branch (orkunkarakus:fix/7497-LongLinesInCode) ?

Open any chat.
Send a message would code block as per the issue or use an old message in the history.
Send a few more messages.
Use a touchpad or mouse wheel to scroll the chat message list.
As soon as the cursor comes over the code block, the scroll is blocked.

@parasharrajat You're welcome. I opened the PR https://github.com/Expensify/App/pull/9026

Issued payment to @orkunkarakus after email bump.

This is ready for payout.

Paid @parasharrajat $4k for C+ on a different job than @orkunkarakus (in case anyone is auditing later on).
Closing, thanks for the help!


[FIX] Cards missing when horizontal rule present in document

This Fixes #967 somehow the current function detects a horizontal line as end of frontmatter so I implemented it to use instead the function provided by obsidian.

Found out can't use obsidian functions will I fix this


Multiple send with different attachments

Issue Summary
Related to issue #349
I need to send multiple emails with different personalizations and different attachments. Up to now the helper library doesn't allow this. How can I do this?
Technical details:

sendgrid-nodejs Version: 4.7.1 (from npm)
Node.js Version: 6.1.9

Hello @thinkingserious, I wrote to Sendgrid support and they told me to contact you directly to get help on my issue.

Hello @simonemazzoni,
To achieve your desired result, you would need to execute a separate API call for each attachment. Our API does not currently support specifying attachments within the personalization.
Here is a full example using the helper: https://github.com/sendgrid/sendgrid-nodejs/blob/master/examples/helpers/mail/example.js#L15
And without the helper: https://github.com/sendgrid/sendgrid-nodejs/blob/master/examples/mail/mail.js#L31
And here is an example for sending an attachment specifically: https://github.com/sendgrid/sendgrid-nodejs/blob/master/USE_CASES.md#attachments
I hope that helps.
Thanks!
With Best Regards,
Elmer

@thinkingserious thanks for the answer. I already implemented this solution Two days ago.
My concern regards the fact that up to now it's possible to specify different personalizations, but now different attachments. I thinks is a pretty common and useful use case since it allow developers to execute only one rest call instead of multiple rest calls.
Do you plan to add this feature in future realeases?
More in deep, is this feature compatible with Sendgrid endpoints?
Thanks

@simonemazzoni,
There are no plans to add this functionality in the near future. But every vote counts, so I would suggest you create a separate issue specifically for this feature. Then, as more people vote on it with either a +1 or comment, the issue will move up our queue.
Thanks!

@thinkingserious
Is this functionality added in the last two years.
I need to send a single email to multiple recipients but different personalizations and a different attachment file for each recipient.
Thanks

Hello @sreekanth6495,
No, this feature is not available as described. You will need a separate API call for each email.
With Best Regards,
Elmer


unsupported tensor op : InceptionResnetV1/Conv2d_1a_3x3/BatchNorm/cond/AssignMovingAvg

I'm converting our tensorflow pb file into armnn, I got following exception with the latest code:
terminate called after throwing an instance of 'armnn::ParseException'
  what():  Node 'InceptionResnetV1/Conv2d_1a_3x3/BatchNorm/cond/Identity_1' has Control Input '^InceptionResnetV1/Conv2d_1a_3x3/BatchNorm/cond/AssignMovingAvg' which is unsupported.

Hi @solderzzc the current tensorflow parser cannot guarantee the correct operation of control inputs (which is tensorflow's way of guaranteeing a particular order of execution).
You can try removing the code block at TfParser.cpp:489 to get past this parse error, but if the control inputs are guaranteeing execution of some variable assignment or something, you will probably just hit another parse error. The full list of supported TensorFlow ops is at: src/armnnTfParser/TensorFlowSupport.md
It seems to me that maybe it's not a frozen inference-only model? If you try following the steps at https://www.tensorflow.org/mobile/prepare_models it will remove all training-only nodes and you will have a much smaller, cleaner graph that is more likely to work with ArmNN.
All the best,
Matthew

Hi @MatthewARM
Thank for your reply. I removed the code block at TfParser.cpp to bypass parser error. The model has phase_train (ref: https://github.com/davidsandberg/facenet/issues/357#issuecomment-315548160) to control graph inference flow, so it might has issue during runtime.
I also called optimize_for_inference API of tensorflow to have training-only nodes removed(same behavior as mentioned in https://www.tensorflow.org/mobile/prepare_models), then hit another error log:
terminate called after throwing an instance of 'armnn::ParseException'
  what():  Currently only FLOAT is supported for tensorflow nodes (apart from Const)
Aborted

I think this is because that FLOAT variables were converted to CONST during Freeze Graph phase.
Reference:
https://github.com/davidsandberg/facenet/blob/master/src/freeze_graph.py#L88
graph_util.convert_variables_to_constants(
        sess, input_graph_def, output_node_names.split(","),
        variable_names_whitelist=whitelist_names)

Thanks
Simba

Hi @solderzzc "Currently only FLOAT is supported for tensorflow nodes (apart from Const)" indicates that there is an integer operation in your network, do you know if that is the case? Currently we only support float operations.
If you can find out which operation, and what data type, it would help us prioritise the support work internally. Or we can find a workaround.
All the best,
Matthew

Hi, @MatthewARM
I just go through the network design of facenet,  the non float ops should come from dropout layer of tensorflow.slim.
Network define with dropout

Slim dropout API

Best Regards
Simba

Hi @solderzzc, dropout should definitely get removed by the 'strip unused nodes' transform. Maybe you could try the mobile inference preparation steps again?

Hi @MatthewARM, I loaded the graph into tensorboard, the 'Dropout' layer is not included in the freezed graph. The issue should be introduced by DT_BOOL phase_train.

Thanks for the detailed analysis, @solderzzc.
We can try to get a proper fix done in a future release, but I think you can work around the issue by removing all connections to 'phase_train' from your graph. In the ArmNN TensorFlow parser we will always assume that 'phase_train' is FALSE.

@MatthewARM I will try it and look forward for the next release.
Thanks


Warning: session_start() Cannot send session cache limiter - headers already sent

Hi Guys, If I try to do:
<?php
    require ('steamauth/steamauth.php');
	include ('steamauth/userInfo.php');
	if(!isset($_SESSION['steamid'])) { }
	else {
	$userdbfile = file('userfiles/' . $steamprofile['steamid'] . '.txt');
	}
?>

I get:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at %path%/public_html/beta/index.php:2) in %path%/steamauth/steamauth.php on line 2
(%path is replaced with the path..)
Thanks for everything, Keep up the work!

Try Moving include ('steamauth/userInfo.php'); to your else statement.

Even after doing this, I still get it
(Woah, Thanks for the fast response!)

Put session_start(); After <?php

Have you changed steamauth.php at all?

Make sure that the very top of the steamauth.php file is the following:
<?php
ob_start();
session_start();

<?php
ob_start();
session_start();
require ('openid.php');
...

I can replace the whole thing with the version on github, maybe it'll work?

What "thing"?

Do you use the windows default editors? They tend to put one or two newlines at the beginning.

I use notepad++, I replaced steamauth with that on this github, It didnt work either.

Try the demo file. Does it work?

That one works succesfully.

I used SteamAuth before on this website. This time I got this error

That means that it's not SteamAuth.php. Make sure there is really nothing infront of <?php in your file.
Try making a new file and copy-pasting the things between the PHP-tags.

Is  a thing?

Make sure there is no whitespace at the top of the file.

Yes, it certainly is.

Woops... Thanks :D

You can close it... Stupid me

Technical background: PHP modifies the HTTP-headers to tell the browser how long it should keep the session cookie. The headers get send at first, before any of the HTML. Meaning if you write anything infront of it, it will close the headers and not be able to set the cookie lifetime.

@SmItH197 Another thing: Is the demo page going to come back online somewhere soon?
Otherwise we could move it to github.io or my server.

I will try and get it back up this weekend. Sorry everyone about the downtime!


Make proof faster

Try bandd start pruning with options nothing and everything. It make we can get proof in current block
Update proof.go to get proof in current block

From our findings, if we run a fresh Cosmos-SDK v0.37.4, we will be able to get proofs from old blocks without needing to configure anything. We are investigating on why that is not the case on D3N.


Impeller only: Clipping a Column doesn't work properly when Column contains a BackdropFilter

Steps to reproduce
Run the code to see the issue, click the buttons for debugging hints.
Essentially create a UI like this:

Column:

BackdropFilter
...

Notes:

Also doesn't work on 3.22.1 & 3.22.2 (haven't tried earlier versions)
Without impeller, it works fine

Expected results
Running the code inside Dartpad works perfectly, this is the expected result:
https://dartpad.dev/?id=24d6cbfbd11466920a36e8f73d75ab27
Actual results
BackdropFilter is blurred properly, but the amber Container is not.
Code sample
Code sample
import 'dart:ui';

import 'package:flutter/material.dart';

void main() => runApp(TestClipping());

class TestClipping extends StatefulWidget {
  const TestClipping({super.key});

  @override
  State<TestClipping> createState() => _TestClippingState();
}

class _TestClippingState extends State<TestClipping> {
  bool _blurTop = true;
  bool _blurBottom = true;
  bool _isReversedDirection = false;
  bool _isReversedOrder = false;

  @override
  Widget build(BuildContext context) {
    final children = [
      ClipRect(
        child: Container(
          color: Colors.blue,
          height: 150,
          width: 150,
          child: Center(
            child: _blurTop
                ? BackdropFilter(
                    filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
                    child: Container(
                      color: Colors.black.withOpacity(0.5),
                      height: 30,
                      width: 30,
                    ),
                  )
                : null,
          ),
        ),
      ),
      ClipRect(
        child: Container(
          color: Colors.amber,
          height: 150,
          width: 150,
          child: Center(
            child: _blurBottom
                ? BackdropFilter(
                    filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
                    child: Container(
                      color: Colors.black.withOpacity(0.5),
                      height: 30,
                      width: 30,
                    ),
                  )
                : null,
          ),
        ),
      ),
    ];

    return MaterialApp(
      home: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            ElevatedButton(
              onPressed: () {
                setState(() {
                  _blurTop = !_blurTop;
                });
              },
              child: Text("toggle top blur (works as expected without blur)"),
            ),
            ElevatedButton(
              onPressed: () {
                setState(() {
                  _blurBottom = !_blurBottom;
                });
              },
              child: Text(
                  "toggle bottom blur (just there to show that clipping sometimes works)"),
            ),
            ElevatedButton(
              onPressed: () {
                setState(() {
                  _isReversedDirection = !_isReversedDirection;
                });
              },
              child: Text("reverse column directionality "),
            ),
            ElevatedButton(
              onPressed: () {
                setState(() {
                  _isReversedOrder = !_isReversedOrder;
                });
              },
              child: Text("reverse column children order"),
            ),
            Container(
              width: 300,
              color: Colors.red,
              child: ClipOval(
                child: Container(
                  height: 300,
                  width: 300,
                  color: Colors.green,
                  child: Column(
                    mainAxisSize: MainAxisSize.min,
                    verticalDirection: _isReversedDirection
                        ? VerticalDirection.up
                        : VerticalDirection.down,
                    children: _isReversedOrder
                        ? children.reversed.toList()
                        : children,
                  ),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

Logs
N/A, logs are completely empty
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64, locale de-DE)
    • Flutter version 3.22.2 on channel stable at /Volumes/Storage/Cache/fvm/versions/3.22.2
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (4 weeks ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Volumes/Storage/Development/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Volumes/Storage/Development/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Volumes/Storage/Applications/Xcode-15.3.0.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] VS Code (version 1.90.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.90.0

[✓] Connected device (3 available)
    • iPhone 15 (mobile)              • 62AF32F0-EF0C-4FF3-9809-E79B25181495 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 14.5 23F79 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 126.0.6478.127

[✓] Network resources
    • All expected network resources are available.

• No issues found!

This is related to an optimization that applies a scissor when drawing clips (see https://github.com/flutter/engine/commit/918bf19cd85bc55449203df3444ac8d0a21c40ae)
The example app renders correctly if I patch EntityPass::RenderElement to set the scissor using the replay entity's clip coverage instead of the clip stack's current coverage:
    for (const auto& replay : replay_entities) {
      SetClipScissor(replay.clip_coverage.value(), *result.pass,
                     global_pass_position);
  }

@bdero

This was fixed in https://github.com/flutter/engine/pull/54673


Allow classmethods as config scopes and captured functions

Here's a small example of what I'd like to be able to do. The real usecase is far more complex:
from sacred import Experiment

ex = Experiment()

class A:
    @ex.config
    @classmethod
    def config(cls):
        """It would be nice to have access to `cls` inside of this ConfigScope"""
        classname = cls.__name__

    @classmethod
    def captured(cls, classname):
        """Some function to be captured."""
        print(classname)

# Do capturing here because in my case the classmethod can't be captured with a decorator.
A.captured = ex.capture(A.captured)

@ex.automain
def main():
    A.captured()

Why this fails
ConfigScope
The ConfigScope discards the context of the decorated function or method.
Because of this cls is not accessible from inside of the config scope. This
can be solved by saving the func.__self__ attribute in
ConfigScope.__init__ if func is an instance of types.MethodType
and add this to preset as the first argument when calling the config scope.
captured function
Capturing a classmethod already works if the function is captured before
transforming it into a classmethod:
class A:
    @classmethod
    @ex.capture
    def captured(cls, ...):
      pass

However, this is not possible in my case. To make it work even after
converting the function into a classmethod I need to unwrap the function
and wrap it again into a classmethod (because a classmethod is immutable
so setting additional attributes like logger and signature is not possible):
class A:
    @classmethod
    def captured(cls, ...):
      pass

# This should work, but looks very ugly
A.captured = types.MethodType(ex.capture(A.captured.__func__), A)

This looks very ugly.
Ingredient.capture could be modified to handle this unwrapping and wrapping
if the passed function is an instance of types.MethodType.
I'd like to hear some thoughts about this and whether this could be included
in sacred.
Btw, this should also work for instance methods.

This is an interesting usecase that I haven't considered yet. Thanks for bringing it up. Unfortunately I don't have time to dig into it further now, and I will be on vacation for the next two weeks. But from a casual read of your description, it seems to me that this problem could be solved in such a way, that it does not at all impact the standard usecases of config scopes and captured functions. If so, I'd be more than happy to include an appropriate fix into the next release.

I just noticed that doing it like shown above:
class A:
    @ex.capture
    @classmethod
    def config(cls):
        # ...

does not work, because the classmethod is not bound to any class object yet while the decorator is called. It can work (I tested that) when the config scope is added after the class definition is done:
class A:
    @classmethod
    def config(cls):
        # ...

ex.config(A.config)

To make it work with a decorator we need access to the initialized class object. Two possibilities for this are using a superclass (or metaclass) or a decorator. I tried using a decorator on the class and this also works (including minor changes in ConfigScope):
def class_decorator(cls):
    for k in dir(cls):
        attr = getattr(cls, k)
        if isinstance(attr, types.MethodType) and getattr(attr.__func__, '_use_as_config', False):
            setattr(cls, k, ex.config(attr))
    return cls

def method_decorator(m):
    m._use_as_config = True

@class_decorator
class A:
    @method_decorator
    @classmethod
    def config(cls):
        classname = cls.__name__

The same thing is true for captured classmethods also. Now this feature seems a lot more complicated to implement than I thought and the usecases are very limited. Nevertheless, I have some code that would greatly benefit from this feature as I anyways would capture the classmethods in a different place than defining them.

The thing with decorating the classmethod directly is very complicated, especially when dealing with subclasses. What should be the value of classname for this example?
class A:
    @ex.config
    @classmethod
    def config(cls):
        classname = cls.__name__

class B(A):
    pass

At the point of definition of the config scope, the function is not bound to any class. After subclassing A,  B inherited the config scope from A, but would set classname to 'B'.  I think the a reasonable possibility would be to only allow adding the config scopes afterwords like ex.config(A.config), wihch makes clear which class should be passed as cls.
For capturing a classmethod we could instead of doing types.MethodType(ex.capture(A.captured.__func__), A) define a descriptor as sublcass of classmethod:
class CapturedMethod(classmethod):
    def __init__(self, f) -> None:
        super().__init__(ex.capture(f))

and use A.c = CapturedMethod(A.c.__func__), which would be aequivalent to
class A:
    @classmethod
    @ex.capture
    def captured(cls, ...):
        # ....

Where are we with this?

@kirk86 I'm not sure how useful this is anymore. I solved my use case now differently. Do you need this feature?


ORC-284: [C++] add missing tests for C++ tools

Added two tool tests for FileStatistics and FileContents.

@majetideepak Please help review this patch, thanks!

+1 LGTM. Thanks @wgtmac !


Allow readthedoc loader to pass custom html tag

Description
The html structure of readthedocs can differ. Currently, the html tag is hardcoded in the reader, and unable to fit into some cases. This pr includes the following changes:

Replace find_all with find because we just want one tag.
Provide custom_html_tag to the loader.
Add tests for readthedoc loader
Refactor code

Issues
See more in https://github.com/hwchase17/langchain/pull/2609. The problem was not completely fixed in that pr.
Who can review?
@hwchase17
@eyurtsev

@dev2049 can you also look at https://github.com/hwchase17/langchain/pull/5171


feat: :fire: add guidance client

why

[x] add MS guidance as a alternative for Class AI

Can be used as following main.py
import json
import logging
import shutil

from pathlib import Path

import typer

from gpt_engineer import steps
from gpt_engineer.ai_with_guidance import AIwithGuidance
from gpt_engineer.db import DB, DBs
from gpt_engineer.steps import STEPS

app = typer.Typer()

@app.command()
def main(
    project_path: str = typer.Argument("example", help="path"),
    delete_existing: bool = typer.Argument(False, help="delete existing files"),
    model: str = "gpt-4",
    temperature: float = 0.1,
    steps_config: steps.Config = typer.Option(
        steps.Config.DEFAULT, "--steps", "-s", help="decide which steps to run"
    ),
    verbose: bool = typer.Option(False, "--verbose", "-v"),
    run_prefix: str = typer.Option(
        "",
        help=(
            "run prefix, if you want to run multiple variants of the same project and "
            "later compare them"
        ),
    ),
):
    logging.basicConfig(level=logging.DEBUG if verbose else logging.INFO)

    input_path = Path(project_path).absolute()
    memory_path = input_path / f"{run_prefix}memory"
    workspace_path = input_path / f"{run_prefix}workspace"

    if delete_existing:
        # Delete files and subdirectories in paths
        shutil.rmtree(memory_path, ignore_errors=True)
        shutil.rmtree(workspace_path, ignore_errors=True)

    ai = AIwithGuidance(
        model=model,
        temperature=temperature,
    )

    dbs = DBs(
        memory=DB(memory_path),
        logs=DB(memory_path / "logs"),
        input=DB(input_path),
        workspace=DB(workspace_path),
        preprompts=DB(Path(__file__).parent / "preprompts"),
    )

    for step in STEPS[steps_config]:
        messages = step(ai, dbs)
        dbs.logs[step.__name__] = json.dumps(messages)

if __name__ == "__main__":
    app()

Thanks for the contribution!
I would probably make it inherit much of the functionality from the AI class.
Also this change doesn't seem to actually add any functionality, just use a different library?

@FOLLGAD
Thank you for your feedback!
This Pull Request (PR) is primarily aimed at introducing the Guidance Client, and as such, does not include any additional functionality. However, I'd like to emphasize that the new AIwithGuidance class will maintain equivalent functionality to the current AI class, with the addition of guidance-specific enhancements.
We understand the importance of leveraging existing code. Therefore, my plan is to have AIwithGuidance inherit most of its functionalities from the AI class, reducing redundant code and promoting code reusability.

Thanks for wanting to contribute! There are many ways.
But what problem does this solve?
To merge, we would need it to actually use functionality in guidance and have a "case" for this being better
We want as few lines of code as possible.

@AntonOsika
Thank you for your feedback!
I had thought of this PR as I saw using guidance in the benchmarks on the roadmap.
However, as you correctly pointed out, my current implementation doesn't introduce any new functionality.
It also seems to go against the policy of preferring fewer lines of code.
Therefore, I've decided to close this PR. I'll make another PR when I have another opportunity.


mpd: 0.22.4 -> 0.22.5

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/mpd/versions.
meta.description for mpd is: "A flexible, powerful daemon for playing music"
meta.homepage for mpd is: "https://www.musicpd.org/"
meta.changelog for mpd is: ""
Updates performed

Version update

To inspect upstream changes

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 0.22.5 with grep in /nix/store/pjybzkzapzh53m7dvnk1nqhxi8cg57l5-mpd-0.22.5

directory tree listing: https://gist.github.com/33b56a718a4cef129006e8ff3d7bf921

du listing: https://gist.github.com/a338be823b52b2131b42e155545bcca4

Rebuild report (if merged into master) (click to expand)

8 total rebuild path(s)

2 package rebuild(s)

2 x86_64-linux rebuild(s)
2 i686-linux rebuild(s)
2 x86_64-darwin rebuild(s)
2 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
mpd
mpd-small

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/pjybzkzapzh53m7dvnk1nqhxi8cg57l5-mpd-0.22.5 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A mpd https://github.com/r-ryantm/nixpkgs/archive/9b4fa5a54b1b6768e4178fca53e77336cd5a7283.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/pjybzkzapzh53m7dvnk1nqhxi8cg57l5-mpd-0.22.5
ls -la /nix/store/pjybzkzapzh53m7dvnk1nqhxi8cg57l5-mpd-0.22.5/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages built:

mpd
mpd-small

Maintainer pings
cc @astsmtl @ehmry @fpletz @tobim for testing.

Result of nixpkgs-review pr 113385 at 9b4fa5a5 run on aarch64-linux 1

2 packages built:

mpd
mpd-small

2 suggestions:

warning: unclear-gpl
gpl2 is a deprecated license, check if project uses gpl2Plus or gpl2Only and change meta.license accordingly.
Near pkgs/servers/mpd/default.nix:176:9:
    |
176 |         license     = licenses.gpl2;
    |         ^

warning: unnecessary-parallel-building
Meson, CMake and qmake already set enableParallelBuilding = true by default so it is not necessary.
Near pkgs/servers/mpd/default.nix:152:7:
    |
152 |       enableParallelBuilding = true;
    |       ^


Add new constructor and get() method to Some<>.

@lisitsyn
Changes:

Fix the SGObject equals() (in view of SG_REF refactor);
get() method permits to extract the raw pointer from Some<> (in view of SG_REF refactor);

Other changes:

Add .idea (CLion IDE directory) to .gitignore;

:+1:

Are CIs failing at random?

mmm travis tend to do these things lately:
The command "docker exec -t devenv /bin/sh -c "cd /opt/shogun/build; ctest --output-on-failure -j 2"" exited with 0.

Done. Your build exited with 1.

which seems to be due to
clang: error: unable to execute command: Killed

clang: error: clang frontend command failed due to signal (use -v to see invocation)

Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)

Target: x86_64-pc-linux-gnu

Thread model: posix

clang: note: diagnostic msg: PLEASE submit a bug report to http://bugs.debian.org/ and include the crash backtrace, preprocessed source, and associated run script.

clang: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.

make[2]: *** [tests/unit/CMakeFiles/shogun-unit-test.dir/clone_unittest.cc.o] Error 254

make[1]: *** [tests/unit/CMakeFiles/shogun-unit-test.dir/all] Error 2

make[1]: *** Waiting for unfinished jobs....

[ 87%] Building CXX object tests/unit/CMakeFiles/shogun-serialization-unit-test.dir/base/main_unittest.cc.o

[ 87%] Building CXX object tests/unit/CMakeFiles/shogun-serialization-unit-test.dir/utils/Utils.cpp.o

Linking CXX executable ../../bin/shogun-serialization-unit-test

Discovering Tests in shogun-serialization-unit-test

[ 87%] Built target shogun-serialization-unit-test

make: *** [all] Error 2

i reckon we are running out of mem?

@geektoni i've just restarted the windows based one

@vigsterkr AppVeyor is now green :tada:


Add navigation target sensor

This would be very useful to set up home automations based on a destination of “home” like setting thermostat temp at home so its nice and cool upon arrival.

We have this.

device_tracker.model3_destination_location_tracker or whatever.


How to allow only the routes on a specified network segment to pass through the proxy? For example, using tun2proxy as a vpn mode?

How to allow only the routes on a specified network segment to pass through the proxy? For example, using tun2proxy as a vpn mode?

Currently tun2proxy is not supported for specifying the network segment to be bypass with CIDR.
Single target IP is supported. Please check the wiki.

It's not supported through --setup currently, but it can be done manually by employing the steps from the README file and only adding the desired route to the tunnel interface instead of <IP_ADDRESS>/0 or <IP_ADDRESS>/1 and <IP_ADDRESS>/1.


Add Enum fields

I think this time I'm done )

Thanks, I know that Dadata has released a lot of new "directories". If you suddenly want to add methods to work with them, I will be grateful :)


C/CPP - Looping Control Structure

Description 📜

Documentation for loops and their functioning in C

Domain of Contribution 📊

[x] C/CPP

/assign

/assign

/assign Document

/assign

/assign

/assign

/assign

@Shubhrajyoti24  doc has already been assigned
Lemme know if you want to contribute audio/video

/assign
want to contribute in video format


I love ungoogled-chromium

Damn, i love this. I can't use a computer without this web browser.

Thanks! Glad you're liking it.

Same here!
Great project, fantastic work, well done.

Same! Especially the pre-built packages are SUPER helpful. I love how they get updated fast for debian.

@Obsessive Huh, that's not something your hear everyday. Out of curiosity, what made you switch?

I wrote a extension to make it easier to install extensions from the webstore by following the url method stated in the faq, All that it does is get chrome's version and extension's id and insert it into the crx url, The #extension-mime-request-handling flag is still required.
https://github.com/UnnoTed/Ungoogled-Chromium-Extension-Installer

I love it too, thanks so much!

Moved from Firefox quantum to Chrome thanks to this project ;)

For me it is because Firefox is far worse on the privacy side. If you tcpdump it - not only it connects to Google (for unsafe browsing and who knows what else) but also to other hosts of Amazon, Akamai, Mozilla (for telemetry and what not), OCSP etc. Chromium at least communicates only with 1 entity. Of course through certain combinations of about:config settings Firefox background chatter can be reduced but it requires quite a lot of fine tuning and constant monitoring as in new versions they keep adding more and more "features". When I reported all that to Mozilla they ignored and closed my bug reports, didn't update their documentation about how to stop background communication and as a whole behave in a very repulsive way. People who trust "non-profit" Mozilla (actually a multimillion dollar corporation) are very mislead imo.

I love it as well!! <3
I'm using ungoogled chromium for all my GUI based network devices and never had any problem with it...
For normal browsing i still use a customized Firefox ESR 52, with noscript, uBlock Origin and a few more addons.
 On my i5 7200u Notebook youtube 4k content is causing ~65% CPU load where Chrome only needs ~12% CPU and ~15% iGPU load for the same 4k content!

@anchev
Most of the revenue of Mozilla is coming from google
Mozilla 2016
How Mozilla Make Moeny
All that money make firefox switching to webkit questionable... they have indeed good reasons but when you see project like palemoon where just 2 developers made an amazing work... for sure there is something going on but what ? we will never know...
@Eloston Personally am using :
50% : Palemoon as main browser, (can not live without xul)
40% : Ungoogled Chromium as secondary (mainly for its speed, and because of U.G. features)
10% : Mixed Browser Depending Used Service

Chrome (for netflix)
Firefox v52.9.0 Mageia Custom Build (Used rarely just there to remember this old beast, but still its a custom build with many features... but as it is going nowhere in a near future i kind switched before the storm)
Seamonkey (Nice little alternative when i don't want to miss with my browsing sessions)
Cyberfox (Secondary alternative)
Waterfox (Running insecure addons)

I remember not so long ago being stuck on firefox v3/v4 for my addons my custom setup & custom build... damn those versions of firefox sky-rocked at their time
May be i am crazy using all those stuff lol... and i did even not talked about android lol
Also for the record Windows 10 made me switch to linux fully, i really did love a lot that system... it took me many months to makes windows custom at every release with all the modifications & hack etc... but with v10 things became raging and most of the time way too much time consuming to setup, and when you do set it up windows give you a "hi 5" by and update that erase everything and you have to start from scratch... at least when you customize linux it's there for a long time if not for good.
I always have been postponing fully switching to linux... but now that i did and with my custom build from custom Bios to custom Kernel to custom Linux LSM to custom custom KDE... it's like heaven lool now days linux evolution have reached truly amazing stage. if MS was not alone doing things like they did with Win 10 would of made them loose a lot of customers
But thanks god snowden revelation made open-sources world evolve like never before (even if we knew about it... but now politics know). and European union is not inactive in the domain.

@intika

May be i am crazy using all those stuff lol... and i did even not talked about android lol

Lots of people like to play with their systems, whether it be a desktop, server, DIY electrical device, car modding, etc. You're definitely not alone.

i was a little skeptical when i first find it because of the lack of website and the given name to the project

Interesting. I tend to go to GitHub (or similar services) to see what a project is like, because it allows me to see attributes that aren't visible on a website; e.g. development activity, code quality, stability, the kind of atmosphere it promotes, etc.
But that's just my opinion. Others prefer websites for a variety of reasons, and that's understandable. (If you would be interested in helping to make the website, we should discuss more in #335.)

Interesting. I tend to go to GitHub (or similar services) to see what a project is like, because it allows me to see attributes that aren't visible on a website; e.g. development activity, code quality, stability, the kind of atmosphere it promotes, etc.

Yeah me too but for a project like a browser (even if it's a fork) i expected to see more than a git, i know now the background but back then i was like "this is someone who are playing with chromium this is not serious and may be it will not survive a long time" but as i already said after digging in it's a whole other story... as we say "first impression is a bitch" lol

+1 for this product. Gave you a shout out here too: https://news.ycombinator.com/item?id=18047418

@Eloston you should set up a donation link with PayPal, Patreon, or Open Collective so you can work on this more 👍

"respecting our users is at the core of what we do" is the latest Google's nonsense in this bug report about Chromes privacy issues related to connections to Google:
So once again: huge thanks to @Eloston for this great project.

"respecting our users is at the core of what we do" is the latest Google's nonsense in this bug report about Chromes privacy issues related to connections to Google:
So once again: huge thanks to @Eloston for this great project.

Yes they do because if not no one would use the product, in the other hand we sometime forget that all of this is free... in the butom line we are the product... there is reason why google services are so good it's because they know so well theirs users lol hahaha

@niftylettuce This is a month late, but ungoogled-chromium is a side project for me, and I intend to keep it that way for the forseeable future. Nevertheless, thank you for your show of appreciation!

@Eloston must earn over a 6 figure a year :p so he is too generous

I'm very happy I found this again!  https://github.com/UnnoTed/Ungoogled-Chromium-Extension-Installer
Could this be added to: https://ungoogled-software.github.io/ungoogled-chromium-wiki/user-resources/Useful Extensions. I find it very handy to still be able to install extensions.
Thanks UnnoTed and of course @Eloston for making and this panacea of a browser! Hope you find some time 'from time  to time' to maintain these great builds!
Thank you!

I wrote a extension to make it easier to install extensions from the webstore by following the url method stated in the faq, All that it does is get chrome's version and extension's id and insert it into the crx url, The #extension-mime-request-handling flag is still required.
https://github.com/UnnoTed/Ungoogled-Chromium-Extension-Installer

Unfortunately I lost this love.

lmao


Bus PriceTable

This PR tries to take advantage of the price tables stored in the database; instead of having every worker fetch its own price table from the host we reuse the price information from the database that might have been collected by other workers.
This has several advantages, mostly in multi-worker setups:

workers use the same prices and their behaviour is thus more predictable
workers can be dynamically upscaled and will hit the ground running as we can bootstrap them with valid price tables
if we want to, we can be clever about when to update host prices and potentially use the cheapest prices
it plays well with the UI, price tables are now host metadata, the UI can display it as such and avoid complexity

I think my refactor of the pricetables on the host is quite nice and results in cleaner code. Especially the way we fetch price tables but also the wrap of the rhpv3.HostPriceTable in a struct that also keeps track of the Expiry. This is information that we are currently missing and is definitely useful.
This was a bit of an experiment, I already peeled off some pieces I liked and got them merged in separate PRs. As you may have noticed I have not implemented any distributed locking because I want to argue it's not necessary and not that big of a deal. I think it will perform better than current master in multi-worker scenarios, or when the system is under constant load, and will not perform worse than what we currently have in all other scenarios.
edit: refactored it so it's not overloading host scans but instead I add a new interaction type

Looking pretty good but I'm deploying it to my node before hitting merge.

What a weird panic. I don't think we should merge this PR before the release this week. My node is pretty unhappy as well. I'd rather branch off a stable branch and keep testing that one this week.

What a weird panic. I don't think we should merge this PR before the release this week. My node is pretty unhappy as well. I'd rather branch off a stable branch and keep testing that one this week.


stop generation button disappeared on android

stop generation button disappeared on android
Originally posted by @Ar57m in https://github.com/MaidFoundation/maid/issues/203#issuecomment-1850354649

Thanks, now it's working the button 🙏


fix crash on shutdown where the engine attempted to use debugInterfac…

…e even if it was null. Added an assert for now - but should likely change this to spawn a message to the user if we care (or, just skip the debug checks silently, if we don't)...

Thanks for reporting this.  We tend to test the code on systems with the debug layers installed.
It is better practice to check the return code from QueryInterface since I have seen bugs in the past where the output pointer is not properly initialized by an API in the failure case.  If you update it to "if (SUCCEEDED(g_Device->QueryInterface(&debugInterface)))" I can merge this in.
Thanks again.

Hi- I didn't hear back from you, so we will go ahead and make this change directly in the branch and close this pull request.

I was just doing it now - but either way is fine :)
Sent from my BlackBerry 10 smartphone.
From: Bob Brown
Sent: Wednesday, September 2, 2015 17:57
To: Microsoft/DirectX-Graphics-Samples
Reply To: Microsoft/DirectX-Graphics-Samples
Cc: Mah, Layla
Subject: Re: [DirectX-Graphics-Samples] fix crash on shutdown where the engine attempted to use debugInterfac… (#17)
Hi- I didn't hear back from you, so we will go ahead and make this change directly in the branch and close this pull request.
—
Reply to this email directly or view it on GitHubhttps://github.com/Microsoft/DirectX-Graphics-Samples/pull/17#issuecomment-137257608.

Ok.  If you're working on it, please continue.  I was going to wait a day for a reply and then make the change.  I should have written that originally.

I think GitHub added the new commit to this pull request -- but please let me know if it didn't make it :)

Merged it. Thanks!


Suggestion for template addition: format tool names and file names

Hi all,
We have been writing some Galaxy tutorials (which I am hoping to contribute over here soon) and were using CSS to add some formatting to various parts. I include an example here in case you are interested in using this too.
For example: tool names/settings in blue, and file names with a border:

In Markdown format, we then added tags such as "ss" for screen shot text and "fn" for filenames.
Then in the CSS file, we added these descriptions, e.g.
SS {
font-family: "Lucida Grande", sans-serif;
font-size: 80%;
font-weight: bolder;
color: black;
text-align: center;
border-radius: 5px;
background: lightsteelblue;
padding: 0.3ex 1ex;
}
FN {
font-family: "Lucida Grande", sans-serif;
font-size: 80%;
color: black;
text-align: center;
padding: 0.3ex 1ex;
border: solid thin black;
border-radius: 4px;
}
Just putting it here as a suggestion.
Anna

Thanks @AnnaSyme for this suggestion. It could be nice to have something to make even more clear which tool using on which tool.
How is the markdown looking to do that?
For now, we do not have special formatting for the filename, just for the tools:

In markdown:
2. **TopHat** :wrench:: Run **TopHat** with:
    - "Paired-end (as individual datasets)" instead of "Single-end"
    - The Trim Galore outputs in the correct order (forward and reverse reads)
    - "Drosophila melanogaster: dm3" as reference genome
    - Default values for *strandedness* and *insert size*

PS: as the section where to find the tool can change from one instance to the other, we decided to not adding them

Thanks @bebatut for your reply.
I will use the current formatting for now - that looks good - with the **  and the wrench.
If we ever want to use the CSS style, the way to do it in Markdown is to surround the text with CSS tags such as <ss> text </ss>

@AnnaSyme should we discuss this further during the upcoming training contribution fest, or can we close this?

@bgruening @bebatut  we can close this for now - it's always an option for the future but the current format looks good.

@AnnaSyme great, thanks!


Fix the description of neat remove

Good catch, will merge.

https://github.com/thoughtbot/neat/commit/a818981c7c172882383c8d4c6fc1638749d99019 has been merged


[DS-3991] made sure that the halbrowser now correctly downloads files

Implemented a fix that allows the HAL browser to properly download files when trying to access the content of a bitstream through the BitstreamContentRestController.
 It has merge conflicts.  Could you rebase it against the latest master branch, please?

@tdonohue : It was indeed created from an outdated master branch, I've rebased this onto the current master branch now.

@Raf-atmire : thanks for making that last minor update. This now looks good, and it has two +1 votes.  Merging immediately.


Added complete unit and integration tests for slp/validateTxid

This PR can be merged now, or wait till Monday.

Pull Request Test Coverage Report for Build 1558

0 of 0   changed or added relevant lines in 0 files are covered.
45 unchanged lines in 1 file lost coverage.
Overall coverage increased (+0.7%) to 75.997%

Files with Coverage Reduction
New Missed Lines
%

dist/routes/v2/slp.js
45
59.19%

Totals

Change from base Build 1549:
0.7%

Covered Lines:
3007

Relevant Lines:
3754

💛  - Coveralls

:tada: This PR is included in version 1.14.6 :tada:
Your semantic-release bot :package::rocket:


Reimplemented the mempool traversal function and fixed some existing bugs in the mempool

Summary
Reimplemented the mempool traversal function and fixed some existing bugs in the mempool.
Re-implementation:
The previous implementation could not effectively handle the use of memdump in an SMP environment because syslog would create race conditions under SMP. Therefore, instead of traversing the linked list, we directly traverse the entire memory address space. This approach avoids race conditions in an SMP environment and makes debugging easier.
bug fix:

fix bug when deinit mpool, wrong parameters used
Need check mpool is NULL
need unposion memory when deinit
fix bug when free a alignment address
fix mempool memdump address incorrect printing
fix memdump leak will hang on spinlock

Impact
mempool
Testing
vela & qmue mpsan547 mm testing with mempool

@anjiahao1 fix lint error.


[WIP][🚨][RN] Updates RN version

Fails

:no_entry_sign:
Please add a description to your PR.

:no_entry_sign:
Please assign someone to merge this PR, and optionally include people who should review.

  Generated by :no_entry_sign: dangerJS

Going to close this now; I want to give FlatList a shot after upgrading our RN version.


Credentials

having trouble creating new credentials
added to profile:
jenkins::credentials { 'name-key':
password            => '',
private_key_or_path => hiera('namekey_key'),
}
error:
Error: /Stage[main]/Profiles::Jenkins/Jenkins::Credentials[namekey-key]/Jenkins::Cli::Exec[create-jenkins-credentials-namekey-key]/Exec[create-jenkins-credentials-name-key]/unless: Check "$HELPER_CMD credential_info name-key | grep name-key" exceeded timeout

The problem comes from the jenkins-cli.jar not handling correctly the private key argument when it is the content itself. It is due to the dash characters interpreted as option of the command line even if surrounded with quotes.
Debug: Exec[create-jenkins-credentials-test1@example.com](provider=shell): Executing '["/bin/sh", "-c", "/usr/bin/java -jar /usr/share/jenkins/jenkins-cli.jar -s http://<IP_ADDRESS>:8080 groovy /usr/share/jenkins/puppet_helper.groovy create_or_update_credentials<EMAIL_ADDRESS>'' '' 'Managed by Puppet' '-----BEGIN'"]'
Debug: Executing '/bin/sh -c /usr/bin/java -jar /usr/share/jenkins/jenkins-cli.jar -s http://<IP_ADDRESS>:8080 groovy /usr/share/jenkins/puppet_helper.groovy create_or_update_credentials<EMAIL_ADDRESS>'' '' 'Managed by Puppet' '-----BEGIN''
Debug: /Stage[main]/Main/Node[default]/Jenkins::Credentials[test1@example.com]/Jenkins::Cli::Exec[create-jenkins-credentials-test1<EMAIL_ADDRESS>Sleeping for 10.0 seconds between tries

java -jar /usr/share/jenkins/jenkins-cli.jar -s "http://<IP_ADDRESS>:8080" groovy /usr/share/jenkins/puppet_helper.groovy create_or_update_credentials<EMAIL_ADDRESS>'' '' 'Managed by Puppet' '-----BEGIN'
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
"-----BEGIN" is not a valid option
java -jar jenkins-cli.jar groovy [SCRIPT] [ARGUMENTS ...]
Executes the specified Groovy script.
 SCRIPT    : Script to be executed. File, URL or '=' to represent stdin.
 ARGUMENTS : Command line arguments to pass into script.

I have opened a PR for comments that provides an alternative credentials type that should correctly handle cli authenication.  https://github.com/jenkinsci/puppet-jenkins/pull/382


[Feature] Analytics for tracking viewer events

Problem description
As a user, I can integrate with an analytics platform to track viewer events.
Why would it be useful?
If I use google analytics, posthog, segment, pendo, plausible, logrocket, google tag manager, etc. I want to be able to capture events from my users on Fern Docs.
Describe the solution (optional)
In docs.yml:
...
analytics:
  posthog:
    apiKey: <key>
  pendo:
    apiKey: <key>
...

tracking in linear


Self pointing relationship

Hi, i'm trying to make work this
public function parent()
    {
        return $this->hasMany('Category', 'id', 'parent_id');
    }

    public function children()
    {
        return $this->belongsTo('Category', 'parent_id', 'id');
    }

'columns' => array(
		'id',
		'name_ru',
		'name_en',
		'parent_id' => array(
			'relationship' => 'parent',
			'select' => '(:table).name_en',
			),
		),

Got no results tho.... Can u help a bit, how it can be done with administrator?

@SergeyMiracle can you explain how? I'm trying to a self-referencing FK (parent_id) and so far I didn't find any way to save my data.

@sergiocastrovale it was sooo long time ago... And i'm not using it anymore, so i think i can help u :) sorry


Create error outside process.nextTick

This creates much more relevant stack traces for user input errors

@thejameskyle would you mind checking the "allow maintainers to edit" checkbox?


Could not find job in package

I have registered a job using the following code
export const regularJobKey = "regularJobKey";

import {regularJobKey} from './Utils/stringHolders';

BackgroundJob.register({
    jobKey: regularJobKey,
    job: () => processBackgroundTask().done()
});

I can see the the logcat prints out The job regularJobKey was successfully scheduled.
I used http://www.javarepl.com/term.html to generate the hash which returns -917799906 in my case but when i run the code adb shell cmd jobscheduler run -f in.example -917799906 I get an error
Could not find job -917799906 in package in.example / user 0
Using the android emulator running API level 27

I am also facing this. Did you find any solution?

Sorry, now that we're using FirebaseJobDispatcher I'm not sure the jobs can be triggered with adb anymore. Try setting exact to true and a short interval instead.


chore(main): release 2.18.0

:robot: I have created a release beep boop
2.18.0 (2024-07-25)
Features

EMS-3631: declaration versions - database restructure, application creation (#2805) (2353b5f)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v2.18.0
:sunflower:


Ci: update package version based on git tag before publishing

so I don't need to remember to update the pyproject.toml every time

it works 🥳


Does buildfarm have the capability of controlling workers load balancing?

When I used it, I found that the CPU usage of some workers was close to 100%, while the CPU usage of some workers was very low.

Some more metrics might be informative. What was the relative load of each worker, obtainable by bf-cat WorkerProfile or prometheus?
Executions on buildfarm workers occur with them pulling work, making load balance an emergent behavior of each worker being able to receive as much work as they can support.

It's also possible some workers were "busy" doing i/o-intensive work


can break container if removing network after it's assigned to said container first

FEATURE request Description
I was experimenting with networking, and found that if you remove a network after a container is associated with it, the container breaks, and you can no longer 'leave' the non-existent network.
Please add a feature that prevents you from deleting a network if it still has attached containers, and/or ensure the Leave Network works even if the network has already been deleted.
In my case the container was stopped so there were no active endpoints.
Steps to reproduce the issue:

Create a new bridge network
set a container to use only the new network
delete the network
in the container properties page try 'leave network' on the just-deleted network.

receive 'failure container is not connected to the network'
(refer screenshot)
Technical details:

Portainer version: Was v1.11.1 when containers & networks created, was 1.16.5 when issue occurred (Arm HF, in container named portainer/portainer )
Target Docker version (the host/cluster you manage):
Platform (windows/linux): Ubuntu 16.04.4 LTS on Odroid XU4 kernel 4.14.29
Command used to start Portainer: docker run --restart=always -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer
Browser: Chrome & Edge

Docker default behavior is to raise an error when removing a network with active endpoints (e.g. running containers). I believe that we should prevent the removal of any network with associated containers (no matter the state of the containers).

Hi, this is not the case.
I got Portainer running, was trying to add a ipv6 network, made a typo. Deleted the network and Portainer is unable to restart because the network does not exist anymore.
The error: Error response from daemon: Cannot restart container 6bd0ef355f28: failed to create endpoint portainer on network bridge: network 68d1364f1c21fb0e070b77b15ea039a50021855ce4ff1c05f22ebd9da49f523a does not exist


GitFlow: Merge Develop into Main for a release

This pulls in the change from #21 into main for a tag

Let me do a quick GEOSgcm run to make sure it's zero-diff. I mean, it seems it obviously is, but...for safety's sake :)

Should be 0diff if running standard RRTMG. But if running RRTMGP it may not be 0diff if one selects those new AGCM.rc parameters different from the default values of 10.

And it is! Zero-diff. Merging and will make release.


Encapsulate the sendTranasction method in the OwnershipProvider

To lower the development barrier, we can encapsulate the sednTransaction method in the OwnershipProvider to support

pay transaction fee
sign (seal) the transaction
broadcast the transaction

how to
https://github.com/ckb-js/nexus/pull/255#discussion_r1174563498


Generalize widgetry texture support, and use real photos in the LTN app

This PR does two things:

make widgetry able to load a configurable spritesheet, with possibly different sprite dimensions (generalizing #333 by @michaelkirk)
add real photos for selecting the LTN filters, since a picture is immediately clear and descriptions are confusing!

https://user-images.githubusercontent.com/1664407/195868302-176f59db-29e2-4974-a0d6-16720c30e58d.mp4
I still need to

decide how to load the PNG file on the web and where to store it -- 3MB is large to put in git or bake into the .wasm
take photos of the 3 filters; the ones in the demo above are from the web and probably have copyright issues

Notes:

I tested on web, things work fine
I oddly had trouble finding a tool to just pack 3 differently-sized images in a spritesheet. https://codeshack.io/images-sprite-sheet-generator/ helped, but I had to manually pad
The images stretch/shrink with --scale-factor in a way that seems reasonable to me:

The inclusion of photos looks like an amazing feature!

As a hypothetical "widgetry user", I'll say this would be a surprising way to add an image to my hypothetical application.

To expound on this a bit more, it'd be nice if your images could load things async via URL on web - maybe utilizing something like this pure javascript example: https://webglfundamentals.org/webgl/lessons/webgl-2d-drawimage.html
Getting a nice adapter pattern that works on web and native might be tricky and more work than it's worth at this point. What you have totally gets the job done for now and being able to configure sprite size seems like a useful thing in general.

Specifically, I wouldn't expect to have to collate all my images into a single sprite sheet, and I wouldn't expect that all images would have to be the same dimension.

I agree about both of these -- it's a very clunky API. Long long ago, widgetry could look individual images of any size, and it seemed to work fine on Linux, but on Mac it broke with a 16 texture limit or something. (That was actually one of the things originally pushing towards everything-as-a-vector!) I do not have a great understanding of how all of this works, but based on https://stackoverflow.com/questions/27345340/how-do-i-render-multiple-textures-in-modern-opengl and some other resources, supporting many images and different sizes requires some work. I think some game engines include a bit of an asset building pipeline to do things like spritesheet packing, even. I couldn't find a simple example or explanation how to manage many images in OpenGL, so I'm just tacking onto the array texture bit you figured out.
At the moment, I don't have the energy to push for widgetry to be more widely used and have a good API, so I'm just unblocking the immediate next use case. Packing images into one file is annoying, but it'll scale for a while.

ltn spritesheet.gif - In case you missed it, there is irregular blank space around your images which seems like it would make pixel perfect layout annoying.

Yep, thanks! This is still a placeholder; I need to take a real photo of a bus gate today, then I'll size everything and get the spacing correct.

To expound on this a bit more, it'd be nice if your images could load things async via URL on web

Ooh, this tutorial is much better than the one I had been following (https://learnopengl.com/Getting-started/Textures) -- thanks for the link! Keeping parity between native/web is still vital. We could use FutureLoader and store the file in the S3 bucket as a cross-platform pattern, but it complicates things. The compromise I found was to convert the image from PNG to GIF and lower the resolution, going from about 3MB to 300KB for the placeholder. Now just include_bytes! is acceptable

Real images finalized now, with no trimming problems. There are some styling issues with the popup dialog (button width, text wrapping, cancel button), but I'll iterate on that separately


Cookies are not covered by schema validation

Similar to #288.
Looking at checkCookies, it does not support schema validation as well.
Is there are particular reason for that?

Not that I remember.
If I'm not mistaken, I just accepted that PR #232 because the implementation was almost a copy-and-paste of the headers implementation.


Unable to setup a session/ handshake with TpLink Tapo bulb

File "python/site-packages/PyP100/PyP100.py", line 129, in handshake
encryptedKey = r.json()["result"]["key"]
KeyError: 'result'

I checked the response and it happens to be: {'error_code': 1003}
I am trying to set a connection with my TpLink Tapo L530 bulb and run this code to turn it on and off:
from PyP100 import PyL530

l530 = PyL530.L530("IP Address", "Mail ID", "Password")

l530.handshake()
l530.login()

l530.turnOn()
l530.turnOff()
l530.turnOn()

How do I tackle this issue?

Same problem here.

So there is no way to establish communication with the bulb until there is a new firmware update to fix it?

Another package has fixed this: https://github.com/petretiandrea/plugp100/blob/main/plugp100/protocol/klap_protocol.py#L96

Another package has fixed this: https://github.com/petretiandrea/plugp100/blob/main/plugp100/protocol/klap_protocol.py#L96

@timothy-holmes do you have any example code on how I can perform actions like color and brightness change, on and off? Thank you.

I'm new to python and have little experience in coding, however through Tapo L530, a microphone and this libraries I built a system that give light feedback to control the noise generated by the customers of winery. This system represented an important point of equilibrium between the winery and my condo after month of frictions.. but it is now broken! Is there any chance that these libraries will be fixed? Or alternatively can anybody suggest me an alternative? Thank you very much for any help!

Hi ,
I have the exact same response for the P100 plug device. Until today, 2023/09/12, I was able to utilize the package and create a wrapper class to control the switch. Now I get the same error when executing the handshake() function, as the JSON response I get is:
{'error_code' : 1003}
@fishbigger , I hope it is okay to tag you for this >.<

Another package has fixed this: https://github.com/petretiandrea/plugp100/blob/main/plugp100/protocol/klap_protocol.py#L96

@timothy-holmes do you have any example code on how I can perform actions like color and brightness change, on and off? Thank you.

I haven't tested this so may have some errrors, but it would probably go something like:
from plugp100.api.tapo_client import TapoClient, AuthCredential
from plugp100.api.light_device import LightDevice

credential = AuthCredential('<tapo_email>', '<tapo_password>')
client = await TapoClient.connect(credential, '<ip_address>')
light = LightDevice(client, "<device-ip>")
await light.on()
await light.off()
await light.set_hue_saturation(hue=120, saturation=100)

(of course, you'll need to install it beforehand with pip install plugp100)

Dear, @timothy-holmes,
thank you very much for your help! I installed the package and tried your code, the example code on the project page but I'm already stuck at library import. I assume the modules that should be imported may be in some other form or order...
Moreover it is not clear to me why I should indicate two different ip adress, one for the TapoClient and one for Light device, but I suppose it should be the same.
thank you very much for any additional help.. if possible!
Federico

Tried getting plugp100 working using the code from @timothy-holmes, but no luck. Do we know if someone is planning to update the existing PyP100 module so that this works again? Thank you!

Im also interester if someone could fix this issue asap. KeyError result also here.

Same thing here, and I already bought 5 of them to control an escape room :'D Some hero of coding please help us!

Same thing here, getting KeyError, and I've already bought 5 of them to control an escape room :'D Some hero of coding please help us!

I got it to work by using this library: https://github.com/petretiandrea/plugp100/tree/main
Just rebember to use python 3.9

Hi, in general I think that lib is dead, author is not responding, many PRs are hanging without response from @fishbigger

Hello, I forked the project and added the new auth support.
I tested it with P100 version 1.2.2 and it works great.
Let me know if it works for you.

Hi @almottier,
Thanks for the great work, but please check again PyL530.py and PyP110.py, it says:
from TapoP100.PyP100.PyP100 import ...
If I install it with pip, there's no TapoP100 package.
When I change it like this, it works:
from PyP100.PyP100 import ...

Hello @m-mihaly ,
Thanks, it should be fixed now.
I also added support for old firmware using a fallback to the old authentication mechanism.

Thank you @almottier!!!
All my P100's are working again... both hw version 1.20.0 + fw 1.5.5, and hw version 2.0 + fw 1.2.1 are all working.
Thank you!!

Thank you @almottier for fixing this.  I really appreciate it.

@almottier Greetings!
It must be because I was also naive enough to update my FW as well but now I'm getting an error with my automations as well.
Even with your fork I'm getting an error in the handshake stage saying the initialization failed.
Error: {'error_code': 1003}
Failed to initialize protocol OldProtocol
Traceback (most recent call last):
.
.
.
    result = self._request_raw("handshake", {"key": public_key})
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/home/.termux/tasker/libraries/TapoP100Almottier/PyP100/auth_protocol.py", line 173, in _request_raw
    raise Exception(f"Error code: {data['error_code']}")
Exception: Error code: 1003
Traceback (most recent call last):
.
.
.
    raise Exception("Failed to initialize protocol")
Exception: Failed to initialize protocol

This is my script
#!/usr/bin/python3.11

import sys
from PyP100 import PyP100

# constants
charger = "Phone Charger"

# functions
def charge(ip):
                p = PyP100.P100(ip<EMAIL_ADDRESS>"password", preferred_protocol="old")
                p.handshake()
                p.login()
                print(p.getDeviceInfo())
                if p.getDeviceName() == charger:
                        print(f"Correct IP: {ip}")
                        p.turnOn()
                        p.turnOffWithDelay(3600)
                        sys.exit()
                else:
                        print(f"Wrong IP: {ip}")

# main
charge("192.168.X.X")
charge("192.168.X.X")

My smart plugs are:
Tapo P100
HW version 1.0.0
FW version 1.4.0 Build 20231017 Rel. 33876
Tapo P105
HW version 1.0
FW version 1.2.1 Build 230804 Rel. 190922
Anyone having an idea on how to fix this is greatly appreciated.


How to clean message database (or set rotation by maximum size)

Please help me!

Database can only be deleted for now. All secret chat messages will be lost, but most other data will be recovered by TDLib. To delete the database, you need to manually delete db.sqlite file while TDLib isn't launched.


Setup a build task

There should be npm scripts that produce combined files.
There should be a build setup to run with every commit.

@kdinev can a take a look at https://github.com/damyanpetev/zero-blocks/commit/84eee8b74e29681564d1eb87f86908f25ffe2a94 when you get the chance.
Notes:

Templates are inlined for the bundle - if we want to keep them as separate requests for the per-module js files there should be yet another task to build those with and without tempaltes and copy them too.
Did my best to ignore most of the files the bundle produces to reduce constant merge conflicts, but did test a npm install from the dist folder locally and everything seems to run rather smoothly with the bundled file and css on client side and import * as Infragistics from 'zero-blocks/main' though the typings. Add a readme and some task tweaks and those are good to go for npm.
From above the demos page for #4 should be able to run mostly on CDN resource like https://github.com/IgniteUI/igniteui-angular2 with just the min.js and css.
Lastly - had to use temporary 'zero-blocks' folder for output to produce the correct bundle module names, which turned out a bit messy and no config worked around that. Perhaps we can rename either the dist or src folders instead to avoid having to delete it and move files around?

Still have't tested using source filed directly without the bundle, but let me know what you think and if I should PR that branch in.

@damyanpetev Do you suggest to rename dist to zero-blocks? The rest seems good to me.

@kdinev Or the source the same way Angular had modules/angular and is now modules/@angular folder - the bundled module names are created based on relative paths so they match file imports without need to change code.
The extra folder (while extra hassle) still works and I realize the repetition would look super awkward in our current setup so how about we try as is for now.

Alright! Setup the pull request :)


Addons Engine + Marketplace

#315
PR:
Three major components created:

marketplace_manager: is a server for hosting available addons.
addons_manager: is a server, providing manipulation to addons database. User decide whether to run an addon or disable it by modifying the state of the addon in the database.
addons_monitor: Polls the addons_manager and docker to achieve the target state of the addon. It is responsible for running, stopping and retrying addons. Addons monitor utilizes docker outside docker: basically allows a container to manage containers of the host (outside) by mounting the socket volume. This approach is more safe/secure in comparison to dind.

Simple Run:

inside root_orchestrator: docker compose up --build --force-recreate addons_monitor -d
make a post request to [POST] localhost:11102/api/v1/marketplace/addons:

    {
      "name": "testing-addon",
      "services": [
        {
          "command": "sh -c 'while true; do echo \"Hello, World (testing!!) !\"; sleep 10; done'",
          "image": "alpine",
          "service_name": "my-alpine"
        }
   ]}

make another api request to [POST] localhost:11101/api/v1/addons:

    {
        "marketplace_id": (id from the response of the above request)
    }

Can we migrate this implementation as compose override instead of directly in root compose? @melkodary


Issue starting project after running command

[Enter feedback here]

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

ID: 21cb7455-3305-9316-5440-bdc22947a82d
Version Independent ID: 137d4b94-7b26-3911-b22d-42c754a95fc1
Content: Introduction to authentication for Single Page Apps on ASP.NET Core
Content Source: aspnetcore/security/authentication/identity-api-authorization.md
Product: aspnet-core
Technology: aspnetcore-security
GitHub Login: @javiercn
Microsoft Alias: riande

Error:
fail: Microsoft.AspNetCore.SpaServices[0]
(node:19196) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
fail: Microsoft.AspNetCore.SpaServices[0]
(Use node --trace-deprecation ... to show where the warning was created)
fail: Microsoft.AspNetCore.SpaServices[0]
(node:19196) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please
use the 'setupMiddlewares' option.
node -v
v18.11.0

Are you on .NET 7?

Those aren't errors, they're warnings.


Add Aqara Double Wall Switch US (WS-USC04)

Add Aqara Double Wall Switch US (WS-USC04)

Thanks! I will merge request near to release version. There's a very big change right now.

Thanks. Added to master from other branch

Tried pairing the switch but gateway beeps 3 times and deletes the device after a few seconds.

Probably you should use another MiHome cloud region.

I’m using the Chinese server. I did try using an external converter but having a hard time with the documentation

External converter wouldn't help with this situation. Because it is original lumi device. Gateway kick it off because regional restrictions. The component does not interact with the pairing process of the original devices.

Cloud remove the switch US in cn region.
Nothing can do.