Category "javascript"

What does this app.directive snippet do in Angular?

I have the following snippet of code app.directive('widthSetter',function($timeout){ return { restrict: 'A', link: function (scope, element,

What is the difference between client-side and server-side programming?

I have this code: <script type="text/javascript"> var foo = 'bar'; <?php file_put_contents('foo.txt', ' + foo + '); ?> var

HackerRank - Birthday Cake Candles

I was just practising Javascript from Hackerrank. The question that I am working on is as follows: Colleen is turning n years old! Therefore, she has n candles

proper usage of flatpickr and laravel

Hello all I am trying to get Flatpickr working with Laravel v8. I've done the following: npm install flatpickr then I added to the resources/app.js: const flat

How to collect the last 5 notifications that were created using angularjs-toaster?

I am currently trying to create a table with the last 5 notifications that were created using angularjs-toaster (https://www.npmjs.com/package/angularjs-toaster

proper usage of flatpickr and laravel

Hello all I am trying to get Flatpickr working with Laravel v8. I've done the following: npm install flatpickr then I added to the resources/app.js: const flat

vue.js cannot use data property in computed method

I'm trying to use a property of my data in a computed method like this: data() { return { ToDoItems: [ { id: uniqueId("todo-"), label: "Learn

How to keep marker at the bottom of the screen when zooming like google maps?

I was wondering if it is possible to change the default behavior zoom, the default seems to change the viewport in all directions, but I want to keep the bottom

How to update state ( initial State ) objects in reducer when using immer?

If have a state of objects payload: export const initialState = { payload: { firstName: 'Mick', lastName: 'Andri', phoneNumber: '

How to redirect in React Router v6?

I am trying to upgrade to React Router v6 (react-router-dom 6.0.1). Here is my updated code: import { BrowserRouter, Navigate, Route, Routes } from 'react-route

Async/Await not executing as expected

I have the below method where I am updating store and after store updating, I am performing certain activities based on store values - useEffect(()=>{ const

FlowType.js and flexbox doesn't work together

so Iam using FlowType.JS it works and the text become I mean the the text become responsive. but if I wrote display: flex; or width: fit-content; the FlowType.J

Add line numbering to a .docx with ActiveXObject('Word.Application')

Hi i want to add line numbering to the opened .docx file before converting it to .pdf and i really didn't find how to do that on code, it is converting my .docx

neovim [coc.nvim] build/inderx.js not found, please install dependencies and compile coc.nvim : yarn install

I trying to build, yarn build but it shows me yarn run v1.22.17 error Couldn't find a package.json file in "/home/darth/.config/nvim/plug-config" info Visit htt

why react-helmet-async is not working in app?

In my react application, when I am using Helmet to show the title of the browser dynamically, the page in which I am using the CODE Like - **<Helmet>

Is it possible to pause/resume a web worker externally?

I've seen that web workers have a terminate() function, but is there a way to pause and resume web workers from the host thread similar to interrupts? The crit

Dynamically set background color based on value from DB

The db stores hex values which will then be used to set the background color of the div. How can I pass the value which is coming through from the DB to the css

React.JS App MODULE_NOT_FOUND error on 'npm start'

I have a problem with React.js. After creating a react application, when I run the command npm start I have the following error: PS G:\workspace\WEB\gab-web\cli

jQuery check all checkboxes in table

I have a table with a checkbox in the table head which I want to use to check/uncheck all the checkboxes in my table. This is my code, but it doesn't work.

ERROR:jQuery.verto.init is not a function

I'm using a Verto library in my nodejs console based project - I've added all necessary references to main.js file - something like this: const jsdom = require(