79286348

Date: 2024-12-16 23:46:08
Score: 0.5
Natty:
Report link

There is now Aside, an unofficial Google library for adding type support, linting and unit testing to Apps Script using TypeScript, ESLint, Prettier, and Jest.

Note that as far as I can tell, to run tests in Jest on functions which remotely execute Google Apps APIs (even things like SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Home").getRange("A1").getValue()), you would need to:

  1. Write a test function which will run remotely and does setup, calls the function you are testing, and then outputs the result to stdout
  2. Write a Jest test which will call clasp run <test_function> (see this documentation on clasp run and this SO post on calling command line functions from node) and then write assertions against the output.
Reasons:
  • Blacklisted phrase (1): this document
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Jimmy Li

79286344

Date: 2024-12-16 23:42:08
Score: 1.5
Natty:
Report link

git remote update --p or git remote update --prune

Is a solution.

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Malak

79286340

Date: 2024-12-16 23:41:07
Score: 1.5
Natty:
Report link

I migrated from a bare native project and removing this line solved it for me:

NativeModules.DevSettings.setIsDebuggingRemotely(true)

It must not play nicely with Expo

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Harrison Armitage-Bath

79286337

Date: 2024-12-16 23:40:07
Score: 3
Natty:
Report link

There are literally 36 executables installed by this god forsaken installer I have no idea how to use any of them, and can't find any information. Damn you all.

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

79286336

Date: 2024-12-16 23:39:07
Score: 1
Natty:
Report link

FastCGI running concurrent processes without terminating them, so the performance will be optimized. But it has some config to avoid memory leak. If for some requests your program works fine and not facing 500 error all the times, i suggest you check the pm configuration of fastcgi:

  1. open /etc/php/7.0/fpm/pool.d/www.conf
  2. check to see if the pm is set to be dynamic. (fastcgi will handle number of processes dynamycally)
  3. check pm.max_children to be high enough. (if the max reached and requests not finished, you will face server error, because there is no other worker to handle request)
  4. if you changed the value, run sudo systemctl restart php-fpm to restart fastcgi.

Note

  1. check memory_limit of php.ini to see how much each php process will take and then by considering your RAM free space, choose the pm.max_children.
Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Ali Mousavi

79286330

Date: 2024-12-16 23:35:06
Score: 0.5
Natty:
Report link

This is what help me fix my own

const CustomToolbar = ({date, onNavigate}: ToolbarProps)  => {

    const goToBack = () => {
        onNavigate('PREV');    }

    const goToNext = () => {
        onNavigate('NEXT');
        };

    return (
        <div className='rbc-toolbar'>
            <PrimaryButton onClick={goToBack} style={{marginRight: "5px"}} text='Previous'/>
            <DefaultButton onClick={goToNext} style={{marginRight: "5px"}} text='Next' />
            <DatePicker />
        </div>
    )
}
Reasons:
  • Blacklisted phrase (1): help me
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Frank Oppong Konadu

79286320

Date: 2024-12-16 23:29:05
Score: 0.5
Natty:
Report link

another variant (using GNU Awk 5.0.1) Handles standard ascii and dos formatted records

cat pablo.awk
{ gsub("\r",""); k[$1" "$2] = k[$1" "$2] + 1 }
END{
        for (ki in k)
                if ( k[ki] > 1 )
                        print ki
}

# running that produces
awk -f pablo.awk input
u   8574 
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: ticktalk

79286319

Date: 2024-12-16 23:28:05
Score: 3
Natty:
Report link

You can do that now with @view-transition. See the example which is also linked to from the before mentioned page: https://mdn.github.io/dom-examples/view-transitions/mpa/

Reasons:
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
Posted by: zıəs uɐɟəʇs

79286308

Date: 2024-12-16 23:17:03
Score: 1
Natty:
Report link

What you've done already works, if you dont have a i tag, the query will be empty and not have the class, if it exists it will check the class. But any ways, if you want to check the tag, or any other query selector, the jquery method is .is( "i" )

https://api.jquery.com/is/

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): What you
  • Low reputation (0.5):
Posted by: Eloi

79286301

Date: 2024-12-16 23:16:03
Score: 3
Natty:
Report link

Ah, I just realized that there is a typo. It should be cachedResponse.json(), instead of cacheResponse.json(). Silly me.

Please close this question.

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

79286288

Date: 2024-12-16 23:07:01
Score: 0.5
Natty:
Report link

Following @BenjaminW's advice I simply moved the Sphinx docs to a subfolder of the MyST docs. I managed this with github actions (doing edits upon the one generated by myst).

The key was to remove the artifact uploads from the initial workflow then replace it with some linux commands for moving everything to the _site directory and uploading the _site directory as an artifact. Namely

      - name: Copy builds to site-directory
        run: |
            mv _build/html _site
            mv docs/_build/html _site/docs
            mkdir _site/nb
            mv nb/public _site/nb/public
      - name: Upload Site Artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: ./_site

Here's the complete file:

# This file was created by editing the file created by `myst init --gh-pages`
name: MyST and Sphinx GitHub Pages Deploy
on:
  push:
    branches: [main]
env:
  # `BASE_URL` determines the website is served from, including CSS & JS assets
  # You may need to change this to `BASE_URL: ''`
  BASE_URL: /${{ github.event.repository.name }}

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
  contents: read
  pages: write
  id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
  group: 'pages'
  cancel-in-progress: false
jobs:
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Setup Pages
        uses: actions/configure-pages@v3
      - uses: actions/setup-node@v4
        with:
          node-version: 18.x
      - name: Install MyST Markdown
        run: npm install -g mystmd
      - name: Build MyST HTML Assets
        run: myst build --html
      - name: Install Sphinx and Dependencies
        run: |
          pip install sphinx sphinx-autodoc2 furo myst_parser
      - name: Sphinx Build HTML
        run: |
            (cd docs && make html)
      - name: Copy builds to site-directory
        run: |
            mv _build/html _site
            mv docs/_build/html _site/docs
            mkdir _site/nb
            mv nb/public _site/nb/public
      - name: Upload Site Artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: ./_site
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4
Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @BenjaminW's
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: brook

79286276

Date: 2024-12-16 23:00:59
Score: 0.5
Natty:
Report link

From my experience, it does not make much sense to check the Mock of an object. That way you are checking if the framework actually works instead of any functionality (as Andrew S). In short, sure you can use it but it is just redundant code (I never use it). Also, I took a look at the website that you referenced and I think the AssertNotNull is used as a poor example there.

Reasons:
  • Whitelisted phrase (-1.5): you can use
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: MartinDM

79286273

Date: 2024-12-16 23:00:59
Score: 0.5
Natty:
Report link

I realized I should set the number of batch dimensions to 1. This now works:

