New Template: DM Guild style guide

A suggestion from the sub Reddit today - a template that conforms to the posted Dungeon Master's Guild style guide and Publishing Specifications.

My immediate thought is that such a template should be more easily added after the launch of the v3 editor, so tagging this one as "blocked" until the new editor is live.

What particular style guide would a template work for?  I looked at the linked style guides (DMG has 4 bundled together) and it seems all of that is 'content oriented' rather than rules about graphic style. I'm not sure how a template could be made to satisfy those rules/suggestions.

At this point, the template might consist of page 1 being the front cover, numbered i, page 2 being the rear cover, numbered ii; the front cover containing the required DM's Guild logo; a location for a personal brand/logo on one of the first internal pages (as per DMG guidelines, personal brands are not permitted on the cover).
A better template is here, under 5E_DMGuild_SPECS.docx, which shows headers, subheaders, sidebars, etc. It's definitely the best guide to what such a template might look like - at least, that I've found thus far.

I'll add that adding themes styled similarly to various other WOTC books like Xanathar's Guide to Everything, the Dungeon Master's Guide, or Tasha's Cauldron of Everything would likely be very welcome additions.

This is all waiting for better metadata handling on #1838

If this theme is done, would it replace the PHB theme as default? Most of our users develop stuff specifically to share it in that platform.

Replace it as the default new theme, if we don't shift that to Blank.  I would be drop the existing 5e theme.

I wouldn’t put blank as the default. For many users, I think, the utility of HB is that it is mostly set up and easy to start, and gives a good result from the start. And the largest audience is 5e.
And I think people come to HB to begin writing because they benefit from the visual representation of their work. If they wanted to start with a blank white page, they’d go to any number of editors.
THAT SAID…. Starting with the 5e PHB theme and then deciding later to check out other themes can cause problems because 5e theme has snippets that won’t always translate to other themes. So maybe an agnostic theme that only has the same snippets as Base, but is still styled fancifully, would be a good default. Then, switching to any other theme will only ever expand the options rather than find broken options.
More to 5e_clerics question, I don’t see much benefit in switching the default between current and this new one. Rather, I see some benefit, but the disruption I think would be large, and I’m not sure the gain is important enough. Especially if an agnostic theme as described above is later made default.

those are some more than valid comments, default snippets not being translated is a problem...
Another point is users think this tool only makes PHB content, or only CAN make phb content because that is what they see
We could introduce something about themes in the homepage.

maybe if theme could be a URL parameter, one could include it in links they share. So someone in the pathfinder community can share a /new&theme=pf2 link in their circles and visitors would go straight to the pf2 theme with a new brew.
The normal link without the extra parameter would be the “generic” theme

I like it.

/new?theme=pf2
/new/:id?theme=pf2

right, using the css routes
We are looking into that with brew themes, well, not exactly that, but could be the way.


new tenets proposal: "A {Checker|Service} MUST pin its dependencies as pedantic as possible

We don't want another pyDns debacle

We would have to check how well this works with stuff like https://github.com/enowars/enochecker/issues/62
In that case we would could end up with two requirements.txt pinning two different versions

Don't you start with a "normal" dependency list, find out that it works, and then pin it? The values should match in that case unless you update the base image

Yes, but if you pin your versions outside of the docker image and we update something in the base image, the dependencies might no longer match. This is fine when only pinning everything non-enochecker/gunicorn related, but if one of the "outside" dependencies shares a dependency with a dependency from the base-image, we might end up with two different pinned versions for the same package.

we update something in the base image

hence pin the base image hash in your dockerfile and verify everything works when upgrading? 😛

That would somewhat eliminate the use case for the base Docker image, which is being able to update/modify the configuration without requiring manual action in each repository. But maybe that is not desirable at all since it might break other stuff


Add file chunk uploading for Azure Blob Storage Integration

Is your feature request related to a problem? Please describe.
Uploading large files (>50MB) to blob storage fails.
Describe the solution you'd like
Use file chunking in the Azure client.py:
block_list=[]
chunk_size=1024*1024*4

with open(local_html_file_path, "rb") as data:
    while True:
        read_data = data.read(chunk_size)

        if not read_data:
            break # done

        blk_id = str(uuid.uuid4())
        blob_handle.stage_block(block_id=blk_id,data=read_data)
        block_list.append(BlobBlock(block_id=blk_id))

blob_handle.commit_block_list(block_list)

I have tested the above by updating the client.py locally. The code above needs review and some love (removing the while true would be first on the list). <3
Describe alternatives you've considered
The only alternative I've considered is performing the upload outside of elementary.
Additional context
Nope.
Would you be willing to contribute this feature?
I would, if I had time. I'll leave it in your capable hands.

Hi @bdstout ,
Thanks for opening this issue and apologies for the late reply!
This makes a lot of sense, however due to a significant backlog I don't believe the Elementary team will be able to get to it in the near future, so I'm adding the "Open to Contribution" label.
If you are willing to add as a contribution I will love to provide further guidance.
Thanks,
Itamar


Example of encrypted local storage

An example of how to implement secure-ls to the plugin with the purpose of getting more security when we need to use local storage.

@macarthuror thanks! Didn't know this secure-ls project, looks cool!

@robinvdvleuten Hope can be helpful 😁


updated winsorize to take dataframe and apply column-wise. also added…

… trim method to replace outliers with NaNs

Coverage decreased (-0.5%) to 52.071% when pulling c4cec6d3074f1b59cf33d1d0eea0f991f69a9a4c on winsorize_fix into 080196fe9c041b684edbcc9c7e45df3db3219b38 on master.

Coverage increased (+1.0%) to 53.571% when pulling 07cab07d5d6df104cf86a42b6a434071e6738d88 on winsorize_fix into 080196fe9c041b684edbcc9c7e45df3db3219b38 on master.

fixes:
added trim method in which outliers become NaN
fixed winsorize so that it can also take DataFrames
added option to winsorize to replace with cutoff values or values closest to cutoffs


Latest version 1.9.0 does not load account content on MacOS

Latest version 1.9.0 does not load storage account content on MacOS, where can I get older binaries to downgrade ?

Found it just here on github. :-)


imagemagick: 7.1.0-32 -> 7.1.0-33

