video plyer code that cam help to rethrive videos saved in my website and display them then play them when clicked
html code, css code, javascript code, php code and Mysql code
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
Category Added in a WPeMatico Campaign
video plyer code that cam help to rethrive videos saved in my website and display them then play them when clicked
html code, css code, javascript code, php code and Mysql code
The below payload works if I hardcode the pubblish date, but if I want to use a variable, it breaks, I can’t get the correct way of adding a variable in the payload, I can’t use template literals as the JS engine is prior to ES6.
var today = new Date();
var publishDate = new Date(new Date().setDate(today.getDate() - 31));
const query = JSON.stringify({query:
'{' +
' all_insight_article(locale: "en-gb"'+
' where: {business_unit: {business_unit: {title: "Capital"}, MATCH: ALL}, audience: {MATCH: ALL, audiences: {title: "Management"}} publish_date_gt:'+publishDate+'}'+
' ) {items {'+
' system {uid publish_details {time} updated_at}'+
' absolute_url title subtitle main_image'+
' audienceConnection {edges {node {... on Audiences {title system {uid}}}}}'+
' article_typeConnection {edges {node {... on ArticleType {title}}}}'+
' topicsConnection {edges {node {... on Topics {title display_name system {uid}}}}}}total}}'
});
Error:
07/03/2023 14:47:24 js3 []
07/03/2023 14:47:24 js3 INT-150012 The HTTP query returned a 'Unprocessable Entity' type error (422)
Website https://mearesmarine.com
I believe the issue started with a recent update to WP 6.1. Please view the “Recently Listed” section. On desktop, the links are there but not clickable. On mobile this works as expected.
I have tried.
Updating vc_carousel javascript files.
Custom CSS / assumed maybe a position/z-index problem.
Updating plugins/theme.
I just want to start this question by saying that I am a complete beginner to web dev.
This question might be stupid so thank you for looking at it and answering it.
I am on node version 16.15.1 and npm version 9.5.0. I created my project by running $ npm create vite@latest. I then choose Vue and Javascript. Other than npm complaining about “deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead” everything worked well.
I cded into the project and ran $ npm install and then $ npm run build. No errors or warnings occurred.
After this, I opened up dist/index.html and there was nothing except a blank page. npm run dev seems to work, but I can’t find the final website anywhere.
I have previously tried again and again but I get the same results.
What am I doing wrong?
Again, I want to thank anyone who takes the time to answer my question.
So I’m loading a todo list from a json. It looks something like this:
{
"todos": [
{"id":1,"todo":"Do something nice for someone I care about","completed":true,"userId":26},{"id":2,"todo":"Memorize the fifty states and their capitals","completed":false,"userId":48},{"id":3,"todo":"Watch a classic movie","completed":false,"userId":4}
] ,"total":150,"skip":0,"limit":30
}
So when I load it and apply the “completed” to the Checkbox checked the checkbox stops working. Absolutely nothing happens when I click it.
Code:
import './App.css';
import React, { Component } from 'react';
import { Checkbox, FormControlLabel, FormGroup } from '@mui/material';
import data from './todo-list.json';
function App() {
return (
<div>
<header>
<FormGroup>
{data.todos.map(todo => <FormControlLabel control={<Checkbox checked={todo.completed}
/>} label={todo.todo} /> )}
</FormGroup>
</header>
</div>
);
}
export default App;
I also get a warning Warning: Each child in a list should have a unique "key" prop..
I tried doing something like this:
const [isTrue, setIsTrue] = React.useState(false);
return (
<div>
<header>
<FormGroup>
{data.todos.map(todo => <FormControlLabel control={<Checkbox
checked={isTrue}
onChange={e=> {
setIsTrue(e.target.checked)
}}
/>} label={todo.todo} /> )}
</FormGroup>
</header>
</div>
);
But this doesn’t apply the initial state and also when I click the checkbox it clicks all the checkboxes. So my click is applied to all of the checkboxes on the screen.
I am using the following code in JavaScript to insert a div with class = “blah” inside a main div with class = “container” (the main div is created with HTML) but something goes wrong.
const board = document.createElement('div');
const mainContainer = document.getElementByClassName('container');
board.className = 'blah';
mainContainer.appendChild(board);
The error I get is “Uncaught TypeError: mainContainer.appendChild is not a function”. What am I missing?
Thank You for the help
I am creating a shopping cart app, I am trying to create a table and an Appbar to display with the App.js file. I am using two separate files for both the Table and Appbar, both are js files. When I try and import the files into App.js I get this error.
ERROR in ./src/App.js 21:36-42
export 'Appbar' (imported as 'Appbar') was not found in './Appbar' (possible exports: default)
ERROR in ./src/App.js 69:39-44
export 'Table' (imported as 'Table') was not found in './Table' (possible exports: default)
Any suggestions?
PS - I am fairly new at this, so forgive me for the lack of clarity in my question
I tried creating folders in the src file and putting the table and appbar files in those respective folders.
When we compare a string with a number in JS using regular comparison operators not the strict ones, JS performs implicit type coercion. My question is: does JS perform implicit type coercion as well when we compare two string holding numerical values? or does it compare the ascii code of a string holding a number? or are both the same thing lol?
In the browser console, I tried the following:
comparing two strings holding numbers
How does the below logic at line if(!chars[word]) work?
Suppose we have an string that we need to find count of words.
const str = "hello world Welcome to hello world"
const chars = {}
const arr = str.split('')
for (let word of arr) {
if (!chars[word]) {
chars[word] = 1
} else {
chars[word]++
}
}
console.log(chars)
I want to know how it exactly works like how it finds the number of count.
I am trying to create a Raidobutton in React. Below is the code.
When I click on first radio button(“Windows”) , the Radiobutton shows checked, when I click second one (“Mac”) the Radiobutton does not show checked even though the checked is true. When we again click on “Mac” Radiobutton gets checked.And after that all Radiobutton works fine.
Can somebody help with this.
import './App.css';
import { useState } from 'react';
const options = ["Windows", "Mac", "Linux"]
const days = ["Male", "Female"]
const TempRadio = ({ item, group }) => {
const [checked, setChecked] = useState('')
const handleChnage = (e) => {
console.log(e.target.value)
setChecked(() => e.target.value)
}
return (
<label>
<input type="radio" value={item} checked={item === checked} name={group} onChange={ handleChnage} />{item}
</label>
)
}
function App() {
const renderItems = (items, group) => {
return <div className='myul'>{items.map((item) =>
<TempRadio item={item} key={item} group={group} />
)}</div>
}
return (
<div className="App">
<header className="App-header">
<h1>
Which OS?
</h1>
{renderItems(options, "OS")}
<h2>Gender</h2>
{renderItems(days, "time")}
</header>
</div>
);
}
export default App;
how can i stop scrolling body with navbar in mobile view responsive i get to make stop scroll in mobile view responsive help me to fix it 48
I am building a mobile responsive website that has a nav menu. When I get to the bottom of the menu – If I continue scrolling when I reach the bottom of the menu – it scrolls the page in the background. How can I disable it?
const blogPostSchema = Schema({
title: String,
tags: [String]
});
How to edit delete works on the tags as I want to do crud operation on tags as I got documentation for it not getting understand thanks in advance and here is the url of that documentation
https://masteringjs.io/tutorials/mongoose/array
As I want to know these schema work in mongodb through mongoose as I am struggling how things works
I have a existing App where all units are made in px.
The thing was done with poorly responsivenes, but i don’t want to change the whole thing now.
Im pretty new to Svelte, but saw there is a possibility to collect the clientWith and height dynamically from the svelte:window element.
Is there a way to apply this dnamically via transform: scale(?,?) css? so that with and height allways use the whole display of a given device.
I use this configuration:
"devDependencies": {
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-node-resolve": "^11.0.0",
"rollup": "^2.3.4",
"rollup-plugin-copy-assets": "^2.0.3",
"rollup-plugin-css-only": "^3.1.0",
"rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-svelte": "^7.0.0",
"rollup-plugin-terser": "^7.0.0",
"svelte": "^3.0.0"
},
"dependencies": {
"@rollup/plugin-json": "^4.1.0",
"convert-csv-to-json": "^1.3.3",
"d3": "^7.4.4",
"miragejs": "^0.1.45",
"mock-socket": "^9.1.5",
"sirv-cli": "^2.0.0",
"svelte-i18n": "^3.4.0",
"svelte-keyboard": "^0.5.5",
"svelte-navigator": "^3.2.2",
"svelte-preprocess-sass": "^2.0.1",
"ws": "^8.9.0"
}
To collect the dimesions, i tryed to use:
<script>
let scale = 1;
let innerHeight = 800;
let innerWidth = 1024;
$: scale = Math.min((innerWidth ? innerWidth : 0) / 1024, (innerHeight ? innerHeight : 0) / 800);
</script>
<svelte:window bind:innerWidth bind:innerHeight />
Then on the topmost div in the app i try to apply the style like this:
<div on:contextmenu|preventDefault style={bind({ transform: `scale(${scale})` })}>
But i keep receiving this error:
index.mjs:362 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'insertBefore')
at insert (index.mjs:362:12)
at insert_dev (index.mjs:2011:5)
at Object.mount [as m] (Router.svelte:197:1)
at mount_component (index.mjs:1827:26)
at Object.mount [as m] (Route.svelte:117:24)
at Object.update [as p] (Route.svelte:98:14)
at update (index.mjs:1093:36)
at flush (index.mjs:1060:13)
I’ve been working on tampermonkey script on Mozilla and it works fine, it has it’s flaws but it works; I decided to test it out on greasemonkey and Chrome(greasemonkey works fine) and even though it is still tampermonkey it seems like addEventListener is not working at all for Chrome;
var projsubOptions = document.createElement('select');
projsubOptions.id = "projSuboptions";
projsubOptions.className = "sapcnqr-popper__target sapcnqr-select__popper sapcnqr sapcnqr-input-group sapcnqr-select__input-group sapcnqr-input-group--lg"
for(var i1 = 0; i1 < stack.projects.length; i1++){
projOptions.innerHTML += "<option id=" +stack.projects[i1].identity + ">" + stack.projects[i1].projectName + "</option>";
}
outterdiv1.appendChild(projOptions);
outterdiv2.appendChild(projsubOptions);
for (var i2 = 0; i2 < stack.projects.length; i2++) {
(function () {
var projectX = stack.projects[i2];
document.getElementById(stack.projects[i2].identity).addEventListener(
"click", function() { projectX.populateHTML();}, false
);
}());
}
});
Basically, I have a class of elements that I need to render into an options separately and for each of them to have different function parameters that are based on other class (nested functions).
Though the issue here is that the addEventListener does absolutely nothing in Chrome and works fine in Mozilla. Any thoughts?
I’ve tried changing addEventListener(“change”,console.log(“x”),false); Tried adding event listened on element (projOptions), even tried setting up one of the labels as button and firing onClick and it still doesn’t work. IF I do not encapsulate console.log into function() {} it fires up on load, if I do, it doesn’t work at all
Uncaught (in promise) undefined
WebPDFJRWorker.js?h=…e055744205ae90ad8:1
does anyone know how to fix this ?
this is when trying to load the pdf editor via Asp.net core web application