[React] CSS not loading when using redirectTo

Version - @curi/router: 1.0.4
Disclaimer, I'm using SSR so I'm not sure if that's related.
I'm trying to use redirectTo in my routes file by doing this
{
        name: 'CreateAccount',
        path: 'signup',
        resolve: {
            authorized: hasPlanSelected //this is a separate function returning a promise
        },
        response({ resolved }) {
            if (resolved.authorized) {
                return { body: CreateAccount };
            }

            return {
                redirectTo: { name: 'Pricing' },
                status: 302
            };
        }
    },

It's working, but once I'm redirected to Pricing, the CSS is not loaded although I'm importing it at the top of the file. I took a look at @hickory/browser and found finalizeReplace (line 65), and I see that there's a try/catch block using window.history.replaceState first. Would this have anything to do with CSS not loading for a new page?
It's my hunch because when I manually use window.location.replace as the redirect tool, the CSS is normal.

window.location.replace causes a full page load (hits the server). It is there for a fallback if replaceState() fails for some reason, but should almost never be necessary.
Is your application doing dynamic CSS loading? Can you open the network tab (in chrome's dev tools) and see if there is a request for the expected file?

I'm using Create React App (no eject) so all pages and CSS are bundled in one JS file. No specific CSS files are requested in the Network tab. Maybe this is outside of your project. It seems like a thing with React and replacing history state, but I'm not too sure. The only reason it makes sense to me is because I have never used replaceState when redirecting.

(It may not be directly related, but it always helps to know what issues people run into while using Curi.)
Can you expand on what you mean by "the CSS is not loaded"? If I understand CRA correctly, it injects the styles into the page's . Is that not happening in your application? Also, when you say SSR, are you calling yarn build and running a local server or using yarn start?
It just seems odd to me that that isn't working. Typically when there are issues with static content in SPAs, it is because a relative path is used instead of an absolute path (so a request is made for an invalid file), but that shouldn't be the case here.
There are a few situations that I am curious about:

When the user is authorized:
a. Navigating directly to CreateAccount
b. Navigating to CreateAccount from another page in your app
When the user is not authorized
a. Navigating directly to CreateAccount
b. Navigating to CreateAccount from another page in your app
Navigating directly to Pricing

Based on what you described above, I believe that 2a does not work, but I am unsure about the other ones.

One thing I did differently is use emitRedirects: false on the router's init. Would that have anything to do with it? I was confused by the documentation on what it's used for. I just know without it, on redirect I get the React error type is invalid -- expected a string or a class/function but got: undefined.

The app is setup with CRA, but you're running your own server? Something like this example? Does the HTML (e.g. view source) look like what you're expecting?
To be honest, I'm a bit stumped based on what you described. I don't understand how the application is running (so that Curi runs and it knows to redirect) but the bundle isn't inserting the styles into the .
I think that if your server sends a 302 response, the browser should automatically redirect if you get that setup correctly. That would get around the issue that you are having, although I would still be curious to understand why the CSS isn't working.
I'll expand a bit on redirects so that hopefully you can verify everything is setup as expected on the server.

The idea with emitRedirects is that if a response only has a redirectTo property, your render function probably doesn't know how to render it (since there is no response.body component). When emitRedirects is false, the render function won't be called for that response, so you don't have to worry about trying to render something for it.
function render({ response }) {
  // this only works if response.body exists
  const { body:Body } = response;
  return
}

You could return a response that has a body property, but when you're going to re-render for the redirected location right away, it isn't really necessary.
emitRedirects should be true (the default) on the server, since you would want to detect that and set the status on the response (and you don't even have to render the application).
For server-side rendering, you also want to set automaticRedirects to false. That was the result a more recent discovery where the response for the redirect was generated before router.once() is called.
function(req, res) {
  const history = InMemory({ locations: [req.path] });
  const router = curi(history, routes, {
    automaticRedirects: false
  });
  router.once(({ response }) => {
    if (response.status === 302) {
      return res
        .redirect(302, response.redirectTo.pathname)
        .send();
    }
    // ...
  });
}

I should probably put together a guide on redirecting and a guide on server side rendering. I think that Curi handles both of those well, but they are also little bit tricky to reason about, so the docs would benefit from adding that information.

The app is setup with CRA, but you're running your own server? Something like this example?

Yep, very identical to that example. I started doing that months ago when I first started learning about server side rendering because CRA wasn't quite up to par. It's worked well.

Does the HTML (e.g. view source) look like what you're expecting?

Yep. That's all good. Every bit of CSS is in the  and the views switch as needed.

I think that if your server sends a 302 response, the browser should automatically redirect if you get that setup correctly.

This is where I'm lacking knowledge on routing. Since I'm basing my authorization for a page on the client, how can I get the server to redirect? I'm guessing if I can make that happen, then the CSS will have no trouble rendering. But at this point, the server renders CreateAccount, and never Pricing when redirecting. As I'm typing, it makes sense conceptually, but I don't understand what the solution would be because I haven't developed on the server enough.

Also, if it helps, my setup includes React App Tools which is how I'm running the server.

I am curious what happens if you configure the server to not do SSR; will navigating directly to CreateAccount work on the client side? To test that, I would either save an index.html file and use res.sendFile() to respond with that or use whatever inline HTML generation you are doing without inserting the React generated HTML.
function render(req, res) {
  res.sendFile("./public/index.html");
}

// re-using your markup insert function might be faster

function render(req, res) {
  res.send(markup(""));
}

function markup(html) {
  return `<!doctype html>

${html}

`;
}

If it works when Curi is only running on the client, that should confirm that the issue originates with the server.

Your suggestion isn't quite working for me because of how React App Tools works, but I worked around it with a change to package.json and got it to work client-side only.
The problem definitely lies on the server rendering. The redirect works as expected using Curi. Any other ideas on a solution for the server? I know it would be difficult since I'm using React App Tools and you didn't build it but any more insight would be helpful. Thank you for all your help!

Have you tried updating the handler to send a 302 redirect when the response has a redirectTo property?
function handler(req, res) {
  // ...
  const router = curi(history, routes, {
    automaticRedirects: false
  });
  router.once(({ response }) => {
    if (response.redirectTo) {
      res.redirect(302, response.redirectTo.pathname);
      return;
    }
    const html = renderToString(...)
    // ...
  });
}

or maybe your CreateAccount route is running into issues while creating a response? Maybe check the error property in the response() function or add a log statement in router.once().
{
  name: 'CreateAccount',
  path: 'signup',
  resolve: {
    authorized: hasPlanSelected //this is a separate function returning a promise
  },
  response({ error, resolved }) {
    if (error) {
      // ...
    }
    if (resolved.authorized) {
      return { body: CreateAccount };
    }
    return {
      redirectTo: { name: 'Pricing' },
      status: 302
    };
  }
},

function renderHandler(req, res) {
  // ...
  router.once(({ response }) => {
    console.log({ path: req.path, response }); // see if this is what you're expecting
  });
}

There is no error from the route on Curi but it's odd, if I add console.log({ path: req.path }) to my router.once call, I only get { path: '/signup' } once, and nothing shows when it redirects. So my question is how do we get Curi to communicate to the server that a redirect is happening? Here is my code for the server for context:
const path = require('path');
const express = require('express');
const React = require('react');
const { renderToString } = require('react-dom/server');

const { curi } = require('@curi/router');
const InMemory = require('@hickory/in-memory');
const { curiProvider } = require('@curi/react-dom');
const { default: routes } = require('../routes');
const { default: AppWrapper } = require('../containers/AppWrapper');
const { default: redirects } = require('../redirects');
const assets = require('./assets.json');

const app = express();
app.use(express.static(path.join(__dirname, '/public')));

app.get('*', (req, res) => {
    const history = InMemory({ locations: [req.url] });
    const router = curi(history, routes, {
        automaticRedirects: false
    });
    const Router = curiProvider(router);

    router.once(({ response }) => {
        console.log({ path: req.path });
        if (response.status === 302) {
            return res
                .redirect(302, response.redirectTo.pathname)
                .send();
        }

        const pageMarkup = renderToString(
            <Router>
                {() => (<AppWrapper />)}
            </Router>
        );

        res.send(`

                    <meta charset="utf-8">

                    <meta name="viewport" content="width=device-width, initial-scale=1">

                    <link rel="manifest" href="manifest.json">

${pageMarkup}

                    ${
                        Object.keys(assets).map((key) => {
                            let mapped = assets[key].map((src) => {
                                return `<script src="/${src}"></script>`
                            });
                            return mapped[0];
                        }).join('')
                    }

        `);
    });
});

if (process.env.NODE_ENV === 'production') {
    app.listen(process.env.PORT || 8080);
} else {
    module.exports.default = app;
}

Did you inspect the response? It turns out res.redirect().send() isn't a thing (you don't need the send()), so if you aren't getting an error, I assume that the response doesn't have a redirectTo property (i.e. resolved.authorized must be true).

Yeah the response is not being sent back on redirect. Notice that I have a console.log right before if (response.status === 302). It only prints on first load, but never the redirect.

I figured it out! I'm not sure if it's ideal but basically I told the client side router to do the redirect.
router.once(({ response }) => {
    if (response.status === 302) {
        window.location.replace(response.redirectTo.pathname);
        return;
    }
    ReactDOM.hydrate((
        <Router>
            {() => ( <AppWrapper /> )}
        </Router>
    ), root);
});

This way the server is hit again. But if there's something better, please feel free to let me know. Thanks again for all your help!

I feel like I'm missing something because you should not have to call window.location.replace(). Unless you use automaticRedirects: false on the client, Curi should use history.replaceState() to change locations automatically.
That element type error happens because response.body is undefined. If you want to emit redirects, you can write a function component and attach it to the redirect response as its body.
const Redirecting = () =>
Redirecting...
;

response({ resolved }) {
  // ...
  return {
    redirectTo: { name: "Pricing" },
    status: 302,
    body: Redirecting
  };
}

As for the server, is there any situation where the user would navigate directly to /signup (so that the server handles a request for /signup) and they should not be redirected (i.e. calling resolve.authorized() on the server should return true)? If not, then that res.redirect() call should happen and the browser should redirect for you. When you call window.location.replace(), that is doing pretty much the same thing, but manually.
I updated the server rendering example with a redirect to verify that this approach works (admittedly for a much simpler use case).

As a side not, I'm realizing that response.redirectTo should have a url property. That way, if you include a query/hash in the redirect, you don't have to manually concatenate those strings together.

As for the server, is there any situation where the user would navigate directly to /signup (so that the server handles a request for /signup) and they should not be redirected

Nope. The first part of the flow is to choose a plan. Users will not be able to sign up without a plan selected.

If you want to emit redirects, you can write a function component and attach it to the redirect response as its body.

It would be nice to understand how to make this work without emitting redirects but the problem remains that the server doesn't get the redirect call. Only the client side does. The elephant in the room is that I'm using React App Tools so that could be a blocker. Also, I'm trying to do research on how pushState affects the server, if at all, to get more clues.

pushState/replaceState navigation never hits the server (except for any API calls that may result from the navigation).
For reference, when my example server sends a redirect, this is what my network tab looks like:

I'm still a bit hung up on these lines from your server:
if (response.status === 302) {
  return res
    .redirect(302, response.redirectTo.pathname)
    .send();
}

Have you edited that to get rid of the .send() call that throws an error? And do requests for /signup hit that loop? A super quick way to check if correctly redirecting will fix issues would be to hard code a /signup check at the top of the handler function.
function renderHandler(req, res) {
  if (req.path === "/signup") {
    res.redirect(302, "/choose-plan"); // I'm not sure what the actual pathname is
    return;
}

Have you edited that to get rid of the .send() call that throws an error? And do requests for /signup hit that loop?

Yes, I removed that .send() call, but the error never happened because there is no second call to the server router to check for the 302 status. So my problem isn't redirecting from the server, it's when the redirect happen in Curi client side
{
        name: 'CreateAccount',
        path: 'signup',
        resolve: {
            authorized: hasPlanSelected
        },
        response({ resolved }) {
            if (resolved.authorized) {
                return { body: CreateAccount };
            }

            return {
                redirectTo: { name: 'Pricing' },
                status: 302
            };
        }
    },

and never hits the server check
app.get('*', (req, res) => {
    const history = InMemory({ locations: [req.url] });
    const router = curi(history, routes, {
        automaticRedirects: false
    });
    const Router = curiProvider(router);

    router.once(({ response }) => {
        if (response.redirectTo !== undefined) {
            res.redirect(302, response.redirectTo.pathname);
            return;
        }

        //everything else...
        //res.send()
    });

Re-reading your comment...

pushState/replaceState navigation never hits the server (except for any API calls that may result from the navigation).

So how are we suppose to catch a redirect on the server if replaceState never hits it?

With single-page applications, in-app navigation should never hit the server. The only request that the server handles is the initial page.
Direct navigation to /signup

User navigates directly to /signup.
The browser sends a request for /signup to the server.
Curi matches the CreateAccount route and calls hasPlanSelected.
hasPlanSelected returns false (right?) and returns a response with { status: 302, redirectTo: {...}}.
The router.once() callback sees response.redirectTo and calls res.redirect().
The browser receives the redirect and sends another request to the server for the redirect location.

In-app navigation to /signup

User navigates directly to /.
The browser sends a request for / to the server.
Curi matches the Home route and returns a response with { body: Home }
The router.once() callback renders the application into an html string, which is inserted into the page HTML and sent to the user.
The user clicks a link to /signup and Curi intercepts the navigation.
Curi matches the navigation to its CreateAccount route and calls hasPlanSelected.
Based on the return value of hasPlanSelected:
a. if true, the response will have a body and render the /signup page conteont.
b. if false, the response will have a redirectTo property. Curi will see that and automatically redirect (using history.replaceState) to the new location. If emitRedirects is true, the response with the redirectTo property will be emitted (i.e. the React app will re-render, but you should only do this if the response also has a body). If emitRedirets is false, the response will not be emitted, so the app will not re-render until the response for the Pricing route is emitted.

(sorry, that got a bit wordy)

If your server calls res.redirect(), the redirect will happen automatically. In order for this to happen, the request for /signup has to result in a Curi response with a redirectTo property (in order to enter that if statement).
The redirectTo property only exists when resolve.authorized is false (hasPlanSelected returns false). I want to say that that function must be returning true on the server for some reason.

I understand but the problem is that the server is never called again at all to enter the if statement. I'll try to demonstrate:
app.get('*', (req, res) => {
    //init the router here...blah blah

    router.once(({ response }) => {
       //should log a response
        console.log(response)
        //^^^never logs a response on redirect before getting to the if statement^^^

        if (response.redirectTo !== undefined) {
            res.redirect(302, response.redirectTo.pathname);
            return;
        }

        //everything else...
        //res.send()
    });

never logs a response on redirect

By this, do you mean when when req.path is /signup? Or is the browser receiving the 302 Redirect and not automatically sending another response?
Also, did you try hard-coding the redirect at the top of the handler?

Also, did you try hard-coding the redirect at the top of the handler?

Yes, this works fine.

By this, do you mean when when req.path is /signup? Or is the browser receiving the 302 Redirect and not automatically sending another response?

The browser is receiving the 302 redirect but is not automatically sending another response to the server. This is how I was able to detect and manually reload on the browser. But as you said, we want the server to know but nothing is being sent to it at all.

The browser is receiving the 302 redirect but is not automatically sending another response to the server. This is how I was able to detect and manually reload on the browser.

You're seeing a 302 redirect in the network tab (the server response) or the "response" that Curi creates has a status: 302?

Nope. Here's a screenshot. My second route (/pricing) never shows.

When /signup returns a 200 (it should not), there will never be another request sent to the server. Curi will handle the redirect on the client side (using history.replaceState). However, /signup should not return a 200.
I really think the issue is because resolve.authorized is returning true on the server when it should always be returning false.

I really think the issue is because resolve.authorized is returning true on the server

Oh I see what you mean! Ok, you're right, it is true because on the server. I'm sorry for the confusion. Here's my method for hasPlanSelected:
const hasPlanSelected = () => {
    if (process.browser) {
        if (!__isEmpty(localStorage.getItem('selectedPlan'))) {
            return Promise.resolve(true);
        } else {
            return Promise.resolve(false);
        }
    } else {
        //let SSR bypass
        return Promise.resolve(true);
    }
};

The reason I let the server come out as true is because localStorage is not ready on the server, so it caused an error. I guess the new question is, what is a good way for the server to know if there is a selected plan? I was trying to avoid any API calls for this simple prop.

I've been researching and I had no idea that cookies were readable from the server. I think I found my answer. Yet again, you helped me solve an issue I caused. I really appreciate it.

Awesome! I was just writing a comment about using cookies because there isn't a great way to access them from hasPlanSelected. :smile:
The approach that I would take is to attach them to the location's state.
function renderHandler(req, res) {
  const InMemory({ locations: [
    { pathname: req.path, state: req.cookies }
  ] });
}

hasPlanSelected will be passed the location, so you could check the cookies using that.
const hasPlanSelected = ({ location }) => {
  if (process.browser) {
    // ...
  } else {
    // resolve true if the cookie exists
  }
};

As a style nit, !__isEmpty(localStorage.getItem('selectedPlan')) is a boolean, so you can change that if/else to:
return Promise.resolve(
  !__isEmpty(localStorage.getItem('selectedPlan'))
)

🙏🙏🙏🙏🙏
You have been amazing. I'll get this implemented. I thought I was done "figuring out" server-side rendering but I had a lot more to learn. Thanks so much again.

 I'm working on putting together an SSR guide, so hopefully some of the setup will be more obvious.


project environment

hello ,would u plz give detailed information about the project environment ,such as keras and tensorflow version ,cuda and cudnn?
when i run "python3 SSRNET_train.py --input /home/xd/workspace/SSR-Net/data/imdb.npz --db imdb --netType1 4 --netType2 4", the folloing errors occur:
Epoch 1/90
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/home/xx/.local/lib/python3.5/site-packages/keras/engine/training.py", line 606, in data_generator_task
generator_output = next(self._generator)
File "/home/xx/workspace/SSR-Net/training_and_testing/TYY_generators.py", line 49, in data_generator_reg
yield augment_data(np.array(p)),np.array(q)
File "/home/xx/workspace/SSR-Net/training_and_testing/TYY_generators.py", line 27, in augment_data
images[i] = tf.contrib.keras.preprocessing.image.random_rotation(images[i], 20, row_axis=0, col_axis=1, channel_axis=2)
AttributeError: module 'tensorflow.contrib' has no attribute 'keras'
File "/home/xx/.local/lib/python3.5/site-packages/keras/engine/training.py", line 1852, in fit_generator
str(generator_output))
ValueError: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None
Your reply would be appreciated greatly.

Thanks for your response.
And your cuda and cudnn version ? python2 or python3? Maybe my current environment doesn't match your project so I am eager to find their difference.
Thanks again.

cuda 9.0, cudnn 7.1.2, python 3.5
I use anaconda to install the virtual environment to avoid the trouble. You could consider use anaconda.

Best wishes.
I will try to use anaconda , and your reply is very timely and useful.


python311Packages.twilio: 8.10.0 -> 8.10.1

Diff: https://github.com/twilio/twilio-python/compare/refs/tags/8.10.0...8.10.1
Changelog: https://github.com/twilio/twilio-python/blob/8.10.1/CHANGES.md
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 265903 run on x86_64-linux 1

5 packages built:

home-assistant-component-tests.twilio
python310Packages.twilio
python310Packages.twilio.dist
python311Packages.twilio
python311Packages.twilio.dist


add util method for shadow children

Sometimes it's useful to tell whether a node is in your light or shadow DOM*, so this PR adds a convenience method for that. It's the shadowDomChild version, since the similar isLightDom would also return true for sibling elements which is a bit of a lie.

Mostly around event handling; light dom children should usually handle their own events (see: https://github.com/PolymerElements/paper-item/issues/28, https://github.com/PolymerElements/paper-menu/issues/44)

Let me know if the space trimming changes drive you insane -- Chromium used to disallow trailing spaces, so my editor auto-nukes them on sight.
/cc @cdata @blasten

@sorvell i don't think the failing tests are my fault -- they're in dom-repeat

@cdata: i've added correct implementations for isLocalDescendant and isLightDescendant (where descendant = child but i can't use that word). We still want isLocalDescendant

couple little test nits but otherwise LGTM.

@sorvell Done! Who merges in Polymer land?

Thx...


Create CODE_OF_CONDUCT.md

Like a general OWASP admin or abuse address?

It should be a general abuse email. Let me speak with tiffany to understand what is there currently at a global level
From: Fraser Scott<EMAIL_ADDRESS>Reply-To: owasp-cloud-security/owasp-cloud-security<EMAIL_ADDRESS>Date: Monday, 20 November 2017 at 22:21
To: owasp-cloud-security/owasp-cloud-security<EMAIL_ADDRESS>Cc: devseccon<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Subject: Re: [owasp-cloud-security/owasp-cloud-security] Create CODE_OF_CONDUCT.md (#84)
Like a general OWASP admin or abuse address?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.


Preserving offsets

Nice to see this, much, much cleaner than what I created https://github.com/jweir/elm-iso8601/tree/parser
My applications display time based data across several timezones.  The application graphs this data in the local time, sometimes comparing the data across timezones and often grouping the data relatively (ie all points by hour, or day of week.)
Once the time is converted to POSIX, the local time is of course lost.  It can be converted back if the application is aware of the timezone/offest of the source data.  But this would become an extra step left to the libraries consumer.
If the application gets a point like this { t: "2006-07-08T09:10:11.123-05:30", v: 7} how will the application ever cast it back to local time?
What I propose, to keep this library as light as possible, is one new function like:
-- offset is the number of seconds?
type alias Offset = Int

toTimeAndOffset : String -> Result Parser.Error (Time.Posix,Offset)

Then the library consumer can make the necessary calculations on the time to present in the local format.
I'd be happy to take a stab at a PR if you think this would be appropriate.

So I have some pretty strong feelings about UTC Offset. Specifically, I feel it was a tragic mistake for any technology ever to have adopted it. To me, chucking the ISO-8601 dates' UTC offsets into the incinerator is a great feature, and it's one I'm reluctant to consider removing. 😅
The trouble with UTC Offset is that it isn't the same as time zone, but applying UTC offset coincidentally gives the same answer as applying a time zone just often enough to instill a false sense of confidence and let edge case bugs slip under the radar.
Put more concisely, UTC Offset is a subtle bug factory. It's very frustrating to me that browsers only expose UTC Offset for the current user, rather than exposing actual timezone information.
Anyway, given the use case of wanting to send timestamps along with time zones, I personally wouldn't use UTC Offset for that, which means I wouldn't use ISO-8601 dates for that either. I would rather send the timestamp along with the actual time zone!

Fair enough – I understand your motivation, and I agree the TZ is the correct choice over offset.

I would rather send the timestamp along with the actual time zone!

If you have the luxury of controlling the source of the data.  Imagine getting a blob of timestamped data across several timezones and you need to analyze it by local hour or day of week.  The data only comes in ISO-8601 (you can not control the source).  Without the offset your task is going to be very difficult.
Something to consider.
I will close this issue as there are alternatives for my use case.
Cheers and thank you!


Admin: Implement project management

Closed by https://github.com/rilldata/rill-developer/pull/1898


Sorting CollectionVersions for PageList slows down query

PageLists retrieves pages with a query built in function finalizeQuery. This query contains a subquery so it selects the approved collection version. This subquery orders the results before limiting it to 1 result.
https://github.com/concrete5/concrete5/blame/develop/concrete/src/Page/PageList.php#L222
 $query->andWhere('cv.cvID = (select cvID from CollectionVersions where cID = cv.cID and cvIsApproved = 1 and ((cvPublishDate <= :cvPublishDate or cvPublishDate is null) and (cvPublishEndDate >= :cvPublishDate or cvPublishEndDate is null)) order by cvPublishDate desc limit 1)');

If I remove the order by clause the query is a bit faster. On a site that by accident contains too many collection versions the speed gain is up to 70 times. On normal sites the effect is less pronounced but noticable.
Given that on any moment there will allways be one cvIsApproved = 1 per cID, this order by doesn't seem necessary. It was added when fixing #6356 .

Is this issue a duplicate of https://github.com/concrete5/concrete5/issues/7060 ?

It is very similar. I was aware of that issue, but I misremembered the proposed solution so thought it wasn't that related. In any case; that solution solves this issue.


Add tests of file_compress/file_uncompress in minigzip and minideflate.

This PR increases coverage, but unfortunately it seems like Github Actions chose to run this PR on VMs without AVX512-VNNI and VPCLMULQDQ support, therefore resulting in a total decrease in coverage.
Ref: https://app.codecov.io/gh/zlib-ng/zlib-ng/pull/1489/indirect-changes

I made some changes so it could be merged into the other script, and that now supports both modes. Also removed the two extra tests, opting instead to run some of the others in filemode.

Added back the separate tests again, it was a better solution after all.

It is failing all over now, but I am not sure why it triggers this error:
CMake Error at cmake/compress-and-verify.cmake:145 (file):
  file COPY cannot copy file
  "/home/actions-runner/_work/zlib-ng/zlib-ng/test/data/corpora/calgary/book1"
  to
  "/home/actions-runner/_work/zlib-ng/zlib-ng/test/Testing/Temporary/book1":
  No such file or directory.

It is copying the file to the temp folder (because we can't control output path/name when compressing a file directly).
But I am at a loss as to why the file would suddenly be missing in this test, then it works again in the very next test that uses the same file but tries to compress using -5 instead of -4..
The failing tests seem to be from test-data.cmake, and a random 5-10 are failing each time.
So this probably is a concurrency issue in relation to running multiple tests at the same time, but the copy should not have any problems with that..
Any thoughts?

It is failing all over now, but I am not sure why it triggers this error:
CMake Error at cmake/compress-and-verify.cmake:145 (file):
  file COPY cannot copy file
  "/home/actions-runner/_work/zlib-ng/zlib-ng/test/data/corpora/calgary/book1"
  to
  "/home/actions-runner/_work/zlib-ng/zlib-ng/test/Testing/Temporary/book1":
  No such file or directory.

It is copying the file to the temp folder (because we can't control output path/name when compressing a file directly).
But I am at a loss as to why the file would suddenly be missing in this test, then it works again in the very next test that uses the same file but tries to compress using -5 instead of -4.. The failing tests seem to be from test-data.cmake, and a random 5-10 are failing each time.
So this probably is a concurrency issue in relation to running multiple tests at the same time, but the copy should not have any problems with that..
Any thoughts?

Instead of copying and renaming, you should copy in single step to avoid concurrency issues...

Instead of copying and renaming, you should copy in single step to avoid concurrency issues...

That was what I tried to do at first, but ´file(COPY ..´ will create a folder with the destination name and put the file there, instead of letting you specify a filename.
Will try to use ´configure_file()´ instead, it is a bit of an hack but should work at least as good as the old copy and rename.

Passes tests now


test: Try and run more nongroovy tests on OCP.

Description
A detailed explanation of the changes in your PR.
Feel free to remove this section if it is overkill for your PR, and the title of your PR is sufficiently descriptive.
Checklist

[ ] Investigated and inspected CI test results
[ ] Unit test and regression tests added
[ ] Evaluated and added CHANGELOG entry if required
[ ] Determined and documented upgrade steps
[ ] Documented user facing changes (create PR based on openshift/openshift-docs and merge into rhacs-docs)

If any of these don't apply, please comment below.
Testing Performed
Here I tell how I validated my change
TODO(replace-me)
Use this space to explain how you validated that your change functions exactly how you expect it.
Feel free to attach JSON snippets, curl commands, screenshots, etc. Apply a simple benchmark: would the information you
provided convince any reviewer or any external reader that you did enough to validate your change.
It is acceptable to assume trust and keep this section light, e.g. as a bullet-point list.
It is acceptable to skip testing in cases when CI is sufficient, or it's a markdown or code comment change only.
It is also acceptable to skip testing for changes that are too taxing to test before merging. In such case you are
responsible for the change after it gets merged which includes reverting, fixing, etc. Make sure you validate the change
ASAP after it gets merged or explain in PR when the validation will be performed.
Explain here why you skipped testing in case you did so.
Have you created automated tests for your change? Explain here which validation activities you did manually and why so.
Reminder for reviewers
In addition to reviewing code here, reviewers must also review testing and request further testing in case the
performed one does not seem sufficient. As a reviewer, you must not approve the change until you understand the
performed testing and you are satisfied with it.

/test ocp-4-12-nongroovy-e2e-tests
/test ocp-4-15-nongroovy-e2e-tests
/test ocp-4-candidate-nongroovy-e2e-tests
/test ocp-4-preview-nongroovy-e2e-tests
/test ocp-stable-scanner-v4-nongroovy-e2e-tests

/retest

/test ocp-4-15-nongroovy-e2e-tests
/test ocp-4-preview-nongroovy-e2e-tests

/test ocp-stable-scanner-v4-nongroovy-e2e-tests

/test ocp-4-12-nongroovy-e2e-tests
/test ocp-4-15-nongroovy-e2e-tests
/test ocp-4-candidate-nongroovy-e2e-tests
/test ocp-stable-scanner-v4-nongroovy-e2e-tests

/test ocp-4-12-nongroovy-e2e-tests
/test ocp-4-15-nongroovy-e2e-tests
/test ocp-4-candidate-nongroovy-e2e-tests
/test ocp-stable-scanner-v4-nongroovy-e2e-tests

/retest-times 10 ocp-4-12-nongroovy-e2e-tests
/retest-times 10 ocp-4-15-nongroovy-e2e-tests
/retest-times 10 ocp-4-candidate-nongroovy-e2e-tests
/retest-times 10 ocp-stable-scanner-v4-nongroovy-e2e-tests


State holidays aren't being reflected

Describe the bug

It looks like the user's State isn't being properly recorded and is being confused with the state of the sensor.  For instance, if I go through Config Flow and enter "CA" as my state (California), it ends up as "2" in the logs and doesn't properly match any California holidays.
Configuration
Do you configure the integration in YAML or Config Flow (GUI)? :
Config Flow

Error log/debug information

Here's what I'm talking about:
2020-08-15 12:11:48 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Recycling) Calling update
2020-08-15 12:11:48 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Recycling) Country Holidays with parameters: country: US, prov: None, state: 2, observed: True
2020-08-15 12:11:48 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Recycling) Found these holidays:
  2020-09-07: Labor Day
  2020-11-26: Thanksgiving
  2020-12-25: Christmas Day
  2021-01-01: New Year's Day
  2021-12-31: New Year's Day (Observed)
  2021-05-31: Memorial Day
  2021-07-04: Independence Day
  2021-07-05: Independence Day (Observed)
  2021-09-06: Labor Day
  2021-11-25: Thanksgiving
  2021-12-25: Christmas Day
  2021-12-24: Christmas Day (Observed)

Note the state: 2 up there.  That's the current state of the sensor (2 or more days away from collection) and not the state/location that I entered.  That ends up providing a list of only countrywide holidays.
I'm also pretty sure that this is where it's coming from:
        self.__state = config.get(CONF_STATE)
        self.__observed = config.get(CONF_OBSERVED, True)
        self.__holidays = []
        self.__period = config.get(CONF_PERIOD)
        self.__first_week = config.get(CONF_FIRST_WEEK)
        self.__first_date = to_date(config.get(CONF_FIRST_DATE))
        self.__next_date = None
        self.__last_updated = None
        self.__days = None
        self.__date = config.get(CONF_DATE)
        self.__entities = config.get(CONF_ENTITIES)
        self.__verbose_state = config.get(CONF_VERBOSE_STATE)
        self.__state = "" if bool(self.__verbose_state) else 2

Note the setting of self.__state at the top with the "real" state/location, and later overwriting that same self.__state with the state of the sensor (verbose or not).
I think you need a different member for the state/location. :)  If I use self.__state_loc in the appropriate locations, it fixes the issue.
After fixing that, I'm also seeing an exception that sometimes prevents holidays from being removed, but it may be coming from the python_holidays package.  I see it when I go to October 2022, and pop_named fails to remove "Columbus Day" with this:
2020-08-15 13:02:33 DEBUG (MainThread) [custom_components.garbage_collection.sensor] (Landscape) Country Holidays with parameters: country: US, prov: None, state: CA, observed: True
2020-08-15 13:02:33 ERROR (MainThread) [custom_components.garbage_collection.sensor] (Landscape) Holiday not removed - Invalid name (Columbus Day) (dictionary changed size during iteration)

I added the exception string for debugging.
This gives some insight into the exception.
    def pop(self, key, default=None):
        if default is None:
            return dict.pop(self, self.__keytransform__(key))
        return dict.pop(self, self.__keytransform__(key), default)

    def pop_named(self, name):
        to_pop = self.get_named(name)
        if not to_pop:
            raise KeyError(name)
        for key in to_pop:
            self.pop(key)
        return to_pop

Screenshots

Version
Integration version: 3.03-beta3
Home Assistant version: 0.114.1

Thanks. Interesting that nobody found that earlier.
I fixed that in 3.03-beta6.
Not sure about the pop, but it shoudl be handled by teh exception handling.

Thanks for the quick turnaround!  I can repro the exception and lack of proper removal with just python_holidays and a small test script, so I reported it there.


Add GetSender and GetReceiver methods to Packet interface

Needed for ADR-8

[ ]  Add GetSender and GetReceiver methods to packet interface
[ ]  Transfer will return the packet.Sender and packet.Receiver respectively
[ ]  ICA will return the ICA controller account (on controller chain!!) for packet.GetSender() and returns empty string for packet.GetReceiver()

Can take up this and #2455

Hi @alizahidraja, thanks for offering. Yesterday @colin-axner had some questions about this issue, so it might be good to clarify those first with @AdityaSripal. I will add the label needs discussion for now.

For future reference, it might be nice to open ADR issues after the ADR has been merged to avoid opening issues that may not be necessary


v-analyzer stops with new @[attribute] with strings

Describe the bug
The v-analyzer stops giving any code completion or intellisense after a line where it encounters the new @[attribute] syntax with a string in it.
Example
struct Foo {
    foo_id string @[json: 'fooId']
}
//or
struct Foo {
    bar_id string @[references: 'bar(id)']
}

Video proof:
https://github.com/v-analyzer/v-analyzer/assets/62309738/2d3ef0eb-b939-4acd-b240-132bd3806ab2
In neovim the syntax highlighting also breaks:

Expected Behavior
To continue to have normal lsp features working after a line with attributes with strings.
Current Behavior
v-analyzer stops working after the line with new @[attribute] syntax if theres a string in it.
Reproduction Steps
Write a line with the new @[attribute] syntax with a string in it. Example @[json: 'foo']
Possible Solution
No response
Additional Information/Context
No response
Environment details (v doctor output)
V full version: V 0.4.3 b3b68e4.e1a474e
OS: linux, Ubuntu 22.04.3 LTS (WSL 2)
Processor: 6 cpus, 64bit, little endian, AMD Ryzen 5 3500X 6-Core Processor
getwd: /home/greidinger-reis/repos/vlang/rss
vexe: /home/greidinger-reis/.asdf/installs/v/weekly.2023.43/v
vexe mtime: 2023-11-25 18:11:28
vroot: OK, value: /home/greidinger-reis/.asdf/installs/v/weekly.2023.43
VMODULES: OK, value: /home/greidinger-reis/.vmodules
VTMP: OK, value: /tmp/v_1000
Git version: git version 2.34.1
Git vroot status: weekly.2023.43-295-ge1a474e1
.git/config present: true
CC version: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
thirdparty/tcc status: thirdparty-linux-amd64 12f392c3
Editor name
VSCode, Neovim
v-analyzer Version
v-analyzer version 0.0.2-beta.1
VS Code Extension Version
0.0.2

Fixed in #55


[Archiver] Add CRC as option, per fragment, use session id to store CRC

Note: This is a place holder item, which may or may not be worth doing.
This is on write to file. This will produce overheads as currently we do not parse fragments on write. The overwritter sessionId is not used on read since the fragment header is replaced on replay.

Session ID is a good thing to use. This is consistent and metadata.

See re-edit of first comment.

I thought the CRC is bad option for the record corruption. It decrease the performance for reliability. I think the proper method is close and start recording a new data file.

How do you mean "close and start recording a new data file"? CRCs let you detect whether a file has been corrupted by some underlying mechanism such as a faulty SSD, Hard Disk or Controller.

@RichardWarburton , For example, if you have an apple fell to the ground broke, how can effectively mark the broken apple, not to give each apple to be marked.

@jordanxlj I am failing to understand what you mean. Can you please explain via an example, or point to an article which demonstrates your point?

The archive should have a context option to enable CRC checks on fragments with the CRC stored in the session-id field. This can be added when the stream is recorded and checked when loaded for replay or via the verify option to CatalogTool.


How i can download dependencies?

I Not have experience in this area but i know that is missing some components to work
Example:

I Can download this?

Hi, thanks for your question. In order to use the app run bower install in the directory. That should take care of installing all dependencies for you! :)

I've adjusted the readme to better explain everything: https://github.com/dularion/streama-video-player/blob/master/README.md

Thanks


White space in broadcast names handled differently by different fields

Expected Behavior
White space, such as multiple spaces between words in a broadcast name, should display consistently in the dropdown field and the input field.
Actual Behavior
Extra  spaces  in  a broadcast name are displayed in the input field on the block, but not in the dropdown menu.
Steps to Reproduce
Create a broadcast message with multiple spaces between the words.
Compare the appearance of the message between the input field and the dropdown.

Operating System and Browser
Mac OS 10.13.2 Chrome 64.0

/cc @kchadha


Revamp Ubunchuu Truong US using Nextra

Docusaurus is fat and not applicable to our usage.
Nextra is an alternative, a new approach with advanced features.
By adopting this technology, Ubunchuu Truong Us will not sleep anymore.

I totally agree with you. Ubunchuu Truong Us need to be revived. CC: @thangbuiq

When will we start? Let's keep in contact if we need any other design (figma,...) or something. Good to hear we are going to make Ubunchuu great again 😃

Yes, I'll write the contribution guide in documentation this week, also next week.


Added identity layer

@fchollet
Please see #17251.

@fchollet
Resolved the CI build error. Please run the workflow again.

@fchollet
Not sure what's causing the build to fail. Here's the error:
ImportError: cannot import name 'layers' from partially initialized module 'keras' (most likely due to a circular import) (/home/kbuilder/.cache/bazel/_bazel_kbuilder/31d6f47147b75c35404d734345be7323/execroot/org_keras/bazel-out/k8-opt/bin/keras/utils/data_utils_test.runfiles/org_keras/keras/__init__.py)

All tests failed with this error.

I have re-applied the change. One modification I had to do is to apply a tf.identity() op in the call method.

@fchollet Thanks a lot for the follow up. Really nice of you to keep me in the loop. Thoroughly appreciate it.


Form item label does not align with vaadin-text-field label

<vaadin-form-layout responsive-steps='[{"columns": 2, "labelsPosition": "top"}]'>
  <vaadin-combo-box label="Label" placeholder="Placeholder"></vaadin-combo-box>
  <vaadin-form-item>
    Options

      <vaadin-checkbox checked>Checked</vaadin-checkbox>
      <vaadin-checkbox>Unchecked</vaadin-checkbox>

  </vaadin-form-item>
</vaadin-form-layout>

A similar baseline fix, which is used in vaadin-text-field, should be applied for the form item label as well (when labelsPosition=='top').

Not sure if this is worth fixing. It probably can’t be fixed so that it works in all possible cases (e.g. when using the small theme for vaadin-text-field), but maybe worth fixing so that the most common use case works as expected?

As a workaround, use align-self: flex-start; for the form item:
<vaadin-form-item style="align-self: flex-start;">

but maybe worth fixing so that the most common use case works as expected?

I think so.
Since the baseline shift in <vaadin-text-field> is introduced by the Lumo theme, the fix for this should be applied in Lumo theme too.

We have this problem In Bakery. We need to hide a field when there is a new order and show it when editing the order, but the visual result does not align with other fields in the form, as you can see in the next screenshot when changing the display property:

This is the same case here, with the difference that we have a <vaadin-form-layout> inside instead of a <vaadin-form-item>.
The workaround in Bakery is to set <vaadin-form-layout style="align-self: flex-start;">


#puppethack (PUP-3963) Improve error message for allowed module names

CLA signed by all contributors.

New PR was entered here #6428 - closing this.


Generation: RuntimeError: FlashAttention only support fp16 and bf16 data type

My finetune.py script work in this repo, while when I try to generation I got error: FlashAttention only support fp16 and bf16 data type

The script I am using is
query = '<ImageHere>Please describe this image'
# # image = ['../tiger.jpeg']
model_name_or_path = "/home/yerong2/models/internlm-xcomposer2d5-7b"
model = AutoModel.from_pretrained(model_name_or_path, trust_remote_code=True).eval()

tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=True)
model.tokenizer = tokenizer

image = ['tiger.jpeg']
with torch.autocast(device_type='cuda', dtype=torch.float16):
    response, his = model.chat(tokenizer, query, image, do_sample=False, num_beams=3, use_meta=True)
print(response)

I used the huggingface demo but still get same error

query = 'Image1 <ImageHere>; Image2 <ImageHere>; Image3 <ImageHere>; I want to buy a car from the three given cars, analyze their advantages and weaknesses one by one'
image = ['./examples/cars1.jpg',
        './examples/cars2.jpg',
        './examples/cars3.jpg',]
with torch.autocast(device_type='cuda', dtype=torch.float16):
    response, his = model.chat(tokenizer, query, image, do_sample=False, num_beams=3, use_meta=True)
print(response)

(mllm) yerong2@ hopper$ pip show flash-attn
DEPRECATION: Loading egg at /home/yerong2/local/miniconda3/envs/mllm/lib/python3.11/site-packages/flashattn_hopper-3.0.0b1-py3.11-linux-x86_64.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
Name: flash-attn
Version: 2.6.1
Summary: Flash Attention: Fast and Memory-Efficient Exact Attention
Home-page: https://github.com/Dao-AILab/flash-attention
Author: Tri Dao
Author-email<EMAIL_ADDRESS>License:
Location: /home/yerong2/local/miniconda3/envs/mllm/lib/python3.11/site-packages
Requires: einops, torch
Required-by:
(mllm) yerong2@ hopper$ pip show transformers
DEPRECATION: Loading egg at /home/yerong2/local/miniconda3/envs/mllm/lib/python3.11/site-packages/flashattn_hopper-3.0.0b1-py3.11-linux-x86_64.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330
Name: transformers
Version: 4.33.2
Summary: State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow
Home-page: https://github.com/huggingface/transformers
Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/transformers/graphs/contributors)
Author-email<EMAIL_ADDRESS>License: Apache 2.0 License
Location: /home/yerong2/local/miniconda3/envs/mllm/lib/python3.11/site-packages
Requires: filelock, huggingface-hub, numpy, packaging, pyyaml, regex, requests, safetensors, tokenizers, tqdm
Required-by: peft

I resetup the environment with flash-attn2 installed. While it pops out an error flash_attn is not installed.

I can pass flash_attn test on my L40S with CUDA 12
pytest -q -s tests/test_flash_attn.py

maybe the model is saved with a different dtype, try model = model.half() after loading it from_pretrained

it seems the model is not loaded on the GPU, try model = model.cuda()

it seems the model is not loaded on the GPU, try model = model.cuda()

OOM when I model = model.cuda()


Does not work with CSP img-src where data: sources are blocked

The problem occurs when selecting images with non default orientation (from camera for example). Cropper tries to rotate the image for viewing. Probably rendering the image to a rotated canvas and making an image from the canvas using a data: url.
To reproduce
To reproduce open the following image https://github.com/recurser/exif-orientation-examples/blob/master/Portrait_7.jpg on the demo in the main page with CSP header as img-src 'self' blob:;
You can use this plugin for quick testing from the browser: https://chrome.google.com/webstore/detail/csp-tester/ehmipebdmhlmikaopdfoinmcjhhfadlf
Possible solution
Instead of producing an intermediate image, rendering the source (blob:) image directly rotated onto the target canvas would probably fix the problem. Basically setting the initial rotation config derived from the orientation meta data of the image.

You may need to set checkOrientaion option to false.

I know that is what I use now. But then the user needs to manually rotate.
Seems like a simple and usefull fix. Just set the rotation config based on the orientation and its working and CSP approved. Which seems like a big+

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-crossorigin

I dont get how this will solve anything?
This problem is fixable for me by reading the orientation externally and setting rotation and scaling accordingly with checkOrientation set to false for cropper. Would be nice if cropper could do that though.


Add syntax highlighting to README.md

Small fix for README.
Feel free to do this change yourself.
I think it improves the readability of the examples and also looks better :smile:

Thank you!

No problem!


How to render html comment

Is it possible to render HTML comments, I am using this to render server side templates, and it would be useful to print out html comments so it helps with debugging and getting meta information

There isn't a Comment syntax for JSX. You can preprocess the Strings array before it reaches htm, and then undo that preprocessing using the tag function you pass. Here's an example that enables only certain comments (IE conditional comments):
https://jsfiddle.net/developit/jwb4nkao/


inject dont work

After i did install xinamine i tried to add smplinks, it was working but after i delete it i got an error. i didnt took a look on it.
then i went to settings i saw that twaek injeciton stop to work. Treid var clean/ uninstall bootstrap etc, didnt help me to fix it.

nvm mind new update fixed it

Xinamine should not be installed on the roothide Bootstrap


VSCode keyboard text selection should allow for selecting complete strings including opening and closing "'s

Type: Bug
Open this file with the C++ extension:
https://raw.githubusercontent.com/SuperTux/supertux/master/src/worldmap/worldmap.cpp
Go to line 65 where you see this:
SoundManager::current()->preload("sounds/warp.wav");

Put the cursor right before the first " in column 36. Press Alt+Shift+Right multiple times to continue selecting text. I want the selection to stop right after the closing " so I can easily copy the whole string.
Currently, the selection step includes everything up to but not including the closing " and the next step includes the end of the line.
The same is true for the opposite direction:
Go to column 53 in the same line and press Alt+Shift+Left. The selection either won't include the opening " or both the opening " and the opening bracket.
VS Code version: Code 1.81.1 (Universal) (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:20:33.924Z)
OS version: Darwin x64 19.6.0
Modes:

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz (8 x 2300)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
2, 3, 3

Memory (System)
8.00GB (0.16GB free)

Process Argv
--crash-reporter-id 7fb4b399-e69a-4df0-a0ca-537803191807

Screen Reader
yes

VM
0%

Extensions (12)

Extension
Author (truncated)
Version

doxdocgen
csc
1.4.0

gitlens
eam
14.2.1

vscode-github-actions
git
0.26.1

better-cpp-syntax
jef
1.17.2

cmake-language-support-vscode
jos
0.0.9

vscode-language-pack-de
MS-
1.81.2023081609

vscode-dotnet-runtime
ms-
1.7.2

cmake-tools
ms-
1.15.31

cpptools
ms-
1.17.5

cpptools-extension-pack
ms-
1.3.0

diff
raf
0.0.1

cmake
twx
0.0.17

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30803844
2e4cg342:30602488
f6dab269:30613381
vscrp:30673768
a9j8j154:30646983
showlangstatbar:30737416
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxptcf:30805731
pythonnoceb:30805159
dsvsc013:30795093
dsvsc014:30804076
diffeditorv2:30821572

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!


Split debuginfos in addition to stripping

Since this action does all: compiling, stripping, and uploading, it's currently not possible to retain debuginfos in a separate file, since they're just stripped away immediately after building. Debuginfos are important for debuggers and profilers to work though so it would be nice if there was some way to enable keeping them.
Would you be open to in addition to stripping adding an object copy that first extracts debuginfos? For example here:
objcopy --only-keep-debug "${target_dir}/${bin_exe}" "${target_dir}/${bin_exe}.debug"

Is the actual request here to add an option to support split-debuginfo? Or is it to add an option to not strip?
In the former case, specifying split-debuginfo in the profile and using the include/asset option would probably already work.
In the latter case, this action should already respect it if you explicitly set strip to false in the profile.
In any case, I'm open to adding an option to make it easier. However, as for split-debuginfo, considering cross that doesn't propagate environment variables to cargo by default, users will probably need to specify the option in the profile anyway.

The problem with split-debuginfo is that the format of debuginfos it produces is very different from those that are included in the binary. This is because split-debuginfo produces dwp dwarf package files which are easy to produce but not supported by many tools. Whereas when including debuginfos in the binary with debug = true they are produced the same way as Linux distributions publish on debuginfod servers.

So the actual request is the latter (add an option to not strip)?

I think that's generally a useful thing to have, but often people want minimal production binaries but still keep the debuginfos somehow for using with profiling or debugging (I happen to need them for profiling). So I think both an option to not stripping at all, and an option that when stripping to retain the debuginfos in a separate file.

If you're generally open to this, I'd be happy to draft something up.

I would accept PRs to implement them.


Automated Package Upgrade

:tada: This PR is included in version 6.0.99 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Add public API to access nodal solution values and coordinates

It would be very nice to implement a public interface to access the nodal solution values and coordinates from a Trixi/ODE solution and/or solution files to allow people to run their own visualization stuff.
CC @jlchan

You mean something like
u = get_u(sol)           # get latest solution
x = get_coordinates(sol) # get nodal coordinates

possibly with overloads
u = get_u(u_ode, semi)
x = get_coordinates(mesh, semi)

?

Yes 👍 But with a nice and clear API about the storage format of the return values of these functions that is uniform across all solvers etc.


(simatec) Add tinker monitor

Pease fix io-package.json!! Line 38 is missing a quote

Fix is done ...

I would live to see one more thing: green tests :-) I know it is broken since my update because I was not able to update the package-lock.json (because I do not have a tinker hardware). So please update package-lock and then testing should get green and we can proceed. Thank you!

@simatec
Please have a look at :
https://github.com/simatec/ioBroker.tinker/pull/7

Thanks @DutchmanNL, I did not see that ... sorry

Thanks @DutchmanNL, I did not see that ... sorry

no problem that's why we are a community and help each other :)
test will still fail until you update locally on an tinker installation the package lock with npm I
I can't do that on Mac, wrong architecture :/

I'll do that tonight and then update to Github

I'll do that tonight and then update to Github

cool ! please give an update here after that, as far I see the testing part is the only missing peace to get into stable :)