import tensorflow as tf
V=tf.random.uniform((2,3,4),minval=0,maxval=2,dtype=tf.int32)
print(V[0,:])
W=tf.random.uniform((2,5), minval=0, maxval=4, dtype=tf.int32)
print('W=',W)
Z=tf.gather(params=W, indices=V, axis=1, batch_dims=1)
print(Z.shape)

The shape is (2,3,4), as desired. Simple in the end, but a pain to figure out!

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: user3433489

79286262

Date: 2024-12-16 22:54:58
Score: 3.5
Natty:
Report link

As suggested by Murta previously, BigQuery's TRANSLATE function is very handy and allows you to do exactly what you need to. https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#translate

SELECT TRANSLATE('brasília', 'í', 'i') AS translated

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

79286257

Date: 2024-12-16 22:51:58
Score: 0.5
Natty:
Report link

RANDOM() will generate random floats and multiply it with dates across last 3 years

Fiddle

UPDATE events
SET created_at = created_at - INTERVAL '3 years' * RANDOM(); 
Reasons:
  • Low length (1):
  • Has code block (-0.5):
Posted by: samhita

79286244

Date: 2024-12-16 22:43:56
Score: 1.5
Natty:
Report link

This installation conflict could be due to development-version (installed during development/debugging) are signed differently from the Play Store version.

To resolve it:

  1. Uninstall the previously installed app version from your device
  2. Download the app again from the Play Store

This will eliminate any signature mismatches.

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

79286241

Date: 2024-12-16 22:42:56
Score: 1.5
Natty:
Report link

This should do the work

 *::after,
 *::before {
    outline: 1px solid red;
 }
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Belkacem Yahiaoui

79286235

Date: 2024-12-16 22:39:55
Score: 0.5
Natty:
Report link

I believe that this is equivalent to what you are looking for:

git checkout better_branch          # This is the branch whose commits you want to keep
git merge --strategy=ours master    # keep the content of this branch, but record a merge
git checkout master                 # You want to **lose** all changes on this branch
git merge better_branch             # fast-forward master up to the merge

See: https://stackoverflow.com/a/2763118/1290781

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Probably link only (1):
  • Has code block (-0.5):
  • High reputation (-1):
Posted by: John Henry

79286213

Date: 2024-12-16 22:28:53
Score: 3
Natty:
Report link

Look at this other post, you will need to download them via ftp. https://wordpress.stackexchange.com/questions/87395/import-media-to-online-wordpress-from-local-development

OR, look for an export plugin that adds the media attachements into a zip file.

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

79286208

Date: 2024-12-16 22:26:52
Score: 0.5
Natty:
Report link

remove the limits = c(0, 360) since 0 and 360 will overlap:

library(ggplot2)

wake_loss_per_sector <- data.frame(
  sector = 1:12,
  wake_loss = c(16.48843, 17.59385, 19.19244, 27.17434, 26.13185, 10.95055,
                11.09595, 14.24783, 15.59619, 19.09893, 22.63984, 15.84240),
  angle = c(30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330, 0)
)

# Plot
ggplot(wake_loss_per_sector, aes(x = angle, y = wake_loss)) +
  geom_col(width = 30, fill = "skyblue", color = "black") +
  coord_polar(start = -pi / 12) +
  scale_x_continuous(
    breaks = seq(0, 330, by = 30)
  ) +
  theme_minimal() +
  labs(x = "Angle (degrees)", y = "Wake Loss", title = "Polar Plot of Wake Loss by Sector")

out

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: G-Man

79286203

Date: 2024-12-16 22:24:52
Score: 2.5
Natty:
Report link

You should override:

isDense: true

and

suffixIconConstraints: const BoxConstraints(minHeight: YOUR_DESIRED_MINIMUM_HEIGHT)

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

79286188

Date: 2024-12-16 22:17:50
Score: 2.5
Natty:
Report link

The problem was in the setData function of my PandasModel. I was using values instead of iloc.

self.data_frame.iloc[index.row(), index.column()] = value

self.data_frame.values[index.row(), index.column()] = value

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

79286187

Date: 2024-12-16 22:17:50
Score: 2
Natty:
Report link

in my case, i have some dependencies missing running npm install metro metro-config metro-core --save-dev works for me

Reasons:
  • Whitelisted phrase (-1): works for me
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Mudasir Bilal

79286182

Date: 2024-12-16 22:13:49
Score: 1
Natty:
Report link

In my project folder that contains 89 files. I created a new file called unused.py In that file I put the following:

# Why can't I find a tool that detects this file is not used ?
# 

print("Nothing")

Vulture did not find this file.

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

79286180

Date: 2024-12-16 22:12:49
Score: 3
Natty:
Report link

For me, simply recompiling kaldi and vosk like in the Dockerfile of Vladimir link did the trick, don’t use the gpu fork branch but the main vosk.

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

79286174

Date: 2024-12-16 22:07:47
Score: 0.5
Natty:
Report link

For everyone who's comes from Google search result and I couldn't find the answer anymore here it's

If you want to still build it as root, then disable sanity check in the file :

 meta/conf/sanity.conf 

comment this line like this:-

#INHERIT \+= "sanity"

src

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Salem

79286167

Date: 2024-12-16 22:02:46
Score: 2
Natty:
Report link

In the end, it looks like calling load() on book works when you specify the chapter in it, as follows: const content = await book.load(item.href);

Hope that helps someone.

Reasons:
  • Whitelisted phrase (-1): Hope that helps
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Riri

79286145

Date: 2024-12-16 21:53:44
Score: 2
Natty:
Report link

Old answer, old mistake. I2C has several speed modes: Standard-mode (100kbps), Fast-mode (400kbps), Fast-mode Plus (1Mbps), High-speed mode (3.4Mbps) and Ultra-Fast mode (5Mbps).

UM10204 I2C-bus specification and user manual Rev. 6 - 4 April 2014, section 3.2 (page 23-64) Explains about Ultra-Fast mode, ok? 2014!

So, telling someone to give up a project, being unfamiliar with a subjec or having no or limited knowledge of a topic, that's stupid!

Today, basically all cellphones comunicates in I2C with all modules, even the camera!

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user28812140

79286133

Date: 2024-12-16 21:46:43
Score: 1.5
Natty:
Report link

I'm using the Supabase connection pooler and was able to resolve this issue by increasing the Pool Size (Settings > Database > Connection Pooling Configuration). Default value for my project was 15, and stopped having this issue after increasing to 48.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: ahchoo

79286129

Date: 2024-12-16 21:39:42
Score: 0.5
Natty:
Report link

From this answer, for doing this from application.properties, you can add the following entry:

logging.pattern.console= %-5level %logger - %msg%n

This will remove the timestamp from your logs.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Diego Marquez

