Skip to content
Advertisement

Tag: javascript

Capture word after first dot and before second dot

i have some strings like: I’m trying to write a regex that makes the first two string pass, but not the third one. The rule is that if the string contains the word “router” after the first dot and before the second dot it’s ok. i tried with but it match every .router. in my string, so also the third

Why WebStorm show errors in gql query inside apollo object in Vue component or .grapgql files

I have a problem with WebStorm syntax highlighting. I created valid GraphQL query which works on localhost app but WebStorm says that unknown field “familyMembers” on object type “Query” and highlights the whole query in red. I am really confused but maybe I should change something inside apollo.config.js – if yes please tell me what. HelloWorld.vue apollo.config.js Some screenshots: Answer

Excel JavaScript API fails to read range from sheet Edge vs IE

We have an Excel add-in which writes a range to an Excel sheet and lets the user modify it. Once they are done they will press a button on which we will read the range from the sheet and will try to parse it. Excel has recently updated its integration browser: https://learn.microsoft.com/en-us/office/dev/add-ins/concepts/browsers-used-by-office-web-add-ins Windows 10 ver. < 1903 / Office 365

Webpack dev server and WebSockets

Three quick questions: 1) Knowing full well the benefits of Socket.io, I still wanna know if it is possible to run a single webpack-dev-server that can server both http and ws. Everything online is oriented to using Socket.io and running dual servers for http / ws. 2) If indeed I must use Socket.io, how does local development (http server and

Getting a PeerServer key

The PeerJS Documentation says The ‘key’ we’re passing in to the Peer constructor is a PeerServer cloud API key. You can use ours for now, but you should sign up for your own free key. However, the given link just leads to this page, which doesn’t have instructions on how to get a PeerServer key. So, How do I get

How to pass a unique uuid to each callback?

I’m using multer-s3-transform, which allows me to manipulate the image coming in, before uploading it to my bucket. Here’s what I have: The problem is that the uuid will always be different for the small and the original versions. How can I make const fileName = uuid.v4() passed down to each callback, so that they’d have the same name, with

Using a default image on load of the page, then overwrites it

I have a page which contains several images. When the page loads it provides a default image for each IMG: What I want is something like this: Where src2 overwrites src1 when it is loaded. Edit: The first image (src1) comes as the page loads while the second (src2) is requested trough the internet. Example: https://cdn.pixabay.com/photo/2016/10/17/10/52/wind-farm-1747331__340.jpg Answer Use the onLoad

Advertisement