package-lock is now up2date ... ;-)

Travis CI is now green ;-)

yyeeeayyy :-)

Cool Welcome to stable ! ;)


Waiting for a saga to complete

The use case is a legacy application without Redux, where you try to introduce (gradually) Redux and Redux-Saga without rewriting the whole app at once.
The legacy code uses a promise-based pattern:
getArticle(123).then(data => render(data)).catch(err => renderError(err))
Inside getArticle there is a fetch call to some JSON endpoint. This could be rewritten in redux:
function getArticle(id) {
  store.dispatch(actions.requestArticle(id));
}

// ...

function* requestArticle ({id}) {
  try {
    const response = yield call(fetch, 'http://example.com/...');
    const data = yield call(response.json);
    yield put('ARTICLE_REQUEST_SUCCESS', data);
  } catch (err) {
    yield put('ARTICLE_REQUEST_FAILED');
  }
}

function* saga () {
  yield fork(takeEvery, 'REQUEST_ARTICLE', requestArticle);
}

What we want to achieve, is to keep the old behavior of getArticle, so that it returns a Promise that is resolved with the data, or rejected with the error. That way, we can move parts of the app to redux while keeping other, promise-based code around for a bit longer.
I suppose this would work similar to dispatching redux thunks. Is there an easy way to build a "bridge" like that, for redux-saga?

