Browser crashes while using OffscreenCanvas.convertToBlob method large file in web worker

I’m trying to show Tiff File in browser, i successfully read Tiff using UTIF.js file, Where I am using Web worker to read Tiff format file . Some files are very large like 10,000 px height and 13,000 width, I need to show them in browser. Browser crashes while executing code OffscreenCanvas.convertToBlob method which return Promise object.

This is where i used Web Worker and Offscreencanvas , I have tried convertToBlob method with different parameter such as quality .6 and less also but still browser crashing.

UTIF.decodeImage(ubuf,utif[k]); var ubuf1 =UTIF.toRGBA8(utif[k]); var a =  new Uint8ClampedArray(ubuf1); var imgData = new ImageData(a,utif[k].width,utif[k].height); var canvas1 = new OffscreenCanvas(utif[k].width,utif[k].height); var ctx = canvas1.getContext('2d'); ctx.putImageData(imgData,0,0); var that = self; if(utif[k].width >2048) { canvas1.convertToBlob({type : "image/jpeg", quality : 0.3 }).then(function(blob) { that.postMessage(blob);                    }); } else { canvas1.convertToBlob( {type : "image/jpeg", quality : 1 }).then(function(blob) { that.postMessage(blob);                    }); } 

I am expecting browser should not crashes in large file scenario.

THanks a Lot in Advance.

After install phpMyAdmin, I could not access phpMyAdmin from web Browser – 404 Page Not Found?

I tried to install apache2, php, mysql, and phpMyAdmin on my Ubuntu by following this youtube video. After awhile it seemed apache2, php, and mysql were working fine. However I have problem with phpMyAdmin, that when I tried to access it from address http://localhost/phpmyadmin, browser show 404 page not found.

I don’t know what caused this problem, but I was ensure mysql was working as I could access mysql shell from terminal mysql -u root -proot. Furthermore, I tried to test run php file by creating infor.php inside /var/www/html and run from browser http://localhost/infor.php, it is also not working.

What is the problem with that? Am I missing something? Please kindly help. Thanks

After install phpMyAdmin, I could not access phpMyAdmin from web Browser – 404 Page Not Found?

I tried to install apache2, php, mysql, and phpMyAdmin on my Ubuntu by following this youtube video. After awhile it seemed apache2, php, and mysql were working fine. However I have problem with phpMyAdmin, that when I tried to access it from address http://localhost/phpmyadmin, browser show 404 page not found.

I don’t know what caused this problem, but I was ensure mysql was working as I could access mysql shell from terminal mysql -u root -proot. Furthermore, I tried to test run php file by creating infor.php inside /var/www/html and run from browser http://localhost/infor.php, it is also not working.

What is the problem with that? Am I missing something? Please kindly help. Thanks

Link to view PDF version of a Google slides in browser

I’m trying to create a link to a google slides doc that will open in a browser as a pdf. I’ve tried changing the end of the URL from edit?usp=sharing to export?format=pdf and a few variations with no success. My suspicions were confirmed after reading this article from how-to geek that asserts the technique does not work with google docs. Does anyone know of a technique that does work on google docs or a work-around?

Persistent OTP on Web Browser using cookie

Currently I’m planning to use OTP for my web app, I’m a bit confused about how to keep the users logged on the app, my plan is to use cookie, but I’m not sure whether this is correct or not

This is my plan for the moment

  1. User request for password, server generate public_key, otp, private_key, save the private_key, hash (combination of public_key, otp, and private_key) on the database and save the public_key in the user’s browser using cookie and send the otp to user’s phone number via sms
  2. User receive the otp and validate it on different page, like “verify” page or something, server will fetch the required data from database based on the public_key from cookie, then compare the retrieved hash with user’s input hash (public_key from cookie, inputted otp, retrieved private_key), if it’s same then it will set the hash to cookie
  3. Every time user visit the web, server will check the saved public_key and hash from cookie then compare it on the database and check if the hash is still valid (expired on 5 minutes or so) then retrieve the user’s data

Thanks in advance

Modifying Page Title To Be Separate From Browser Title

I have a module that contains multiple forms, each form in its own file. I need to modify the page title such that it is different from the browser title for several of these pages. The name of the module is member_login. This is what I have so far:

function member_login_preprocess_page(&$  variables) {   if (\Drupal::routeMatch()->getRouteName() == 'member_login.login') {     $  variables['content']['#title'] = t("The new HTML title.");   } } 

I add this function to the .module file. Do I need to call it, or does Drupal call it automatically for it to come into effect? Currently, I do not see it into effect.

View GraphQL queries in browser network developer tools [on hold]

We recently migrated our API to graphql, and it’s been working very well for us. However I did come across one inconvenience during development that I couldn’t find any information on. When using the browser developer tools to inspect network requests, all our requests which used to have specifically named endpoints like inventory?id=1234 are now just listed as graphql.

I understand why this is the case, but was hoping for a way to include some of the POST information in the list of requests. It is cumbersome to click through a dozen POSTs to try to find the one I am looking for.

It seems likely that different browsers may have different methods of approaching this. Maybe a plugin that extends the developer tools? I mention graphql since that’s the context of my question, although I suppose this problem isn’t graphql specific

In browser developer tools, is there a way to add content from each POST request to the row?

Browser to remember Camera selection, without the browser setting but through a cookie set

I am developing a website, for the employees, they must take a picture of themselves. How can you avoid browser from keep asking whether to allow to access to camera:

Even if you change the browser setting, to allow access camera, it still asking. (Edge). However, for Chrome, the camera option in setting is grayed out.

Every time the page is refreshed, it always ask.

How about a cookie to remember this action? Or any other method?

Please help

Why I am not able to authenticate with Microsoft Graph Explorer through Sharepoint Custom Web Part only in Edge Browser

I have deployed a custom web part on sharepoint online, in which I am authenticate with Microsoft Graph Explorer.

It is authenticated through Sharepoint Custom Web Part successfully in Chrome, IE and Firefox but not authenticated in Edge.

In Edge I’ve getting below error:

enter image description here

description: "Invalid argument" message: "Invalid argument" number: -2147418113 stack: "TypeError: Invalid argument at Anonymous function (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-05-31.012/sp-pages-assembly_en-us_80b161431b1b8ce356b58dd5ab1df0cc.js:1178:42819) 

This is my method in which I found that at the time of calling microsoft graph explorer API(“https://graph.microsoft.com”), in Chrome, IEand Firefox the API provides the response, but in Edge it goes in catch part and throws error.

private _getListApplications(param): Promise<any> {   return this.context.aadHttpClientFactory.getClient('https://graph.microsoft.com')   .then((client: AadHttpClient) => {       return client.get("https://graph.microsoft.com/beta/applications",AadHttpClient.configurations.v1);       }).then((responseListAllApps: SPHttpClientResponse) => {          return responseListAllApps.json();          }).catch(err => { console.log('errr', err); }); }