79286127

Date: 2024-12-16 21:37:41
Score: 3.5
Natty:
Report link

Make sure you're using a compatible version of TypeScript.

Angular: 18.1.x || 18.2.x

TypeScript: >=5.4.0 <5.6.0

Source: https://angular.dev/reference/versions#actively-supported-versions

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

79286111

Date: 2024-12-16 21:33:39
Score: 5.5
Natty:
Report link

Have you used correct resource type in your ARM template?

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Soumyadip

79286094

Date: 2024-12-16 21:21:37
Score: 2
Natty:
Report link

If some dependency failed because it requires a different version, try:

rpm -i --nodeps somepackage.rpm
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user28811902

79286092

Date: 2024-12-16 21:20:37
Score: 3.5
Natty:
Report link

convert image fom YUV to nv21 in Android and to bgra8888 in IOS.

See also: https://pub.dev/packages/google_mlkit_commons

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

79286091

Date: 2024-12-16 21:18:36
Score: 0.5
Natty:
Report link

Per the error this isn't possible. You can only accept and return single objects per row, your object can be arrays/seqs but you cannot use dataframes at all in UDFs, the spark session does not exist on executors. It may run locally but will fail when run on a non local relation.

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

79286087

Date: 2024-12-16 21:15:36
Score: 2.5
Natty:
Report link

Try right-clicking on the .csproj. Choose Properties. Then uncheck 'Transform project properties into assembly attributes during build.' Also uncheck 'Enable implicit global usings to be declared by the project SDK.'

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

79286084

Date: 2024-12-16 21:14:35
Score: 1
Natty:
Report link

Finally I found an answer. It is simple, but not mentioned anywhere...

Just open xcode project file in any editor and instead

shellScript = "cd \"$SRCROOT/..\"\n./gradlew :composeApp:embedAndSignAppleFrameworkForXcode\n";

put

shellScript = "";

You can do the same via xcode UI, but it is much quicker to do it this way.

This script is a leftover existing there due to direct integration (that is in all samples by default): https://kotlinlang.org/docs/multiplatform-direct-integration.html

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Ilia Petukhov

79286078

Date: 2024-12-16 21:11:35
Score: 0.5
Natty:
Report link

After I searched lots of questions in stackoverflow I get the solution. I changed these parts of code:

ElevatedButton.styleFrom(
                                    backgroundColor: result ==
                                                AppLocalizations.of(context)
                                                    ?.truth_answer &&
                                            selectedOption == option
                                        ? Colors.red
                                        : result ==
                                                    AppLocalizations.of(context)
                                                        ?.wrong_answer &&
                                                selectedOption == option
                                            ? Colors.blue
                                            : result ==
                                                        AppLocalizations.of(context)
                                                            ?.wrong_answer &&
                                                    currentQuestion["answer"]
                                                            as String ==
                                                        option
                                                ? Colors.red
                                                : Colors.blue),

with these code:

ButtonStyle(
                              backgroundColor: WidgetStateProperty.resolveWith<Color>((states) {
                                if (result == AppLocalizations.of(context)?.truth_answer && selectedOption == option) {
                                  return Colors.green;
                                } else if (result == AppLocalizations.of(context)?.wrong_answer && selectedOption == option) {
                                  return Colors.blue;
                                } else if (result == AppLocalizations.of(context)?.wrong_answer && currentQuestion["answer"] as String == option) {
                                  return Colors.green;
                                } else {
                                  return Colors.blue.shade200;
                                }
                              }),
                            ),
Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Ahmet Yılmaz

79286077

Date: 2024-12-16 21:11:35
Score: 1
Natty:
Report link

Like this? I assume, hopefully, that he meant 12 points. I added a step from 0 to 360 by 30. However it just draws the same 3 triangles from different points.

from graphics import *
from math import *

def ar(a):
    return a*3.141592654/180

def main():
    x0 = 100
    y0 = 100
    stepangle = 120
    radius = 50

    win = GraphWin()
    for startangle in range(0,360,30):
        p1 = Point(x0 + radius * cos(ar(startangle)), y0 + radius * sin(ar(startangle)))

        for i in range(stepangle+startangle,360+stepangle+startangle,stepangle):
            p2 = Point(x0 + radius * cos(ar(i)), y0 + radius * sin(ar(i)))
            Line(p1,p2).draw(win)
            p1 = p2

    input("<ENTER> to quit...")
    win.close()

main()

enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Andy Richter

79286064

Date: 2024-12-16 21:07:33
Score: 0.5
Natty:
Report link

I've written a package to handle this: repeat-todo. It supports weekdays, weekends, and custom combinations of days:

* TODO Water the flowers
SCHEDULED: <... ++1d>
:PROPERTIES:
:REPEAT: weekdays
:END
* TODO Go for a walk
SCHEDULED: <... ++1d>
:PROPERTIES:
:REPEAT: weekend
:END:
* TODO Get the mail
SCHEDULED: <... ++1d>
:PROPERTIES:
:REPEAT: M W F
:END:

The key methods are:

