StackOverflow.com

VN:F [1.9.22_1171]
Rating: 8.5/10 (13 votes cast)

Random snippets of all sorts of code, mixed with a selection of help and advice.

Can You Please Help Me What In The World Am I Doing

28 March 2026 @ 11:26 pm

How do i make a controller for a top-down shooter game in Game Maker Studio 2? I'm new to the GML Visual coding language I tried everything but I'm more used to GML Code and the code is always bloated.

Collaboration between tenants on Microsoft 365

28 March 2026 @ 11:25 pm

I’ve been researching collaboration between tenants to better understand the available options, but I’m struggling to find a clear path to follow. My goal is to “connect” the tenants to improve collaboration between colleagues from different companies including Teams, SharePoint, Outlook, and calendars. I have a couple of questions: Would you recommend continuing with two separate tenants, or moving to a single tenant? What approach would you suggest for this type of collaboration? Should we consider upgrading licenses (e.g., to include Azure AD P1), or is there a better alternative?

Interpolation between arrays of different dimension

28 March 2026 @ 11:16 pm

I am working on a 1D rod heat diffusion simulation with a moving heat generation term. Below is my code for the moving source: # Functions def wf_pos(t): """ Position of the heat source position in m """ position = np.sqrt(t * dt) # interpolate position_interp = interp1d(t, position) return position_interp I am then integrating the following ODE: def ode(t, T, Nx, x, dx): """ The ODE from of the spatially discretized PDE """ # laplacian NX = len(T) Tp = np.zeros((NX)) for i in range(1, NX-1): Tp[i]=((T[i-1] - 2 * T[i] + T[i+1])) # finite difference num # compute the heat source at this time # (only need time) x = wf_pos(t) # position of the source (interpolated) lindex = lindex_func(x) # tells us which configuration number we are at Q_val = Qi_func(lindex) # heat generated by sou

How to change date format from day-month-year to month-day-year

28 March 2026 @ 11:16 pm

I have two very simple columns of data that I am trying to rbind, but can't because one is in day-month-year format and the other is in month-day-year format. I have been able to convert dates before with no issue, however this time my data won't convert with the same code I used last time, and suggested code from similar questions has not worked either. enter image description hereenter image description here These are the two tables I am trying to rbind, and I would like the "Group.1" date format for the table on the right to match the date format of the table on the left. This is the code I have been using (the bottom two lines are trying to do the same thing, they are simply two different methods I have tried): normaxav <-aggregate(nordatamax$Mortality.rate, by=list(nordatamax$End.Date),FUN=length) normaxav$date <- for

Why do email providers like Gmail block emails I send to Cloudflare email router to route to my personal email?

28 March 2026 @ 10:57 pm

I am trying to implement Cloudflare email routing so that all emails sent to [email protected], [email protected], [email protected] go to my personal Gmail Inbox. However, Gmail and other email providers deny my email upon sending, and I don't receive any of the intended-to-receive emails. I get 551 5.7.1 denied errors in gmail, and no responses/emails sent in other mailing systems. What I Have Already Done I have set the allowlist variable in the Cloudflare Email worker to match my set emails, and have properly set up the email function in the Cloudflare Email worker. Made custom routing rules and addresses so that things get redirected correctly. Check DNS records and validate them. Used different email providers to test (still, things failed). The Code This is the code for the Cloudflare Email Worker:

I want to make a conditional component in React but didnt work, What I'm doing wrong?

28 March 2026 @ 10:37 pm

Currently I have my code like this, and it works: {(users.length===0)? (<></>) : ( <Pagination sx={{ mt: '1rem' }} page={page} count={pagination.last_page} onChange={handleChangePage}/> )} But I want to have it like this: const MyComponent = () => { return ( ... <HideIf condition={users.length===0}> <Pagination sx={{ mt: '1rem' }} page={page} count={pagination.last_page} onChange={handleChangePage}/> </HideIf> ); } export default Component; const HideIf = ({condition, children}) => {   if(condition){     return ( <></> );   }   else {     return (       <>{children}</>     );   } } export default HideIf; And with this form, It gaves me the following error _Cannot read properties of null (reading 'last_page')_

Can importing a python package override core features like dict, list, or set comprehension?

28 March 2026 @ 3:08 pm

I'm idly working on a frankly terrible joke collections package. One that claims the world, accomplishes very little, and is worse than useless. One thing I would 'love' to do is have this package be slightly infectious - that as you run your program with it, not only does it give you awful useless collections, but slowly replaces creation of standard collections with its own. This is, honestly, something that should not be possible in a secure language. But is it possible? I managed to override the dict() function easily, but dict comprehension still returned the standard dictionary instead of calling my function underneath.

I am completely new to coding and looking for advice

28 March 2026 @ 1:44 pm

I am completely new to coding and looking for advice on the best ways to learn for free and what language(s) to start with, sources of information, things to avoid, etiquette etc. Books, YouTube, online learning platforms. Please can you help? Thanks so much. GG.

How can I fix the Prettier extension?

28 March 2026 @ 12:19 pm

I'm using the VSCode extension called Prettier to distinguish between text strings, but it doesn't seem to be working. I was using it 10 minutes ago and it was working fine, but when I closed the program and reopened it, it stopped working. I've tried everything, but it's not working anymore. I NEED HELP/ Estoy usando la extension de VSCode llamada Prettier para poder distinguir las cadenas de texto, pero por lo visto no funciona. La esava usando hace 10 min y iva bien, pero al cerar el programa y volver a abrirlo, ya no funcionava. He intentado de todo pero ya no va. NESESITO AYUDA

Extending class and assigning different value to an existing property

27 March 2026 @ 2:25 pm

I'm trying to extends a class and assign a different value for a property that has been already defined in the parent class. The new value is from the allowed values: class X { constructor() { /** @type {'a'|'b'|'c'} */ this.property = 'a'; } } class Y extends X { constructor() { super(); this.property = 'b'; } } I get error: Class 'Y' incorrectly extends base class 'X'. Types of property 'property' are incompatible. Type 'string' is not assignable to type '"a" | "b" | "c"'. What an I not understanding? Am I forced to redefine the property type on child class? Here is