Im not exactly sure what you mean by the bridge here, but this API http://yelouafi.github.io/redux-saga/docs/api/index.html#runsagaiterator-options helps connecting the saga to the non-redux projects.
In that way you could pass success/error from the getArticle's callbacks to the saga.
Or you could just dispatch your getArticle and play around with this snippet
function getArticle(id) {
  const apiCall = fetch(...); // your promise
  // you cant test your created promise origin, so checking in saga just for smth like takeEvery(ac => typeof ac.then === 'function') wont suffice as you probably like to handle different promises in different ways, so you need to have a 'type' here os some other field, but with type you can use a shortcut syntax for takeEvery('REQUEST_ARTICLE' )
  apiCall.type = 'REQUEST_ARTICLE'
  return apiCall
}

// ...

function* requestArticle (promise) {
  try {
    const response = yield promise; // you can yield promises just like that
    const data = yield call(response.json);
    yield put('ARTICLE_REQUEST_SUCCESS', data);
  } catch (err) {
    yield put('ARTICLE_REQUEST_FAILED');
  }
}

function* saga () {
  yield fork(takeEvery, 'REQUEST_ARTICLE', requestArticle);
}

I ended up using this middleware: https://github.com/Chion82/redux-wait-for-action. It looks like it works quite well combined with redux-saga.
const actionCreators = {
  requestArticle: id => ({
    type: 'REQUEST_ARTICLE',
    [WAIT_FOR_ACTION]: 'ARTICLE_REQUEST_SUCCESS',
    [ERROR_ACTION]: 'ARTICLE_REQUEST_FAILED'
  })
};