(defun repeat-todo--parse-property (prop-value)
  "Return repeating days for PROP-VALUE as list of day numbers (sun=0, mon=1, etc)."
  (let ((case-fold-search nil))
    (cond
     ((string-match "weekday\\(s\\)?" prop-value)
      '(1 2 3 4 5))
     ((string-match "weekend\\(s\\)?" prop-value)
      '(6 0))
     (t
      (let ((repeat-days '())
            (prop-values (string-split " " prop-value 'omit-nulls)))
        (dolist (value prop-values)
          ;; su, sun, sunday
          ((when (string-match "^su\\(n\\(day\\)?\\)?")
             (push 0 repeat-days)))
          ;; m, mon, monday
          ((string-match "^m\\(on\\(day\\)?\\)?") (push 1 repeat-days))
          ;; t, tue, tues, tuesday
          ((when (string-match "^t\\(ue\\(s\\(day\\)?\\)?")
             (push 2 repeat-days)))
          ;; w, wed, wednesday
          ((when (string-match "^w\\(ed\\(nesday\\)?\\)?")
             (push 3 repeat-days)))
          ;; r, thu, thur, thurs, thursday
          ((when (or (string= "r")
                     (string= "R")
                     (string-match "thu\\(r\\(s\\(day\\)?\\)?\\)?"))
             (push 4 repeat-days)))
          ;; f, fri, friday
          ((when (string-match "^f\\(ri\\(day\\)?\\)?")
             (push 5 repeat-days)))
          ;; sa, sat, saturday
          ((when (string-match "^sa\\(t\\(urday\\)?\\)?")
             (push 6 repeat-days))))
        (reverse repeat-days))))))

(defun repeat-todo--next-scheduled-time (current-scheduled-time weekdays)
  "Return the next valid, by WEEKDAYS, time after CURRENT-SCHEDULED-TIME.

WEEKDAYS: See `repeat-todo--weekdays'."
  (when weekdays
    (let ((new-scheduled-time
           (time-add current-scheduled-time (days-to-time 1))))
      (while (not
              (member
               (string-to-number
                (format-time-string "%u" new-scheduled-time))
               weekdays))
        (setq new-scheduled-time
              (time-add new-scheduled-time (days-to-time 1))))
      new-scheduled-time)))

(defun repeat-todo--reschedule (point-or-marker)
  "Reschedule heading at POINT-OR-MARKER to the next appropriate weekday."
  (when (and repeat-todo-mode
             (org-entry-is-done-p)
             (repeat-todo--p point-or-marker))
    (org-schedule
     nil
     (string-replace
      " 00:00" ""
      (format-time-string
       "%F %H:%M"
       ;; Schedule to the day before the next schedule time because
       ;; it'll get moved forward one day past when we schedule it
       (time-subtract
        (repeat-todo--next-scheduled-time
         (org-get-scheduled-time point-or-marker)
         (repeat-todo--parse-property
          (or (org-entry-get point-or-marker repeat-todo--property) "")))
        (days-to-time 1)))))))
Reasons:
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: cashpw

79286056

Date: 2024-12-16 21:02:32
Score: 1.5
Natty:
Report link

To piggy back off of @palash-toshniwal:

I was not able to get the attachment to not show in the inbox but to avoid the "download" and "add to drive" options in gmail when hovering the image while reading the email, I simply wrapped the <img /> tag with a <a href="yourURL"> tag.

<a href="yourURL">
    <img src="cid:logo2" />
</a>`
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @palash-toshniwal
  • Low reputation (1):
Posted by: Jack Jones

79286052

Date: 2024-12-16 21:00:31
Score: 1.5
Natty:
Report link

Yes, we encountered the same issue on our platform under high load with cache tags being created and flushed in queues.

We’ve turned off the cache on the high load query (after making sure it was indexed correctly).

Interesting to note, the latest Laravel docs say not to use cache tags with redis. We’re going to move our cache to Memcached.

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

79286051

Date: 2024-12-16 21:00:31
Score: 1
Natty:
Report link

Add c## before user name like

create user c##username identified by password;

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • High reputation (-1):
Posted by: Md Shahriar

79286049

Date: 2024-12-16 20:59:31
Score: 2
Natty:
Report link

If you want it to always automatically reveal the currently opened file in the Project sidebar, you can go to the Project panel, click the ... menu then Behavior -> Always Select Opened File

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

79286047

Date: 2024-12-16 20:57:31
Score: 2
Natty:
Report link

min-height: max-content; combined with overflow: hidden; solved the problem for me

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Basti

79286043

Date: 2024-12-16 20:55:30
Score: 0.5
Natty:
Report link

For future people looking for answer. My solution was to remove the response header Content-Disposition which had been set to attachment; filename=....

Together with Content-Type as application/pdf, the file is now showing in the new tab.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Timmy Chan

79286040

Date: 2024-12-16 20:53:29
Score: 4.5
Natty:
Report link

I am new too, trying to learn this stuff as well. Right now I am learning about javascript, in fact we only did codes in javascript to do this kind of stuff.

You can do it in CSS, but it is not recommended. You should try watching some basic javascript codes to get wanted result.

Make the class that you want to target with javascript, in your CSS and you will get a clean CSS with a nice button function.

I'd really upvote your question, but I can't since i do not have the reputation for it yet, but from my personal experience, this website is not welcoming new people trying to learn. You'll meet a bunch of old farts here, trying their best to say anything to sound smart, but not answer your question. Expamle - How to ask your question, fix your punctuation and shit... So, better go on reddit or youtube if you want your answers.

P.S. Respect for the guys who actually are trying to help you, as I've seen here in the replies.

Reasons:
  • Blacklisted phrase (0.5): upvote
  • RegEx Blacklisted phrase (1.5): i do not have the reputation
  • RegEx Blacklisted phrase (1.5): I am new
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: new guy

79285991

Date: 2024-12-16 20:30:23
Score: 13.5 🚩
Natty: 5.5
Report link

were you able to figure out how to get global decorators on an HTML Storybook project? I am having issues and was wondering if you were successful. Thank in advance for your feedback.

Reasons:
  • Blacklisted phrase (2): was wondering
  • RegEx Blacklisted phrase (3): Thank in advance
  • RegEx Blacklisted phrase (3): were you able to figure out
  • RegEx Blacklisted phrase (3): were you able
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Mario Hernandez

79285986

Date: 2024-12-16 20:25:21
Score: 1.5
Natty:
Report link

npm init playwright@latest

This helped me too.

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Sahil Rajput

79285977

Date: 2024-12-16 20:21:20
Score: 3
Natty:
Report link

I had been experiencing this issue myself on and off for a while until I toggled off the 'Run Debugger in Server Mode' option for the PyCharm debugger in settings.

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

79285952

Date: 2024-12-16 20:10:18
Score: 0.5
Natty:
Report link

I just ran into this myself, and I don't know if this information is still relevant for you, but I'm still posting in case someone else finds it useful.

I tried to execute a script that implements Cyberark, called it from within the containing folder as such:

cd /containingFolder

bash script.sh

and got that same error... But when invoking it as such:

bash /containingFolder/script.sh

The script ran with no errors.

This is due to Cyberark's "autorized path" policy. I went into the dashboard and realized that /containingFolder/ was an authorized path for my Cyberark installation, meaning other scripts outside this path, are NOT authorized to invoke Cyberark implementations. And this is why it must be called with an absolute path every time.

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

79285951

Date: 2024-12-16 20:10:18
Score: 0.5
Natty:
Report link

You need to add the NuGet packages that provide these models. They aren't included by default in netstandard2.0 like they were in Framework4.X

System.ServiceModel.Primitives

System.ServiceProcess.ServiceController

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

79285941

Date: 2024-12-16 20:05:17
Score: 1
Natty:
Report link

You'll need access value first

{% assign metafield_value = app.metafields.namespace.key.value %}

Then, get json value as needed

{{ metafield_value.car.color }}

Or access directly if you don't wanna use variables

{{ app.metafields.namespace.key.value.car.color }}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Zeindelf

79285927

Date: 2024-12-16 19:58:16
Score: 1
Natty:
Report link

You need to have runat="Server" in your control:

<select name="par_num" id="par_num" title="par_num" runat="Server" style="width:100%;">
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: jp2code

79285925

Date: 2024-12-16 19:58:16
Score: 1
Natty:
Report link

React tracks hooks in a specific order during each render of a component using a linked list of hooks tied to the component.

Conditional rendering of components does not interfere with state because each component's state is tracked independently via its node.

When a component is unmounted, React removes the component (and its associated state) entirely from its memory, and remounting creates a new component instance with fresh state.

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Kaveh Movahedi

79285918

Date: 2024-12-16 19:55:15
Score: 2
Natty:
Report link

In my case I imported the Response Body annotation from wrong source. I imported from swagger instead of Spring Framework and it created all the problem. I re-imported from Spring Framework and it worked.

Reasons:
  • Whitelisted phrase (-1): it worked
  • Low length (0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Mukesh Ranjan

79285905

Date: 2024-12-16 19:52:14
Score: 3
Natty:
Report link

I have a problem with tax information, I am not in company, I am using it for learning purposes, so I have no tax information to give, but I can not proceed without it

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Ljuban Opačić

79285901

Date: 2024-12-16 19:51:13
Score: 1
Natty:
Report link

To take this one step further and be able to unfollow a mass list of work items: (I also taught chatgpt to do this, so hopefully it learns for others).

On the Boards menu - select work items. Then from the drop down in the upper left, select 'follow'. Using the filter, filter to the list of work items that you want to unfollow. Then select the upper left radio button to mass select all records, then click on the 'Open filtered view in queries. Using shift, select all records. Click the 3 dots button on one of the work items, select 'Unfollow'

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

79285896

Date: 2024-12-16 19:49:12
Score: 3
Natty:
Report link

You can also use Pasify , its a password/secret management app , specially designed and developed for developers and tech professionals.

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

79285894

Date: 2024-12-16 19:48:11
Score: 6 🚩
Natty: 5
Report link

Is it possible to program specific URL within websites into another URL? For example a specific twitch channel into another channel. If so, is that possible in caso of raids when the URL is filled automatically?

Reasons:
  • Blacklisted phrase (1): Is it possible to
  • Low length (0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Starts with a question (0.5): Is it
  • Low reputation (1):
Posted by: Vagner Mesquita

79285886

Date: 2024-12-16 19:45:10
Score: 0.5
Natty:
Report link

As for the field C to be not updating, you might want to explicitly reference the field\_c in the field\_a that is still UNNEST, you can try to update below:

from

"@var\_b" AS field\_b,

field\_c AS field\_c

to

"@var\_b" AS field\_b,

a.field\_c AS field\_c

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: marky

79285884

Date: 2024-12-16 19:44:09
Score: 3.5
Natty:
Report link

curti desta vez é inedito os fatos corrigidos

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Tiago Θεός

79285861

Date: 2024-12-16 19:35:07
Score: 3.5
Natty:
Report link

after trying more than one solutions (all does not work). i just restart my router device and it is work.

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

79285853

Date: 2024-12-16 19:31:05
Score: 12 🚩
Natty: 5
Report link

A late reply to this thread but I'm facing the same issue. To set something with SNMP, I need to put in an OctetString with BITS Syntax. This are the possibilities:

BITS {interface1(0),
interface2(1),
interface3(2),
interface4(3),
interface5(4),
interface6(5),
interface7(6),
interface8(7)
}

And combinations are possible. I don't know how to set only interface5 or interface2, interface3 and interface5 together or how to set all of them together.

Can someone help me, please?

Thank you

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (1): help me
  • Blacklisted phrase (0.5): I need
  • RegEx Blacklisted phrase (3): Can someone help me
  • RegEx Blacklisted phrase (2): help me, please
  • Has code block (-0.5):
  • Me too answer (2.5): I'm facing the same issue
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: JKE

79285838

Date: 2024-12-16 19:23:03
Score: 2.5
Natty:
Report link

The TextInput tag is self-closing. If you add a closing tag beneath it, this can cause issues with the placeholder and other functionalities. Try removing the closing tag from your code.

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

79285836

Date: 2024-12-16 19:22:02
Score: 4.5
Natty:
Report link

I have a workaround for Obsidian and potentially other apps, since I have the same issue: if you're using the Flatpak version, you can disable Wayland (Wayland Windowing System, Inherit Wayland Socket) in Flatseal, which gets pen support working for the most part.

The only issue with the above is that some drag and drop stuff no longer works, and if the display scale isn't set to 100% the pen cursor is kinda off in things like Excalidraw (but still draws correctly)

If you install some of the other applications as flatpaks too, doing the same to those might work as well.

Reasons:
  • Blacklisted phrase (1): I have the same issue
  • Long answer (-0.5):
  • No code block (0.5):
  • Me too answer (2.5): I have the same issue
  • Low reputation (1):
Posted by: neontheneon

79285829

Date: 2024-12-16 19:20:02
Score: 2.5
Natty:
Report link

Do you try to check cache if it has been cache then make all fields assign to the cache and then make them readonly after assign i don't try it but in logic I think it will be right

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: محمد ابوضيف

79285812

Date: 2024-12-16 19:14:59
Score: 4
Natty: 5
Report link

Use (and star) this cross-browser library: https://github.com/xitanggg/node-selection

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

79285811

Date: 2024-12-16 19:13:59
Score: 1.5
Natty:
Report link

Yes, the code provided disposes of resources correctly by utilizing the using statement for SqlConnection, SqlCommand, and SqlDataAdapter objects. The using statement ensures that these objects are disposed of properly even if an exception occurs.

The DataSet is returned without needing explicit disposal as it will be garbage collected once it goes out of scope.

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

79285796

Date: 2024-12-16 19:05:57
Score: 2.5
Natty:
Report link

Since you are trying to parse config, you might also consider using pydantic-settings module instead of just pydantic. However, if all of your configuration is coming from YAML, this doesn't make a lot of sense.

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

79285794

Date: 2024-12-16 19:05:56
Score: 12
Natty: 7.5
Report link

Have you found any solution yet?

Reasons:
  • Blacklisted phrase (1.5): any solution
  • RegEx Blacklisted phrase (2.5): Have you found any solution yet
  • RegEx Blacklisted phrase (2): any solution yet?
  • Low length (2):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: MUHAMMAD HARIS

79285793

Date: 2024-12-16 19:04:56
Score: 2.5
Natty:
Report link

Sorry for bad writing style, its my first time to use stack overflow.

No. This is not how it works. Route table only routes (directs) traffic according to rules. A routing table is analogous to a distribution map in package delivery. Whenever a node needs to send data to another node on a network, it must first know where to send it. That's what a route table does. In order to control the ingress (TO) and egress (FROM) traffic you set up security groups and NACLs. That's the layer you need to focus on.

I would still to double check: this comment is trying to explain that "Route table is not used for traffic control". However, can we say that:

Setting: There is a VPC, Alice, we are using (local), and another VPC, Bob, we try to connect to.

Statement1: If Bob is not in the route table attached to Alice regardless of other resources/services such as security group etc, then Alice cannot direct traffic, or in plain words cannot send message, to Bob.

Statement2: Even if Bob is not in the route table attached to Alice, but correctly configuring other resources/services, Alice is still possible to receive message from Bob.

Are the statements right or wrong? If it is wrong, why is it? Or if the statement itself is wrong depicted, what is it?

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Ruochen Sun

79285792

Date: 2024-12-16 19:04:56
Score: 1.5
Natty:
Report link

myFinalCode:

Public Function func_1() As Double
'MS Access module

    Dim xlapp As New Excel.Application
    Dim wkb As Excel.Workbook
    Dim wks As Excel.Worksheet
    Dim arg1 As Double
    
    Set xlapp = CreateObject("Excel.Application")
    xlapp.Visible = True
    Set wkb =  xlapp.Workbooks.Open("C:\Book1.xlsm")
    arg1 = 100
    xlapp.Run "func_2", arg1

    'Thank you all very much!    

End Function
Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: rhk123

79285788

Date: 2024-12-16 19:02:55
Score: 2
Natty:
Report link

I have created 2 simple Python scripts that:

No need to install pandoc or any other package.

https://gist.github.com/fabiog1901/d6a41c4416eefe49c372f11cab2b2084

Reasons:
  • Contains signature (1):
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: fabiog1901

79285786

Date: 2024-12-16 19:02:55
Score: 3.5
Natty:
Report link

VBA is not supported by the New Outlook.

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

79285784

Date: 2024-12-16 19:00:55
Score: 2
Natty:
Report link

This was fixed by stylelint/stylelint#5835 in version 14.3.0.

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

79285781

Date: 2024-12-16 18:59:54
Score: 1.5
Natty:
Report link

Short answer: Yes, it is possible to prevent screenshots of PDFs by using advanced DRM tools like VeryPDF DRM Protector https://drm.verypdf.com/online/ . This software blocks all known screen capture methods, including disabling the "Print Screen" key and preventing tools like SnagIt and the Windows Snipping Tool. It also adds dynamic watermarks with user-specific details to discourage unauthorized sharing and uses military-grade encryption to restrict access. These features make it ideal for protecting sensitive content, such as eBooks, from piracy while maintaining a seamless user experience.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Peter Chen

79285775

Date: 2024-12-16 18:57:54
Score: 1
Natty:
Report link

One way is to normalize the data. You can read about it here: https://redux.js.org/tutorials/essentials/part-6-performance-normalization#normalizing-data

Another way is to use shallowEqual. https://react-redux.js.org/api/hooks#equality-comparisons-and-updates

// (1)
import { shallowEqual } from 'react-redux';

import { MyEvent, getEventsByUser } from './state/events.slice';
import { useAppSelector } from './state/hooks';

export function EventsRow({ user }: { user: string }) {
  console.warn('Events Row rendered for user: ' + user);
  const events: MyEvent[] = useAppSelector(
    (state) => getEventsByUser(state, user),
    // (2)
    shallowEqual
  );

  return (
    <div id={`user-${user}`}>
      {events.map((x) => (
        <div>{x.title}</div>
      ))}
    </div>
  );
}

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: y0u

79285774

Date: 2024-12-16 18:56:53
Score: 2.5
Natty:
Report link

Finding it's a data issue and that while Glue is defining the column as a timestamp and Athena can query it the structure of the data won't allow Redshift to read it. If the data is converted as a 'date' in Glue it comes through to Redshift without issue.

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

79285770

Date: 2024-12-16 18:56:53
Score: 1
Natty:
Report link

As it turns out, I was doing this kind of wrong. I should have been using a hooks.server.ts file first of all. Hyntabyte explains it well in this YouTube video: https://www.youtube.com/watch?v=K1Tya6ovVOI

Essentially, we should be doing the auth check in the hooks.server.ts file, then passing whether or not it is authenticated using Locals. That way, you can access it through locals in each +page.server.ts file to determine if the user is authenticated or not.

Another issue I was running into later was that I needed to forward to cookies to SvelteKit. I keep trying to set it using event.cookies, but it should have been event.request.headers.get like this:

import type { Handle } from '@sveltejs/kit';
import { API_URL } from '$lib/config';

export const handle: Handle = async ({ event, resolve }) => {
    const cookies = event.request.headers.get('cookie') || '';

    const response = await fetch(`${API_URL}/api/auth/status`, { # my endpoint for checking auth status
        credentials: 'include',
        headers: {
            'X-Requested-With': 'XMLHttpRequest',
            Cookie: cookies
        }
    });

    const data = await response.json();
    event.locals.isAuthenticated = data.isAuthenticated;
    event.locals.user = data.user;

    return resolve(event);
};

Finally, I also had issues with CORS. I needed to run my Django server using python manage.py runserver localhost:8000 to prevent it from defaulting to 127.0.0.1:8000. I also needed to have these in my settings.py file:

CSRF_COOKIE_SECURE = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SAMESITE = 'None'
SESSION_COOKIE_SAMESITE = 'None'
Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (1): youtube.com
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: St3ph3n92

79285767

Date: 2024-12-16 18:53:52
Score: 0.5
Natty:
Report link

I was practicing the first examples of input, and them I skipped to the if, else and for loops.

The whole example contains two files.

First file is sayhi.py:

name = input('What is your name?\n')
print('Hi, %s.' % name)
print('Welcome to Python.')
quest01 = input('Do you like it? Y/N\n')
if(quest01 == 'Y'):
  print(f"Yeah, {name}!\nI like it too!")
else:
  print(f"Oh, {name}.\nToo bad you don't like it!")

The second file is dragonloot.py:

import random
import sayhi
from rich import print

# Inventory and loot
stuff = {
    "rope": 3,
    "torch": 5,
    "gold coins": 47,
    "dagger": 2,
    "arrow": 13,
    "dragon tail": 0,
    "legendary weapons": 3,
    "girls": 0,
    "wolf fangs": 33
}

dragonLoot = ['gold coins', 'dragon tail', 'dagger', 'ruby', 'silver ore', 'girls']

# Function to display the inventory with styles
def displayInventory(inventory):
    # Title
    print("[bold yellow]\nYour inventory, right now:[/bold yellow]\n")

    # Header
    print("[bold cyan]{:^18} {:>5}[/bold cyan]".format("Item", "Count"))
    print("[blue]" + "-" * 24 + "[/blue]")

    # Inventory items
    total_items = 0
    for item, count in inventory.items():
        if item == "gold coins":     # Style for gold coins
            style = "bold yellow"
        elif item == "ruby":         # Style for ruby gems
            style = "bold red"
        elif item == "silver ore":   # Style for silver ore
            style = "bold blue"
        elif count > 10:             # Style based on item count
            style = "green"
        elif count == 0:
            style = "orange"
        else:
            style = "white"

        # Print the item and count with the style
        print(f"[{style}]{item:<20} {count:>3}[/]")
        total_items += count

    # Footer
    print("[blue]" + "-" * 24 + "[/blue]")
    print(f"[bold magenta]Total number of items: {total_items}[/bold magenta]")

# Function to add random loot to the inventory
def add_item_to_inventory(inventory, item, min_qty, max_qty):
    if item not in inventory:
        inventory[item] = random.randint(min_qty, max_qty)
    else:
        inventory[item] += random.randint(min_qty, max_qty)

# Function to handle adding all loot
def addToInventory(inventory, addedItems, dragon_status):
    for item in addedItems:
        if item == 'dragon tail' and not dragon_status:
            add_item_to_inventory(inventory, item, 1, 1)
        elif item == "dragon tail" and dragon_status:
            add_item_to_inventory(inventory, item, 0, 0)
        elif item == 'gold coins':
            add_item_to_inventory(inventory, item, 17, 100)
        elif item == 'girls':
            add_item_to_inventory(inventory, item, 0, 5)
        else:
            add_item_to_inventory(inventory, item, 1, 9)

# Function to get the dragon's survival status
def get_dragon_status():
    alive = random.randint(0, 1)
    if alive:
        print("[bold green]\nCongratulations! You've looted the dragon without killing it![/bold green]")
    else:
        print("[bold red]\nYou've looted the dragon, but you managed to kill it. Shame on you![/bold red]")
    return alive

# Function to handle special items like "girls"
def handle_special_items(inventory, item, alive_dragon):
    if inventory.get(item, 0) == 1 and alive_dragon:
        return "[bold cyan]\nCongratulations! You have a girlfriend![/bold cyan]"
    elif inventory.get(item, 0) == 1 and not alive_dragon:
        return ("[bold cyan]\nCongratulations! You have a girlfriend ...[/bold cyan]\n"
        + "[bold red]but, she hates you for killing her mom... [italic](yes! the dragon!)[/italic][/bold red]")
    elif inventory.get(item, 0) > 1:
        if alive_dragon:
            return (
                f"[bold yellow]\nYou have {inventory[item]} girls?!!\n"
                + "Sorry! But you'll have to manage it! You can keep only one.\n\n"
                + "Suggestion: [italic]dragon snacks...[/italic]\n\n"
                + "What a great way to thank the dragon for your loot![/bold yellow]"
            )
        elif sayhi.quest01 == "Y":
            return (
                f"[bold red]\nYou have {inventory[item]} girls! "
                + "Sorry! But you’ll have to manage this mess — you can only keep one!\n\n"
                + "Suggestion: \n[italic]Oh, for crying out loud…[/italic]\n"
                + "You actually killed the dragon, didn’t you?! Unbelievable!\n"
                + "Well, now you’ve got some serious damage control to do.\n"
                + "Find another dragon (yes, a [bold underline]new[/bold underline] one), try not to kill it this time, and\n"
                + "offer girls as a peace offering… Err, I mean, a snack.\n\n"
                + "Go redeem yourself, you [italic]terrible, terrible[/italic] dragon slayer![/bold red]"
            )
        else:
            return (
                f"[bold red]\nYou have {inventory[item]} girls! "
                + "Sorry! But you’ll have to manage this mess — you can only keep one!\n\n"
                + "Suggestion: \n[italic]Oh, for crying out loud…[/italic]\n"
                + "You actually killed the dragon, didn’t you?! Unbelievable!\n"
                + "Well, now you’ve got some serious damage control to do.\n"
                + "Find another dragon (yes, a [bold underline]new[/bold underline] one), try not to kill it this time, and\n"
                + "offer girls as a peace offering… Err, I mean, a snack.\n\n"
                + "Go redeem yourself, you [italic]terrible, terrible[/italic] dragon slayer [italic](and programmer)[/italic] - yes, I've noticed you don't like Python...[/bold red]"
            )
    if sayhi.quest01 == "Y":
        return "[bold red]\nSorry! The girl didn't make it alive.[/bold red]"
    else:
        return "[bold red]\nSorry! The girl didn't make it alive.\n\n[italic]And it's probably because you don't like Python![/italic] SHAME ON YOU![/bold red]"

# Main Execution
alive_dragon = get_dragon_status()
addToInventory(stuff, dragonLoot, alive_dragon)
displayInventory(stuff)
print(handle_special_items(stuff, "girls", alive_dragon))

Output example 1:

What is your name?
Daniel
Hi, Daniel.
Welcome to Python.
Do you like it? Y/N
N
Oh, Daniel.
Too bad you don't like it!

Congratulations! You've looted the dragon without killing it!

Your inventory, right now:

       Item        Count
------------------------
rope                   3
torch                  5
gold coins            67
dagger                 8
arrow                 13
dragon tail            0
legendary weapons      3
girls                  4
wolf fangs            33
ruby                   3
silver ore             1
------------------------
Total number of items: 140

You have 4 girls?!!
Sorry! But you'll have to manage it! You can keep only one.

Suggestion: dragon snacks...

What a great way to thank the dragon for your loot!

Output example 2:

What is your name?
Daniel
Hi, Daniel.
Welcome to Python.
Do you like it? Y/N
N
Oh, Daniel.
Too bad you don't like it!

You've looted the dragon, but you managed to kill it. Shame on you!

Your inventory, right now:

       Item        Count
------------------------
rope                   3
torch                  5
gold coins           142
dagger                 7
arrow                 13
dragon tail            1
legendary weapons      3
girls                  0
wolf fangs            33
ruby                   8
silver ore             6
------------------------
Total number of items: 221

Sorry! The girl didn't make it alive.

And it's probably because you don't like Python! SHAME ON YOU!

Output example 3:

What is your name?
Daniel
Hi, Daniel.
Welcome to Python.
Do you like it? Y/N
N
Oh, Daniel.
Too bad you don't like it!

You've looted the dragon, but you managed to kill it. Shame on you!

Your inventory, right now:

       Item        Count
------------------------
rope                   3
torch                  5
gold coins           107
dagger                 5
arrow                 13
dragon tail            1
legendary weapons      3
girls                  4
wolf fangs            33
ruby                   3
silver ore             6
------------------------
Total number of items: 183

You have 4 girls! Sorry! But you’ll have to manage this mess — you can only keep one!

Suggestion: 
Oh, for crying out loud…
You actually killed the dragon, didn’t you?! Unbelievable!
Well, now you’ve got some serious damage control to do.
Find another dragon (yes, a new one), try not to kill it this time, and
offer girls as a peace offering… Err, I mean, a snack.

Go redeem yourself, you terrible, terrible dragon slayer (and programmer) - yes, I've noticed you 
don't like Python...
Reasons:
  • Blacklisted phrase (1): What is your
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Delboni

79285765

Date: 2024-12-16 18:52:52
Score: 1.5
Natty:
Report link
# Train a Linear Regression model
lm_model <- lm(medv ~ ., data = Boston, subset = train)
lm_pred <- predict(lm_model, X_test)

# Evaluate performance
mse_lm <- mean((y_test - lm_pred)^2)
print(paste("MSE for Linear Regression:", round(mse_lm, 2)))
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user28810451

79285757

Date: 2024-12-16 18:48:51
Score: 3
Natty:
Report link

You can try installing it in R instead of RStudio and then use RStudio to run this package!

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

79285729

Date: 2024-12-16 18:34:47
Score: 2
Natty:
Report link

Solved. My GCP user, the one logged in Firebase CLI with firebase login, was missing the setIamPolicy. Adding the policy to it and redeploying solved.

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Matheus Ribeiro

79285728

Date: 2024-12-16 18:34:47
Score: 1
Natty:
Report link

you don’t like the performance?

This is one time work or your goal is to insert 50M records every time? Inserting 50m records without committing, is not the best idea you can do with Redo.. Also on which table you have PK? Table1 or Table2? What is the point of having PK on varchar data type column? This kind of a solution might have performance issues, because indexing and lookup operations on varchar columns are generally slower than on numeric columns because string comparison + validation overhead and in long term it will cost you more storage…

So I would recommend to commit after every 10K - 50K records are inserted… Maybe this will help.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Tvitmsvleli

79285726

Date: 2024-12-16 18:34:47
Score: 2.5
Natty:
Report link

You may try with ks_2samp, like the following .. stat, p = stats.ks_2samp(a, b, alternative='two-sided')

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

79285725

Date: 2024-12-16 18:34:47
Score: 4
Natty:
Report link

Hey @ChrisHaas thanks for the recommendation, what I was able to do is pass it as an array from the second addTag call since the Zendesk function allows arrays or strings so I just changed the shouldReceive call to expect an array and I was able to target that specific call.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Low length (0.5):
  • No code block (0.5):
  • User mentioned (1): @ChrisHaas
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: RDelorier

79285721

Date: 2024-12-16 18:33:46
Score: 1.5
Natty:
Report link

In my tests with ldap3 I:

  1. Added the user account without those attributes.

  2. Setted password with:

    conn.extend.microsoft.modify_password(user=dn, new_password=pwd, old_password=None)

  3. Setted only userAccountControl:

    conn.modify(user_dn, changes = { "userAccountControl": (MODIFY_REPLACE, [512])})

When I setted pwdLastSet to zero, as @ElPalomo mention, I can't authenticate user/password.

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @ElPalomo
  • Low reputation (1):
Posted by: ProfessorNpc

79285714

Date: 2024-12-16 18:31:45
Score: 5
Natty:
Report link

i did a little reasearch, and no, i would have to implement the logic myslef (thanks @John Gordon) so i will go and suffer now :)

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Low length (1):
  • No code block (0.5):
  • User mentioned (1): @John
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: gaskutiy

79285711

Date: 2024-12-16 18:31:45
Score: 1
Natty:
Report link

I can confirm that this is an issue with Vercel and Next.js 15.1.0.

Downgrading to Next.js 15.0.4 worked for me.

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

79285705

Date: 2024-12-16 18:29:44
Score: 2.5
Natty:
Report link

If the only reason you are subclassing TGroupBox is to create a new style for it and in particular to not show the frame, then why not just set the ShowFrame property to false instead?

If you have other functionality in your subclassed GroupBox or if I have misunderstood your question, then I would tag Delphi as well because you will engage a much larger base of users for something that is more VCL specific than C++ specific.

(I wish I could have just left a comment but because the way SO works is that I have to generate enough points to do that and one way is by submitting answers. It seems odd to me that it is more difficult to comment than to provide an answer.)

Reasons:
  • Blacklisted phrase (1): to comment
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Gary Pauls

79285702

Date: 2024-12-16 18:27:44
Score: 2.5
Natty:
Report link

Making a composer update woks for me, Laravel 11

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: JuanJota

79285692

Date: 2024-12-16 18:24:43
Score: 4.5
Natty:
Report link

Looks like you both have the same issue. A quick search links to an issue in the official flutter repository, which highlights the root cause, (latest JDK that comes with android studio), this then linked to the migration instructions of how to update your project to be compatiable. The steps are here: https://github.com/fluttercommunity/plus_plugins/issues/3303

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Me too answer (2.5): have the same issue
  • Low reputation (1):
Posted by: Mehedi Hasan Ovi

79285672

Date: 2024-12-16 18:16:41
Score: 2.5
Natty:
Report link

It figured it out. I just had to initialize m_socket at the top like this:

int m_socket;
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Yuri Mckoy

79285658

Date: 2024-12-16 18:12:40
Score: 2
Natty:
Report link

Just in case anyone else is as unobservant as I am: I got this error when I put a line of code inside a new class but not inside any methods (there were no methods yet and I wasn't paying attention).

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

79285640

Date: 2024-12-16 18:05:38
Score: 1
Natty:
Report link

Impossible due to security reasons

Due to security reasons on most browsers, pages are not allowed to redirect or have links to about: system pages. Some, like about:quit, about:hang, or about:restart (all found at, in chrome's case, chrome://chrome-urls/) do unwanted things to the system.

If redirects and links were allowed, people could exploit clickjacking to restart people's computers, hang them, and more. However, it seems that about:pages themselves are allowed to redirect to other pages, like on the about:chrome-urls page.

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

79285630

Date: 2024-12-16 18:01:36
Score: 1
Natty:
Report link

You can type in the debug console:

po FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first

And it will give you the path.

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ori C.

79285618

Date: 2024-12-16 17:58:35
Score: 4
Natty:
Report link

ESCAPE_UNENCLOSED_FIELD=NONE

Solved the problem

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Has no white space (0.5):
  • Low reputation (1):
Posted by: yagmurkoksal

79285612

Date: 2024-12-16 17:56:34
Score: 1.5
Natty:
Report link

I was able to expose the Enum as string configuring the method JsonOptions on extension method AddControllers in Program.cs like the follow code:

 builder.Services.AddControllers().AddJsonOptions(options =>
{
    options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());

} );
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Guilherme silva

79285610

Date: 2024-12-16 17:56:34
Score: 2
Natty:
Report link

For what this is worth, I had the correct keys (managed programmatically), but Minio didn’t like secret keys with symbols in them. Once I changed the password to alphanumeric (Minio lets you do this through the WebUI), it instantly worked.

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