I’m making a simple teleprompter app, and the idea is to control it through a local PC but to have the same view/Vuex state while accessing the page from my tablet. So, same page, same state, multiple devices. Do I understand correctly that the only way is to duplicate all the mutation requests to the s…
Tag: javascript
Vue property or method is not defined on the instance but referenced during render?
When trying this code in an online compiler it works fine but on localhost I see this problem: Property or method “searchfunc” is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components) main.js Ho…
Check if a user can send message in a mentioned channel discord.js
I have a command which allows users to make the bot to say a message, but I would like it to be able to check whether the user is able to send messages in that channel before it sends it. Currently, I just have it locked to the MANAGE_MESSAGES permission. Here is the code: I have searched and couldn’t f…
Error when creating array of objects in a javascript loop
I have a problem creating an array of objects. the problem is that you should only create 2 objects but you end up creating 8 objects, because each value of a property is inserted into a new object. I have an array of objects called columns, which is dynamic since the values and properties are changing what I…
use same component with same props name in on page not works vuecli
Well. i have a component called Logo and i am using it in nearly every views and even in other components. Logo component takes only 1 props: “size” and i use javascript to mack it responsive depend on its font size but => for example i have a landing: in landing i have component renderd in lan…
Given a string s, find the length of the longest substring without repeating characters
Example Input: s = “abcabcbb” Output: 3 Explanation: The answer is “abc”, with the length of 3. I tried writing this but if condition is never being exceuted. I am not able to figure out the reason. Answer This is the same algorithm as described by danhuong, simply written with a recur…
Javascript – Functions won´t run the same way after the first time
I am new learning front-end and Javascript and I am designing a game ¨to learn the abecedary” on my own to achieve that. My intention is to: 1st – Randomnly put the abecedary letters in the gameboard. 2nd – The user selects the first one (A, for instance). The code assigns the firstSelectedL…
DOM change font color by using addEventListener
I am a beginner of JS and HTML. I encounter a problem with changing the font color by using addEventListener here is my part of HTML code here is my js code. the situation I encounter is when I click the color box, it pops up the Palette, and then you have to “click” again for choosing the color. …
Why simple javascript import is not working?
Here not working https://plnkr.co/edit/a7H1ilzkUA3918vc?open=lib%2Fscript.js&deferRun=1 But here in similar example – works, from which I am trying to do: https://plnkr.co/edit/XLSL581pjgwe3PI1?open=lib%2Fscript.js&deferRun=1 page1.js script.js index.html: package.json Alert message is not displ…
loop in all property of model in typescript and nodejs
i have a generic model for get all items from Schema . now i use that by this model : and this is items of my models : now i want to search in all filters item and push that in the variable . i write this code but it not worked and not go loop in the all items