store.dispatch(actionCreators.requestArticle(123))
  .then(() => console.log('success'))
  .catch(() => console.error('error'));

How do you leverage redux-saga in combination with this other middleware?

Here is an example of redux-saga combined with redux-wait-for-action, interacting with legacy code. It's pseudocode, I haven't actually tried it.
// saga code
function* requestArticleSaga({ id }) {
  try {
    const response = yield call(fetch, `https://api.example.com/${id}`);
    const data = yield call(response.json);
    yield put({ type: 'ARTICLE_REQUEST_SUCCESS', id, data });
  } catch (error) {
    yield put({ type: 'ARTICLE_REQUEST_FAILED', id, error });
  }
}

function* root() {
  yield fork(takeEvery, 'REQUEST_ARTICLE', requestArticleSaga);
}
sagaMiddleware.run(root);

// reducer
switch (action.type) {
  case 'REQUEST_ARTICLE':
    return { ...state, [action.id]: { loading: true } };
  case 'ARTICLE_REQUEST_SUCCESS':
    return { ...state, [action.id]: action.data };
  case 'ARTICLE_REQUEST_FAILED':
    return { ...state, [action.id]: { error: action.error } };
}

// action creators
function requestArticle(id) {
  return {
    type: 'REQUEST_ARTICLE',
    id,
    [WAIT_FOR_ACTION]: 'ARTICLE_REQUEST_SUCCESS',
    [ERROR_ACTION]: 'ARTICLE_REQUEST_FAILED'
  };
}

