lightsensor

u/lightsensor


r/vuejs•

Hi everyone, I have a question. How would you handle placing markers on Google Maps? Consider that I need to pass Google Maps an HTMLElement. At first I was using the Vue function "h" to render a Vue component into a HTMLElement but I'm scared of its life cycle and I don't like having to use an observer to make it "reactive".

I then tried to use a Teleport: basically I create an empty div and feed it to Google maps as a marker and then I fill the div with my component using a Teleport.

My colleagues told me this is not the correct use of Teleport but I would like to know your opinions too.

Thanks in advance!

113

r/vuejs•

I was discussing with a collegue earlier today about this situation

<script>
const a = ref(0)

function f(x) {
  return x + a.value
}
</script>

<template>
  <div>{{ f(3) }} </div> // if 'a' changes the result updates
</template>

I was not convinced this could work but after some testing it turned out that calling the function from the template really acts like a reactive element. I thought the function would return a value and then stay still until at least a reload happened (note that the function was called without a reactive element for parameter, x is static).

My question is, is it good practice? Is it documented or it's just an edge case t

528

r/vscode•

Hello everyone, I don't know if anyone experienced this as well but I have had this issue on both my personal PC and work PC (Mac book air and Mac book pro, both about 1 year old).

​

Basically my intellisense is absent when I use copilot and it's insanely slow when I use snooze it.

​

I have read on the subreddit that enabling copilot disables intellisense (which imo is really dumb because the engineers could have worked around something to make them function together (I don't even think copilot reads intellisense suggestions otherwise 80% of my suggestions wouldn't be trash)) so anyway that checks in.

​

But when I snooze copilot I get suggestions from intellisens

812

Buongiorno, il titolo può essere un po' fuorviante quindi tento di spiegare meglio. Lavoro in un'azienda X in cui sono entrato tramite alla loro azienda di recruiting esterna Y. Non mi sto trovando benissimo in azienda, mi hanno messo a lavorare con tecnologie non specificate nel momento dell'assunzione e che non sono interessato ad imparare (non per mancanza di voglia di imparare ma perché sono interessato a fare carriera in altre direzioni) (lavoro nell'ambito dello sviluppo). Ho trovato un'altra offerta ma ho notato che l'azienda di recruiting è la stessa. A regola il responsabile HR è un altro rispetto a quello che ha seguito me ma ho comunque ansia che condivida informazioni con il mio

25

r/AITAH•

A very close friend of mine confessed me a secret about his relationship with his girlfriend and explicitly asked me to not tell anyone, not even my girlfriend. He said he has nothing against her but he just feels better with no one knowing it except close friends.

That friend and his girlfriend had an almost break up a few weeks ago and my girlfriend asked me if I knew why. I have a policy of 0 lies so I told her I had some information but I had promised to not tell a soul.

She got really mad and said that this counted as a lie and also a secret and that I had a secret with her. She said that her trust was compromised because I should have told her.

I feel like I didn't lie at all becaus

26

r/macbook•

I followed this guide to reset my Mac https://support.apple.com/en-us/102664 But I stopped at step 5 and forgot to continue (I didn't connect it to the WIFI). Was that important? Is it still possible to retrieve my files?

I sold it to a person I kind of know that lives 2 hours away from me and I wouldn't like to have to drive there to finish the procedure. Thanks in advance!

13

r/sveltejs•

I'm building a nested tree of objects. This the structure

class Paragraph {
    ID: string;
    indexes: number[];
    title: string;
    validated: boolean;
    column: DescriptionElement[];
    children: Paragraph[];
}

I want to create a new div for every child inside children. I have 2 components:
- SvelteDocument
- SvelteParagraph

Inside SvelteDocument I have a state which is an array of Paragraph. I'm passing the array like this

<div>
     {#each paragraphs as paragraph, index (index)}
           <SvelteParagraph bind:paragraph={paragraphs[index]} disabled={false} />
     {/each}
 </div>

Inside SvelteParagraph we get the pro

17

r/sveltejs•

I'll explain my set up: I'm building a standalone website that should work in various way with SSR.

I also want to export some components (that won't need SSR) to embed them inside an old PHP website.

I have already done something like this but with a svelte project and an adapter static. Can I keep the adapter node but still export fully functional JavaScript components to use them in websites that don't have access to node?

Thanks in advance!

57

r/aws•

As title, I'm coming from Google Cloud Run for my backend and for my new job I'm forced to used aws. I think ECS is the most similar to Cloud Run but I can't figure out how to expose my APIs. Is it really the only way to make it work to create a VPC and a gateway? In cloud run I get directly a URL and I can use it straight away.

Thank you for probably a very noob question, feel free to abuse me verbally in the comments but help me find a solution 🙏

99

r/node•

Here is the problem. I'm typing from my phone so I can't share code rn but I'll try to explain.

I have an async function Foo() that is called 10 times in a for loop without await

Inside the Foo() there are 3 exec that call time consuming tasks.

When I run the loop I would expect to see the exec starting asynchronously all together but they clearly start synchronously.

Is there something I'm missing or is my code probably wrong? Thanks!

110

r/videography•

As title states, I'm going to shoot a video during a foam party. My camera is a Sony A7II so not water sealed. I was wondering what's the best way to protect my gear during the event.

I didn't want to buy a full water sealing protection because those cost a lot. Also I'd like to use my gimbal (if possible, otherwise I'll just go hand held or use the mechanical one that is not affected by water).

Any suggestion is welcome, thanks!

23

r/learnprogramming•

Hi everyone. I0m trying to complete an assignment but i got stuck here. I don't understand how calling a function multiple times on a struct (the function doesn't modify the struct) results in a segmentation error. At the end of the code you can see the cases where it works and where it does not. If you can tell me what's wrong with it it would be of great help thanks!

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

#include <math.h>

​

typedef struct exa{

int len;

double *vect;

double avg;

double std;

`char filename[30];`

} Exam;

​

void printExam(Exam *exam) {

`printf("%10d %10.2f %10.2f

25

r/webdev•

Hi everyone, i was wondering if anyone knew some good ticketing system (selling tickets for an event) that can be easily embedded in my website through some API. The system should be able to process payments and let me access the list of all the signed users

11