79406290

Date: 2025-02-02 08:58:31
Score: 4.5
Natty:
Report link

Just using 'ec2-user' worked for me. Could someone tell where this user name is configured while creating EC2 instance

Reasons:
  • Whitelisted phrase (-1): worked for me
  • RegEx Blacklisted phrase (2.5): Could someone tell
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: USHA S R

79406286

Date: 2025-02-02 08:55:30
Score: 2
Natty:
Report link

This cloud be just what you want.

import { text } from "node:stream/consumers";

console.log(await text(process.stdin));

streamConsumers.text(stream) (nodejs.org)

streamConsumers.text(stream)

Added in: v16.7.0

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: reosablo

79406280

Date: 2025-02-02 08:49:29
Score: 0.5
Natty:
Report link

Turns out that my main issue was that the cookies sent by the login endpint were not being saved in my browser. I should have checked that first to make this question clearer. To fix that, I had to modify the /api/login request I was making on the front end to also have credentials: 'include'. This is because by default, when dealing with cross-origin api calls, received cookies are not saved. See this answer.

My fixed simple front-end script looks like this:

(async () => {
    console.log("logging in...")

    const loginResponse = await fetch('http://127.0.0.1:8000/api/login', {
        credentials: 'include', // <------------------------ NEW
        method: 'POST',
        headers: {
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
            username: 'test',
            password: 'securepassword123'
        })
    })
    const loginData = await loginResponse.json();
    console.log(loginData)

    if (!loginResponse.ok) {
        console.log('login failed :(')
        return
    }

    console.log("getting user info...")

    const userResponse = await fetch('http://127.0.0.1:8000/api/user', {
        credentials: 'include'
    });
    const userData = await userResponse.json();
    console.log(userData)
    if (!userResponse.ok) {
        console.log("user data fetch failed :(")
    }
})();
Reasons:
  • Blacklisted phrase (1): :(
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Ashkan Arabi

79406274

Date: 2025-02-02 08:44:27
Score: 4
Natty:
Report link

This feature was added in new version of gitea v1.23.0.

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: MoriQ

79406273

Date: 2025-02-02 08:44:27
Score: 2.5
Natty:
Report link

Make sure that there is no 'tsconfig.app.json', 'tsconfig.spec.json' file that is overwriting the 'paths' property

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: dgzornoza

79406268

Date: 2025-02-02 08:40:27
Score: 3.5
Natty:
Report link

if you use tailwind just add whitespace-pre-line classname

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: rasoul mohammadi

79406266

Date: 2025-02-02 08:40:27
Score: 1
Natty:
Report link

There is an, admittedly, not very thoroughly explained answer here, but it did work for me several times when I got this error.

When it happened to me, I quit the R session (since there was no other option), but I did save my script temporarily in another file (simply copy-pasting it).

When I reopened the project and the associated script files, I did not need to use the backup script to update my work --- however, I must say I would always make a backup.

So, in brief, RStudio should be able to restore your script without loss, at least if you reopen the session immediately, but, regretfully, I cannot tell you why, and you should make a backup whenever possible.

Reasons:
  • Blacklisted phrase (0.5): I cannot
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: streamline

79406265

Date: 2025-02-02 08:39:26
Score: 3.5
Natty:
Report link

Good news! This has been resolved in Access version 2501. After the MSOffice update on 28th Jan the issue is now fixed.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: jedder

79406264

Date: 2025-02-02 08:38:26
Score: 3.5
Natty:
Report link

i think that the simplest way would be: uv pip freeze > requirements.txt

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: unter

79406256

Date: 2025-02-02 08:31:25
Score: 0.5
Natty:
Report link

application.properties:

ADD

spring.servlet.multipart.max-request-size=50MB
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Has no white space (0.5):
  • High reputation (-1):
Posted by: life888888

79406249

Date: 2025-02-02 08:27:24
Score: 1
Natty:
Report link

Using preload, our custom font is downloaded, but it is not used or rendered yet. Fonts will only be fully activated when they are actually used on the page (i.e. used by actual text or invisible text [like your hack]).

Your hack forces the browser to apply the font and render it on an invisible text, so next time when actual text appears, our font is loaded, cached and activated so it’s available to be applied instantly without any delay.

Extra point: We can use {font-display: swap} to reduce the delay to load the text with custom font but the hack works fine and I think is the best way to ensure the text is loaded with custom font without any delay.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Harsh

79406239

Date: 2025-02-02 08:17:22
Score: 3
Natty:
Report link

libssh2.dll copy from root php to apache>bin

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: user3205930

79406231

Date: 2025-02-02 08:02:19
Score: 0.5
Natty:
Report link

This is the full code that works below.

Note in the frontend the first communication is to /generate-token which builds the Oauth url where the user logs in.

Once the user has logged in there is a callback to /oauth2/callback/google with the authCode as paramter that is used to get the refreshToken.

Using @dip-m's answer.


@Controller
class GmailController(
    private val securityUtils: SecurityUtils,
    private val googleOAuthService: GoogleOAuthService
) {
    @GetMapping("/settings")
    fun getSettingsPage(model: Model): String {
        if (!model.containsAttribute("tokenGrantSuccess")) {
            model.addAttribute("tokenGrantSuccess", model.getAttribute("tokenGrantSuccess"))
        } else {
            model.addAttribute("tokenGrantFail", false)
        }
        return "setting"
    }

    @GetMapping("/oauth2/callback/google")
    fun refreshTokenCallBack(
        redirectAttributes: RedirectAttributes,
        @RequestParam("code") authCode: String,
    ): String {
        val currentUserEmail = securityUtils.getCurrentUser()?.email
            ?: throw OAuthException("User not authenticated")

        googleOAuthService.handleOAuthCallback(authCode, currentUserEmail)
        redirectAttributes.addFlashAttribute("tokenGrantSuccess", true)
        return "redirect:/settings"
    }
}

@Service
class GoogleOAuthService(
    private val jdbcClient: JdbcClient,
    @Value("\${spring.security.oauth2.client.registration.google.client-id}") private val clientId: String,
    @Value("\${spring.security.oauth2.client.registration.google.client-secret}") private val clientSecret: String,
    @Value("\${spring.security.oauth2.client.registration.google.redirect-uri}") private val redirectUri: String,
    @Value("\${spring.security.oauth2.oauthUrl}") private val oauthUrl: String,
    @Value("\${spring.security.oauth2.client.registration.google.scope}") private val scope: String
) {
    private val logger = LoggerFactory.getLogger(GoogleOAuthService::class.java)
    private val jsonFactory: JsonFactory = GsonFactory.getDefaultInstance()
    private val httpTransport: NetHttpTransport = GoogleNetHttpTransport.newTrustedTransport()

    fun handleOAuthCallback(authCode: String, userEmail: String) {
        try {
            val response = GoogleAuthorizationCodeTokenRequest(
                httpTransport,
                jsonFactory,
                clientId,
                clientSecret,
                authCode,
                redirectUri
            ).setGrantType("authorization_code").execute()

            updateUserRefreshToken(userEmail, response.refreshToken)
        } catch (e: Exception) {
            logger.error("Failed to handle OAuth callback", e)
            throw OAuthException("Failed to process OAuth callback: ${e.message}")
        }
    }

    private fun updateUserRefreshToken(email: String, refreshToken: String) {
        jdbcClient.sql("""
            UPDATE users SET refresh_token = :refreshToken WHERE email = :email
        """.trimIndent())
            .param("refreshToken", refreshToken)
            .param("email", email)
            .update()
        logger.info("User refresh token successfully updated for email $email")
    }

    fun generateOAuthUrl(): String {
        validateOAuthConfig()
        return try {
            buildOAuthUrl()
        } catch (e: Exception) {
            logger.error("Failed to generate OAuth URL", e)
            throw OAuthException("Failed to generate OAuth URL: ${e.message}")
        }
    }

    private fun buildOAuthUrl(): String {
        val encodedRedirectUri = URLEncoder.encode(redirectUri, StandardCharsets.UTF_8.toString())
        val encodedScope = URLEncoder.encode(scope.replace(",", " "), StandardCharsets.UTF_8.toString())

        return UriComponentsBuilder.fromUriString(oauthUrl)
            .queryParam("client_id", clientId)
            .queryParam("redirect_uri", encodedRedirectUri)
            .queryParam("response_type", "code")
            .queryParam("scope", encodedScope)
            .queryParam("access_type", "offline")
            .queryParam("prompt", "consent")
            .build()
            .toUriString()
    }

    private fun validateOAuthConfig() {
        val missingFields = buildList {
            if (clientId.isBlank()) add("clientId")
            if (redirectUri.isBlank()) add("redirectUri")
            if (oauthUrl.isBlank()) add("oauthUrl")
            if (scope.isBlank()) add("scope")
        }

        if (missingFields.isNotEmpty()) {
            val errorMessage = "Missing required fields: ${missingFields.joinToString(", ")}"
            logger.error(errorMessage)
            throw OAuthException(errorMessage)
        }
    }
}

class OAuthException(message: String) : RuntimeException(message)

@RestController
class GmailRestController(private val googleOAuthService: GoogleOAuthService) {
    @GetMapping("/generate-token")
    fun generateRefreshToken(): String = googleOAuthService.generateOAuthUrl()
}

Frontend code, ScriptsStylingAndMeta just imports HTMX, Shoelace and Bootstrap:

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:hx-on="http://www.w3.org/1999/xhtml">
<head>
  <div th:replace="~{fragments :: ScriptsStylingAndMeta}"/>
  <title>Settings Page</title>
  <style>
    .settings-card {
      background-color: var(--sl-color-neutral-0);
      border-radius: var(--sl-border-radius-medium);
      box-shadow: var(--sl-shadow-medium);
      padding: var(--sl-spacing-large);
    }

    .settings-description {
      color: var(--sl-color-neutral-600);
      margin-bottom: var(--sl-spacing-medium);
    }

    .success-message {
      display: flex;
      align-items: center;
      gap: var(--sl-spacing-small);
    }

    .hidden {
      display: none;
    }
  </style>
</head>
<body>
<div th:replace="~{fragments :: header}"/>

<div class="container py-5">
  <sl-card class="settings-card">
    <div class="settings-section">
      <sl-header class="mb-4">
        <h2>Google Integration</h2>
      </sl-header>

      <div id="integration-status" th:fragment="status" class="stack">
        <div th:if="${tokenGrantSuccess}" class="success-message" role="status">
          <sl-alert variant="success" open>
            <sl-icon slot="icon" name="check2-circle"></sl-icon>
            Refresh token has been successfully configured!
          </sl-alert>
        </div>

        <div th:unless="${tokenGrantSuccess}">
          <p class="settings-description">
            Generate a refresh token to enable Gmail integration with your account.
          </p>
          <sl-button
                  variant="primary"
                  size="large"
                  hx-get="/generate-token"
                  hx-trigger="click"
                  hx-swap="none"
                  hx-indicator="this"
                  hx-on::after-request="handleTokenResponse(event)"
                  aria-label="Generate Gmail refresh token"
          >
            <sl-icon slot="prefix" name="key"></sl-icon>
            Generate Refresh Token
          </sl-button>

          <sl-alert
                  variant="danger"
                  class="error-message hidden"
                  id="error-message"
          >
            <sl-icon slot="icon" name="exclamation-triangle"></sl-icon>
            Failed to generate token. Please try again.
          </sl-alert>
        </div>
      </div>
    </div>
  </sl-card>
</div>

<script>
  document.addEventListener('DOMContentLoaded', () => {
    // Ensure Shoelace components are defined
    customElements.whenDefined('sl-alert').then(() => {
      const errorAlert = document.getElementById('error-message');

      function handleTokenResponse(event) {
        const response = event.detail.xhr.response;
        if (response) {
          window.location.href = response;
        } else {
          console.error('Invalid response received');
          errorAlert.classList.remove('hidden');
          setTimeout(() => {
            errorAlert.classList.add('hidden');
          }, 5000);
        }
      }

      window.handleTokenResponse = handleTokenResponse;
    });
  });
</script>
</body>
</html>
Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @dip-m's
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: pleasebenice

79406226

Date: 2025-02-02 07:56:17
Score: 9.5 🚩
Natty: 4.5
Report link

were you able to solve this issue? i am facing something similar

Reasons:
  • Blacklisted phrase (1): you able to solve
  • RegEx Blacklisted phrase (1.5): solve this issue?
  • RegEx Blacklisted phrase (3): were you able
  • Low length (1.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: WiZarD

79406210

Date: 2025-02-02 07:36:13
Score: 2.5
Natty:
Report link

Run your program, open Task Manager, right click and select "Open File Location", then copy the exe file to the USB.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: 許恩嘉

79406204

Date: 2025-02-02 07:30:12
Score: 3.5
Natty:
Report link

not working in ubuntu ( ver. 24.04 - but in ver.22 works fine )

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: rafal saint

79406199

Date: 2025-02-02 07:26:11
Score: 2
Natty:
Report link

When comparing Angular Modules and Modular Website Design, it's essential to understand their roles in website designing and development. Angular Modules help developers structure and manage large-scale applications efficiently, improving maintainability and scalability. On the other hand, Modular Website Design focuses on reusable components, ensuring flexibility and faster development. Both approaches enhance project efficiency but serve different purposes. If you're a business handling VAT Registration, a modular approach can streamline compliance-related features, making updates and modifications seamless.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): When
  • Low reputation (1):
Posted by: Hugo Hall

79406180

Date: 2025-02-02 07:06:08
Score: 2.5
Natty:
Report link

I am stuck by this limitation too, and it is still NO today. Unless the parsing algorithm of the "in head" insertion mode is updated to allow custom elements, they will be moved into the <body> element.

Reasons:
  • RegEx Blacklisted phrase (1.5): I am stuck
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Siu Pang Tommy Choi

79406178

Date: 2025-02-02 07:05:08
Score: 0.5
Natty:
Report link

Problems: Line 27 (photo = ImageTk.PhotoImage(img)) is unnecessary and should be removed. img is a local variable, and Python's garbage collector removes it after the function exits. As a result, the image disappears from image_label. The solution is to store the image as a global variable or an attribute of so that it persists.

Reasons:
  • Whitelisted phrase (-1): solution is
  • No code block (0.5):
  • Low reputation (1):
Posted by: NotKamy

79406173

Date: 2025-02-02 06:57:06
Score: 3.5
Natty:
Report link

In your authorizeUser function, are you using bcrypt? I also got the same error and solved it by removing bcrypt. How do I salt & hash the password then? Currently I have no solution for this.

I really should look into the error stack trace and maybe opening a new issue either on Next.js or Auth.js github

Reasons:
  • Blacklisted phrase (1): How do I
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Rezha Bahari

79406172

Date: 2025-02-02 06:53:05
Score: 0.5
Natty:
Report link

I hope this helps, I updated the mongodb version, I tried to install bson but it wasn't compatible and I had installed already mongoose in my project so I extracted the ObjectId from the Types object import { Types } from 'mongoose';. ex. Types.ObjectId

Reasons:
  • Whitelisted phrase (-1): hope this helps
  • Low length (0.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: David Nuñez

79406166

Date: 2025-02-02 06:47:05
Score: 1.5
Natty:
Report link

A good example of a .inc file would be ename.c.inc file which defines an array of strings, ename and those are the symbolic names corresponding to the errno values on the Linux/x86-32 system for example. It is hardware architecture specific though.

Source: The Linux Programming Interface book: Chapter 3, Page 57

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: skm

79406158

Date: 2025-02-02 06:40:03
Score: 3
Natty:
Report link

Issue solved by modifying emulator setting.

SDK Manager > Tools > Emulator > Uncheck 'Launch in the Running device tool window

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: josephyumss

79406157

Date: 2025-02-02 06:40:03
Score: 1
Natty:
Report link

Maybe this will help with someone having a similar,but not exact, issue as OP's. that come across this post when searching for solution.

I had a similar problem on Linux system when trying to build a Kotlin project using Gradle Wrapper. I eventually traced problem to that months back I was building using a local install of gradle rather than gradlew. When I started using gradlew, I removed the local Gradle install, but forgot that I had put a PATH variable in my .bashrc file that referenced the local Gradle install.

Once I removed the PATH variable setting in the .bashrc file, the gradlew build and run worked fine.

If I understand correctly, if the build process detects a reference to a local install it will override the wrapper method and attempt to use a local Gradle process (and its javatool chain references, etc) for the build.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Gary Winston

79406150

Date: 2025-02-02 06:32:02
Score: 0.5
Natty:
Report link

Everything is clearly explained in the documentation: CSS scroll snap. The example Scroll snap in action is pretty clear: you can look at some large scene with objects through a viewport.

If the objects' layout is regular, you may prefer not smooth scrolling, but scrolling snapping at certain object features, for example, centering each object in the viewport, see the objects aligned by one of the sides of their bounding rectangles, and so on.

To see the difference in behavior, check or uncheck the checkbox disable snapping, use both the arrows and the sliders of the scrollbars.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Sergey A Kryukov

79406147

Date: 2025-02-02 06:30:01
Score: 1
Natty:
Report link
  1. Your card view contains multiple child elements without containing viewGroup(Relative or constraint layout) in the cardview first you take one view group and inside place all whatever you want.

  2. It maybe because of your android:background="@drawable/custom_text" check it this properly it once what it is doing.

  3. Remove backgroundTint for the card it maybe confict with the cardview

  4. And try to apply the visiblity for the edittext at run time edittext.setVisibility(View.VISIBLE);

let me know still if you face any issue

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Thogaruchesti Hemanth

79406139

Date: 2025-02-02 06:19:00
Score: 2
Natty:
Report link

I made a workable template for using tailwind + shadcn in nextra.

You can find the config or direct use it at Github: nextra-docs-tailwind-shadcn-template

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Observed Observer

79406124

Date: 2025-02-02 06:03:55
Score: 4
Natty: 5.5
Report link

TÔI MUỐN TÌM SNI NHÀ MẠNG IFU CỦA FET

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: anh quyen

79406121

Date: 2025-02-02 05:56:54
Score: 3
Natty:
Report link

This is just a guess, you can try running the app on your own phone, delete targetSdkVersion 34, and try a different version of the phone like API 34 35

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Atrideistria l

79406117

Date: 2025-02-02 05:52:52
Score: 5
Natty:
Report link

enable::::::::::::::::::::::::::::::mod_filter,mod_deflate

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Has no white space (0.5):
  • Single line (0.5):
  • No latin characters (1):
  • Filler text (0.5): ::::::::::::::::::::::::::::::
  • Low reputation (0.5):
Posted by: user3205930

79406113

Date: 2025-02-02 05:48:51
Score: 0.5
Natty:
Report link

Adding \n in the string adds a new line.

For example,

print(f"Adds one extra line after the text \n")
print(f"Adds two extra lines after the text \n\n")
print(f"Adds three extra lines after the text \n\n\n")
print(f"And so on..")
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Himanshu Singh

79406108

Date: 2025-02-02 05:40:49
Score: 3
Natty:
Report link

The issue was the limit on the number of AWS lambda parallel threads. It was 10 by default. I made a request to increase it to 1000 and everything works well now.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Vahagn

79406105

Date: 2025-02-02 05:36:49
Score: 3
Natty:
Report link

I have this issue too. The flickering seems a driver issue. If you use Chrome, try disabling Hardware Acceleration in Chrome.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Michael

79406102

Date: 2025-02-02 05:29:47
Score: 2
Natty:
Report link

I do not have enough stackoverflow points so I am responding via an answer.

Given that you have "LockAcquisition", I assume you are using a version column.

If you are using versioning, there are some additional annotations you might require depending on what type of locking approach you are taking.

For instance, for optimistic locking there's the annotation below where you can specify the exact lock type mode you want.

@Lock(LockModeType.OPTIMISTIC_FORCE_INCREMENT)

And also exceptions related to optimistic locking such as OptimisticLockException.class, CannotAcquireLockException.class, UnexpectedRollbackException.class, etc based on your requirements..

If this isn't the case, let me know and I can try to help as I have PROD experience with having to implement retryable.

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Mark Park

79406091

Date: 2025-02-02 05:11:45
Score: 0.5
Natty:
Report link

Try to do it in NgOnChange lifecycle hook.

ngOnChanges(changes: SimpleChanges) {
if (changes['username']) {
  this.username = changes['username'].currentValue;
}
if (changes['image_url']) {
  this.image_url = changes['image_url'].currentValue;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Raihan Ridoy

79406089

Date: 2025-02-02 05:10:45
Score: 3
Natty:
Report link

I removed Frame control from my Collectionview DataTemplate.

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: sham

79406086

Date: 2025-02-02 05:06:43
Score: 2
Natty:
Report link

This often occurs in webpack 4.x. What version are you using? Upgrading to 5 can help.

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: Charles Owen

79406083

Date: 2025-02-02 05:01:42
Score: 3.5
Natty:
Report link

Selecting the default python interpreter fixed the issue for me.

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Jaswanth Kumar

79406075

Date: 2025-02-02 04:45:39
Score: 2
Natty:
Report link

You just need to change this line: RETURN DATEDIFF(StartHour, EndHour, HOUR)

to

RETURN DATEDIFF(StartHour, EndHour, MINUTE)

If you wanted to a fractional hour, you'd divide by 60 RETURN DIVIDE(DATEDIFF(StartHour, EndHour, MINUTE),60)

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Pieter Linden

79406072

Date: 2025-02-02 04:36:37
Score: 0.5
Natty:
Report link

To extract images from pdf in c/c++ use 'pdfimages -all sample.pdf /tmp/output' for Extracts images in their original format. And -j flags for Extracts images in JPEG format. after extracting images you can use poppler library of c to extract text from that images.

Reasons:
  • Whitelisted phrase (-1.5): you can use
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: OMKAR GULAMBE

79406070

Date: 2025-02-02 04:33:36
Score: 1.5
Natty:
Report link

I figured out the answer to my question. Found a similar process in another area of the program that was causing the file to stay open.

Reasons:
  • Whitelisted phrase (-2): I figured out
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Nat Broughton

79406069

Date: 2025-02-02 04:33:36
Score: 2.5
Natty:
Report link

it's currently a bug for macbook users. here is the bug

it should be working again on the 5th according to a user (patrickstar1234) on the issue on github.

this isn't new for docker unfortunately.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: jackpurrin

79406066

Date: 2025-02-02 04:32:36
Score: 3.5
Natty:
Report link

I'm not sure the exact intention
Are you wanting to scope/colour the capture groups separatory?

You can use "captures" to target a capture group
captures

do you have an example of a file you've trying to tokenize?

Reasons:
  • Whitelisted phrase (-1.5): You can use
  • RegEx Blacklisted phrase (2.5): do you have an
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: RedCMD

79406065

Date: 2025-02-02 04:31:35
Score: 1.5
Natty:
Report link

This is the best way!

<a id="btn" onclick='alert("Hello people up vote please...! Thanks");'>Run Function</a>
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Onyedikachi Oko - Dexter

79406063

Date: 2025-02-02 04:29:35
Score: 3
Natty:
Report link

There Is A World.frameRate block in game lab if this stops working. set the block to a really high number and put it in the draw loop.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: burritoman9

79406058

Date: 2025-02-02 04:24:34
Score: 1
Natty:
Report link

make sure you've imported both Bootstrap CSS and Bootstrap JS correctly in your index.js

import 'bootstrap/dist/css/bootstrap.min.css';
import 'bootstrap/dist/js/bootstrap.bundle.min.js';

but as you are using react I would suggest you to use Modal from react-bootstrap. Here you can find the details of it: React bootstrap Modal

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Shahnewaz Tameem

79406037

Date: 2025-02-02 03:46:27
Score: 1
Natty:
Report link

you can set the default value of an input field in several ways

  1. by using value property directly using JS:
document.getElementById('inputId').value = 'Input value';
  1. you can set it directly in the HTML using the value attribute
<input type="text" id="inputId" value="Input Value">
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Shahnewaz Tameem

79406029

Date: 2025-02-02 03:39:26
Score: 1
Natty:
Report link

ssh connection in airflow ui mention server ip,username,password, port and paste this below path in extra.load private key to data folder in gcs bucket created by composer .Instead of mention data bucket path mention below

{"key_file": "/home/airflow/gcs/data/gcp_key"}

Reasons:
  • Low length (0.5):
  • No code block (0.5):
Posted by: y durga prasad

79406015

Date: 2025-02-02 03:18:22
Score: 0.5
Natty:
Report link

Apart from the technical answers above, below answer serves as a simple mental model to fit the purpose of Script scope. Mental Model : We might want to declare some global variables but don't want to assign those variables to the global object ( reason : unnecessary polluting attributes of an global object ), in that case we use let/const(at top level). And to make sure above works, we need a way to show that these variables are global but not attached to the global object. Thus they have added a Script scope [ following the terminology from Chrome Dev tools ]

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Code learner

79406014

Date: 2025-02-02 03:16:22
Score: 1
Natty:
Report link

I have learned that, even one uses module-info.java to name its modules, on multimodule pom projects, childeren module names and the foldernames of the childeren has to be same.

There,

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Tugalsan Karabacak

79406009

Date: 2025-02-02 03:09:21
Score: 1.5
Natty:
Report link

You're looking for the as property:

https://react-bootstrap.netlify.app/docs/getting-started/introduction#as-prop-api

So your code becomes:

<Container as="header" className="main-header">
  <Row>
    <Col sm={6}>
      Some content here
    </Col>
  </Row>
</Container>
Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: shotor

79406003

Date: 2025-02-02 03:02:19
Score: 1
Natty:
Report link

Adding an updated answer here since I believe Go has implemented some new features in the standard library since this question was asked. Now you can simply do this:

http.HandleFunc("/smth", smthPage)
http.HandleFunc("/{$}", homePage)  // {$} represents the end of the URL
http.HandleFunc("/", custom404Page)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Jeremy French

79406001

Date: 2025-02-02 03:01:19
Score: 2.5
Natty:
Report link

f'I want {quantity} pieces of item number {itemno} for {price} dollars.'

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Low length (1.5):
  • Has code block (-0.5):
  • Single line (0.5):
Posted by: Suramuthu R

79405994

Date: 2025-02-02 02:51:17
Score: 4
Natty:
Report link

ÿÄ�µ���}�!1AQa"q2‘¡#B±ÁRÑð$3br‚
%&'()456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ��������
ÿÄ�µ��w�!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ� ��?�á‹,s�ù}¸#õ«Ñiûs’UWŸºyô毙„j8ôù)­u•Û““Œ÷ÅyMöFlÚl!ÉØ¸ÏÔô©#µŠNß^ǘf“ž™§åUH Á‡Ò§™€Æ ¨TÏÝÇzlùŠ ~x£r¨'8â¦Vó#äç ãñ¢ãyaT¨8 ã9Í9TŸB3Ú§[]Êâ02N9¤òJüÀ“޼æ˜Ä{XÇo­?= ö-C<lÛ£<žµ\F­·vHè¤a¨U”nvŠl¿*ðrا¿.H$ÿ�žj©¢‚’3ǨïLD»ƒ(n‡3ùR3cœñþ:Ï›TŠ%¤ ÈuÅ,Ú´;~FW8?túÓåb¹¥w6sØS®2¬r3Øn‘o«36Z<3’:~†¤›TóB—{U˜î^Š©Ê…=3ø{ÓÚe�ÀdwÖÍÔ³H¸Üs»wJ‚âwgÏÆp2OùH¹Ò=ÄQ‚ÌÁp:Å5o­Ù¶ùªHPë\Йß,]ˆ¡mÀBçpÆHíùÕr!sš…ª²î9ÈèNMI&¹gYPÙ ¹õ®Fè2°$푚–Zl‚XöƥȂìÕ¸ñ4Àí…wn'Šrø‚]£îr­SþÏ)Ž72øâ’Hßfݬ¬=Zz¦ë^½Ä%Ïÿ�\f²ÍõÆæùøè8Î
Õ„o4N78ã¯Z­sg*Í…ƒÓœóéR¬€‡OR׋3–nz÷5g_ºpvFåY¹,}¿È©ítÉ·°*9Ç¥X¾°7‹ÀÃ~?,Quq˜)pòÆC3q·>Ý*8X¦UY¶çŒ¶Gç[º eù¤ùq‘й‹˜\äUs ±•ÆbÇê9õÅ9 œgÒ¶äÓ­ËäF£ü¹Î*HìÓËû€g¯~*yXϱÜöæÈÁãw›´ÅpTÉ=@üë¡XV(È©¼±ýÑ#}?Æ…+ÌKm,l>CŽ£Rÿ�fÌØ™útú×G°{7æ‚¿6Òr¿J|ác ×I’lîøiô=ÛFó9ëgw#k@9¨6üÛ¹Æx<ì®TfG •dŒót=©ú•™{a ûXö&´XØ€;~´�v†óŒgó¥ÌÕ¶zx[uV]¬_JÔ‚?.- óƒÐõ¦ínr8éš�zmò4›¸ÇîÜq¼2O׊•U0hü?A´ êGŸ$‡»Æzæ¤c½±žØ'ÈFycGÞ ’=qK·h?Å“Ÿþµ�F˹‰Èfô&œÌ¹ëךCžvŒàýi’.ãÓð â3+ÂT“3zâ-[k+Iç"½v÷ÃqëIXñϨúSáÓYmeãc¿zî§Z0™Í:nRº8MzK+­:U“ø¶Žsšæcgåí^“«|:Þªmäàÿ�xšço>ê–¸Ä[Ïû>•ÑN¬S Â]Žj „m¸Œð3Iw;I!<¨ÎpÅÆ‘uk# !e zU]­»iqü«¡4ö0ÕzZ½½ÒÊíÜ Ü}ëÙô)ãO…ƒÇûÕátðGŽIÁÇzô†zô—‘˜&u;�Ç=s\˜ˆó+4¥gcÐY‡@xèwR–ÎÓ"—žBŒ÷~•,j?ºÄc¿Zóβ-£åÈç·µÜ;…JÑFáž9¥[}¹ÏA@ P\’9½{ÓØmàž„v§L»üàŸ¥1º“Ô�ÅÎy$ûc½?i®:ð1ÏÔ‚1ÔœŽ˜§!œó­�;Œr@ý)‹ÎߘuúÓ‘U}1ÓŒÀzbhÛ†OÇ€K6�È>¸¨Cmp@ã¦jvùI8Ç?OÒ€ tcøH=zw÷¨õÉëŒv§ž˜B ÓY7p«Ôäÿ�J�sd¨ =;~t«˜go#=0)Ç$ç¶(áFÐ6žÜ @<6ÖîÝÉ4Ÿ7¯ËßúRÞnÉíÏ_þ½&üäðO±Æ8¦�Íé»ô9úÓ@ÛÇéõ óÎ:“Í9GQ»wÔ�åÇ'ð=éÛ‚ƒÇÔN=鹇B;¦u# úPÊG$wÆ{Ô°Éóp�â Üwn'œç½Ooµ“pÉn¿Ò¤c¤!ºƒžØ¤]ê^¹õ¨çPÒ8®?¥I»æÃŸöy¤¶ôÀàz”ÒØÎ3ó{Z8ì7c¨¡†N ú†Í†~o~3Ú£Û³7õý)ï¹�ãwÇZ€x�ç®=(�?tö=~ji$ç¨ç&¿Ê¤ûñøÓ¸Ûó ?Î(…Ù9éÏ·?‘õª“Œçô«wXøª!Üd°Æ@4 HÔ3sÇoBÀÆÐ£ŸLþµDÀÉqŒsÏÖœÎþ4ã£Æàp}ÏcþsM“æ�oÇñž¸?ËéL8<€GæZÆšd…™C_¥rHTp3Ž9®ùØ6W¯oþµqúÕ¿“1*¿&9íZÅÌyïb[“èy}+.KÂİR?J[ͪØêzðimìÚL|¥°98þu·C"9/¥Q3ߟåXÚ•“H»Š±<œžÕÜÙèñ§Í!Ï8ÚOÖu¢Àü‚GSÓ­.dUÕìfF9¡ëÚ¡Óm¥™¶ùLêŒgü÷¯iÿ�„rÒL«Ç¸ãï0áN_ Ù®æ ™È<ÿ�þª|èv<îÇIšFUd{ÔVô6Ïk®0r:þ•ØAg ¬N0O}Ã?J£wnr�@¡1Xå÷L¬¤}ÒyÀÆzÔ±OµNK(ô槙㱂=GjÈžè;~ïæOP®:öuãŸ×½%µð³ÄÍÀS»?¦¦ÓÜs׊}Æš÷|«Är>”´ê> ñ¥–£o‰>êÇNµÚC4D©·×9¯¼3«ÝèºÔ°’Yw‘–l ×¢Çñ æ64¿/(<ô¬%O] NŒúY&ùœŒ3×Ó·5ÙSïߊñÍâ³EÏúÄl‚º«_‰Ö®öÃÓ0k7M£XÉHí¶žLŸóô©&o•F>l‘ê+ÏÆúmÆSÎØØ!C×P·»ÁWSôáO 5¹WEë%‚œ¯=‡ÿ�­h3É8ééþESÓ¶¶ÖÁ#·?­`Ü|»‡\çµC4Ÿ¼øÓQã}¾¢†Ê)'±éDŽ ðÀò}ºÐŒÉÎ9õíúSÕBàד֣Â3FCg §O¥+Ì8Ü@íùÐ$¬ªw;~!¿§n•Zúþu$¶}+#Tš_´åÂŽØàþ•›4ff*[#ïWJ‰ƒ‘¹·oæÉcœ|ßY“Z·Ž<ç?xc+›µ³,ß'ËÛ=?-Ŭ²dÁìçҟ*36%ÖÔd®Ž{äÿ�œÕ«{“%¿œø[¨ÍsÖvû¤Ãex8÷®‡J\B¹P/¯ùïI¤ŠW(Ýk’ZÈUWiRqž¿VmRêê@IzƒŸnôÝCM‘®‰ ¸tÎ=êx´·X×±l’�«÷IÔ¨ÞkÌ2Ä€îçñý)åeÝÿ�)çæ´²Ý°sƒ÷‡ Ô–Úku”{i]+1á¼eÔ GÈ,ÝAë×Ú¶/mÛ—=9éUfÒ‹^G6HÃpOÆ·üµx”9ÈŸâ¥&ºÜäõYkãrôëÿ�ë¦A§+ÐŒžý}«§kŸ¹þŸ­Okg Q¸Œ–ç#4s‡)Ë+0ðAÎ1ʦ[i®(L ýìpá[²XFf@9ê¥]Ž5…UBŒuÎ)s”Á‹MvQ¸dà/5-îŽ$ Wänã?Ïš×Ù·æ‡ÏùÅ ãv g®y˜XÇC LœçŽ?ϽY‹ME\$>£¾kB5)Ž�P0sü©Ü7Þ矺}}hæaÊŠÙi‘"·à…I— )ü[~€Õ­Çå�9Å+¶æ�žœôõ£™ŽÈAI÷WcÇaGÙÔü¼œçjÐ>^€qþ~”’|¹ ƒê1×üâ¤d‚!ð˜’)~N2>UàsŠjüáÍ'Ê}ÏiǽÌBüÜäõΡ—œ;wúÓ¾laqž_óÿ�Ö§GÃwϧ<Ð1qœ•Q·Û¥/%¸À#®I¡‰Ü3ÉîOZ¾0¯\З<g<Rco$ŒRíÊúqÏùü©C}ìn xâ€rß–>†ž¡¹ìCçM $Ž=³Ö¦Ü¼Œ÷ç½ UÛì:ãÿ�¯M9äž™ÉéŠ]ç~OCÇÒ•”~Ã4�ô庌óHÀ0!»z·�ËŸóÅ5[,îsÏ>Þ”6D¹]Ô6ß`cm/fïÞ£o›hÈô�3÷ŽrïOF+€O c=Å"&7dm?OJF—–éüDf€'}¡sõ¨ùÛ¸ƒÀ>£ÿ�×J«žÈÇ^´óÆ Ÿn´�G‚ÞÎI‚Çòþ´‘íË6ï§

Reasons:
  • Blacklisted phrase (1): ¿
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • No latin characters (2):
  • Filler text (0.5): ��������
  • Low reputation (1):
Posted by: Jade

79405990

Date: 2025-02-02 02:45:16
Score: 2.5
Natty:
Report link

I recently had this issue and want to help people who may have similar issues in the future. I tried to use gnu-elpa-keyring-update, but it also failed because it pointed to an expired URL. To fix this,

  1. Go to the package website: https://elpa.gnu.org/packages/gnu-elpa-keyring-update.html, download the latest .tar file.

  2. Run tar -xvf gnu-elpa-keyring-update-2022.12.1.tar, or whatever the latest filename version is (this was the latest as of writing this answer) in the terminal where the current directory is where the file is located.

  3. Now that the files are extracted from the .tar, you'll want the update.el file. To load it in emacs use M-x load-file, navigate the the update.el file and hit enter.

  4. Now, with it pointing to the correct URL, running package-refresh-contents should work with no errors (or at least not the error from this question).

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): have similar issue
  • Low reputation (1):
Posted by: Scott Hootman-Ng

79405974

Date: 2025-02-02 02:22:12
Score: 0.5
Natty:
Report link

this worked for me: ffmpeg -i input.mp3 -af "rubberband=pitch=1.059463094352953" -c:a libmp3lame -q:a 2 output.mp3

Reasons:
  • Whitelisted phrase (-1): this worked for me
  • Whitelisted phrase (-1): worked for me
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: joshuascottpaul

79405969

Date: 2025-02-02 02:01:09
Score: 0.5
Natty:
Report link

I reckon that the behavior you're observing will depend on the type of script you're executing.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Clemen Canaria

79405963

Date: 2025-02-02 01:57:07
Score: 5.5
Natty: 5
Report link

I've a similar issue. This method works correctly? I was trying to access one element inside an iframe on a different origin. But it is restricted by the same-origin policy for security reasons. I'm not sure I can resolve this issue. Thanks!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (0.5):
  • No code block (0.5):
  • Me too answer (2.5): 've a similar issue
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Gold Star

79405946

Date: 2025-02-02 01:31:03
Score: 2
Natty:
Report link

last element's index will be 39200 + 9 * 32 + 1 = 39 489. Generally, if you want to access ton`th element value the computer will read size_of_type_of_array bits starting from array_offset_in_memory + (n - 1) * size_of_type_of_array + 1. – nickolay CommentedAug 17, 2019 at 13:44

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: mangal sude

79405945

Date: 2025-02-02 01:31:02
Score: 11.5 🚩
Natty: 6
Report link

hello im having the same issue, did you find a solution?

Reasons:
  • RegEx Blacklisted phrase (3): did you find a solution
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): having the same issue
  • Ends in question mark (2):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: guillermo