// legacy code
const id = parseInt(params.id);
view.renderLoadingSpinner();
requestArticle(id)
  .then(() => view.renderArticleView(store.getState()[id]))
  .catch(view.showErrorPage(store.getState()[id].error));

I have one concern though; if you dispatch multiple REQUEST_ARTICLE in parallel, and they return responses out of order, the wrong promise might be resolved.

I might not know something about requirements, but I dont see why this logic couldnt be embedded in the saga, instead of in redux-wait-for-action, which would automatically solve your concern about promise order.
/ saga code
function* requestArticleSaga(view, { id }) {
  yield call([view, view.renderLoadingSpinner]);

  try {
    const response = yield call(fetch, `https://api.example.com/${id}`);

    // aint sure if this method needs the appropriate this binding but it would be safer to use
    // 1. const data = yield call([response, response.json]);
    // or 2. const data = yield apply(response, response.json);

    const data = yield call(response.json);
    yield put({ type: 'ARTICLE_REQUEST_SUCCESS', id, data });
    const articleState = yield select(state => state[id]);
    yield call([view, view.renderArticleView], articleState);
  } catch (error) {
    yield put({ type: 'ARTICLE_REQUEST_FAILED', id, error });
    const articleError = yield select(state => state[id].error);
    yield call([view, view.showErrorPage], articleError);
  }
}

