Need to hire a Chrome Extension Developer ASAP

I am looking for a chrome extension that will allow me to input an instagram username and output all posts that were paid partnerships. I would like to be able to export the following information into a spreadsheet: Tagged Accounts, Mentioned Accounts, Hashtags used and keywords that indicated it was a paid promotion (i.e., hashtags including “#ad”, #sponsored”, “#paid”, or other keywords and hashtags that include such keywords, and “Paid Partnership” banner (if possible)). Are you capable of this? Thanks!

Please let me know if you can do this ASAP and we can exchange info

How to calculate latitude and longitude based location of mouse on map

I have a map image (4 different images organized for one visual image, downloaded from an OpenStreetMap map). With this map, I am wanting to get the latitude and longitude on the map of the users mouse position (for comparing to the location of a real location).

enter image description here

The longitude is pretty easy to calculate since it is uniformly spaced. The latitude is where I am having problems.

Here are some of the things I’ve tried:

  • I have tried getting the latitude of easy to spot land, and the mapping them on my map and tried to calculate from them, but to no avail.
  • I’ve tried doing calculations using the equation for arclength, sin(θ), and tan(θ). And just trying any possible thing I could think of related to angles and the shape of the Earth. But nothing I tried gave me the correct latitude.
  • I searched online for solutions, but didn’t find anything that seemed to be related to my problem. It almost seems like either no one has had this same issue, or have never published any notes on their solution.
  • I attempted to find a question here on StackOverflow about my problem, but the closest thing I found was this one. That just points me in a direction, but I don’t really want to go in that direction (at least myself), I know the idea of bilinear interpolation, but I am not quite comfortable enough with the concept to come up with a solution to my problem that way.
  • Also when I was searching on SO, I found many questions asking about calculating it, but they were using Google Maps, Google Maps API, or some other somewhat related tool.

How can I calculate latitude based on mouse location on the map? I do not want to switch to using a Google Maps API (or any other related tool) to have it practically automatically give me the lat/long.

If bilinear interpolation is the only way, can someone please give me a little more info about it and how I might go about doing it that way?

how to disable skipFiles in vscode JavaScript debug terminal

How can vscode’s JavaScript Debug Terminal be coerced into stepping into node’s internal files? There are many questions and answers about how to skip node internal files, but my question is the opposite.

I’ve tried:

“debug.javascript.terminalOptions”: {
“skipFiles”: [
“<node_internals>/**/*.cc”
]
},

“debug.javascript.terminalOptions”: {
“skipFiles”: []
},

and not inserting any debug.javascript.terminalOptions. vscode still steps over calls to node internals. It seems like skipping node internal files is a hardcoded setting.

Making Audio Visualiser for LIFX Bulb

I’m trying to create a program in JavaScript to control an LIFX Smart Bulb. At the minute I have all the basic features such as turning on and off, changing colour etc., which were all easily developed via the API.

I was wondering how I would go about creating a feature where the bulb changes its colour and brightness based on the input to my device’s microphone? I’m relatively new to JavaScript and I’m not sure of the best way to capture the microphone’s input and have that change the colour and brightness on the bulb.

How to get event.target.result in javascript indexdb typescript working?

In my javascript/typescript project I have this code

        request.onupgradeneeded = (event: IDBVersionChangeEvent) => {
            console.log('idb onupgradeneeded firing');
            const db = event.target.result;
            //if (db != null) {
                //console.log(`Upgrading to version ${db.version}`);
                if (!request.result.objectStoreNames.contains(this.#name)) {
                    request.result.createObjectStore(this.#name, {keyPath: 'id', autoIncrement:true});
                }
            //}
        };

But the problem is this code

event.target.result;

Shows an underline saying Property 'result' does not exist on type 'EventTarget'.

How can I fix this in typescript?

use function search substring js

I want to write a code in the JavaScript language that searches for the number of repetitions of letters in a word, like this code, but in a short way o(1).

function naiveSearch(long, short){
    var count = 0;
    for(var i = 0; i < long.length; i++){
        for(var j = 0; j < short.length; j++){
           if(short[j] !== long[i+j]) break;
           if(j === short.length - 1) count++;
        }
    }
    return count;
}
naiveSearch("lorielol loled", "lol")

React State not updating before callback function executes (Version 16.4.1)

I have a react onChange method on a dropdown UI component (Custom react component, not standard HTML) which updates the state to the newly selected value when a user selects an item from the dropdown, then makes a callback to retrieve new data from an API based on this new state.

Despite the API call being in a callback, the state is always stale by 1 interaction, meaning if I select 1, it will make the API call with the relevant state variable set to 0 (default value), and if I then select 2, it makes the API call with the relevant state variable set to 1.

Usually this happens because the function being called is NOT a callback, but in this case it is so I am confused how the state remains stale.

I know there are not other functions firing as there are no ComponentDidUpdate calls or anything else to interfere with this process.

I have confirmed with console logging that the new value that the state is supposed to be set to is correct in the onChange function prior to setting state, and yet the state is not set to the new value in the callback function.

I didn’t think this was possible and am stumped on what to try next to troubleshoot this, so any ideas on what this might be caused by are appreciated.

Is it possible to prevent a keystroke with Microsoft Word’s API?

I’m working on a plug-in for Microsoft Word, and I’ve run into a side case where hitting ‘TAB’ while interacting with a form in the plug-in causes the user to insert a tab in the document, not switch to the next input of the form. A side effect of this is that the modal that hosts this form is closed, as it’s triggered by highlighting text within the document.

Is it possible to use the Microsoft Word JavaScript API to prevent keystrokes within Word, while still registering them within the plug-in? Or perhaps change the focus of Word?

I was thinking about using Office.EventType.DocumentSelectionChanged, but it doesn’t seem like there’s something analagous to .preventDefault() documentation for the Word Add-In, and my guess is that something like that would prevent the user from using TAB at all.

How to add HTML link inside of my Javascript? [closed]

So in HTML if you wanted to add href in a button you’ll just have to do

      <form action="other.html">
        <input
          type="submit"
          name="other"
          value="other html"

How can I do it in Javascript?

$('#other-btn').click(function () {

When you clicked the "Retake Quiz" it will go back to the quiz, if you clicked Go back it will go to the index html. My goal is, if you clicked other it will transfer me to other raw html. How can I do that?

When you clicked the “Retake Quiz” it will go back to the quiz, if you clicked Go back it will go to the index html. My goal is, if you clicked other it will transfer me to other raw html. How can I do that?

How do I select one button on a page which has same classes as all other buttons?

How do I add event listeners on click to the edit button and make them edit different sections if the classes and HTML code is the same for all edit buttons

<div className="top-row">
  <div className="left-header">ABOUT ME</div>
  <div className="right-header">Edit</div>
</div>
<div className="bottom-row">

...

<div className="top-row">
  <div className="left-header">PLEASE UPDATE YOUR LINKS</div>
  <div className="right-header">Edit</div>
</div>
<div className="bottom-row">

Screen layout for reference

getElementByClassName() does not seem to work

How to convert MUI component to PDF?

I need to convert a MUI component into a pdf.

I want to convert the following component into a pdf and open it in the browsers pdf context:

<Typography component="h6" variant="h5">Hello World</Typography>

I tried using @react-pdf/renderer

The component:

Document>
    <Page size="A4" style={styles.page}>
      <View style={styles.section}>
        <Typography component="h6" variant="h5">Hello World</Typography>
      </View>
    </Page>
  </Document>

I then try to open it via another function:

async function openPdf() {
  const pdfBlob = await pdf(<MyPdf />).toBlob();
  const pdfUrl = URL.createObjectURL(pdfBlob);
  const pdfWindow = window.open(pdfUrl, '_blank');
  pdfWindow.document.title = 'My PDF Document';
}

But I get the following error:

TypeError: dispatcher.useInsertionEffect is not a function

I hope someone can help me

้how to upload image to cloudinary with (MERN)

this error when submit form
POST https://api.cloudinary.com/v1_1/dvq5qpz3n/image/upload 400 (Bad Request)
{“error”:{“message”:”Upload preset must be whitelisted for unsigned uploads”}}

form.jsx

const uploadImageToCloudinary = async (imageFile) => {
    const formData = new FormData();
    formData.append("file", imageFile);
    formData.append("upload_preset", process.env.REACT_APP_CLOUDINARY_UPLOAD_PRESET);
  
    const response = await fetch(
      `https://api.cloudinary.com/v1_1/dvq5qpz3n/image/upload`,
      {
        method: "POST",
        body: formData,
      }
    );
  
    const data = await response.json();
    return data.secure_url;
  };
  
  const handleSubmit = async (e) => {
    e.preventDefault();
  
    if (image) {
      try {
        const uploadedImageUrl = await uploadImageToCloudinary(image);
        const newBlog = {
          title,
          description,
          image: uploadedImageUrl,
        };
  
        await createBlog (newBlog).unwrap();
        setTitle("");
        setDescription("");
        setImage("");
 
      } catch (error) {
        console.log(error);
      }
    } else {
      console.log("Please select an image.");
    }
  };

/* CONFIGURATION */
dotenv.config();
const app = express();
app.use(express.json());
app.use(helmet());
app.use(helmet.crossOriginResourcePolicy({ policy: "cross-origin" }));
app.use(morgan("common"));
app.use(bodyParser.json());
app.use(cors());
app.use(bodyParser.json({ limit: '50mb' }));
app.use(bodyParser.urlencoded({ extended: true, limit: '50mb' }));
app.use('/blog', BlogRoutes);


/* ROUTES */
app.use("/client", clientRoutes);
app.use("/general", generalRoutes);
app.use("/management", managementRoutes);
app.use("/sales", salesRoutes);


cloudinary.config({
  cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
  api_key: process.env.CLOUDINARY_API_KEY,
  api_secret: process.env.CLOUDINARY_API_SECRET,
});



mongoose.set('strictQuery',false);
// CONFIGURATION
const PORT = process.env.PORT || 9000;
mongoose
  .connect(process.env.MONGO_URL, {
    useNewUrlParser: true,
    useUnifiedTopology: true,
  })
  .then(() => {
    app.listen(PORT, () => console.log(`Server Port: ${PORT}`));

    // User.insertMany(dataUser);
    // Product.insertMany(dataProduct);
    // ProductStat.insertMany(dataProductStat);
    // Transaction.insertMany(dataTransaction);
    // Blog.insertMany(dataBlog);
  })
  .catch((error) => console.log(`${error} did not connect`)); 

i need to build CRUD dashboard now i can create new property to mongodb but not have field of image
i already setting cloudinary to unsigned