Description of changes

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] 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/)
22.05 Release Notes (or backporting 21.11 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
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

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

6 packages built:

imagemagick
imagemagickBig
imagemagick_light
perlPackages.ImageMagick
python310.pkgs.Wand
python39.pkgs.Wand


Automated builds

Build steps are currently pretty well documented in README.md. We should make a github actions flow to automatically build and publish new releases.

I'll adopt this task.


notion site not showing - blank screen

Hi all,
is anyone else facing a blank screen with their webpage? I solved the baseDomain issue and things seem to work yesterday, but now the notion page is not appearing anymore.
I have the following in the console log but I'm not sure if this is related to the issue.

Any information would be very helpful, thanks!

I'm also currently having this exact error as well. When checking api/v3/getPublicPageData, it gives me a Cloudflare Error 1101.

same issue

If your page created when the format url still using notion.so/username, it was completely safe, checkout my website.
But, if your page was created after the format url changed into username.notion.so it was completely break or even redirected like my Links website
That's why the reason fruitionsite website are safe.

If your page created when the format url still using notion.so/username, it was completely safe, checkout my website.
But, if your page was created after the format url changed into username.notion.so it was completely break or even redirected like my Links website.
That's why the reason fruitionsite website are safe.

I'm not quite sure if this is the case, since I'm trying to use older version of the code (documented in https://fruitionsite.com/update) and it still gives me the error.

This also looks very similar to the issue faced in #103.

If your page created when the format url still using notion.so/username, it was completely safe, checkout my website.
But, if your page was created after the format url changed into username.notion.so it was completely break or even redirected like my Links website.
That's why the reason fruitionsite website are safe.

I'm not quite sure if this is the case, since I'm trying to use older version of the code (documented in https://fruitionsite.com/update) and it still gives me the error.

I know, that's why I told you. I have used Notion since 2020 and having many old pages. Since 2021 Notion transforms their URL into a username.notion.so it breaks my new page, then the update of fruitionsite to add some code into the condition on the worker came.
You can check my code and modify your needs.
  /* CONFIGURATION STARTS HERE */

  /* Step 1: enter your domain name like fruitionsite.com */
  const MY_DOMAIN = 'perogeremmer.com';
  const MY_FULL_DOMAIN = 'https://perogeremmer.com';

  /*
   * Step 2: enter your URL slug to page ID mapping
   * The key on the left is the slug (without the slash)
   * The value on the right is the Notion page ID
   */
  const SLUG_TO_PAGE = {
    '': '<your-notion-page-id>'
  };

  /* Step 3: enter your page title and description for SEO purposes */
  const PAGE_TITLE = '';
  const PAGE_DESCRIPTION = "";

  /* Step 4: enter a Google Font name, you can choose from https://fonts.google.com */
  const GOOGLE_FONT = 'Roboto';

  /* Step 5: enter any custom scripts you'd like */
  const CUSTOM_SCRIPT = ``;

  /* CONFIGURATION ENDS HERE */

  const PAGE_TO_SLUG = {};
  const slugs = [];
  const pages = [];
  Object.keys(SLUG_TO_PAGE).forEach(slug => {
    const page = SLUG_TO_PAGE[slug];
    slugs.push(slug);
    pages.push(page);
    PAGE_TO_SLUG[page] = slug;
  });

  addEventListener('fetch', event => {
    event.respondWith(fetchAndApply(event.request));
  });

  function generateSitemap() {
    let sitemap = '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
    slugs.forEach(
      (slug) =>
        (sitemap +=
          '<url><loc>https://' + MY_DOMAIN + '/' + slug + '</loc></url>')
    );
    sitemap += '</urlset>';
    return sitemap;
  }

  const corsHeaders = {
    'Access-Control-Allow-Origin': '*',
    'Access-Control-Allow-Methods': 'GET, HEAD, POST, PUT, OPTIONS',
    'Access-Control-Allow-Headers': 'Content-Type',
  };

  function handleOptions(request) {
    if (request.headers.get('Origin') !== null &&
      request.headers.get('Access-Control-Request-Method') !== null &&
      request.headers.get('Access-Control-Request-Headers') !== null) {
      // Handle CORS pre-flight request.
      return new Response(null, {
        headers: corsHeaders
      });
    } else {
      // Handle standard OPTIONS request.
      return new Response(null, {
        headers: {
          'Allow': 'GET, HEAD, POST, PUT, OPTIONS',
        }
      });
    }
  }

  async function fetchAndApply(request) {
    if (request.method === 'OPTIONS') {
      return handleOptions(request);
    }
    let url = new URL(request.url);
    url.hostname = 'www.notion.so';
    if (url.pathname === '/robots.txt') {
      return new Response('Sitemap: https://' + MY_DOMAIN + '/sitemap.xml');
    }
    if (url.pathname === '/sitemap.xml') {
      let response = new Response(generateSitemap());
      response.headers.set('content-type', 'application/xml');
      return response;
    }
    let response;
    if (url.pathname.startsWith('/app') && url.pathname.endsWith('js')) {
      response = await fetch(url.toString());
      let body = await response.text();
      response = new Response(body.replace(/www.notion.so/g, MY_DOMAIN).replace(/notion.so/g, MY_DOMAIN), response);
      response.headers.set('Content-Type', 'application/x-javascript');
      return response;
    } else if ((url.pathname.startsWith('/api'))) {
      // Forward API
      response = await fetch(url.toString(), {
        body: request.body,
        headers: {
          'content-type': 'application/json;charset=UTF-8',
          'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36'
        },
        method: 'POST',
      });
      response = new Response(response.body, response);
      response.headers.set('Access-Control-Allow-Origin', '*');
      return response;
    } else if (slugs.indexOf(url.pathname.slice(1)) > -1) {
      const pageId = SLUG_TO_PAGE[url.pathname.slice(1)];
      return Response.redirect('https://' + MY_DOMAIN + '/' + pageId, 301);
    }
    else {
      response = await fetch(url.toString(), {
        body: request.body,
        headers: request.headers,
        method: request.method,
      });
      response = new Response(response.body, response);
      response.headers.delete('Content-Security-Policy');
      response.headers.delete('X-Content-Security-Policy');
    }

    return appendJavascript(response, SLUG_TO_PAGE);
  }

  class MetaRewriter {
    element(element) {
      if (PAGE_TITLE !== '') {
        if (element.getAttribute('property') === 'og:title'
          || element.getAttribute('name') === 'twitter:title') {
          element.setAttribute('content', PAGE_TITLE);
        }
        if (element.tagName === 'title') {
          element.setInnerContent(PAGE_TITLE);
        }
      }
      if (PAGE_DESCRIPTION !== '') {
        if (element.getAttribute('name') === 'description'
          || element.getAttribute('property') === 'og:description'
          || element.getAttribute('name') === 'twitter:description') {
          element.setAttribute('content', PAGE_DESCRIPTION);
        }
      }
      if (element.getAttribute('property') === 'og:url'
        || element.getAttribute('name') === 'twitter:url') {
        element.setAttribute('content', MY_DOMAIN);
      }
      if (element.getAttribute('name') === 'apple-itunes-app') {
        element.remove();
      }
    }
  }

  class HeadRewriter {
    element(element) {
      if (GOOGLE_FONT !== '') {
        element.append(`<link href="https://fonts.googleapis.com/css?family=${GOOGLE_FONT.replace(' ', '+')}:Regular,Bold,Italic&display=swap" rel="stylesheet">
        `, {
          html: true
        });
      }
      element.append(``, {
        html: true
      })
    }
  }

  class BodyRewriter {
    constructor(SLUG_TO_PAGE) {
      this.SLUG_TO_PAGE = SLUG_TO_PAGE;
    }
    element(element) {
      element.append(`
Powered by Fruition

      ${CUSTOM_SCRIPT}`, {
        html: true
      });
    }
  }

  async function appendJavascript(res, SLUG_TO_PAGE) {
    return new HTMLRewriter()
      .on('title', new MetaRewriter())
      .on('meta', new MetaRewriter())
      .on('head', new HeadRewriter())
      .on('body', new BodyRewriter(SLUG_TO_PAGE))
      .transform(res);
  }

I have no luck with any of the versions. It actually redirects me to the notion login screen now.

I've been getting this error on and off all day. Still blank screen. The thing is that I'm hosted through hostnotion. Not independently hosted through cloudflare. @hostnotion

I created a worker with wrangler (kind of annoying I can't tail existing workers). The error I got was:
{"name":"TypeError","message":"response.body.delete is not a function","timestamp":1629262161661}

It is on the /api/v3/getPublicPageData route, so that's at least our debug step.
However, I've never worked with notion so I have no idea what things to try to solve this. Maybe one of the other devs can use this as a starting point?

This appears to be affecting any service that provides a domain in front of notion. It's kinda a problem in a lot of cases but I am unable to detect if it's a CloudFlare edge problem or not, but seeing as other providers for Notion domains are down I doubt they all use CF and workers so might fully on Notions end.

Given that the CF worker is throwing a JavaScript error and it has to do with response.body.delete not being a function, I think this is a Notion issue.
If I replace response.body.delete('requireInterstitial') with just a console.log, the page renders requiring me to log in:

Also, the body on the /api/v3/getPublicPageData route ends up being:
betaEnabled: false
canJoinSpace: false
canRequestAccess: false
icon: "https://s3-us-west-2.amazonaws.com/public.notion-static.com/51444871-9329-42c5-82d8-a1457bdeab37/pfp1.png"
publicAccessRole: "comment_only"
requireLogin: true
spaceDomain: "darkswordsman"
spaceId: "7eec1f3f-d91a-438c-8103-551bfe46b71c"
spaceName: "Dark's Blog"

Though, what I'm failing to understand is that the response for the same URL via the worker is:
{
  "webSocket": null,
  "url": "https://www.notion.so/api/v3/getPublicSpaceData",
  "redirected": false,
  "ok": true,
  "headers": {},
  "statusText": "OK",
  "status": 200,
  "bodyUsed": false,
  "body": {
    "locked": false
  }
}

I have some understanding of JavaScript through webapp development, but I am failing to see how this script is working.
My only conclusion is that notion changed something on their end, so the request it incorrect in some way. I wish I can debug further, but I just simply don't know. We will have to wait for a dev I guess.

Alright, so update:
For the part where it makes a new request on /api, I added the following code:
const responseTwo = await fetch(url.toString(), {
        body: url.pathname.startsWith('/api/v3/getPublicPageData') ? JSON.stringify({
          requestedOnPublicDomain: true,
        }) : request.body,
        headers: {
          'content-type': 'application/json;charset=UTF-8',
          'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36'
        },
        method: 'POST',
      });

The only part there that is new is:
url.pathname.startsWith('/api/v3/getPublicPageData') ? JSON.stringify({
  requestedOnPublicDomain: true,
})

This causes it to work. I am not proposing this as a fix though, because I still have no idea how it works and this is clearly very different from how it was working before. It also probably is very wrong to do it this way.
My only possible guess after analyzing the requests is that cloudflare is not passing the request body and other information from the original request. So this is probably not a notion issue. Maybe, idk.
I think it has to do with the body: false I was seeing earlier.

I also think reason of issue is not:

Cloudflare
Notion

Observation:

old notion pages used as website are still online
new notion pages used as website made with newest Fruition code are blank page

Perhaps a new change at Notion side is now causing a problem with the newest Fruition code

Alright, so update:
For the part where it makes a new request on /api, I added the following code:
const responseTwo = await fetch(url.toString(), {
  body: url.pathname.startsWith('/api/v3/getPublicPageData') ? JSON.stringify({
    requestedOnPublicDomain: true,
  }) : request.body,
  headers: {
    'content-type': 'application/json;charset=UTF-8',
    'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36'
  },
  method: 'POST',
});

The only part there that is new is:
url.pathname.startsWith('/api/v3/getPublicPageData') ? JSON.stringify({
  requestedOnPublicDomain: true,
})

This causes it to work. I am not proposing this as a fix though, because I still have no idea how it works and this is clearly very different from how it was working before. It also probably is very wrong to do it this way.
My only possible guess after analyzing the requests is that cloudflare is not passing the request body and other information from the original request. So this is probably not a notion issue, but a cloudflare one.
I think it has to do with the body: false I was seeing earlier.
Hopefully the fruition devs can properly fix this or provide some other solution.
Edit: It also appears some sites, even fruition, are still running fine. So I'm not sure how this is possible, unless it's like @perogeremmer mentioned with the URL change.
Either way, very frustrating. Hopefully this is properly resolved.

That's what I said 🤣. It's quite frustrating because the old pages worked fine like my website. But it breaks for the new page like my another website It must be Notion dev changes some flow to redefine the URL for the new page version request.
But actually, something weird with the deeper page, if you're using linked pages for the old version page as I did, it would return the error message "Continue to external site by following the link below" like the new page version.
Fruitionsite is working properly since they're not using linked pages.

I'm not a developer so do shout at me if I'm totally off - when adding the new base URL that Notion provide, ie. the "xyz.notion.site" to const slug_to_page moves me from a 301 fail to a 200 response. I wonder if every "notion.so" URL and reference to it in the Fruition script needs updating to "xyz.notion.site" for consistency. Lmk what you guys think.

Does it also resolve the blank page issue? Because that test you're doing is only the base web app. I had the same 301 status before (and 200 if I did my own domain), but it didn't reflect the 500 of the API route mentioned.

if i did his test correctly, it doesn't work and i still get the api error in the console when i deploy/reload.

same issue to me

same issue

same issue

Same issue with me, yesterday the code worked fine with the new urls. I updated all my links to the new format with no problems, but today all my websites are just blank screens.

Is there an update on this issue?

Is there an update on this issue?

i think we need to wait

adding to the thread here. patiently waiting on a fix.

Ditto

Instead of replying just to get notifications there is a "subscribe" function on the right sidebar of this page. I suggest using that.

Instead of replying just to get notifications there is a "subscribe" function on the right sidebar of this page. I suggest using that.

I was going to mention this as well. Though, the reason I'm replying here now is just to provide an annoying but more stable alternative (in my opinion).
I just ripped out the worker for various reasons and replaced it with redirects and page rules.
The reasons I ripped it out were:

I hit 17k out of 100k requests on my worker after linking it on a single page with very little traffic.

Because this worker redirects all requests, I had 17k requests for 450 unique visitors. This is way too much in my opinion just for me to have a pretty URL. If I'm going to spend money on a cloudflare worker, it would probably be cheaper and easier to just get a Digital Ocean box to do Nginx proxying.

Since these are just URL redirects, they are protected by RFC specifications. This means that it is more stable and not subject to change on Notion's end or have a chance to break because of the script not being updated correctly.

You can see these here:

The only oddity is that only the www subdomain works at redirecting to my blog. The apex (@, or root) does not work, so I have to also specify a redirect/rule for @ to www. But, it works great otherwise.
Maybe one day Fruition can be more stable, or better yet: Notion could actually provide support for custom domains.

Refer to this comment.
Here is a solution, even it is not that perfect.
But it can absolutely solve these problems we are currently facing with.
All we need to do is make that system think we returned /api/v3/getPublicPageData, with any content, even this JSON content is not relative with Notion, however, we could not just make it return error 500 directly, 500 will let the page shown blank, as many users face with.
I modified the code here, and delete the code here, these changes made it work again. I tried it many times between different Notion pages and domains, and it also brought all of my FruitionSite projects back to life.
Here is what I have changed.
// Modified line 111
body: url.pathname.startsWith('/api/v3/getPublicPageData') ? null : request.body,

// Deleted line 121-123
if (url.pathname.startsWith('/api/v3/getPublicPageData')) {
  response.body.delete('requireInterstitial');
}

Complete code is here.
Hope this helps.

Great! that works indeed, Harry-Yep, thanks so much.
For some reason I still had the blank screen in the same chrome browser session (even with empty cache and hard reload) and saw the content only when testing the URL in safari or in a private chrome session. Just in case other people experience the same.

Great! that works indeed, Harry-Yep, thanks so much.
For some reason I still had the blank screen in the same chrome browser session (even with empty cache and hard reload) and saw the content only when testing the URL in safari or in a private chrome session. Just in case other people experience the same.

Make sure to clear your browser’s cache before visiting your website, I believe that these changes will be effective in all platforms.

@Harry-Yep Tried this but it didn't work for me. Tried with clearing cache also.

I can confirm that the fix works on my end. For those having cache issues, try using Development Mode and also purging the cache on Cloudflare.

@Harry-Yep I have implemented the changes you suggested in your https://github.com/stephenou/fruitionsite/issues/113#issuecomment-901524424 on the worker, and they worked fine. Website is visible again.
Many thanks,
Luca

@aashay96 Hi, see the update on original comment. Hope this helps.

⭐ UPDATED:
For those who still see the blank page after applying these(#117) changes, please make sure:

The browser cache has been cleared. (For Chrome User)
Cloudflare Dev Mode is turned on. (You can turn it off after it works for you.)
Use other browsers (or Browser Private Mode) or mobile phones to visit your website, these devices or browsers must never visit this website. (Once it works for any device or browser, it would also work for all platforms)

Refer to this comment.
Here is a SOLUTION, even it is not that perfect.
But it can absolutely solve these problems we are currently facing with.
All we need to do is make that system think we returned /api/v3/getPublicPageData with any content, even this JSON content is not relative to Notion, however, we could not just make it return error 500 directly, 500 will let the page shown blank, as many users face with.
I modified the code here, and delete the code here, these changes made it work again. I tried it many times between different Notion pages and domains, and it also brought all of my FruitionSite projects back to life.
Here is what I have changed.
// Modified line 111
body: url.pathname.startsWith('/api/v3/getPublicPageData') ? null : request.body,

// Deleted line 121-123
if (url.pathname.startsWith('/api/v3/getPublicPageData')) {
  response.body.delete('requireInterstitial');
}

Complete code is here.
See changes on this Pull Request(#117).
Hope this helps.

Thank you Harry-Yep, it works for me!

hey. thanks for that. works fine. but there are a few errors in the console. don't know how critical that is or if it needs to be corrected. i'm not a programmer.

and one thing. now the browser does not display the page description.

⭐ UPDATED:
For those who still see the blank page after applying these(#117) changes, please make sure:

The browser cache has been cleared. (For Chrome User)
Cloudflare Dev Mode is turned on. (You can turn it off after it works for you.)
Use other browsers (or Browser Private Mode) or mobile phones to visit your website, these devices or browsers must never visit this website. (Once it works for any device or browser, it would also work for all platforms)

Refer to this comment.
Here is a SOLUTION, even it is not that perfect.
But it can absolutely solve these problems we are currently facing with.
All we need to do is make that system think we returned /api/v3/getPublicPageData with any content, even this JSON content is not relative to Notion, however, we could not just make it return error 500 directly, 500 will let the page shown blank, as many users face with.
I modified the code here, and delete the code here, these changes made it work again. I tried it many times between different Notion pages and domains, and it also brought all of my FruitionSite projects back to life.
Here is what I have changed.
// Modified line 111
body: url.pathname.startsWith('/api/v3/getPublicPageData') ? null : request.body,

// Deleted line 121-123
if (url.pathname.startsWith('/api/v3/getPublicPageData')) {
  response.body.delete('requireInterstitial');
}

Complete code is here.
See changes on this Pull Request(#117).
Hope this helps.

Worked for me! Thankyou bro! I don't know the technicalities behind it but is this a permanent fix?

@leshapetrovskiy This is normal, and it does not interfere with your daily use. Because the code replaces all *.notion.so with your domain name, therefore, some deep subdomain will return an error.
@patrickbatememan If Notion makes any more changes to their code, or takes a different approach to validation. Then we need to change the code to accommodate the new variations. Unless Notion has a conscious objection to us doing such things. However, I don't think that will happen, because I believe Notion is friendly to all developers.

Works. Many thanks.

@Harry-Yep Thanks for the solution, my website worked. I have been struggling for many days. You have saved my time.

Please stop commenting about the solution working. It's better if you just REACT with the emoji!

Hi. I have followed all the instructions here and have the latest code updated on my work (after I completely deleted the old worker on CloudFlare) and all I get is a blank page. I tried clearing the cache, purging CF cache, turning on CF dev mode, I am completely out of ideas. Can somebody help me out here? What should I do? Thank you very, very much!

Still experiencing the Mismatch between origin and baseUrl (dev). issue and can reproduce even after following these steps:

Removing existing worker + route
Removing my site altogether
Adding the site back
Turning on Developer Mode
Creating a new worker
Pasting brand new script created from Fruition Site (see below)
Opening Firefox Private (a browser I haven't used before, i.e. no cache of my site)
Opening my site (sabol.io)

Brand new Fruition script from no. 6

```
  /* CONFIGURATION STARTS HERE */
/* Step 1: enter your domain name like fruitionsite.com */
const MY_DOMAIN = 'sabol.io';
/*

Step 2: enter your URL slug to page ID mapping
The key on the left is the slug (without the slash)
The value on the right is the Notion page ID
*/
const SLUG_TO_PAGE = {
'': 'd37469163f9a4a199caa10ba58ada034',
'resume': '3c6ed9b1437d4edf8c74aad69e23e15c',
};

/* Step 3: enter your page title and description for SEO purposes */
const PAGE_TITLE = '';
const PAGE_DESCRIPTION = '';
/* Step 4: enter a Google Font name, you can choose from https://fonts.google.com */
const GOOGLE_FONT = '';
/* Step 5: enter any custom scripts you'd like */
const CUSTOM_SCRIPT = ``;
/* CONFIGURATION ENDS HERE */
const PAGE_TO_SLUG = {};
const slugs = [];
const pages = [];
Object.keys(SLUG_TO_PAGE).forEach(slug => {
const page = SLUG_TO_PAGE[slug];
slugs.push(slug);
pages.push(page);
PAGE_TO_SLUG[page] = slug;
});
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request));
});
function generateSitemap() {
let sitemap = '';
slugs.forEach(
(slug) =>
(sitemap +=
'https://' + MY_DOMAIN + '/' + slug + '')
);
sitemap += '';
return sitemap;
}
const corsHeaders = {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, HEAD, POST, PUT, OPTIONS',
'Access-Control-Allow-Headers': 'Content-Type',
};
function handleOptions(request) {
if (request.headers.get('Origin') !== null &&
request.headers.get('Access-Control-Request-Method') !== null &&
request.headers.get('Access-Control-Request-Headers') !== null) {
// Handle CORS pre-flight request.
return new Response(null, {
headers: corsHeaders
});
} else {
// Handle standard OPTIONS request.
return new Response(null, {
headers: {
'Allow': 'GET, HEAD, POST, PUT, OPTIONS',
}
});
}
}
async function fetchAndApply(request) {
if (request.method === 'OPTIONS') {
return handleOptions(request);
}
let url = new URL(request.url);
url.hostname = 'www.notion.so';
if (url.pathname === '/robots.txt') {
return new Response('Sitemap: https://' + MY_DOMAIN + '/sitemap.xml');
}
if (url.pathname === '/sitemap.xml') {
let response = new Response(generateSitemap());
response.headers.set('content-type', 'application/xml');
return response;
}
let response;
if (url.pathname.startsWith('/app') && url.pathname.endsWith('js')) {
response = await fetch(url.toString());
let body = await response.text();
response = new Response(body.replace(/www.notion.so/g, MY_DOMAIN).replace(/notion.so/g, MY_DOMAIN), response);
response.headers.set('Content-Type', 'application/x-javascript');
return response;
} else if ((url.pathname.startsWith('/api'))) {
// Forward API
response = await fetch(url.toString(), {
body: url.pathname.startsWith('/api/v3/getPublicPageData') ? null : request.body,
headers: {
'content-type': 'application/json;charset=UTF-8',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36'
},
method: 'POST',
});
response = new Response(response.body, response);
response.headers.set('Access-Control-Allow-Origin', '*');
return response;
} else if (slugs.indexOf(url.pathname.slice(1)) > -1) {
const pageId = SLUG_TO_PAGE[url.pathname.slice(1)];
return Response.redirect('https://' + MY_DOMAIN + '/' + pageId, 301);
} else {
response = await fetch(url.toString(), {
body: request.body,
headers: request.headers,
method: request.method,
});
response = new Response(response.body, response);
response.headers.delete('Content-Security-Policy');
response.headers.delete('X-Content-Security-Policy');
}
return appendJavascript(response, SLUG_TO_PAGE);

}
class MetaRewriter {
element(element) {
if (PAGE_TITLE !== '') {
if (element.getAttribute('property') === 'og:title'
|| element.getAttribute('name') === 'twitter:title') {
element.setAttribute('content', PAGE_TITLE);
}
if (element.tagName === 'title') {
element.setInnerContent(PAGE_TITLE);
}
}
if (PAGE_DESCRIPTION !== '') {
if (element.getAttribute('name') === 'description'
|| element.getAttribute('property') === 'og:description'
|| element.getAttribute('name') === 'twitter:description') {
element.setAttribute('content', PAGE_DESCRIPTION);
}
}
if (element.getAttribute('property') === 'og:url'
|| element.getAttribute('name') === 'twitter:url') {
element.setAttribute('content', MY_DOMAIN);
}
if (element.getAttribute('name') === 'apple-itunes-app') {
element.remove();
}
}
}
class HeadRewriter {
element(element) {
if (GOOGLE_FONT !== '') {
element.append(<link href="https://fonts.googleapis.com/css?family=${GOOGLE_FONT.replace(' ', '+')}:Regular,Bold,Italic&display=swap" rel="stylesheet">         , {
html: true
});
}
element.append(, {
html: true
})
}
}
class BodyRewriter {
constructor(SLUG_TO_PAGE) {
this.SLUG_TO_PAGE = SLUG_TO_PAGE;
}
element(element) {
element.append(
Powered by Fruition
       ${CUSTOM_SCRIPT}, {
html: true
});
}
}
async function appendJavascript(res, SLUG_TO_PAGE) {
return new HTMLRewriter()
.on('title', new MetaRewriter())
.on('meta', new MetaRewriter())
.on('head', new HeadRewriter())
.on('body', new BodyRewriter(SLUG_TO_PAGE))
.transform(res);
}

For reference, also pasting my original code below:

Original script that worked fine up until a few months ago

const MY_DOMAIN = "sabol.io";
const SLUG_TO_PAGE = {
"": "d37469163f9a4a199caa10ba58ada034",
resume: "3c6ed9b1437d4edf8c74aad69e23e15c",
harvestn: "ab8b94bcb1584f13b14671c0f20ca0b9",
spreely: "12ca2ce330564b3bbb093ecdbfdf818e",
corenps: "d17e45422c77498bb34ea386d6218af0",
insights: "55dfd0038bed4e6698632b3db17039b0",
vendorconnections: "fcd5e42e80dc4cdd8f99b106c5ac996a",
mixpanel: "e06d1373a47e4800aadeae5f1e182b25",
sql: "10624377ce494cf7a01599213f2ddb68",
excel: "256b0e67cd5847008c90ce697bd3fc29",
notion: "7171b061881746668b54bd63776fd61e",
books: "c9bf950ed6ea472bbd2a715b2abcf48b",
};
const ERROR_PAGE = "";
const PAGE_TITLE = "Josh Sabol";
const PAGE_DESCRIPTION =
"Hi, I'm Josh, a Product Manager at AWS in Seattle. Connect with me on Twitter @joshsabol.";
const FAVICON_URL = "https://img.icons8.com/ios-filled/50/000000/circled-j.png";
const IOS_ICON_URL = "https://i.imgur.com/aZPdaEs.png";
const OG_URL = "https://sabol.io";
const OG_TYPE = "website";
const OG_IMAGE_URL = "https://i.imgur.com/9Mn5eXW.png";
const META_TWITTER_CARD = "summary";
const META_TWITTER_SITE = "@joshsabol";
const META_TWITTER_TITLE = PAGE_TITLE;
const META_TWITTER_DESC = PAGE_DESCRIPTION;
const META_TWITTER_IMAGE = "https://i.imgur.com/aZPdaEs.png";
const META_TWITTER_URL = "https://sabol.io";
const GOOGLE_FONT = "Poppins";
const CUSTOM_SCRIPT = ;
const CUSTOM_CSS = div.notion-topbar>div>div:nth-child(1n).toggle-mode{display:none!important}div.notion-topbar-mobile>div:nth-child(1n).toggle-mode{display:none!important}div.notion-topbar-mobile>div:nth-child(5){display:none!important}.notion-frame{background-image:linear-gradient(180deg,#fdfbfb 0,#ebedee 100%)!important}@keyframes gradient{0%{background-position:0 50%!important}50%{background-position:100% 50%}100%{background-position:0 50%}}.notion-page-content{padding-bottom:2.5rem!important;padding-top:2.5rem!important;background:#fff;border-radius:1rem;margin:-2.75rem 0 10vh 0}.notion-page-block{position:relative}.notion-scroller>[style="width: 100%; font-size: 14px;"]{margin-bottom:1.5rem}.notion-image-block{pointer-events:none!important}.notion-image-block img{pointer-events:none!important}.notion-callout-block>div>div{border-radius:.5rem!important}.notion-peek-renderer{background:#142025!important;transition:.3s}.notion-peek-renderer>div:nth-child(2){border-radius:.5rem!important;overflow:hidden}.notion-gallery-view>div>div>a{border-radius:.5rem!important}.notion-gallery-view>div>div>a:hover{opacity:.75}.notion-scroller>div:nth-child(2)>div{opacity:0!important;pointer-events:none!important}[data-block-id=c7ef4bd9-4069-480b-a481-3533903733e8]>div>div:nth-child(even),[data-block-id=f34cdbc9-8cd0-42aa-8189-3aa368fd0f37]>div>div:nth-child(even){display:none!important}@media only screen and (min-width:50em){[data-block-id=c7ef4bd9-4069-480b-a481-3533903733e8]>div>div:nth-child(even),[data-block-id=f34cdbc9-8cd0-42aa-8189-3aa368fd0f37]>div>div:nth-child(even){display:block!important}}[data-block-id=c7ef4bd9-4069-480b-a481-3533903733e8]>div>div:nth-child(odd),[data-block-id=f34cdbc9-8cd0-42aa-8189-3aa368fd0f37]>div>div:nth-child(odd){display:inline-block!important;max-width:50%!important}@media only screen and (min-width:50em){[data-block-id=c7ef4bd9-4069-480b-a481-3533903733e8]>div>div:nth-child(odd),[data-block-id=f34cdbc9-8cd0-42aa-8189-3aa368fd0f37]>div>div:nth-child(odd){display:block!important}}[data-block-id="971194ae-0c81-4fc6-a386-382167111c79"]{display:none}@media only screen and (min-width:50em){[data-block-id="971194ae-0c81-4fc6-a386-382167111c79"]{display:block;text-align:right;margin-top:-5.825rem!important;font-size:4rem}}[data-block-id=fcce5ac2-0901-4e52-a247-4684ece3df01]{font-size:.875rem;text-align:center}[data-block-id=fcce5ac2-0901-4e52-a247-4684ece3df01] .notion-record-icon{display:none!important}[data-block-id="6aa56b96-f6bf-4590-82c4-adca0c85b920"]{text-align:center}[data-block-id="6f58376d-b7c3-47a6-8720-d537db62ebf0"]{text-align:center;margin-bottom:-3.5rem!important}[data-block-id="6d7f9450-7f4e-4b6e-a9b8-45bccd9bfdd5"]{text-align:center;font-size:.875rem}[data-block-id="70792c31-f2b7-40b2-94ba-5a3a6c517273"]>div:first-child,[data-block-id=b15a7f0e-0538-4bc7-aaeb-b9494458f5bb]>div:first-child,[data-block-id=ef16e429-9a91-4e22-8391-032d4fe51cd3]>div:first-child{min-height:0!important}[data-block-id="70792c31-f2b7-40b2-94ba-5a3a6c517273"]>div:first-child>div,[data-block-id=b15a7f0e-0538-4bc7-aaeb-b9494458f5bb]>div:first-child>div,[data-block-id=ef16e429-9a91-4e22-8391-032d4fe51cd3]>div:first-child>div{display:none!important}[data-block-id="70792c31-f2b7-40b2-94ba-5a3a6c517273"].notion-selectable.notion-collection_view-block,[data-block-id=b15a7f0e-0538-4bc7-aaeb-b9494458f5bb].notion-selectable.notion-collection_view-block,[data-block-id=ef16e429-9a91-4e22-8391-032d4fe51cd3].notion-selectable.notion-collection_view-block{border:none!important}[data-block-id="70792c31-f2b7-40b2-94ba-5a3a6c517273"].notion-selectable.notion-collection_view-block,[data-block-id=b15a7f0e-0538-4bc7-aaeb-b9494458f5bb].notion-selectable.notion-collection_view-block{padding-top:0!important}[data-block-id="70792c31-f2b7-40b2-94ba-5a3a6c517273"] .notion-list-view,[data-block-id=b15a7f0e-0538-4bc7-aaeb-b9494458f5bb] .notion-list-view{padding-bottom:0!important}[data-block-id="255f5a05-d774-467f-a73f-7079bcc0eeee"]{display:none!important}@media only screen and (min-width:50em){[data-block-id="255f5a05-d774-467f-a73f-7079bcc0eeee"]{display:block!important}}[data-block-id="75a3b99e-f428-430d-a87b-3d5242fe5cce"]{text-align:right;padding-top:1rem}[data-block-id="51ee9852-027b-450e-aa4e-f6f0a1861ec2"]>div:first-child,[data-block-id=ec104b15-ff6e-4400-a848-a88f6139e1ff]>div:first-child,[data-block-id=f70889a1-feaa-4a1d-b00c-d4ee6e29689d]>div:first-child{min-height:0!important}[data-block-id="51ee9852-027b-450e-aa4e-f6f0a1861ec2"]>div:first-child>div,[data-block-id=ec104b15-ff6e-4400-a848-a88f6139e1ff]>div:first-child>div,[data-block-id=f70889a1-feaa-4a1d-b00c-d4ee6e29689d]>div:first-child>div{display:none!important}[data-block-id="183d187c-7b2c-4ce4-9d56-13d715eb2e9b"],[data-block-id="566014b3-8ba6-448f-b305-717f947ca58a"],[data-block-id="99a71a4b-08f7-4c99-945a-ddfbc9df0a1b"],[data-block-id=a1dd0805-87b2-444e-8a6b-90ce0086a1c3],[data-block-id=afad12b7-f88f-419c-9a7f-7e621018b287],[data-block-id=e8e72e41-d5b4-4987-a016-44f8f489b53f],[data-block-id=ff122c47-f4fe-4b7f-b827-703883217388]{display:none!important}[data-block-id="00b8412b-49d8-4a22-a739-a4f666fbd082"]~div img{border-radius:.5rem!important}[data-block-id=e0fa74a3-dfc2-4b66-bcd9-30abfced1863]~div img{border-radius:.5rem!important}[data-block-id="039a5f84-338a-4b2d-bed7-cd2112784fe2"],[data-block-id="43e70b54-3b70-4735-814e-776b5f5dc4fb"],[data-block-id="8371d4f9-4924-4e07-a422-2b871e2d504b"],[data-block-id=a9066f17-df96-43ab-a81a-ccba76c34176],[data-block-id=e11ff443-eddf-42cc-a197-6580c47d1bc5],[data-block-id=f23de68b-e100-4ff2-a4e0-1a3b19eb98d9]{display:none}@media only screen and (min-width:50em){[data-block-id="54db5892-e2da-460e-8dc9-caa48615b902"],[data-block-id="5fc61763-35d2-4ae7-ab98-086e63758bfb"],[data-block-id="69a89fae-e10d-4f22-806c-e37ab3397f7e"],[data-block-id="71a0c46d-f859-4f2c-80e2-b1e6972f5f0e"],[data-block-id=b506d1bf-8ad7-4bb8-81d2-87e43bf21756],[data-block-id=c0b083f9-d63d-4f45-bee7-8b08d5e7e0f6]{display:none}[data-block-id="039a5f84-338a-4b2d-bed7-cd2112784fe2"],[data-block-id="43e70b54-3b70-4735-814e-776b5f5dc4fb"],[data-block-id="8371d4f9-4924-4e07-a422-2b871e2d504b"],[data-block-id=a9066f17-df96-43ab-a81a-ccba76c34176],[data-block-id=e11ff443-eddf-42cc-a197-6580c47d1bc5],[data-block-id=f23de68b-e100-4ff2-a4e0-1a3b19eb98d9]{display:block}}[data-block-id="8a0b343f-5acc-4095-9fce-266148517eda"]{display:none!important};
const PAGE_TO_SLUG = {};
const slugs = [];
const pages = [];
Object.keys(SLUG_TO_PAGE).forEach((slug) => {
const page = SLUG_TO_PAGE[slug];
slugs.push(slug);
pages.push(page);
PAGE_TO_SLUG[page] = slug;
});
addEventListener("fetch", (event) => {
event.respondWith(fetchAndApply(event.request));
});
function generateSitemap() {
let sitemap = '';
slugs.forEach(
(slug) =>
(sitemap +=
"https://" + MY_DOMAIN + "/" + slug + "")
);
sitemap += "";
return sitemap;
}
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, HEAD, POST, PUT, OPTIONS",
"Access-Control-Allow-Headers": "Content-Type",
};
function handleOptions(request) {
if (
request.headers.get("Origin") !== null &&
request.headers.get("Access-Control-Request-Method") !== null &&
request.headers.get("Access-Control-Request-Headers") !== null
) {
// Handle CORS pre-flight request.
return new Response(null, {
headers: corsHeaders,
});
} else {
// Handle standard OPTIONS request.
return new Response(null, {
headers: {
Allow: "GET, HEAD, POST, PUT, OPTIONS",
},
});
}
}
async function fetchAndApply(request) {
if (request.method === "OPTIONS") {
return handleOptions(request);
}
let url = new URL(request.url);
url.hostname = "www.notion.so";
if (url.pathname === "/robots.txt") {
return new Response("Sitemap: https://" + MY_DOMAIN + "/sitemap.xml");
}
if (url.pathname === "/sitemap.xml") {
let response = new Response(generateSitemap());
response.headers.set("content-type", "application/xml");
return response;
}
let fullPathname = request.url.replace("https://" + MY_DOMAIN, "");
let response;
if (url.pathname.startsWith("/app") && url.pathname.endsWith("js")) {
response = await fetch(url.toString());
let body = await response.text();
response = new Response(
body
.replace(/www.notion.so/g, MY_DOMAIN)
.replace(/notion.so/g, MY_DOMAIN),
response
);
response.headers.set("Content-Type", "application/x-javascript");
return response;
} else if (url.pathname.startsWith("/api")) {
// Forward API
response = await fetch(url.toString(), {
body: url.pathname.startsWith("/api/v3/getPublicPageData")
? null
: request.body,
headers: {
"content-type": "application/json;charset=UTF-8",
"user-agent":
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36",
},
method: "POST",
});
response = new Response(response.body, response);
response.headers.set("Access-Control-Allow-Origin", "*");
return response;
} else if (slugs.indexOf(url.pathname.slice(1)) > -1) {
const pageId = SLUG_TO_PAGE[url.pathname.slice(1)];
return Response.redirect("https://" + MY_DOMAIN + "/" + pageId, 301);
} else {
response = await fetch(url.toString(), {
body: request.body,
headers: request.headers,
method: request.method,
});
response = new Response(response.body, response);
response.headers.delete("Content-Security-Policy");
response.headers.delete("X-Content-Security-Policy");
}
return appendJavascript(response, SLUG_TO_PAGE);
}
class MetaRewriter {
element(element) {
if (PAGE_TITLE !== "") {
if (
element.getAttribute("property") === "og:title" ||
element.getAttribute("property") === "og:site_name" ||
element.getAttribute("name") === "twitter:title"
) {
element.setAttribute("content", PAGE_TITLE);
}
if (element.tagName === "title") {
element.setInnerContent(PAGE_TITLE);
}
}
if (PAGE_DESCRIPTION !== "") {
if (
element.getAttribute("name") === "description" ||
element.getAttribute("property") === "og:description" ||
element.getAttribute("name") === "twitter:description"
) {
element.setAttribute("content", PAGE_DESCRIPTION);
}
}
if (element.getAttribute("property") === "og:url") {
element.setAttribute("content", OG_URL);
}
if (element.getAttribute("name") === "apple-itunes-app") {
element.remove();
}
if (element.getAttribute("property") === "og:type") {
element.setAttribute("content", OG_TYPE);
}
if (element.getAttribute("property") === "og:image") {
element.setAttribute("content", OG_IMAGE_URL);
}
if (
element.tagName === "link" &&
element.getAttribute("rel") === "shortcut icon"
) {
element.setAttribute("href", FAVICON_URL);
}
if (
element.tagName === "link" &&
element.getAttribute("rel") === "apple-touch-icon"
) {
element.setAttribute("href", IOS_ICON_URL);
}
if (element.getAttribute("name") === "twitter:card") {
element.setAttribute("content", META_TWITTER_CARD);
}
if (element.getAttribute("name") === "twitter:site") {
element.setAttribute("content", META_TWITTER_SITE);
}
if (element.getAttribute("name") === "twitter:image") {
element.setAttribute("content", META_TWITTER_IMAGE);
}
if (element.getAttribute("name") === "twitter:url") {
element.setAttribute("content", META_TWITTER_URL);
}
}
}
class HeadRewriter {
element(element) {
if (GOOGLE_FONT !== "") {
element.append(
<link href="https://fonts.googleapis.com/css?family=${GOOGLE_FONT.replace(           " ",           "+"         )}:Regular,Bold,Italic&display=swap" rel="stylesheet">       ,
{
html: true,
}
);
}
element.append(
,
{
html: true,
}
);
}
}
class BodyRewriter {
constructor(SLUG_TO_PAGE) {
this.SLUG_TO_PAGE = SLUG_TO_PAGE;
}
element(element) {
element.append(
Powered by Fruition
     ${CUSTOM_SCRIPT},
{
html: true,
}
);
}
}
async function appendJavascript(res, SLUG_TO_PAGE) {
return new HTMLRewriter()
.on("title", new MetaRewriter())
.on("meta", new MetaRewriter())
.on("link", new MetaRewriter())
.on("head", new HeadRewriter())
.on("body", new BodyRewriter(SLUG_TO_PAGE))
.transform(res);
}

Thank you in advance for your help!

Still experiencing the Mismatch between origin and baseUrl (dev). issue and can reproduce even after following these steps:

Removing existing worker + route
Removing my site altogether
Adding the site back
Turning on Developer Mode
Creating a new worker
Pasting brand new script created from Fruition Site (see below)
Opening Firefox Private (a browser I haven't used before, i.e. no cache of my site)
Opening my site (sabol.io)

Brand new Fruition script from no. 6

Okay if you already observed, did you add anything else? Or are you using the same original script from the fruitionsite.com site?


Opencv cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file) in function 'cv::icvExtractPattern'

Missing opencv_videoio_ffmpeg460_64.dll after compile.
Web camera has this problem. Local camera is ok.
Opencv needs this dll to decide file type when filename extension missing I guess.
nuitka --version
1.2.2
Commercial: None
Python: 3.10.2 (tags/v3.10.2:a58ebcc, Jan 17 2022, 14:12:15) [MSC v.1929 64 bit (AMD64)]
Flavor: Unknown
Executable: F:\python\venv\editor\Scripts\python.exe
OS: Windows
Arch: x86_64
WindowsRelease: 10

pip list | findstr cv
opencv-contrib-python <IP_ADDRESS>

opencvwebcam.py
import cv2

cap = cv2.VideoCapture('http://aaa:aaa@<IP_ADDRESS>:8081/video')
ret, frame = cap.read()
if ret:
    print('success')
else:
    print('error')

python opencvwebcam.py
success

compile
nuitka --show-progress --standalone --follow-imports --enable-plugin=numpy --mingw64  opencvwebcam.py

run
opencvwebcam.exe

opencvwebcam.exe
<EMAIL_ADDRESS>global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap.cpp (166) cv::VideoCapture::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): http://aaa:aaa@<IP_ADDRESS>:8081/video in function 'cv::icvExtractPattern'

Hardware dependent reproducers are kind of a problem for me. Is there some public URL that I could use to reproduce this?

Hardware dependent reproducers are kind of a problem for me. Is there some public URL that I could use to reproduce this?

This is not a hardware dependent problem. Use cv2.VideoCapture open media file need opencv_videoio_ffmpeg460_64.dll
opencvwebcam.py
import sys
import cv2

cap = cv2.VideoCapture(sys.argv[1])
ret, frame = cap.read()
if ret:
    print('success')
else:
    print('error')

opencvwebcam.exe

Hardware dependent reproducers are kind of a problem for me. Is there some public URL that I could use to reproduce this?

This is not a hardware dependent problem. Use cv2.VideoCapture open media file need opencv_videoio_ffmpeg460_64.dll
opencvwebcam.py
import sys
import cv2

cap = cv2.VideoCapture(sys.argv[1])
ret, frame = cap.read()
if ret:
    print('success')
else:
    print('error')

opencvwebcam.exe your_media_file_path

Ah, it seems you were saying the local camera was working, but a webcam was not?

Web camera has this problem. Local camera is ok.

But since you identified the missing DLL, I don't think there is a problem to just include it.

Thanks for your report, this is fixed on the factory branch, which is a development version under rapid development. You can try it out by going here: https://nuitka.net/doc/factory.html
Feedback if this is working is very welcome, just please do not share plans of doing it, but rather confirmations or denials of it working.

This is part of the hotfix release 1.2.3 that I just made.


Implement paragraph "Player ratings"

All subparagraphs have to been implement.

Closing, because this paragraph marked as "Deprecated"


[SPARK-34404][SQL] Add new Avro datasource options to control datetime rebasing in read

What changes were proposed in this pull request?
In the PR, I propose new option datetimeRebaseMode for the Avro datasource. The option influences on loading ancient dates and timestamps column values from avro files.
The option supports the same values as the SQL config spark.sql.legacy.avro.datetimeRebaseModeInRead namely;

"LEGACY", when an option is set to this value, Spark rebases dates/timestamps from the legacy hybrid calendar (Julian + Gregorian) to the Proleptic Gregorian calendar.
"CORRECTED", dates/timestamps are read AS IS from avro files.
"EXCEPTION", when it is set as an option value, Spark will fail the reading if it sees ancient dates/timestamps that are ambiguous between the two calendars.

Why are the changes needed?

New options will allow to load avro files from at least two sources in different rebasing modes in the same query. For instance:

val df1 = spark.read.option("datetimeRebaseMode", "legacy").format("avro").load(folder1)
val df2 = spark.read.option("datetimeRebaseMode", "corrected").format("avro").load(folder2)
df1.join(df2, ...)

Before the changes, it is impossible because the SQL config spark.sql.legacy.avro.datetimeRebaseModeInRead influences on both reads.

Mixing of Dataset/DataFrame and RDD APIs should become possible. Since SQL configs are not propagated through RDDs, the following code fails on ancient timestamps:

spark.conf.set("spark.sql.legacy.avro.datetimeRebaseModeInRead", "legacy")
spark.read.format("avro").load(folder).distinct.rdd.collect()

Does this PR introduce any user-facing change?
No.
How was this patch tested?
By running the modified test suites:
$ build/sbt "test:testOnly *AvroV1Suite"
$ build/sbt "test:testOnly *AvroV2Suite"

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/135045/

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39628/

Test build #135047 has started for PR 31529 at commit 1e3e524.

Test build #135047 has finished for PR 31529 at commit 1e3e524.

This patch fails PySpark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39628/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39628/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/135047/

jenkins, retest this, please

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39630/

Test build #135051 has started for PR 31529 at commit 1e3e524.

Test build #135051 has finished for PR 31529 at commit 1e3e524.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39634/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/135051/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39634/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39634/

Test build #135080 has started for PR 31529 at commit c930fd9.

Test build #135080 has finished for PR 31529 at commit c930fd9.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39662/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/135080/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39662/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39662/

@cloud-fan @gengliangwang @HyukjinKwon This PR is a companion to https://github.com/apache/spark/pull/31489, and should solve the same issues. Any concerns about it?

thanks, merging to master!


Change the website in the app menu to point to the .org

Operating system: Mac osx
Messenger for Desktop version: 2.0.4-beta

Title says it all. In Help->Website it should point point to the .org
The email should also be changed (I can create a rule on clourdflare for it, @aluxian PM with the email you would want the messages to be redirected to)

Can we have something like a community-email? Users send email -> emails go to github -> new issue. Then replies to that issue get sent back to the user by email.
Or something better than email... GitHub is good but people need an account for it.

Nice idea, I will check it out

Who owns the messengerfordesktop dot com domain?  The Windows and Mac links here go to some spammy sites that my ESET antivirus blocks.  Just wanted you to know, not sure if that's why you are trying to switch the links in the app to the .org
See here: http://screencasts.techsure.ca/2017-03-17_07h18_54.png
If you've lost control of the messengerfordesktop dot com domain I'm sorry to hear that!
The messengerfordesktop.org domain downloads seem to work correctly and are linked to github.
BTW --- THANKS!! To those who have been working on the most recent updates it's nice to see issues being resolved. Appreciate it.

I own the .org
Not sure who owns the .com, but yea basically trash installers
Its already been discussed a lot, you can check closed issues.

Other places pointing to .com
-About page of app
-Deb file
Should modify and create a release as soon as possible.


prioritize our bugs with (LOW, MID ,HIGH) insted of (LOW,HIGH)

think of adding another level of prioritization to get less HIGH bugs to fix in the beginning

this part was done internaly


MERGE SORT using cpp/C++

MERGE SORT using cpp/C++
hey, kindly assign this issue to me!
@trishan9

MERGE SORT using cpp/C++
hey, kindly assign this issue to me!
@trishan9

Ok I assign this issue to you!

Issue has been assigned to you! @shivigoyal4321

Happy contribution!

MERGE SORT using cpp/C++
hey, kindly assign this issue to me!
@trishan9

MERGE SORT using cpp/C++ hey, kindly assign this issue to me! @trishan9

Ok I assign this issue to you!

Happy contribution!

I would like to add another language in your hello world collection by using kotlin language
kindly assign me this issue

MERGE SORT using cpp/C++
hey, kindly assign this issue to me!
@trishan9

MERGE SORT using cpp/C++ hey, kindly assign this issue to me! @trishan9

Sure, I assign this issue to you!

Issue has been assigned to you under Hacktoberfest! @sandeepM-codes

Happy contribution!

this is my first open source contribution
thankyou @trishan9 sir
for assinging this project

hey @trishan9 please assign me this project

Please assign this issue to me under Hacktoberfest2024


Fix a typo in the gRPC service name

Collecton -> Collection

We can also add Internal to the service name if this is only used by other pods running in the control plane.


Update index.md

missing space and comma causing types to connect

Hi @rcseacord, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, DNFBOT;

Looks good. Thanks for your contribution @rcseacord!


Increment library version to 0.8.7

Pull Request Test Coverage Report for Build 1641

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 53.097%

Totals

Change from base Build 1639:
0.0%

Covered Lines:
3112

Relevant Lines:
5861

💛  - Coveralls


Add the ability to ignore registry-lookup failures

I am constantly forced online because Cargo wants to update the registry. I do not like this and consider it a major problem that our build tool does not work without being connected to the Internet.
To give you a concrete example of a thing that happens. Earlier this week I built my project, cargo-crusader. Then I updated my toolchain, as I do nearly every day. Today I continued working on cargo-crusader while enjoying a morning in the refreshing air of a park. My peace was almost immediately disturbed when I discovered that I could no longer build cargo-crusader with the same crate resolution that worked just a few days ago because Cargo wanted to update the registry.

Do you know why Cargo decided to update the registry? Some possible cases could be that the lock file was missing or the lock file was present and a package was missing from the index. In both these cases it's kinda necessary to update the lockfile.
Overall I agree that Cargo should be resilient to update failures, but I'd prefer to have something reproducible locally where it's 100% sure that Cargo doesn't need to update the registry, it's just optimistically doing so.

Why is it impossible to update the lockfile if Cargo can't talk to the registry?

It's certainly not impossible, there are situations where you can avoid talking to the registry, but many stars have to align:

We have to discover that the index has already been checked out and is relatively recent
Using the information in the index we determine that the dependency graph can be satisfied
All dependencies which were satisfied were then already downloaded

All the error messages along the way, especially in resolution, would also need to indicate that allowing Cargo to talk to the registry might help make the errors go away.

Having reasonable warning messages is certainly reasonable. However, it is really important that it is possible to do "as much as possible" while not being able to talk to the registry. This definitely includes a project not ending up in a state where it can't build without connecting back to the registry, which definitely happens right now. Ideally, Cargo would even be able to run cargo update, limited to the dependency set it has cached locally when offline.

Do you have an example of a state where cargo can't build without connecting back to the registry? The one I can think of is there's a lock file indicating that a version of a dependency is required but it isn't available locally, but I can't think of many others off the top of my head.

Adding a dependency that you already have locally forces a registry update for sure. I seem to remember that offline cargo updates would get you stuck with a required registry update, but that doesn't seem to be the case in the version that ships with 1.2.0.

A --offline flag could be a decent way to deal with this by making people opt-in to a possibly old view of the world.

We discussed this on IRC a bit yesterday.
Some conclusions were:

@wycats points out that just because one app has populated the cache of crates doesn't always mean that the same cache is useful for another.
@sfackler points out that if you're working with a tree of path dependencies then the "cache population" done by the top is indeed what's needed for working on the sub-dependencies

I think @sfackler's idea of an --offline flag would work well here. By default Cargo would talk to the network as necessary and then using --offline would indicate that it should use the local cache only, possibly tailoring the error messages appropriately to try not passing the flag if it fails.

(I hope I've found the most related issue to comment.)
@alexcrichton I'd like to have an --offline flag to completely work offline, using local cache when possible, failing when there aren't satisfying cache.
I've been offline for some days. I tried to write a simple program in those days, but Cargo always want to update its registry and thus failed.
But I did have all my dependencies cached. I had to manually find and extract source files from cached crates, then manually call rustc with appropriate options, then build my little program. It was tedious.
I want to write Rust programs just as I do with Python or C: when I have all necessary dependencies locally available, I can work with them; it only fails when I lack some of them.

@lilydjwg this issue would indeed suffice for that use case!

Why does this need to go online?
$ cargo clean -p rayon
 Downloading clippy v0.0.64
error: unable to get packages from source

A regular cargo clean doesn't require net access - what's going on?

Probably also of interest is #2895 and @aidanhs' comment in particular.

Another example use case for this stuff that I run into frequently: I like playing with Hello World examples when I'm trying out a new library, and I have a little shell function for creating them quickly. I frequently get myself in a state where one of my hello-world projects is building fine, but a new one with the same dependencies won't build without network access, probably because it's trying to create a lock file first. (Copying the lock file from the old project doesn't always seem to help, maybe because there's other metadata in there that I'd need to tweak and I just don't know enough to do it right.)
I don't think solving my case wouldn't necessarily require adding flags. Maybe there could be a separate command (separate program entirely?) that knows how to inspect all my caches and then put my project in a state where it's guaranteed to build from those caches. I assume that Cargo's directory layout isn't stable, though, so it might make sense to have a tool like this inside the project? A tool like this might also be useful for people who want to set up their own vendoring, if they have a directory full of libraries and they want to rewrite their Cargo.toml to use all of them by path, though the inputs in that case are pretty different.

All the error messages along the way, especially in resolution, would also need to indicate that allowing Cargo to talk to the registry might help make the errors go away.

Why do we need a special error message here? I think using cached deps from other apps can be viewed as an optimization. What about the following algo for adding a dependency:

Try to update the registry. If this fails:
Stuff the error somewhere.
Try to resolve dependencies using cached registry and already downloaded packages.
If succeeded, write the lockfile. It might not be as fresh as theoretically possible, but it will be consistent (like if you have traveled back in time to the previous registry update).
If fail, just show the error message from step 2.

At minimum I'd expect a warning if cargo has fallen back to trying to resolve using offline packages (though my personal preference is still to have a flag you need to use to opt in, per my comment on the other issue).

@matklad yeah that's one possible route to take here, but it's subtly different enough that we need to be sure to tread lightly. That strategy would change Cargo's behavior around resolution, which runs the risk of causing lots of confusion down the line if you're not always getting the latest version of dependencies.
(just something to keep in mind)

I ran into this last night when I found that the internet wasn't working at my home. No problem, I figured, since I happened to already have the packages I needed in my local cache. In fact, cargo insisted on updating the registry, even when my Cargo.toml pinned the dependencies to versions I had available locally. I was starting a new project, so I assume cargo wouldn't have complained if a Cargo.lock file were present. Echoing the sentiments of others: cargo should just make the Cargo.lock file based on my current known registry.

I would love ability to generate the Cargo.lock offline. I need to be able to add new dependencies to the project while working offline — I do have all the crates on my disk locally, especially when I split one of my crates in two.
When I add a new dependency with path = "../foo" to my Cargo.toml it's annoying that cargo insists on connecting to the Internet, even to add a private dependency that doesn't exist on crates.io.

@pornel

When I add a new dependency with path = "../foo" to my Cargo.toml it's annoying that cargo insists on connecting to the Internet, even to add a private dependency that doesn't exist on crates.io.

FWIW this was a historical bug in Cargo which I believe was fixed recently. Does nightly Cargo exhibit this behavior for you?

@alexcrichton Yes! I've tried again with the latest nightly and I was able to add a dependency offline. Great!


Added code of conduct to project

Pull Request Template
What have you Changed(must)
Write here what you have changed in the codebase
Issue no.(must) -
Pr will be close and marked as spam. If issue number not found or issue was assigned to someone else.
Marking as spam can block your account from HacktoberFest.
Self Check(Tick After Making pull Request)

[ ] This issue was assigned to me if not it will be marked as spam.
[ ] My file is in the proper folder
[x] I am following clean code and Documentation.
[ ] I have added the title and what program will do first in the file
[ ] I have named the file as (Problem #). (Problem Title(in Camel Case)).(extension)
ex. 2. AddToNumbers.py

README - How to Contribute

@jivthesh this is a good addition just make an issue then we'll merge the PR associated with it. We'll be closing this for now.


Add locale support

Allow DatePicker to receive locale as props.
The locale is used in the getDateStr method, so that the date text is displayed according to the locale.
Example of usage:
<DatePicker
    date="2016-06-01"
    format="ddd, DDDD MMM YYYY"
    locale="pt-br" />

Related issues:

#71
#91

Coverage remained the same at 96.774% when pulling b31a877bb6787bcc929e4cafcac6c3353a149b8a on danielbucher:allow-locale into 1b2aef97a6ffa71c01f4448ff5711a0f94d9ee7a on xgfe:master.

This actually does not work. Can't find a way to dinamycally require the locale file.

Or maybe user can custom define locale type with moment.defineLocale() method。

@danielbucher I had the same issue.
I was able to solve by doing:
require("moment/locale/it");

So how exactly should we proceed to use locale?

@danielbucher can you elaborate a little how you didt it? Because Im having a hard time changing the locale to norwegian

@andrzey we did something like this:
# setup.js
require('moment/locale/pt-br');
moment.locale('pt-br');

We set the locale globally in our app setup. That worked for us.

Please add this property to the README.md. :)

Please tell more about how you implement locales


JSX: Whitespace missing in emit for <something/> foo

Consider the following:

word code word

it emits :
React.createElement("div", null, "word ", React.createElement("code", null, "code"), "word");

Should emit:
React.createElement("div", null, "word ", React.createElement("code", null, "code"), " word");

@RyanCavanaugh I'll have a PR for your review soon :rose:

Opps I had this window open since yesterday ... didn't see your commit :)


Update event emitter methods

Remove off which does not exist on EventEmitter or process. (This was my bad, as I added this in a PR a few years ago coming from my jQuery background hehe 😏)
Add two new methods that are on EventEmitter.

removing off could theoretically break stuff, otherwise 👍

are there plans to also add a listeners function<EMAIL_ADDRESS>was just released and expects it to be defined in node-like environments.

@dadleyy good call

@feross do you mind updating this if you're able, I can't add to this pull

Ah, sorry I already deleted my fork.
What is the best way to add listeners? Should it always return an empty array? Or should we just make process actually inherit from EventEmitter?

That's OK I'll just create a new one, empty array sounds right as
inheriting is probably a bad idea as it would blow up a lot of code that
used process
On Tue, Apr 25, 2017, 5:44 PM Feross Aboukhadijeh<EMAIL_ADDRESS>wrote:

Ah, sorry I already deleted my fork.
What is the best way to add listeners? Should it always return an empty
array? Or should we just make process actually inherit from EventEmitter?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/defunctzombie/node-process/pull/77#issuecomment-297174415,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABE4n0ZUNweWCAD0zW0sRNluGYt_98mRks5rzmlRgaJpZM4NFPwD
.

Sounds good. Closing this PR then.

done published etc


How do i publishing it to trusted testers?

Response code 400 (Bad Request)
{
    "error": {
        "errors": [
            {
                "domain": "global",
                "reason": "badRequest",
                "message": "Publish condition not met: This item is current published to trusted testers. To publish it to everyone, you must unpublish it first. To keep publishing it to trusted testers, set publish_to_trusted_testers to true in the request."
            }
        ],
        "code": 400,
        "message": "Publish condition not met: This item is current published to trusted testers. To publish it to everyone, you must unpublish it first. To keep publishing it to trusted testers, set publish_to_trusted_testers to true in the request."
    }
}

It's coming in #18
You can try checking out that branch until it's merged.

I don't know if this is working properly. Let's say the extension is published to trusted testers. When I do:
webstore upload --extension-id $extid --client-id $clientid --client-secret $clientsecret --refresh-token $refreshtoken --auto-publish --trusted-testers
The current folder is uploaded and published to everyone instead of staying as trusted testers only?

It's been published as 1.2.0


InAppPurchasePlugin.m中出现的crash

请问InAppPurchasePlugin.m的第148行代码是否会导致block循环引用：
这样写是否会有问题？
[self.productsCache setObject:product forKey:product.productIdentifier];

@jiuwenyixi
Can you provide flutter doctor -v and a complete minimal reproducible code sample` that shows the crash ?

I would like to ask if there is any problem in the SDK you provided?
https://github.com/flutter/plugins/blob/master/packages/in_app_purchase/ios/Classes/InAppPurchasePlugin.m
Is there any syntax error in line 148? and will the use of "self" result in a circular reference to the block?

@jiuwenyixi
Your question is better suited for stackoverflow. Please see https://flutter.dev/community for resources and if you need help with your code, please see https://www.reddit.com/r/flutterhelp/
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you


Questions about the evaluation of SparklesChat versus Minigpt-4

To the best of my knowledge, MiniGPT-4 can only process a single image at a time. Could you please explain how you managed to get it to handle multiple images simultaneously?

The Minigpt-4 url: https://huggingface.co/spaces/Vision-CAIR/minigpt4

Thank you for your query regarding the handling of multiple images in MiniGPT-4.
The adaptation of MiniGPT-4 to handle multiple images simultaneously mainly involves embedding these images within the text context. For the modeling implementation, below are the original forward_minigpt4 function used by MiniGPT-4 and the enhanced forward function for multiple images used by our SparklesChat.
https://github.com/HYPJUDY/Sparkles/blob/913424a4ded9373705c772798e25d3c1a17e7616/sparkles/models/sparkleschat.py#L175-L261
The forward_minigpt4 function processes a single image from the samples. It creates embeddings for the image, combines them with text embeddings, and feeds the concatenated embeddings as inputs_embeds to the model.
The forward function enhances the capability to process multiple images. For each input, the function identifies the positions of image tokens (self.media_token_id) and embeds the corresponding images into the text sequence.
For the implementation of preparing image-text interleaved multimodal data with embeded image tokens for SparklesDialogue, please refer to the MultimodalDialogueDataset class in https://github.com/HYPJUDY/Sparkles/blob/913424a4ded9373705c772798e25d3c1a17e7616/sparkles/datasets/datasets/multimodal_dialogue_dataset.py#L49


Add dependency map partitioner

A variation on Partitioner::Default, which allows builds to run a subset of tests based on the files changed on its branch.
Accepts all the same configuration options as Partitioner::Default, and optionally accepts a dependency_map for each specified test target.
Sample excerpt from kochiku.yml with options:
partitioner: dependency_map

dependency_map_options:
  # Branches with these names will include files that match every test_glob, regardless of files changed on branch
  run_all_tests_for_branches:
    - master

targets:
  - dependency_map:
      # For each object in the dependency_map array, if its source_glob matches files changed on this branch,
      # add files that match its test_glob to the files that should be used in the partitions
      - source_glob: foo/**
        test_glob: foo/**/*spec.rb
        workers: 1  # Add this many workers if this source_glob matches files changed on this branch

      - source_glob:
          - bar/**
          - app/bar/**
        test_glob:
          - bar/**/*spec.rb
          - spec/bar/**/*spec.rb
        workers: 5

      - source_glob: *
        test_glob: baz/*spec.rb

    # If a target specifies a default_test_glob and none of its specified source_globs match files changed,
    # add files that match its default_test_glob to the files that should be used in the partitions
    default_test_glob:
      - {foo,bar}/**/*spec.rb
      - spec/bar/**/*spec.rb
      - baz/*spec.rb

    # Maximum number of workers for this partition
    workers: 30

Very high quality code and tests @mchat! Thank you for this contribution.


Is there a script version available?

Is there a version of this to include and use as just a

Hello! You can download the archive with the library from the releases page: https://github.com/Kosalexei/active-menu-link/releases
Later, the library will be available through cdnjs.


fix: make linarith recognize not-equals when splitNe is true

This is fixing an error discovered in an example reported by Dan Velleman on Zulip.

bors d=kmill

bors r+


Minor UI tweaks

Hey there,
I've noticed a couple of things on the right-hand side of the UI that might benefit from minor tweaks:

Reduce the spacing of the 'Tools / How to Use' header to align the left and right sides with the tool panels
Remove the right-margin on the toggles to center them in their respective panels

You can see the changes below. If you'd like me to go ahead, can you please assign this issue to me?
Thanks!
Before:

After:

I've tinkered with the css a little bit, here as some more examples:
Desktop:

Mobile:


gnss_poser fails to get antenna position from base_link in sample data.

Checklist

[X] I've read the contribution guidelines.
[X] I've searched other issues and no duplicate issues were found.
[X] I'm convinced that this is not my fault but a bug.

Description
When I run the rosbag-replay-simulation in tutorial, gnss_poser outputs the following warning.
[gnss_poser-32] [WARN<PHONE_NUMBER>.053584803] [sensing.gnss.gnss_poser]: "gnss" passed to lookupTransform argument source_frame does not exist.
[gnss_poser-32] [WARN<PHONE_NUMBER>.053649454] [sensing.gnss.gnss_poser]: Please publish TF base_link to gnss

Expected behavior
The gnss_poser successfully gets the antenna position from base_link. And it does not output warnings.
Actual behavior
[gnss_poser-32] [WARN<PHONE_NUMBER>.053584803] [sensing.gnss.gnss_poser]: "gnss" passed to lookupTransform argument source_frame does not exist.
[gnss_poser-32] [WARN<PHONE_NUMBER>.053649454] [sensing.gnss.gnss_poser]: Please publish TF base_link to gnss

Steps to reproduce
Just run the rosbag-replay-simulation in tutorial.
Versions
No response
Possible causes
The warning is printed from https://github.com/autowarefoundation/autoware.universe/blob/1f9cdfee48f3ca14628001f6d9fd18a9c56e8198/sensing/gnss_poser/src/gnss_poser_core.cpp#L347-L369
There are two main reasons.:

The default values of gnss_link in the gnss_poser config of the autoware.universe is gnss.  LINK
On the other hand, the default values of gnss_link in the sample_sensor_kit and awsim_sensor_kit are set to gnss_link.

While some sensor_kit_launch files pass gnss_link as an argument, the gnss_poser launch file does not receive it. As a result, the gnss_link specified in the param.yaml of gnss_poser is loaded by the node. LINK1 LINK2

Consequently, the gnss_poser cannot get the coordinate transformation between base_link and gnss_link (antenna position), treating it as an identity transformation (interpreting that the antenna is located at the position of base_link).
However, this is not a critical issue as it is only used as the starting point for the initial position estimation of NDT.
Additional context
@KYabuuchi is going to fix this.

The simplest solution is to change the default gnss_frame from gnss to gnss_link. Because in most sensor_kits the antenna position is named as gnss_link.


PnP App Only Permissions for creating TeamSites

Working on getting my Teams Provisioning open source project working with the App Only certificate based authentication. I had been doing all my early work with Communication Sites as they are quick and easy to provision. Started doing some testing and realized it isn’t working with Team Sites. Looking for some help or guidance.
I have a simple test script that I'm working with that authenticates with a local certificate. It creates a communication site fine, but not a Team site. I'm thinking it has to do with the groups behind this. It's not provisioning a Team just yet. Below is the script, error, and permissions. Thoughts?
Thanks,
Peter
Connect-PnPOnline -Tenant $tenant -ClientId $clientID -Thumbprint $thumbprint -Url $URL
$web = Get-PnPWeb
$web
$siteTitle = "pstest8"
$siteURL = https://envisionitdev.sharepoint.com/sites/$siteTitle
$alias = $siteTitle
$owner =<EMAIL_ADDRESS>New-PnPSite -Type CommunicationSite -Title $siteTitle -Url $siteURL -Owner $owner
New-PnPSite -Type TeamSite -Title $siteTitle -Alias $alias -IsPublic
New-PnPSite : Code: Authorization_RequestDenied
Message: Insufficient privileges to complete the operation.

Hello @petercarson
how are you?
Even though the PnP documentation articles are on this repository, I need to kindly redirect you to open PnP cmdlets issues/pull requests here, in that repository, where a member of the PnP community will be able to correct the article/review your PR with your feedback.
The documentation for PnP cmdlets is then synced from that repo into this one.
Thank you!

@get-itips Thank you very much for the contribution and sharing this explanation. @petercarson Hope this comment is helpful for you. If you see a documentation update is required, please feel free to open an issue for the same. We proceed here to close it. Thanks for taking out some time to open the issue. Appreciate and encourage you to do the same in future also.


Crashes when receiving

Galaxy S8 android version 8.0. When wallet running in backround and receiving DGB app crashes. Confirmed on transactions received from mobile wallet (Coinomi) and from desktop wallet (full node DGB wallet).

Issue resolved on most recent release / update to the app store.
You guys ROCK!


Add a docs page to explain the password types and how to choose them

See: https://door.casdoor.com/organizations/casbin , our users don't know how to choose them

The new page can be added to: https://casdoor.org/docs/overview

@seriouszyx

Hi, @hsluoyz  I have installed the casdoor-website locally and I have it running.
I am learning how to create docs with it. I will like to work on this issue.
Please assign this to me
Thank you

Hi @seriouszyx
I didn't know this was an admin issue, I started working on this yesterday.
Please can I submit my Pull request on this issue just to show how I created the documentation?
Since potential contributors for GSOD'22 need to prove that they know how to create documentation
Thanks

@Jenniline we are OK with anyone who first make a qualified PR. But for this issue, it seems that @seriouszyx already made one: https://github.com/casdoor/casdoor-website/pull/180 , so maybe can you choose another issue to work on?

Okay, @hsluoyz Thank you for notifying me.
I had already made the PR here is the link.
I understand that the code might not be merged, but this is in an attempt to demonstrate my ability to write docs for the casbin and casdoor projects.
Please review and let me know of corrections I should take note of when working on other issues.
Thank you

@Jenniline plz don't write too long for simple things. You can refer to: https://github.com/casdoor/casdoor-website/pull/180

Okay
Thank you for the correction @hsluoyz
I will take note of it as I work on the other docs


why i failed in the step :make test?

it shows :Error: Cannot find module '/root/node-occ/node-occ/lib/binding/occ.node'

could you tell me how to solve this problem?


qt5.qtbase: switch to overrideSDK

Description of changes
Fixes staging-next build failure on x86_64-darwin: https://hydra.nixos.org/build/239500595. #263535
Switching to unversioned SDK references is not strictly required, but it serves as a good exercise of the SDK adapter.
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[x] 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

[x] Fits CONTRIBUTING.md.

@ofborg build qt5.qtbase

The fix doesn't really work on my side, probably my env is too impure. I'll see what ofborg comes up with.

It’s not building for me either, which is odd because it built locally.

Oh, right. I neglected to cherry-pick the commit that recursively updates the propagated build inputs. 🤪

nix build 'github:NixOS/nixpkgs?ref=pull/263878/head#qt5.qtbase' --system x86_64-darwin succeeds for me now. I also dropped the part that switched to unversioned SDK references because it was causing ofborg-eval to fail.

Emmm, qt5.qttranslations does not evaluate now.

Emmm, qt5.qttranslations does not evaluate now.

I’ve looked at this a bit, but I won’t have time to look at it in depth until later today. The nativeBuildInputs thing is odd because overrideSDK doesn’t touch it.
(I’ll run ofborg’s outPath.nix before I push any updates, so this should be the last eval error from this PR.)

I cleaned up the comments and added a check for null packages. I don’t know how that happens, but doing so fixes evaluation of qt5.qttranslations and allowed the eval check to run and pass locally.

I fixed the conflict after #264497 was merged.


Return info about a token.

Pull Request Test Coverage Report for Build 365

15 of 15 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.4%) to 69.823%

Totals

Change from base Build 363:
0.4%

Covered Lines:
803

Relevant Lines:
1124

💛  - Coveralls

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


[Suggestion Needed] Question regarding implemenation in certain use cases.

How would you implement this library in the following use case ?
I have a bottom tab navigator with 4 tabs. I have to show bottom sheet with different content in different tabs (even 1 tab can have different content).
One approach would be to have the bottom sheet in the root file and calling it from other tab. (Problem here would be rendering dynamic height and dynamic content for bottom sheet for each tab (as height and content are not consistent).
Other approach would be to have bottom sheet for each tab. With this approach, in snapPoints=[0, 400], snapPoints[0] is not going to be true 0 from the bottom of app screen. It's going to be the bottom: 0 from tab navigator instead.
I am not thinking of calculating height of the tab navigator and making snapPoints=[-heightOfTabNavigator, 400] or similar. Suggest me if this is a good idea.
I am using https://www.npmjs.com/package/react-native-tab-navigator [This is a pretty old project 🗡 ] for tab navigator. But I am willing to use react-navigation's bottom navigator if required.
Any kind of suggestions would be helpful. :)
cc @brentvatne @osdnk @Eyesonly88 @satya164  (Sorry to mention you guys here ) 🥂

I'd use react-navigation and have a bottomSheet for each tab so you won't have to worry about calculating the height and bottom 0 would not overlap with the bottom tab bar. You can also use react-navigation SafaArea component to control the boundaries for notch phones.

@Eyesonly88 With this approach, how would you give the initialSnap or snapPoints for Bottom sheet in each tab ? Giving 0 (position from bottom) would actually result in position from the navigation bar, right ? I haven't tried this yet but I was kind of hoping this will be the expected behavior.
However, I will give it a shot.

Seems like, the issue I was mentioning doesn't occur with react-navigation's BottomNavigator. But yeah, the bottom navigator hides certain portion of the bottom sheet. Let me do a bit of more work on this. Thanks @Eyesonly88 for the reply.

it sounds like react-native-tab-navigator uses absolute positioning with padding, so when things are absolute positioned inside of it, it goes below the padding. you could fork it to not be absolute positioned and that'd probably fix your problem, or use react-navigation bottom tab, or use react-navigation-tabs directly


Disable the creation of PV / PVCs by default

Overview
When deploying the stack with AWS EKS PVs are created by default as EBS volumes. This adds unnecessary cost and complexity especially when the hub pod deployment does not require a PV/PVC for the database.
Requirement
Update the values.yml file to include the hub.db.url.type key and set it to postgres by default. The JupyterHub sub-chart in this case will not create a hub-db-dir PV since this PV is only required when for deployments that use SQLite.
.

Closed with #48


Service Workerを永続化する試み

Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.
https://stackoverflow.com/questions/66618136/persistent-service-worker-in-chrome-extension/66618269

const keepAlive = () => setInterval(chrome.runtime.getPlatformInfo, 20e3);
chrome.runtime.onStartup.addListener(keepAlive);
keepAlive();

ひとまずこれを採用


Simplify Socket::Addrinfo.getaddrinfo(&)

This private method is now directly responsible for iterating over all LibC::Addrinfo objects, so there is no need to store this information in the Socket::Addrinfo struct itself.

getaddrinfo does it on the yield new(addrinfo) line, because it is a class method


special character '&' couldnt work for tex_title in latex.

The '&' character in the tex_title result in additional 'amp' ';' letters in the BibTeX paper title generated from the website.

Thanks Xiaoxi! I've been looking at why this happens ... and it's to do with the JavaScript ... it puts it in because & is potentially a malicious character (e.g. in cgi-bin).

Oh ... thanks for noticing! It was part of my testing. I'll flip it back. And thanks for your patience and your work on problem diagnosis. I'll close this issue now.

Many thanks!
Xiaoxi
---- Replied Message ----
| From | Neil @.> |
| Date | 11/22/2022 14:01 |
| To | @.> |
| Cc | Xiaoxi @.> ,
@.> |
| Subject | Re: [lawrennd/proceedings] special character '&' couldnt work for tex_title in latex. (Issue #4) |
Oh ... thanks for noticing! It was part of my testing. I'll flip it back. And thanks for your patience and your work on problem diagnosis. I'll close this issue now.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>


fix(cloudcommon): checksync commitSqlDiffWithName

What this PR does / why we need it:
Does this PR need to be backport to the previous release branch?:
NONE
/cc @swordqiu
/area cloudcommon

/lgtm
/approve


Document workings of integration tests

Did some best-effort scribbling after clarifying the test structure with @CorgiMan .

Love the documentation :+1:

@CorgiMan : addressed all your feedback in the last commit.

LGTM

Merging the squashed version ...


which is the default branch?

There is master and main: master is more up to date, main is default. I guess master should be default?
Or is master the development branch?

i wanted to stick with githubs style of having the default branch be main, the apm publishing tool only accepts master afaik. Deleted main and made master the default branch


Including DSYM?

Hello,
Crashlytics is telling us that all of our builds we're sending (via ipa distribute:crashlytics) are missing DSYM files. We're sending builds to Crashlytics with this module's "ipa distribute:crashlytics ..." command.
How do I get it to upload DSYMs as well? We see the "Blah.app.dSYM.zip" file, so the DSYM is there and accessible.

Check out fastlane which allows you to easily build your app using gym and then directly upload the ipa and the dsym to crashlytics 👍

Will do, thanks!


Suggestion for not wrapping ServerManagedPropertyExceptions

The tests need to be updated for this change, and a new test should be added to FedoraLdpIT that tries to add a fedora-namespaced property, such as fedora:junk = "hello"

@robyj, I would have thought that you would merge this PR into your GitHub branch??

Andrew, I'm sorry, I had issues with my local clones. I accidentally ended up sudo'ing  and didn't realize I had, So when I tried to commit, it wouldn't let me and by the time I realized what was wrong, it was tricky to get it to work.
I had to manually make the changes for the non-wrapping and the other code-review changes.
Sorry
Jon


Hotfix timezone offset

Fixes issues caused by https://github.com/activenetwork/actv/pull/43

@brdrgz Thanks for your effort on fixing my bug. Your functional code looks good. I think we need to merge master branch to this branch and fix the rspec problems(or add the test coverage).

@brdrgz I had added the rspec for the code changesand merge the master into this branch

I think ultimately this solution needs to be in A3, not ACTV (and not for all assets in those source systems, which is a very large set of assets), so this is probably the wrong way to approach the problem.

@marvin-min Also, just to add, the reason we reverted this was because it caused a lot of issues on production (500 errors, response time spikes).  A large number of camps / regecenter assets had a timezoneOffset of nil.

@brdrgz Thanks for you comments. I was also considering fix the issue at A3 side before the PR i had created in ACTV.There are 2 reasons that why i make the changes at ACTV at final:

We used the registration_open_date and registration_close_date many times in A3 code. If we parse the date with correct time zone at A3 side, we will call the parse_date_with_correct_timezone (just an example of the function to parse the date with correct timezone) function in each place where we using registration_open_date or registration_close_date. However,if we makes change at ACTV. we do not take care of this.

2.We add the default timezone 'UTC' at ACTV side now. If we want to correct the time zone at A3 side, we have to discard the 'UTC' timezone first and then add the correct. it looks strange.