function* root(view) {
  // with v0.14 if you import takeEvery from the redux-saga/effects
  // you can shorten this

  yield takeEvery('REQUEST_ARTICLE', requestArticleSaga, view)

  // also if you put the logic into the saga it could be better
  // (if this meets your requirements) to use takeLatest instead of takeEvery
}
sagaMiddleware.run(root, view);

// reducer
switch (action.type) {
  case 'REQUEST_ARTICLE':
    return { ...state, [action.id]: { loading: true } };
  case 'ARTICLE_REQUEST_SUCCESS':
    return { ...state, [action.id]: action.data };
  case 'ARTICLE_REQUEST_FAILED':
    return { ...state, [action.id]: { error: action.error } };
}

// action creators
function requestArticle(id) {
  return {
    type: 'REQUEST_ARTICLE',
    id,
  };
}

// legacy code
const id = parseInt(params.id);
store.dispatch(requestArticle(id))

This way the whole logic is contained in one async flow inside the saga and you get rid of the overhead tracking this between files and concepts.
When you migrate your views to be redux-connected you will just get rid of those pesky view calls inside the saga, as your views will rerender themselves automatically based on the store's state.

The requirement is: this is a gradual legacy code base migration; no "stop the line and rewrite the whole app to redux and redux-saga", all at once.
Calling view.xxx cannot happen inside the saga, because the requestArticle function is exported as a form of public API (you could think of it as an ArticleService). And the state management code shouldn't know about the UI code, architecture wise, the UI should know about the state management (directly or indirectly). The thought is that redux-saga will know about redux, the "facade api" will know about redux (and redux-saga), while the rest of the app (the UI) will only know about the facade.
Then, gradually, views can be shifted from using the promise APIs to reading directly from Redux instead.

In that case the approach with redux-wait-for-action seems really constrained and your objections towards the promise resolution order is just too big of a concern to ignore it.
I would suggest to make your own solution with a custom middleware like this:
export const DEFERRED = Symbol('DEFERRED');

const createExposedPromise = () => {
  const deferred = {}

  const promise = new Promise((resolve, reject) => {
    deferred.resolve = resolve
    deferred.reject = reject
  })

  return [ promise, deferred ]
}

export default store => next => action => {
  if (!action[DEFERRED]) {
    return next(action);
  }

  const [ promise, deferred ] = createExposedPromise()
  next({ ...action, [DEFERRED]: deferred })
  return promise
};

and then use it in the similar way like you have proposed
// saga code
function* requestArticleSaga({ id, [DEFFERED]: deferred }) {
  try {
    const response = yield call(fetch, `https://api.example.com/${id}`);

    const data = yield call([response, response.json]);
    yield put({ type: 'ARTICLE_REQUEST_SUCCESS', id, data });
    const articleState = yield select(state => state[id]);
    deferred.resolve(articleState)
  } catch (error) {
    yield put({ type: 'ARTICLE_REQUEST_FAILED', id, error });
    const articleError = yield select(state => state[id].error);
    deferred.reject(articleError)
  }
}

function* root() {
  yield takeEvery('REQUEST_ARTICLE', requestArticleSaga)
}
sagaMiddleware.run(root);

// reducer
switch (action.type) {
  case 'REQUEST_ARTICLE':
    return { ...state, [action.id]: { loading: true } };
  case 'ARTICLE_REQUEST_SUCCESS':
    return { ...state, [action.id]: action.data };
  case 'ARTICLE_REQUEST_FAILED':
    return { ...state, [action.id]: { error: action.error } };
}

// action creators
function requestArticle(id) {
  return {
    type: 'REQUEST_ARTICLE',
    id,
    [DEFERRED]: true,
  };
}

// legacy code
view.renderLoadingSpinner()
const id = parseInt(params.id);
store.dispatch(requestArticle(id))
  .then(articleState => view.renderArticleView(articleState))
  .catch(articleError => view.showErrorPage(articleError))

Much simpler and it wont suffer from the ordering issue

Yes, that would work!
 Would it be possible to do it as an effect somehow?
// saga code
function* requestArticleSaga({ id }) {
  try {
    const response = yield call(fetch, `https://api.example.com/${id}`);

    const data = yield call([response, response.json]);
    yield put({ type: 'ARTICLE_REQUEST_SUCCESS', id, data });
    yield resolve(data);
  } catch (error) {
    yield put({ type: 'ARTICLE_REQUEST_FAILED', id, error });
    yield reject(error);
  }
}

The effects resolve and reject would then resolve/reject the promise to be returned from store.dispatch(getArticle(123)). (And could be unit tested easily, one wouldn't need to mock a Promise)

Or maybe this all boils down to needing to pass an explicit promise reference, so that the correct promise is resolved...

exactly that, there needs to be some kind of connection between the requestArticleSaga instance (spawned by takeEvery) and the trigger-action's promise. With the ability to make custom effects it maybe could be somehow tied behind the scenes, but there is no possibility to make them right now.
Thats why I've proposed attaching the deferred as metadata on the action object, so it can be easily referenced. If you would like to make it more effect-like you can wrap those resolve/reject calls with call effect, but thats best what can be done for now I guess.
In general when I think about it right now such custom effects could be quite easily created if only certain internal building blocks would be exposed for people wanting to build more personalized runners. For now it will stay as open question if the internals could fulfill such premise, aint sure if they are modularized enough for now. The excellent example of hardcore modularization - exposing both high-level and low-level APIs were recently done in react-redux (v5 !). I think this migration from v4 to v5 in that package might be an excellent study case for such endavours.

Going to close this, if you have any further questions - please just ask :)

Take a look at https://github.com/diegohaz/redux-saga-thunk

A solution I'm using: create a super-simple middleware that listens for Redux actions that indicate "done-ness," and then calls a provided callback that renders/sends the page to the client:
// store.ts
export const getNewStore = (done: () => void): Store<State> => {
  const doneMiddleware: Middleware = store => next => action => {
    const result = next(action)

    if (action.type === FOO_LOADED || FOO_NOT_FOUND) {
      done()
    }

    return result
  }

  return createStore<State>(
    rootReducer,
    initialState,
    applyMiddleware(doneMiddleware),
  )
}

// server.ts
export default async function(req: Request, res: Response, next: NextFunction) {
  let store: Store<State>

  const done = () => {
    const state = store.getState()

    if (state.Foo.isLoading === false) {
      if (state.Foo.notFound) {
        res.status(404)
      }

      res.send(html)
    } else {
      res.status(500)
    }
  }

  store = getNewStore(done)

  // Dispatch the async action. The middleware will call `done()` once the async action has succeeded or failed.
  store.dispatch(loadFoo())
}