79405938

Date: 2025-02-02 01:19:59
Score: 1.5
Natty:
Report link

In my case it was solved with this command

$ npx @next/codemod@canary next-async-request-api .
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Diego Celis

79405934

Date: 2025-02-02 01:15:58
Score: 3
Natty:
Report link

simply do:

conda install conda-forge::docplex 

just went to the anaconda arch packages: https://anaconda.org/conda-forge/docplex

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Mário João

79405925

Date: 2025-02-02 01:00:56
Score: 1
Natty:
Report link

I want to share my solution for using conditional propTypes on a single prop value. Which is the case for showDropdown which and receive either bool || string.

const isBoolean = (val) => typeof val === 'boolean';
const isSring = (val) => typeof val === 'string' || val instanceof String;

Dropdown.propTypes = {
    data: PropTypes.array.isRequired,
    showDropdown: isRequiredIf(PropTypes.bool, props => (isBoolean(props.showDropdown) || isSring(props.showDropdown))),
    id: PropTypes.string.isRequired,
    classname: PropTypes.string,
}

NumaX hope this will help some fellow dev with the same doubt!!!

Reasons:
  • Whitelisted phrase (-1): hope this will help
  • RegEx Blacklisted phrase (1): I want
  • Contains signature (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: NumaX

79405915

Date: 2025-02-02 00:50:54
Score: 2.5
Natty:
Report link

You need the arms so that your phone may function right if without it you have some problems with malfunctions and little arrows inside there so it's good to have the arm and if it's the updated one

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Tommy K Lee

79405914

Date: 2025-02-02 00:49:53
Score: 4.5
Natty: 5
Report link

проблема решается следующим образом:открываете anaconda prompt или что так у вас и пишите:spyder update kernels.И все заработало.Что пришло в голову то и написал,главное что работает,думаю с jupyter схожая ситуация.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • No latin characters (1.5):
  • Low reputation (1):
Posted by: Sys

79405899

Date: 2025-02-02 00:24:49
Score: 0.5
Natty:
Report link
input = `read -n 1000000 user_input; echo $user_input`.chomp
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: Daniel Garmoshka

79405898

Date: 2025-02-02 00:23:49
Score: 4
Natty:
Report link

You can now use prettier plugin called prettier-plugin-multiline-arrays

Reasons:
  • Probably link only (1):
  • Low length (2):
  • No code block (0.5):
  • Single line (0.5):
Posted by: Patrick Cho

79405889

Date: 2025-02-02 00:16:47
Score: 3.5
Natty:
Report link

Maybe you can try out this tool; it is also built on Pandoc, but it’s presented as a web application.

https://huggingface.co/spaces/u5ername/markdown2ppt-docker

Reasons:
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: User

79405878

Date: 2025-02-02 00:07:44
Score: 6.5 🚩
Natty:
Report link

I have the same problem with VS Pro 2022 17.12.4, python 3.13.

Reasons:
  • Blacklisted phrase (1): I have the same problem
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I have the same problem
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: user1807011

79405873

Date: 2025-02-02 00:02:43
Score: 0.5
Natty:
Report link

don't waste time sorting the characters in the string. Just sequentially count frequencies of them, and compare. An anagram, by definition, would cancel out each other's buckets perfectly.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: RARE Kpop Manifesto

79405865

Date: 2025-02-01 23:52:41
Score: 2.5
Natty:
Report link

you can also use userInputService.InputChanged to get the 'Position' value of the input object

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Red pants

79405863

Date: 2025-02-01 23:51:39
Score: 7 🚩
Natty:
Report link

شحن شدات بوبجي مجانا

Blockquote

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Unregistered user (0.5):
  • No latin characters (3):
  • Low reputation (1):
Posted by: user29464066

79405842

Date: 2025-02-01 23:34:35
Score: 1.5
Natty:
Report link

As I supposed, the error was eventually found in the UserLogin.aspx.cs file in that incorrect fields or properties were causing the error. The user comments were appreciated and helped me locate the issue although the Classic/Integrated mode issue was not the cause after all. To complicate matters, in my Global.Application Errors I was redirecting to UserLogin and hence the circular errors. Changing it to redirect to Defaults.aspx also helped as the underlying error was in part caused by incorrect cookies. In short - the answer to my question is it loads the next redirected/default page starting from that pages construction which is before any other events including the page.Preinit event.

Reasons:
  • Blacklisted phrase (1): appreciated
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
Posted by: David

79405835

Date: 2025-02-01 23:21:34
Score: 1
Natty:
Report link

An effective strategy to detect SQL injection attempts is to rigorously validate the parameters received by the application. Each parameter should be checked according to rules specific to the application's domain. For example, parameters representing identifiers (such as those starting with id, e.g., idUser, idOrder) can be validated using a regular expression that allows only integer numbers. Similarly, other types of parameters should be validated based on their intended use. Es. Boolean parameters (true/false or 0/1). Alphanumeric codes with a predefined length or mask. Strings restricted to allowed characters to prevent malicious input. To systematically enforce this validation, a function could be included in every page to validate all (present and future) parameters according to this rule. This ensures a consistent security policy across the entire application.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: umbio

79405829

Date: 2025-02-01 23:18:32
Score: 2
Natty:
Report link

Log error with console.log(error.stack) to show prisma error.

In my case , prisma load enviroment variables from .env.local at database operation. Set database env variables in .env.local too and resolved .

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Setan Natsoe

79405822

Date: 2025-02-01 23:12:31
Score: 0.5
Natty:
Report link

I think your mother-in-law network runs a DNS server on the router which does the resolving for you. So it's DNS, not mDNS. This is confirmed by failure to resolve the hostname when your phone uses private DNS. Your router, on another hand, doesn't resolve . local domain as belonging to local network.

When the devices obtain the IP address via DHCP from the router, the latter can specify the DNS servers to use. Yours may specify the provider's servers while mother-in-law's specifies its own.

Reasons:
  • No code block (0.5):
Posted by: Alexandr Zarubkin

79405821

Date: 2025-02-01 23:12:31
Score: 1
Natty:
Report link

When programming with jQuery, simply put the variable within brackets to send the string value of the variable as the key name.

var SomeElement = 'data1';

$.ajax({
    type: 'post',
    url: 'form/processor/page',
    data: { [SomeElement] : 'val1' },
    ...
});
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): When
  • Low reputation (0.5):