Yeah, saga will wait for such yielded promise. This is not recommended though as promises are eager - use yield call(() => promise) instead.

@Andarist  thanks for the clarification. Didn't know that, I often use call(), is "yield promise" documented anywhere?

It should be somewhere, although as mentioned - it is not recommended. It's better to use call wrappers.


Add more tests involving [ViewComponent(Name = "...")]

The product code has well-defined rules around name ambiguity, view component derivation, and related concerns. However current unit tests are skimpy in this area.

Self-assigning because I created the tests to confirm the behaviours I (correctly :smiley_cat:) thought we had.

68974b2

Closed the wrong PR and issue

f8c7f1a


Printing to VGA crashes qemu

Sample code: https://github.com/Brian3647/rust-bootloader-issue

Bootloader 0.10 doesn't use vga text mode anymore. It sets up a framebuffer instead whose address is stored in boot_info.framebuffer. You have to rasterize a font and write the raw pixels or use the serial port instead.

@bjorn3 do you know any tutorial or something I can follow to do that?

@bjorn3 thanks!


Drop Settings base in favor of adopting the Settings base from Conformity

Issue eventbrite/conformity#65 describes migrating the PySOA Settings base to Conformity. This is the counterpart issue in this repo, to drop the Settings base here in favor of Settings from Conformity.

This is completed in 8f399f4f3dce1e60325f53e5f35b665880fd1253.


Remove unnecessary annotations/casts/aliases

🎉
How did you find these?

I caught one of them during some experiments on quick fixes (I think https://github.com/microsoft/TypeScript/pull/46728) and it had a comment on it, so I searched for similar comments in the codebase.


Release v0.1

@e-koch @low-sky We have a request to release an official version.  I think it's time.  What do we need to complete before then?  Please add to the checklist below:

[ ] Finish the README
[x] Finish testing suite (see below)

Most of these should be simple and easy to add.
Tests to add:

[ ] attach_to_header
[ ] convolve
[ ] deconvolve
[ ] beam_projected_area
[ ] jtok
[ ] jtok_equiv

#47 is the other checkmark.

With some basic docs in place, and the tests @e-koch added, I'm ready to make a v0.1 release.  Any objections, or is there anything critical to add?

We still need a license (#50). I can't think of any other critical things.


Added explicit versions to all packages

I realized I forgot this step with the other PR so npm install currently tries to update mattermost-redux and commonmark.js

Thanks. I forgot we had a branch for that

going to merge as i'm about to cut a build for this


RBAC seed data

Includes the rbac yaml
Code to create the roles, groups and policies

@mkanoor Should this be a wip PR until we understand how to create global rbac data?

Is this PR still  needed?

@gmcculloug Not sure, they are only seeding roles we need groups and policies, unless we have an UI that is going to do the on boarding. We can close it for now


Updated README for typo in 'src' link

Changed the URL from ".../FFMpeg%20src" to ".../FFmpeg%20src" to fix
broken link.

Feel free to let me know if you need any changes to this commit + PR, thanks.

Thanks mate 👍


Retrive a color with Hashtag like #FF00FF

I tried to use HEX format in option, it response a code without hashtag like "FF00FF"
$scope.optionsColor = {
format: 'hex'
}
some advice?

@silviotroia If you want the hash in the hex then the format needs to be hexString.


Carthage support

Thank you for this, works great.
It would be nice if there was support for building it through Carthage.

Thanks, c986cf4 should add Carthage support, can you please confirm that it works for you (requires Carthage 0.9.0 or newer).

Thank you for the quick reply! I'm getting this error when compiling:
➜  TestWebLinking git:(master) ✗ carthage bootstrap
*** Checking out WebLinking.swift at "1.0.0"
*** xcodebuild output can be found in /var/folders/dq/t06w98396l19ljdq183xlnl00000gn/T/carthage-xcodebuild.VjgIZe.log
*** Building scheme "WebLinking" in WebLinking.xcodeproj
** BUILD FAILED **

The following build commands failed:
	CompileSwift normal armv7k /Users/simon/Documents/Code/Tests/TestWebLinking/Carthage/Checkouts/WebLinking.swift/WebLinkingTests/WebLinkingTests.swift
	CompileSwiftSources normal armv7k com.apple.xcode.tools.swift.compiler
(2 failures)
/Users/simon/Documents/Code/Tests/TestWebLinking/Carthage/Checkouts/WebLinking.swift/WebLinkingTests/WebLinkingTests.swift:10:8: error: no such module 'XCTest'
A shell task failed with exit code 65:
** BUILD FAILED **

The following build commands failed:
	CompileSwift normal armv7k /Users/simon/Documents/Code/Tests/TestWebLinking/Carthage/Checkouts/WebLinking.swift/WebLinkingTests/WebLinkingTests.swift
	CompileSwiftSources normal armv7k com.apple.xcode.tools.swift.compiler
(2 failures)

For reference:
➜  TestWebLinking git:(master) ✗ xcodebuild -version
Xcode 7.1
Build version 7B91b
➜  TestWebLinking git:(master) ✗ carthage version
0.9.3


Solving MAXIMUM_SUM problem using C++

Description
SOLVED MAXIMUM_SUM problem in C++.
Test Configuration: (If any)

Firmware version: C++ 17
Hardware:
Toolchain:
SDK:

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] Any dependent changes have been merged and published in downstream modules

@KuSantosh100 it's correct one

Thank You very much


ProgramChange midi1RawBytes()

Please Confirm

[X] I have reviewed the MIDIKit Documentation which contains descriptive guides and extensive API reference
[X] I have searched Issues and Discussions to see if the same question has already been asked

macOS Version(s) Used to Build
macOS 13 Ventura
Xcode Version(s)
Xcode 14
Description
Line 152 in ProgramChange.swift (func midi1RawBytes() -> [UInt8]) codes the Bank Select LSB (CC 32) as 0x32. But CC 32 is decimal 32. Line 152 should read 0x20
Crash Logs, Screenshots or Other Attachments (if applicable)
No response

Nice catch. Not sure how that got through unit testing, but I've performed the fix and updated unit tests.


Remove reliance on SapphireTest::is_running_test

A first attempt at removing the coupling of SapphireTest with core code.
This should allow us to remove the PHPUnitShim file

Also https://github.com/silverstripe/silverstripe-framework/issues/6869

It probably would logically live in the same place as wherever isDev() / isTest() / isLive() belong, which should also be refactored out of director.

It needs to go into App object doesn't it @sminnee ? What should we do in the mean time; Add it as a future story for once app is in core?

It needs to go into App object doesn't it @sminnee ? What should we do in the mean time; Add it as a future story for once app is in core?

I guess that would be the logical place — maybe just note that this method should be shifted on the App object card? Or park this work until App object is done?

I think parking it is best for the sake of velocity.

I wanted to get this in place to be able to remove our PHPUnit shim - if the App object is likely to come soon then we can put this on hold

It's marked for beta1. https://github.com/silverstripe/silverstripe-framework/issues/6681
Once I finish the injector service upgrade work I'll jump onto it.

@dhensby might be worth thinking about what other parts of Director should be in app :)

@dhensby might be worth thinking about what other parts of Director should be in app :)

all of it? :P

Well, how about anything not routing / url related?

url generation, yes?
environment state, no
routing, yes
file paths/handling, no (we need a new director equivalent for file paths IMO).

This API has been superseded by already merged changes. is_running_tests() has been removed, rather than replaced. :) Any code which relies on configurable behaviour has been moved to be controlled by config, which tests can set on an as-needed basis.


Feature/WelcomeUserModal

Description
Added backend and frontend functionality to detect if user is the first time login in Together, if it is, a modal with a welcome message will pop up. After user close the message, it will activate a function to delete needsToBeWelcome property from the user schema so the welcome modal doesn't pop up again next time user logs in.
Type of change
Please select everything applicable. Please, do not delete any lines.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Issue

[ ] Is this related to a specific issue? Is so please specify: #247

Checklist:

[x] I have executed npm run lint and resolved any outstanding errors. Most issues can be solved by executing npm run format
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] My changes generate no new warnings

Testing this feature I found that if the user doesn't click the button " close" and click outside the WelcomeUserModal box, the modal will close but the property needsToBeWelcome doesn't get deleted and WelcomeUserModal will pop up again the second time the user login or refresh the app.

Take a look at this: https://github.com/code2244/Together/pull/1


Problem: We have no way of turning the root entity into DB tables

Turning the root entity into a series of DB tables will be difficult, especially if that structure is tree based, rather than just a flat data structure.
Is there a simple way for us to create a collection of tables, on the fly, based on a tree structure?

Here's a PHP library that seems to solve the problem.
http://www.redbeanphp.com/
Further research is required to see if it can turn any object into a table.

RedBeanPHP seems to solve the problem, let's write a simple test to see if it actually does the job in the way we want.

Pros:

Can give it an arbitrary JSON structure and it will generate a table structure that's queryable

Cons:

Building tables up piecemeal is expensive (lots of SQL calls)
Support for UUID isn't great
Can't use "id" field

RedbeanPHP does seem to solve this problem, and we have a code example that shows how to do it. I'd say we add some comments to the top of the test class, to explain what's going on, then close this issue.

Looks good, closing the issue.


[Python] .gitignore

Reasons for making this change:
TODO
Links to documentation supporting these rule changes:
TODO
If this is a new template:

Link to application or project’s homepage: TODO

@okongwu101 any links to StackOverflow discussions or other documentation about this change?

How to ignore the part of pom.xml file i.e i want to ignore the contents of  tag

No effort to support this PR with sources
Excluding an arbitrary SQL language (postgresql) and not the many others when the language at hands here (Python) has no obvious relation to it
Deleting the source of your pull request as seen by the from unknown repository, preventing any potential correction to it

3 reasons to reject this pull request.

@Coeur agreed
@okongwu101 please open a fresh pull request with more context if you still wish to see this change landed


[BUG]: Define topology for 3 or less peers

Atm we have inconsistencies for topology of size 3 or less which can cause bugs.
We need to properly define topology and make Topology methods be consistent with each other.

We have to remember that such a topology can be the result of network partitioning. As such, preventing non-BFT topologies from the API standpoint doesn't prevent non-BFT topologies from occurring.

1 peer: Leader
2 peer: Leader, Proxytail
3 peer: Leader, Validating Peer, Proxytail


Add Camellia CTS implementation to default provider

We are missing Camellia CTS in the high level API which was possible to do with the old APIs.
See also #16235

I am having a look. It doesn't look too hard to refactor this to handle both cases..

@frozencemetery I am looking at test vectors in
https://mirror.unpad.ac.id/ietf/internet-drafts/draft-ietf-krb-wg-camellia-cts-00.txt
And dont seem to be getting the right results for  Sample encryptions (all using the default cipher state):
   Plaintext: 1
   Random confounder:
       6F 2F C3 C2 A1 66 FD 88 98 96 7A 83 DE 95 96 D9
   128-bit Camellia key:
       50 27 BC 23 1D 0F 3A 9D 23 33 3F 1C A6 FD BE 7C
   Ciphertext:
       84 2D 21 FD 95 03 11 C0 DD 46 4A 3F 4B E8 D6 DA
       88 A5 6D 55 9C 9B 47 D3 F9 A8 50 67 AF 66 15 59
       B8

I was assuming this translates to:
IV =  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
PT =  6F2FC3C2A166FD8898967A83DE9596D931 (cofounder || pt)
KEY = 5027BC231D0F3A9D23333F1CA6FDBE7C (Is this right??)
CT =  842D21FD950311C0DD464A3F4BE8D6DA88 (first bytes of above CIphertext)

Any ideas where I am going wrong here?

It appears that the key is the base key - the missing data is the usage,,,

https://mirror.unpad.ac.id/ietf/internet-drafts/draft-ietf-krb-wg-camellia-cts-00.txt

For what it's worth, that's an early draft of RFC 6803.
As I read section 6, that vector becomes:
IV = <all zeroes>
PT = 6F 2F C3 C2 A1 66 FD 88 98 96 7A 83 DE 95 96 D9 01
KEY (Ke): 50 27 BC 23 1D 0F 3A 9D 23 33 3F 1C A6 FD BE 7C
CT = 84 2D 21 FD 95 03 11 C0 DD 46 4A 3F 4B E8 D6 DA 88

assuming by CT you mean what the draft calls C.
The only difference I spot is that the last octet of PT needs to be a full octet: you have 1, I have 01.
If that doesn't help, I'll have to defer to the document author.

Right after hitting submit, another thought: the "key" may not be "Ke" but rather base-key.  So you'd need to derive Ke (and Ki, if you were doing the MAC part) from it using the KDF.

Yeah it was the base key.. Test vectors are now in the PR.
The missing usage was what threw me initially.


How do you route to a specific item?

I'm very new to GraphQL and Relay. I hit a wall today trying to figure out how to route to a single item, ie can't figure out how to pass the a route param into graphql query.
For example say I have a route /products/1 and I pluck this idea from location props. How do I pass this in as an argument in the query fragment?
Eg node(id: productId) {
title
price
etc
}

See https://github.com/4Catalyzer/found-relay/blob/a439517ecea41231e7fc1f9d4b54ae6e45b32e0f/test/modern/Resolver.test.js#L102-L126.


Add commands for custom code action callbacks

In recent CLI versions, LSP will suggest code actions for enabling/disabling linters and opening the Trunk config. By registering commands to the commands table, we can provide callbacks for these.
Atm we don't have a non-ANSI coloring mode so we strip the output again with sed.
This approach will likely not be feasible for emacs since if the commands don't exist it will attempt to execute them on the command line IIRC.

@puzzler7 fyi would like to make a patch release with this next week


Repairing packaging with error when packaging 1.17.x

Repairing packaging with error when packaging 1.17.x
Proposed changes
Issue Number: close #229 Repairing packaging with error when packaging 1.17.x

Hi，@JNSimba , can you review the issue I fixed? Thank you very much

What is your compilation command?

What is your compilation command?

I checked out from the master branch，cd /home/demo/doris-flink-connector/flink-doris-connector，then execute ./build.sh

Thanks for the reply, but I tested it on both mac and linux platforms, and it can be built directly. I guess it may have something to do with your environment? Maybe you can test it in another environment?

Thanks for the reply, but I tested it on both mac and linux platforms, and it can be built directly. I guess it may have something to do with your environment? Maybe you can test it in another environment?

Thank you very much for your help. I have found the reason. It is because my local JFog artifact repository cannot download the dependent package. Replacing the Maven repository source can successfully compile. I'll close the issue first


use default value from settings Type

Fixes #84
@solnic @andrewcroome I was able to track the issue down. Basically, we where explicitly passing the value as nil if the value wasn't found in ENV or in any of the .env files. To solve we just need not pass the key to the Dry::Struct new method.
So with this change instead of passing {an_int: nil} we pass {} and it will use the default value. Also this change in Dry::Struct helped https://github.com/dry-rb/dry-struct/pull/75

@GustavoCaso On the wholetThis looks right to me, thanks!
In trying to think about this from different angles, though, I did have one question: what happens if someone had explicity set a "nil" or otherwise falsey value in the env_data? However, looking at our Settings:FileParser, I don't think it's possible to get a nil value out of it at all.
So I think we're good :) I'll merge this in now.


Texture2D SetData ignore offset and count parameters

https://github.com/tlgkccampbell/ultraviolet/blob/develop/Source/Ultraviolet.OpenGL/Shared/Graphics/OpenGLTexture2D.cs#L449

This is very old code that was needlessly bloated with a bunch of functionality that was never being used, so I just ripped most of it out and rewrote what was left. The next release should fix this issue.


[AutoPR track2_azure-iot-deviceupdate] Demo ApiView Integration

Create to sync https://github.com/openapi-env-test/azure-rest-api-specs/pull/3068
You can install the use using pip install of the artificats.

API change check for azure-iot-deviceupdate
API changes have been detected in azure-iot-deviceupdate. You can review API changes here


Remove polymer embeds

Replaces the embed-*.html files with the experimental ones. This does not make changes to the experimental/ directory yet.
This doesn't tackle #1185, but the websites are already using the experimental embeds so I don't see it as a blocker. Will be following up soon with a fix for that.
After this, the next step will be to update the websites and codelabs to stop using experimental/ and start using these versions, so we can remove experimental/.
closes #892

@devoncarew @domesticmouse I think this cleans out most of the polymer files and references, but there might be more. Could you take a look to see if I'm missing anything?

The bit to confirm is that all the relevant pages still load and render properly. I have a niggling memory that when I attempted to cut polymer out I accidentally broke the main page.

We also need to look through our analytics data to find out who else is using the embeds and make sure their integrations won't break. We should be able to test them right now by loading the page, altering the iframe URL to point to experiemental with the same query params, and see what happens.

We also need to look through our analytics data to find out who else is using the embeds and make

That makes sense.
You all may already know the main places the embeds are being used. From memory, the main usage was the dartlang web site. cc @kwalrath
It would also be worth getting some page load numbers from Chrome DevTools. When rolling out the previous (polymer based) embed UI, we spent much of our time on the last week or so optimizing the page load time (by asset concatenation at the time, and by tweaking the caching settings in the appengine yaml config file).

I believe that @johnpryan has already taken care of all the embeds in dart.dev.

It would also be worth getting some page load numbers from Chrome DevTools

That's a good point. We're seeing slower page load times in GA (around 65% slower.) Created #1205 to track.

@domesticmouse On my machine, index.html is still working as expected.
@RedBrogdon I've looked through the analytics data and can discuss that offline
On the performance side, I did some quick tests to see how the new embed performs. For a brand new page load (empty cache + hard reload) it loads slightly faster (down from 1100ms to 740ms from initial request to the onload event and down 990ms to 578ms to the first meaningful paint).
It's unclear why we're seeing GA show a slower page load, but it looks like analytics.js is loading about 515ms faster on the new embed, so it's possible that analytics.js starts measuring the performance after it loads, so it thinks the new embed is slower.

I think it would probably be safe to fire this thing off right now, since you've done a lot of work to ensure the old embeds continue functioning. To be sure, though, we should be able to check all these boxes:

The new embed supports every query string option that is actually used by an existing embed (e.g. run doesn't count).
Our O&O sites have already been updated to the new embed's URL.
We've looked through any other pages sending us significant traffic (>100 hits/wk, perhaps) and manually checked that they'll continue working by changing URLs in inspector.

I believe the first two of these are done, and last I heard the conversation was about knocking together a spreadsheet to spread around the work of doing the last one.

@RedBrogdon done, discussed offline.


Support batch input for median_filter2d

Addresses #230. Also meets the interface of mean_filter2d.
A general random test case is down below. Maybe there are some ways to speed up. It's now much more slower than scipy's implementation even for the input of shape [1, h, w, 1].
https://colab.research.google.com/drive/1UkNXxjTMHifKmHB2N5ojOHFojtXrOUIG

@Mainak431 Hi, would you mind taking a look?

@WindQAQ Thanks for the excellent contribution. Everything looks pretty fine.
Can you please add a small training example using this layer with a conv2d layer and dropout layer in tensorflow with maybe mnist dataset? So, that it can be directly used in the network itself?

@Mainak431 Here is the example colab notebook. I will include this in addon's example in maybe the next PR.

Nice contribution.
On Sun 16 Jun, 2019, 10:20 PM Tzu-Wei Sung<EMAIL_ADDRESS>wrote:

@Mainak431 https://github.com/Mainak431 Here is the example colab
notebook
https://colab.research.google.com/drive/1ZOAFTRdxKYDBpG75ZITukIr8MjUR2qDA.
I will include this in addon's example in maybe the next PR.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/addons/pull/288?email_source=notifications&email_token=AIRDMQVU3QCXZFC6XXLN4STP2ZVPDA5CNFSM4HYLJF6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXZQ3MI#issuecomment-502468017,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIRDMQT2RQ7ED3MIX6IELALP2ZVPDANCNFSM4HYLJF6A
.

@WindQAQ Thanks for the contribution.


zsh: command not found: scrcpy

I installed brew and installed scrcpy above guidelines but i type scrcpy in terminal. I have a question look like this "zsh: command not found: scrcpy" What can i do please help me!

Try logout and login again?

Try logout and login again?

where do I am want to log out?

You installed adb/platform-tools, but did you install scrcpy?

You installed adb/platform-tools, but did you install scrcpy?

Thanks mate I resolved all issues


Began adding state param

As per #45

This is being implemented in #82, so this PR is now redundant.


Merge Back Into Dawn

Is there any particular reason this hasn't been added into the Dawn upstream?

Its been several years 😕


gcassert: allow absolute paths to be used for packages, and add cwd arg

@rickystewart looks like the build failed

Looks reasonable, though I don't love that it breaks the API for current users. How about a CWD-passing variant? Also, could you please add an absolute path test and an explicit CWD test?

@jordanlewis Have a look. Also fixed the test.