Posted by: Stan S.

79405820

Date: 2025-02-01 23:12:31
Score: 2
Natty:
Report link

There's a mobile application called Cosmo that integrates with Postman pretty well. Used it a couple times in a pinch when I didn't have my computer on me and needed to run some collections.

App store

Website: https://fetchcosmo.com/

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: John.c

79405810

Date: 2025-02-01 22:56:29
Score: 3
Natty:
Report link

I've tried all the methods with no luck then I randomly toggled prettier back to "singleQuote": true - and started working! Hope it helps!

Reasons:
  • Blacklisted phrase (1): no luck
  • Whitelisted phrase (-1): Hope it helps
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Radek

79405807

Date: 2025-02-01 22:54:28
Score: 0.5
Natty:
Report link

I have used this before:

var uidStr = Files.readString(Paths.get("/proc/self/loginuid"));

Example with jshell:

$ jshell
|  Welcome to JShell -- Version 21.0.2
|  For an introduction type: /help intro

jshell> Files.readString(Paths.get("/proc/self/loginuid"));
$1 ==> "226"
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ron McLeod

79405793

Date: 2025-02-01 22:41:26
Score: 1
Natty:
Report link

pairwise() from the itertools module was added in Python 3.10:

from itertools import pairwise

for a, b in pairwise(["a", "b", "c"]):
    print(a, b)

# Ouput:
# a b
# b c
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Jordi Calafat

79405790

Date: 2025-02-01 22:39:25
Score: 4
Natty: 4
Report link

Always set also seems to interact differently with set directives in .htaccess files.

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Barry Nelson

79405785

Date: 2025-02-01 22:37:24
Score: 4.5
Natty:
Report link

Josepiso127 josepiso127 josepiso127

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Has no white space (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Josmar Ubaldo

79405779

Date: 2025-02-01 22:35:22
Score: 4
Natty: 4
Report link

This fixed it for me: https://medium.com/@islamrustamov/one-of-the-many-react-natives-textinput-problem-on-android-e4c9915acbc6

Let me know if the issue persists!

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Alexander Bogdanov

79405771

Date: 2025-02-01 22:27:21
Score: 3
Natty:
Report link

You can view your web projects on localhost via your browser with the "Live Server" plugin in the VSCode editor.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Raven

79405769

Date: 2025-02-01 22:26:20
Score: 0.5
Natty:
Report link

I could do the publish+start+attach only from VSCode. However, it's not such a big pain, normal coding can be done in VS. VSCode is open next to it and if I need to debug on RPI, I switch to VScode and start the debug session.

This is my launch.json config in VSCode:

    {
        "name": "RPI 192.168.0.xx",
        "type": "coreclr",
        "request": "launch",
        "preLaunchTask": "publish",    <--- this contains the pscp copy part
        "program": "~/.dotnet/dotnet",
        "args": [
            "/testapp/app.dll"
        ],
        "cwd": "/testapp/",
        "stopAtEntry": true,
        "console": "internalConsole",
        "pipeTransport": {
            "pipeCwd": "${workspaceFolder}",
            "pipeProgram": "c:\\Program Files\\PuTTY\\plink.exe",
            "pipeArgs": [
                "-pw",
                "<your_password>",  <--- for local tests ok
                "[email protected]"
            ],
            "debuggerPath": "~/vsdbg/vsdbg"
        }
Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: smcoder

79405768

Date: 2025-02-01 22:25:20
Score: 1
Natty:
Report link

For me, I needed a file called myproject.py. (Could be an empty file.)

Otherwise running poetry install would throw:

Error: The current project could not be installed: No file/folder found for package myproject
Reasons:
  • Blacklisted phrase (0.5): I need
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Weston A. Greene

79405749

Date: 2025-02-01 22:11:18
Score: 3
Natty:
Report link

Sorry to tell you: this is not supported by all browsers. As the documentation on MDN shows: Firefox and Safari don't support this feature.

Firefox would need a PWA Extension (who installs this?).

iOS does not support this kind of installation - the user must do this manually - you could show some instructions to the users, as it is described here This seems to be valid independent of the browser in iOS - see this article

Reasons:
  • Blacklisted phrase (1): this article
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: frim p

79405745

Date: 2025-02-01 22:08:17
Score: 1
Natty:
Report link

u can use the !! instead if u want the program to throw null and only forces non null value

@Composable
fun MyComposeUI(camera: USBCamera?) {
    Button(onClick = { camera!!.setGain(10) }) {}    
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: MohiEddine

79405736

Date: 2025-02-01 21:57:14
Score: 0.5
Natty:
Report link

this will be my first help.

What causes that error in your project is that you specify a custom size for the image. At first, I tried to fix it from the style side, but since you specify a custom size for the image, it does not prioritize the style codes.

I have corrected your code a little bit with my own perspective :) Here you go

 <!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
    <title>Livestreams</title>

    <style>
        .tableTitle tr th {
            padding: 10px;
        }

        .songTitle {
            width: 420px;
        }

        .buttons button {
            margin-right: 15px;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="row mt-5">
            <div class="col-4">
                <div id="YouTubeVideoPlayer">
                    <img src="https://web.lovelady.com/siteImages/bunnyfuzz.jpg" style="width:400px; height:400px"
                        alt="placeholder">
                </div> <!-- YouTubeVideoPlayer -->
            </div>

            <div class="col-8">
                <div class="selectSong mb-3">
                    <label for="selectSong">Matching Songs: </label>
                    <select name='selectSong' id='selectSong' onchange='selectedSongFromHints(this) ;'>
                        <option value='Song suggestions:'>Songs matching "Cool "</option>
                        <option value='COOL WATER 0'>Cool Water (Marty Robbins cover)</option>
                        <option value='THAT AINT COOL 1'>That Ain't Cool</option>
                    </select>
                </div>
                <div class="songsTable mt-3">
                    <table class="table">
                        <thead>
                            <tr>
                                <th style="text-align: center;">Sav</th>
                                <th style="text-align: center;">Clr</th>
                                <th style="text-align: right;">Time</th>
                                <th class="songTitle">Song Title</th>
                                <th style="text-align: center;">Category</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr onclick='selectSongRow(this, 0) ;' id='perf_row_0'>
                                <th scope="row">
                                    <input type='checkbox' id='perf_saved_0' name='perf_saved_0' checked
                                        onclick='savePerfSong(this, 0);'>
                                </th>
                                <td style='text-align:center;' onclick='clearSongRow(0);'>&#10006;</td>
                                <td style="text-align: right;">
                                    <input type='text' id='perf_time_0' name='perf_time_0' style='text-align:right;'
                                        minLength='4' maxLength='7' size='7' value='0:20'
                                        onkeyup='changedPerfTime(this, 0);'>
                                </td>
                                <td><input type='text' id='perf_title_0' name='perf_title_0' style='text-align:left;'
                                        minLength='4' maxlength='80' size='50' value="You Don't Bring Me Flowers"
                                        onkeyup='changedPerfSong(this, 0);'></td>
                                <td><input type='text' id='perf_save_0' name='perf_save_0'></td>
                            </tr>
                            <tr>
                                <th scope="row">
                                    <input type='checkbox' id='perf_saved_0' name='perf_saved_0' checked
                                        onclick='savePerfSong(this, 0);'>
                                </th>
                                <td style='text-align:center;' onclick='clearSongRow(0);'>&#10006;</td>
                                <td style="text-align: right;">
                                    <input type='text' id='perf_time_0' name='perf_time_0' style='text-align:right;'
                                        minLength='4' maxLength='7' size='7' value=''
                                        onkeyup='changedPerfTime(this, 0);'>
                                </td>
                                <td>
                                    <input type='text' id='perf_title_0' name='perf_title_0' style='text-align:left;'
                                        minLength='4' maxlength='80' size='50' value=""
                                        onkeyup='changedPerfSong(this, 0);'>
                                </td>
                                <td><input type='text' id='perf_save_0' name='perf_save_0'></td>
                            </tr>
                            <tr>
                                <th scope="row">
                                    <input type='checkbox' id='perf_saved_0' name='perf_saved_0' checked
                                        onclick='savePerfSong(this, 0);'>
                                </th>
                                <td style='text-align:center;' onclick='clearSongRow(0);'>&#10006;</td>
                                <td style="text-align: right;">
                                    <input type='text' id='perf_time_0' name='perf_time_0' style='text-align:right;'
                                        minLength='4' maxLength='7' size='7' value=''
                                        onkeyup='changedPerfTime(this, 0);'>
                                </td>
                                <td>
                                    <input type='text' id='perf_title_0' name='perf_title_0' style='text-align:left;'
                                        minLength='4' maxlength='80' size='50' value=""
                                        onkeyup='changedPerfSong(this, 0);'>
                                </td>
                                <td><input type='text' id='perf_save_0' name='perf_save_0'></td>
                            </tr>
                        </tbody>
                    </table>

                </div>
                <div class="buttons mt-5 justify-align-center d-flex justify-content-center">
                    <button type="button" class="btn btn-secondary " id='completeButton' type='button'
                        onclick='markComplete(this, 773, false);'>Mark incomplete</button>
                    <button type="button" class="btn btn-success" id='incompleteButton' type='button' disabled
                        onclick='markComplete(this, 773, true);'>Mark complete</button>
                </div>
                <div class="form_and_streams mt-4">
                    <div class="formDiv">
                        <form action="POST" action="/YouTube/performed.php" class="table2 ">
                            <table class="table mt-5">
                                <tbody>
                                    <tr>
                                        <td>
                                            <input type='checkbox' name='filterFromDate' id='filterFromDate' checked>
                                            <label for='filterFromDate'>Earliest date</label>
                                        </td>
                                        <td><input type='text' name='fromDate' id='fromDate' size=10 value='06/20/2016'>
                                        </td>
                                        <td>
                                            <input type='checkbox' name='filterToDate' id='filterToDate'>
                                            <label for='filterFromDate'>Latest date</label>
                                        </td>

                                        <td><input type='text' name='toDate' size=10 value=''></td>
                                        <td>
                                            <input type='checkbox' name='omitCompleted' id='omitCompleted' checked>
                                            <label for='omitCompleted'>Omit if completed review</label>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </form>
                    </div>
                </div>
                <div class="livestream mt-4">
                    <table class="table">
                        <thead>
                            <tr>
                                <th scope="col">Started</th>
                                <th scope="col">Noted</th>
                                <th scope="col">Duration</th>
                                <th scope="col">Livestream Title</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td id='livestream_date_0'>2018-12-23 17:18</td>
                                <td id='livestream_songCount_0'></td>
                                <td id='livestream_elapsed_0'>0:20:09</td>
                                <td>
                                    <span
                                        onclick='selectVidId("n3tSP_imMI", 0, "livestream_row_0", "1280", "720");'>First
                                        Sunday</span>
                                </td>
                            </tr>
                            <tr>
                                <td id='livestream_date_1'>2018-12-24 18:16</td>
                                <td id='livestream_songCount_1'></td>
                                <td id='livestream_elapsed_1'>0:15:17</td>
                                <td>
                                    <span onclick='selectVidId("qtcQtqsaTU", 1, "livestream_row_1", "1280", "720");'>
                                        Live from the Lights Display</span>
                                </td>
                            </tr>
                            <tr>
                                <td id='livestream_date_2'>2019-01-06 07:31</td>
                                <td id='livestream_songCount_2'></td>
                                <td id='livestream_elapsed_2'>0:19:04</td>
                                <td><span onclick='selectVidId("c4y42xI6_o", 2, "livestream_row_2", "1280", "720");'>Jun
                                        26
                                        Follow the sun</span></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>



    <script src='performed.js?modified=1738374550'></script>
    <script async src="https://www.youtube.com/iframe_api"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
        crossorigin="anonymous"></script>
    <script>
        const CONST_IS_IPAD = '';
        const CONST_IS_ANDROID = '';
        const CONST_DEVICE_TYPE = 'unknown';
        const CONST_HIGHLIGHT = '#FDFF47';
        const CONST_LOG_WRITER = 'HTTP/1.1://web.lovelady.com/writeLog.php';
        const CONST_JS_APP_NAME = 'performed.php';
        const CONST_JS_LOG_NAME = '/usr/local/log/performed-2025-01.log';
        const CONST_KEYWORD_LOG_ERROR = 'logError';
        const CONST_NO_BACKUP = 'noBackup';
        const CONST_MAX_PLAYER_WIDTH = '640';
        const CONST_MAX_PLAYER_HEIGHT = '480';
        const URL_SRC = 'https://web.lovelady.com/YouTube/performed.php';
        let livestreamSongsComplete = true;
    </script>
</body>

</html>
Reasons:
  • Blacklisted phrase (1): youtube.com
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Raven

79405735

Date: 2025-02-01 21:55:14
Score: 2
Natty:
Report link

You can use preventDefault function of the onKeyDown event of input element if you know a character is not in english. How do you know it's not english? You can use my trick without using regular expressions: in such events, event variable is of type KeyboardEventHandler.
(event: KeyboardEvent<HTMLInputElement>) => { if(event.code.toLowerCase().includes(event.key.toLowerCase())) return null event.preventDefault() /* prevent event from typing the character in input field as it is not an english character*/ }
this block of code checks if the pressed key character ("s") is included within the key code ("keyS") which is in english just be careful to check the lowercase values as it may run into some exceptions without checking that.

Reasons:
  • Blacklisted phrase (1): How do you
  • Whitelisted phrase (-1.5): You can use
  • RegEx Blacklisted phrase (2.5): do you know it
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Saleh Alikhani

79405734

Date: 2025-02-01 21:55:14
Score: 2.5
Natty:
Report link

Go to Device Manager in Android Studio, click the three dots next to the device and click wipe data.

It resolved my issue atleast.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: The Programmer

79405727

Date: 2025-02-01 21:51:13
Score: 4
Natty:
Report link

You can always access Command Line Arguments by Environment.GetCommandLineArgs()

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Viktor Balykhin

79405723

Date: 2025-02-01 21:49:12
Score: 1.5
Natty:
Report link

I presume that your drawer's widgets will have buttons or listtiles for navigation. So, you just need to add a timer.cancel on the "onTap" function

Drawer
   ListView
      ListItem
         onTap() {
            timer.cancel(); // <-- this will cancel your timer
            Navigator.push();
         }
      ListItem
         onTap() {
            timer.cancel(); 
            Navigator.push();
         }

Cheers

Reasons:
  • Blacklisted phrase (1): Cheers
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Levi Abellar

79405721

Date: 2025-02-01 21:47:11
Score: 1.5
Natty:
Report link

Since the post is quite old and the pkg has been updated, let me quickly post an myself.

If u've been wondering where the Queue object gone, it become a entity called channel.

Small, well-written example to use it: https://stackoverflow.com/a/75625692/15185021

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Hunor Portik

79405720

Date: 2025-02-01 21:44:11
Score: 2
Natty:
Report link

I confirm what @framilano did.

I did this tutorial https://quarkus.io/guides/aws-lambda.

When I actually added the lambda on AWS and created a FunctionURL for it, I started to get null pointers.

Then, I had an idea.

I tested my lambda to receive a JsonNode (jackson.databind).

This revealed that the object which was actually passed to my handleRequest() method was a APIGatewayV2HTTPEvent.

This is the logs on CloudWatch:

enter image description here

After I changed the object on handleRequest(), it worked properly.

Reasons:
  • Blacklisted phrase (1): this tutorial
  • Whitelisted phrase (-1): it worked
  • No code block (0.5):
  • User mentioned (1): @framilano
  • Low reputation (0.5):
Posted by: Juliano Suman Curti

79405715

Date: 2025-02-01 21:39:10
Score: 2.5
Natty:
Report link

Adding the path of Gradle in the previous answers is needed. In my case, I also needed to restart my computer.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Trung Nguyen

79405709

Date: 2025-02-01 21:34:09
Score: 0.5
Natty:
Report link

Well thank you to everybody who answered! In the end I came up with a dirty but efficient solution. The whole problem is that during build time the environment variables are not accessible (unless you use the ARG and ENV parameters in your Dockerfile file, but I don't like to bloat it), therefore all the database initialization, for example Stripe initialization or whatever other services that you may have that require those environmental variables, are gonna fail in build time. The idea is, try to adapt the code so instead of throwing an error, it accepts and manages situations where those env variables are null or not defined. For example in the database(postgres) initialization file (db/index.ts):

import { drizzle } from 'drizzle-orm/postgres-js';
import postgres from 'postgres';

import * as users from '$lib/server/db/schemas/users'
import * as normalized from '$lib/server/db/schemas/normalized'
import * as availability from '$lib/server/db/schemas/availability';
import * as lessons from '$lib/server/db/schemas/lessons';
import * as bookings from '$lib/server/db/schemas/bookings';
import { env } from 'process';


function createDb() {
    const databaseUrl = env.DATABASE_URL;
    console.log('DATABASEURL: ', databaseUrl)
    if (!databaseUrl) throw new Error('DATABASE_URL is not set');
    
    // Skip DB connection during build
    if (process.env.NODE_ENV === 'build') {
        console.log('Build mode - skipping database connection');
        return null;
    }

    if (process.env.NODE_ENV === 'production') {
        console.log('Production mode - skipping database connection');
    }

    const client = postgres(databaseUrl);
    return drizzle(client, {
        schema: { ...users, ...normalized, ...availability, ...lessons, ...bookings }
    });
}

export const db = createDb();

Adn then wherever this db needs to be used, just handle the scenario where it might not be initialized properly:

import { eq } from "drizzle-orm";
import { db } from ".";
import { ageGroups, countries, currencies, languages, pricingModes, resorts, skillLevels, sports, timeUnits } from "./schemas/normalized";


export async function getAllSkiResorts() {
    if (!db){
        console.error('Database Not Initialized')
        return [];
    } 
    return await db.select().from(resorts);
}

export async function getSkiResortsByCountry(countryId: number) {
    if (!db){
        console.error('Database Not Initialized')
        return [];
    } 
    return await db.select().from(resorts).where(eq(countries.id, countryId))
}

export async function getAllCountries() {
    if (!db){
        console.error('Database Not Initialized')
        return [];
    } 
    return await db.select().from(countries);
}

Also in the Dockerfile, you could set the "build" environment var just to perform cleaner logic:

# Build stage
FROM node:22-alpine AS builder
RUN corepack enable && corepack prepare pnpm@latest --activate
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install
COPY . .
# Set build environment
ENV NODE_ENV=build
RUN pnpm build

# Production stage
FROM node:22-alpine
RUN corepack enable && corepack prepare pnpm@latest --activate
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --production
COPY --from=builder /app/build ./build
# Set production environment
ENV NODE_ENV=production
CMD ["node", "build/index.js"]
EXPOSE 3000

you just need to test and try to see where in your app, there is code that might create conflict during build and then adapt the logic to handle non existing values during buildtime. I hope this does the trick for someone in the same situation that I was!!

Reasons:
  • Blacklisted phrase (0.5): thank you
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Erosique

79405707

Date: 2025-02-01 21:31:08
Score: 2
Natty:
Report link

{"object":"whatsapp_business_account","entry":[{"id":"540031869196964","changes":[{"value":{"messaging_product":"whatsapp","metadata":{"display_phone_number":"15551762468","phone_number_id":"564113223449477"},"contacts":null,"messages":null},"field":"messages"}]}]} ``

does that feature need to buy first? i just doing this on dev mode

Reasons:
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Deontae T Thompson

79405695

Date: 2025-02-01 21:24:07
Score: 1
Natty:
Report link

Just like the error message says, change the properties of the model.bim in the Solution Explorer:

enter image description here

enter image description here

Reasons:
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • High reputation (-2):
Posted by: David Browne - Microsoft