79407061

Date: 2025-02-02 18:10:59
Score: 2.5
Natty:
Report link

According to a very fundamental theorem in computer science it is possible to use data structures instead of self modifying code. It would be better to discuss the problems in your python code than how to solve them with variables that automatically change their name at run time, which is a very quick recipe to create a maintenance nightmare. Not even the python language itself changes its own variables. The only thing that gets close is higher order decorators, and they already can be a headache to debug.

Reasons:
  • Blacklisted phrase (1): how to solve
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Max Headroom

79407047

Date: 2025-02-02 18:00:57
Score: 3
Natty:
Report link

Find it! For some reason my file was added to the ressource tags and then considered "On Demand"... I removed it and it all works fine now!

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

79407040

Date: 2025-02-02 17:57:57
Score: 0.5
Natty:
Report link

After a long time of try/error and research the solution for this is quite simple. The code is 100% correct but (at least on Android) the audio is blocked. It is blocked because there is no user interaction on the hybridwevview itself but only on the MAUI UI. If I add a button onto the hybridwebview looking like this:

<button id="enableAudioButton">Enable Audio</button>

and add this code into my JavaScript

document.getElementById('enableAudioButton').addEventListener('click', () => {
const audioElement = document.getElementById('audio');
if (audioElement) {
    audioElement.muted = false;
    audioElement.play().then(() => {
        console.log("enableAudioButton Audio is playing.");
    }).catch((error) => {
        console.error("enableAudioButton Error attempting to play audio:", error);
    });
}

and press the button "Enable Audio", the audio works. What I try to do now is to automate the click on the button, which is the next challange.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Ricardo Enrico Jahn

79407031

Date: 2025-02-02 17:49:55
Score: 3.5
Natty:
Report link

Goodmorning,

from my side when I try to run the script I receved an error saying:

GoogleJsonResponseException: API call to drive.files.copy failed with error: File not found: 1Op2ODeMrxPQTPAuUusqBWHI49Z4bQjhe fetchAndConvertDropboxFile @ Codice.gs:10

enter image description here

Honestly I have no idea the reason why.

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Nightmare

79407027

Date: 2025-02-02 17:46:53
Score: 1
Natty:
Report link

Still, circuit is the way to go:

see this doc section.

And this jobshop example with transitions.

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • High reputation (-2):
Posted by: Laurent Perron

79407024

Date: 2025-02-02 17:45:52
Score: 9.5 🚩
Natty: 6.5
Report link

Any progress on this issue? I'm facing same issue both in mainnet and testnet.

If you find a solution, could you please share here?

Reasons:
  • RegEx Blacklisted phrase (2.5): could you please share
  • Low length (1):
  • No code block (0.5):
  • Me too answer (2.5): I'm facing same issue
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Shariat Ullah

79407018

Date: 2025-02-02 17:40:50
Score: 1.5
Natty:
Report link

Cant use

    'service': 'my_service',
    'passfile': '.pgpass',

So use decouple and tradional

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'dbms_db',
        'USER': 'dbms',
        'PASSWORD': DB_PASS,
        'HOST': '127.0.0.1',
        'PORT': '5432',
    }
}
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Starts with a question (0.5): Can
  • Low reputation (1):
Posted by: Alex P

79407008

Date: 2025-02-02 17:32:49
Score: 1
Natty:
Report link

Given those volumes, I think it makes a lot of sense to store all the images from one event in a separate place in Azure. We do something like this - but in S3 and our separation is all items for a particular site go in their own folder. This makes it a lot easier for me to create a backup of the media for a given site.

What you need to do is create a collection for each event and store the images (and documents) for that event in their own collection. The later is accomplished by giving your image, rendition, and documents models a get_upload-to method that prepends the collection name to the usual Wagtail paths. Here is some code extracted from our project https://gist.github.com/cnk/b361f540330e9f400875ba3d86e61904

I would also suggest that you may want to write a manage command to upload your images into Wagtail. Something along the lines of this blog post https://cynthiakiser.com/blog/2022/07/02/import-files-into-wagtail.html

Reasons:
  • Blacklisted phrase (1): this blog
  • Contains signature (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
Posted by: cnk

79407002

Date: 2025-02-02 17:30:48
Score: 3.5
Natty:
Report link

The way I do this is by wrapping the Script-Fu functions to show debugging details, as explained more thoroughly here.

https://script-fu.github.io/funky/hub/tutorials/folder/debugging/debugging/

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

79406995

Date: 2025-02-02 17:25:47
Score: 3
Natty:
Report link

I have the same problem but only on ios 18. I found a tempory fix. I use two textfield so I don't have to toggle the obscure text property

class PasswordField extends StatefulWidget {
  final TextEditingController? controller;
  final String? hintText;
  final TextInputAction textInputAction;

  const PasswordField({
    super.key,
    this.controller,
    this.hintText,
    this.textInputAction = TextInputAction.done,
  });

  @override
  PasswordFieldState createState() => PasswordFieldState();
}

class PasswordFieldState extends State<PasswordField> {
  late TextEditingController _controller;
  final FocusNode _focusNode = FocusNode();
  bool _isObscured = true;

  @override
  void initState() {
    super.initState();
    _controller = widget.controller ?? TextEditingController();
  }

  void _toggleVisibility() {
    setState(() {
      _isObscured = !_isObscured;
    });
    _focusNode.requestFocus(); // Keep keyboard open
  }

  @override
  void dispose() {
    _focusNode.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return AutofillGroup(
      child: Stack(
        children: [
          // Visible TextField
          Visibility(
            visible: !_isObscured,
            maintainState: true,
            child: TextField(
              key: const ValueKey("visible_text_field"),
              controller: _controller,
              focusNode: _focusNode,
              obscureText: false,
              autofillHints: const [AutofillHints.password],
              textInputAction: widget.textInputAction,
              decoration: InputDecoration(
                hintText: widget.hintText ?? "Enter your password",
                border: OutlineInputBorder(
                  borderRadius: BorderRadius.circular(8.0),
                ),
              ),
            ),
          ),
          // Obscured TextField
          Visibility(
            visible: _isObscured,
            maintainState: true,
            child: TextField(
              key: const ValueKey("obscured_text_field"),
              controller: _controller,
              focusNode: _focusNode,
              obscureText: true,
              autofillHints: const [AutofillHints.password],
              textInputAction: widget.textInputAction,
              decoration: InputDecoration(
                hintText: widget.hintText ?? "Enter your password",
                border: OutlineInputBorder(
                  borderRadius: BorderRadius.circular(8.0),
                ),
              ),
            ),
          ),
          // Visibility Toggle Button
          Positioned(
            right: 0,
            top: 0,
            bottom: 0,
            child: IconButton(
              focusNode: null,
              icon: Icon(
                _isObscured ? Icons.visibility_off : Icons.visibility,
              ),
              onPressed: _toggleVisibility,
            ),
          ),
        ],
      ),
    );
  }
}
Reasons:
  • Blacklisted phrase (1): I have the same problem
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): I have the same problem
  • Low reputation (1):
Posted by: user24684961

79406994

Date: 2025-02-02 17:22:46
Score: 2
Natty:
Report link

How many Puma servers are you running?

If you have one server running -w1 -t1:1, only one request can be processed at a time.

If a large number of requests hit the server at the same time, they will sit in the OS's backlog until Puma can process them.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): How
  • Low reputation (1):
Posted by: Greg

79406991

Date: 2025-02-02 17:14:45
Score: 1
Natty:
Report link

Let's say I want the files for 2 January, 2025...

touch -t 202501030000.00 /tmp/from$$ 
touch -t 202501032359.59 /tmp/to$$
find . -name "file.subfile.P\*.lastfile" -mnewer /tmp/from$$ -molder /tmp/to$$ -print | xargs  echo "Processing files: "
rm /tmp/{from,to}$$
Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Low length (0.5):
  • Has code block (-0.5):
Posted by: xpusostomos

79406983

Date: 2025-02-02 17:10:44
Score: 2
Natty:
Report link

Many thanks to @Moe for the help, I finally got this working thanks to him and I want to leave a trace of what works for others because (to me) this was insanely difficult and I still don't fully understand everything about how it works.

I'm only going to show the specific code for remember/mutableStateListOf here i.e. where it goes in the main class and then composable and, for the moment, I'm not worrying about the blocking issue mentioned above - this is a simplest, probably poorly implemented, but working solution. Note that it's also not everything you need, all the compose layout is missing. Here is what's in the mainactivity class:

class MainActivity : ComponentActivity() {

    // get the folder to save images to
    val outputDirectory = getOutputDirectory()

    // read in a list of images in the images folder
    var fileList: ArrayList<File> = imageReaderNew(outputDirectory)

    override fun onCreate(savedInstanceState: Bundle?) {
        setContent {
            CameraApp1Theme {

                // create a mutablestatelistof and remember it for jetpack compose
                val bitmaps = remember { mutableStateListOf<Bitmap>() }

                // get a list of bitmaps of the images and add it to the bitmaps list
                val loadedBitmaps = getBitmapList(fileList)
                bitmaps.clear()
                bitmaps.addAll(loadedBitmaps)

                BottomSheetScaffold(
                    scaffoldState = scaffoldState,
                    sheetContent = {
                        PhotoBottomSheetContent(
                            // pass bitmaps to the composable
                            bitmaps = bitmaps,
                            modifier = Modifier.fillMaxWidth()
                        )
                    }
                )
                {
                   IconButton(
                        // triggered when the user open the photosheet
                        onClick = {
                            // read in a list of images in the images folder (update)
                            fileList = imageReaderNew(outputDirectory)

                            // get a list of bitmaps of the images and add it to the bitmaps list to update it
                            val loadedBitmaps = getBitmapList(fileList)
                            bitmaps.clear()
                            bitmaps.addAll(loadedBitmaps)
                        }
                    )
                    {
                    }
                }
            }
        }
    }


    // Get output directory for photos
    private fun getOutputDirectory(): File {

        //... get the directory here (internal or external etc.) ...

        // return absolute path to directory
        return fullpath
    }


    // Read in an arraylist of all saved images for this app
    private fun imageReaderNew(root: File): ArrayList<File> {

        //... build the list here ...

        // return filelist arraylist
        return fileList
    }

    private fun getBitmapList(fileList: ArrayList<File>): ArrayList<Bitmap> {

        // set up an empty bitmaps arraylist
        val bitmaps: ArrayList<Bitmap> = ArrayList()

        //... build the list here ...

        // return bitmaps arraylist
        return bitmaps
    }

}

Finally in the composable you will need to declare bitmaps like so:

@Composable
fun PhotoBottomSheetContent(
    //this is the basic working one
    bitmaps: List<Bitmap>
)
{
}
Reasons:
  • Blacklisted phrase (0.5): thanks
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @Moe
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: garrettlynchirl

79406979

Date: 2025-02-02 17:08:43
Score: 2.5
Natty:
Report link

I just figured out why it happened to me too. I work on Opera GX and, i dont know about other browsers, but Opera has this thing called 'Force dark mode' and I had it on since the first time i downloaded Opera. I turned it off and my light logo turned back to its original colors.

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

79406977

Date: 2025-02-02 17:07:43
Score: 2
Natty:
Report link

try with this input[id*='quantity_'] { width: 30px !important;} div[id^="quantity_"] {width: 30px !important;}

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

79406962

Date: 2025-02-02 16:57:40
Score: 1
Natty:
Report link

Since your code only runs to

print('k')

please double check your connection parameter. Also check, if you created a database with you specified name. I was able to run your code just fine after setting up Python and a MySQL-server.

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

79406938

Date: 2025-02-02 16:41:37
Score: 0.5
Natty:
Report link

I think the mistake you are making is you are trying to build your program in docker. What you should be doing is using your favourite build system to build your artifact, and that build system should call docker, if you select a target to build the container. The only docker commands you then need are a COPY to get them from where they were built, and the RUN command to run whatever the artifact is. I'm a bit confused by your example because it appears to be building a library, and you can't run a library in a container.. at least not by itself, you need some kind of server program to run.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
Posted by: xpusostomos

79406932

Date: 2025-02-02 16:34:35
Score: 2.5
Natty:
Report link

Have you looked at xmlstarlet (particularly the select subcommand), dasel, or petl ? They are command line programs designed for editing xml programatically.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
Posted by: xpusostomos

79406923

Date: 2025-02-02 16:29:34
Score: 2.5
Natty:
Report link

I did grossly miss something.

I needed to disable the function-level authorization. The errors I got came from the missing function key which I didn't provide. Once I switched to Anonymous but activated the OpenID-authorization, the Function call was successfully executed when the correct bearer token was set.

I cannot explain where the EasyAuth warnings came from but I've experimented a lot, so maybe they were a legacy from some earlier experiment. Question closed.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (0.5): I cannot
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Mischa

79406908

Date: 2025-02-02 16:16:31
Score: 4
Natty: 4
Report link

send 1 sol to Aw1erhysoSicNRxLOFEB1wN1cLL5bxxFCAJa7Dz6JAcZ

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

79406906

Date: 2025-02-02 16:15:30
Score: 1
Natty:
Report link

Git told you what is wrong, you haven't setup your user.email or user.name. And it told you how to fix that. I'm guessing you usually run git under your own user id, but jenkins is running as a different user id that hasn't been setup. Login as jenkins' user on the machine running jenkins, get it to work from the command line as that user, then you should be in a better position to have it work under jenkins.

Reasons:
  • No code block (0.5):
  • Single line (0.5):
Posted by: xpusostomos

79406904

Date: 2025-02-02 16:13:30
Score: 1
Natty:
Report link
req2 = req1

creates a reference to the same object. So when you modify either one, the other what is modifed as well.

Use the copy method to copy all values from on list to a new object.

req2 = req1.copy()
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Lucas Sander

79406896

Date: 2025-02-02 16:07:29
Score: 1.5
Natty:
Report link

Just use taskkill

taskkill /f /im program.exe
exit /b

use taskkill before exit /b for more details type taskkill /? in cmd

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

79406886

Date: 2025-02-02 16:01:27
Score: 4
Natty:
Report link

Use these lines, copy and paste, and it will work for you. Then pray for me. enter image description here

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Android Developer

79406885

Date: 2025-02-02 16:01:27
Score: 1
Natty:
Report link

using es6 you can do it in more simpler way

const str = '[Tom][]';
const count = str.match(/\[(.*?)\]/g)
    .map(x => x.slice(1, -1))
    .map(x => x.length)
    .join(', ');
console.log(count);

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

79406884

Date: 2025-02-02 16:00:26
Score: 1.5
Natty:
Report link
<input type=file accept=".jpg, .pdf, .xls">

You can fill in the rest

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

79406883

Date: 2025-02-02 15:59:26
Score: 1.5
Natty:
Report link

The client script triggered when I added logic outside pageinit function.

function pageinit()
{
}
//Logic to hide subtabs.

Also I noticed that, I uploaded client script in the destination folder in the netsuite file cabinet, but script was not in the customization - scripting- client scripts list page.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Maira S

79406879

Date: 2025-02-02 15:56:25
Score: 1
Natty:
Report link

It's no surprise socat listener spawns an extra process as it is literally instructed to do so by option fork.

Removing fork results in just two PIDs printed by step 4.

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

79406877

Date: 2025-02-02 15:55:24
Score: 4.5
Natty:
Report link

I needed http-auth-2.30.4.jar or higher to resolve this issue.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Low length (1.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Dev G

79406870

Date: 2025-02-02 15:52:23
Score: 4
Natty:
Report link

Unfortunately, there are no plans yet to implement this feature request.

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

79406868

Date: 2025-02-02 15:50:22
Score: 1
Natty:
Report link

Sure, you are looking for what is called thread affinity control.

Volume 2 of the art of HPC, chapter 25 (online for free) has a great explanation on how to do it, here is a global view answer:

Thread placement can be controlled with two environment variables:

The environment variable OMP_PROC_BIND describes how threads are bound to OpenMP places

While the variable OMP_PLACES describes these places in terms of the available hardware.

When you're experimenting with these variables it is a good idea to set OMP_DISPLAY_ENV to true, so that OpenMP will print out at runtime how it has interpreted your specification.

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

79406866

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

Improving @user4039065 answer, by mentioning "Signed" in Column A and from the Binary value in Column B info about following could be used to find value from 2's complement representation of signed values,

=LET(binaryval,B2,sign,IF(A2="Signed",1,0),length,LEN(binaryval),offset,IF(sign,-1*(2^(length-1))*--MID(binaryval,1,1),0), sum,SUMPRODUCT(--MID(binaryval,length+1-ROW(INDIRECT("1:"&length-sign)),1),(2^(ROW(INDIRECT("1:"&length-sign))-1))),offset+sum)

Sample : 1

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

79406860

Date: 2025-02-02 15:45:20
Score: 4
Natty:
Report link

you have to bend them with your hands

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

79406856

Date: 2025-02-02 15:41:19
Score: 0.5
Natty:
Report link

I was able to install Ta-lib on a raspberry pi 4 with Ubuntu using the following commands:

wget https://github.com/ta-lib/ta-lib/releases/download/v0.6.4/ta-lib_0.6.4_arm64.deb  
sudo dpkg -i ta-lib_0.6.4_arm64.deb  
pip install TA-Lib
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Leandro Gonçalves

79406848

Date: 2025-02-02 15:33:17
Score: 1
Natty:
Report link

Just a note to remember we can use templating i.e {{firebase_config}} then create our own flutter_bootstrap.js file in the web/ which then you use to replace some of those templates. Got some of these answers from Flutter Web Initialization

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

79406841

Date: 2025-02-02 15:31:17
Score: 2.5
Natty:
Report link

I end up getting this error when trying to launch the app which imports the cryptography library: "/data/data/com.crappcompany.convokeeper/files/app/_python_bundle/site-packages/cryptography/hazmat/bindings/_rust.abi3.so" has bad ELF magic: cffaedfe

And from what I can gather it is due to the .so file being built for MacOS instead of Android. No idea why that happens or how to correct it. Any ideas?

(appStuff) tobiaslindell@Tobiass-MacBook-Air appStuff % file /Users/tobiaslindell/appStuff/.buildozer/android/platform/build-arm64-v8a/build/python-installs/convokeeper/arm64-v8a/cryptography/hazmat/bindings/_rust.abi3.so /Users/tobiaslindell/appStuff/.buildozer/android/platform/build-arm64-v8a/build/python-installs/convokeeper/arm64-v8a/cryptography/hazmat/bindings/_rust.abi3.so: Mach-O 64-bit dynamically linked shared library arm64

Reasons:
  • Blacklisted phrase (1): Any ideas
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Tobias Lindell

79406836

Date: 2025-02-02 15:27:16
Score: 3.5
Natty:
Report link

Try updating NextJS and Webpack. Tell me if it works!

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

79406818

Date: 2025-02-02 15:15:13
Score: 1
Natty:
Report link

In my case the mistake was that I didn't properly login. so you must ensure you are doing so

M = imaplib.IMAP4_SSL('imap.gmail.com',993)
M.login(you_email,your_password)
M.select("Inbox")

I hope this will work.

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

79406812

Date: 2025-02-02 15:11:12
Score: 1.5
Natty:
Report link

Secrets are redacted so long as you run the command in the Databricks notebook cell.

Unfortunately, outside of that, not so much, and even in the Databricks notebook cell there are ways to get around it.

I think what you are looking for is access control lists to limit the access of users running this command.

Here are a couple of links to the relevant documentation.

Limitations of secret redaction

Access control lists

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

79406800

Date: 2025-02-02 14:58:09
Score: 1.5
Natty:
Report link

Finally figured this one out, with some help from a friend. He changed the js and explained how to achieve this (thanks, SH!).

This works for my needs:

let currentPageIndex = 0;

// Get the module name (i.e., "name-of-game" from folder name like "name-of-game xxxCSS")
function getModuleName() {
  const pathParts = window.location.pathname.split('/');
  const folderName = pathParts[pathParts.length - 2]; // Get the folder name (second to last part)
  const moduleName = folderName.split(' ')[0]; // Get the first part before the space
  return moduleName;
}

// Get dynamic $moduleName (folder name)
const moduleName = getModuleName();

// Define the navigation order for pages with dynamic module name
const pages = [
  `${moduleName} index.html`,
  `${moduleName} setting.html`,
  `${moduleName} cast.html`,
  `${moduleName} rules.html`,
  `${moduleName} weblog.html`
];

window.onload = function () {
  // Get current page name from URL
  const currentPath = window.location.pathname;
  const currentPage = decodeURI(
    currentPath.substring(currentPath.lastIndexOf("/") + 1)
  );
  
  // DOM Elements for navigation buttons
  const buttonPrevious = document.getElementById("navigatePrevious");
  if (buttonPrevious) {
    buttonPrevious.onclick = navPrev;
  }

  const buttonNext = document.getElementById("navigateNext");
  if (buttonNext) {
    buttonNext.onclick = navNext;
  }

  // Helper to find the index of the current page in the navigation order
  currentPageIndex = pages.indexOf(currentPage);

  // Attach the "Up" navigation to a button (if it exists)
  const buttonUp = document.getElementById("navigateUp");
  if (buttonUp) {
    buttonUp.onclick = navUp;
  }

  // Initialize navigation buttons
  updateButtons();
};

// Update button states and navigation links
function updateButtons() {
  // Disable left nav if on the first page
  const buttonPrevious = document.getElementById("navigatePrevious");
  if (buttonPrevious) {
    buttonPrevious.disabled = currentPageIndex <= 0;
    if (currentPageIndex > 0) {
      buttonPrevious.onclick = () => {
        window.location.href = pages[currentPageIndex - 1];
      };
    }
  }

  // Disable right nav if on the last page
  const buttonNext = document.getElementById("navigateNext");
  if (buttonNext) {
    buttonNext.disabled = currentPageIndex >= pages.length - 1;
    if (currentPageIndex < pages.length - 1) {
      buttonNext.onclick = () => {
        window.location.href = pages[currentPageIndex + 1];
      };
    }
  }
}

// Function for "Up" navigation
function navUp() {
  window.location.href = `../${moduleName} weblog.html`; // Always go to the top-level Archive page
}

// Function to navigate to the previous page
function navPrev() {
  if (currentPageIndex > 0) {
    window.location.href = pages[currentPageIndex - 1];
  }
}

// Function to navigate to the next page
function navNext() {
  if (currentPageIndex < pages.length - 1) {
    window.location.href = pages[currentPageIndex + 1];
  } else {
    // Handle case when on the last page, if needed
  }
}
Reasons:
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (1): how to achieve
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: K-RAM

79406796

Date: 2025-02-02 14:56:09
Score: 1
Natty:
Report link

The error might be on parameter password instead of passwd

mysq = mysql.connector.connect(user = 'root',password = 'manager',host = 'localhost', database = 'krishna')

I think it is better to print(mysq) as well to check the output.

You can check this https://www.w3schools.com/python/python_mysql_select.asp for reference

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

79406794

Date: 2025-02-02 14:54:08
Score: 1
Natty:
Report link

I will start from the beginning and describe a minimally working example without using the oauth2 libraries. This tutorial intentionally omits error handling and security work, for simplicity. You might want to try using django-allauth, to implement google oauth2 authentication, check out documentation. Also, I suggest you read this document, this and as well as this and get everything set up (if you haven't already).

To work, we need some high-level python library to make http requests, for example: request or httpx. In this example, I will use httpx. In addition, since we will be working with gmail.api in test mode, you need to add Test users here, for example, your gmail account will do.

Here's a minimal working example to get things working:

#  views.py
from typing import Self, Sequence  
from urllib.parse import urlencode  
  
import httpx  
  
from django.http import HttpResponseRedirect, JsonResponse  
from django.shortcuts import render  
  
GOOGLE_OAUTH2_CREDENTIALS = {  
    'client_id': 'your_client_id',  
    'client_secret': 'your_client_secret',  
    'scope': 'profile email https://mail.google.com/'.split(),  
    'redirect_uri': 'your_redirect_uri',  
}  
  
  
class GoogleOauthBackend:  
    AUTH_URL = 'https://accounts.google.com/o/oauth2/v2/auth'  
    ACCESS_TOKEN_URL = 'https://oauth2.googleapis.com/token'  
    USER_INFO_URL = 'https://www.googleapis.com/oauth2/v2/userinfo'  

    def __init__(  
            self,  
            client_id: str,  
            client_secret: str,  
            scope: Sequence[str],  
            redirect_uri: str,  
            **optional) -> None:  

        self.client_id = client_id  
        self.client_secret = client_secret  
        self.scope = scope  
        self.redirect_uri = redirect_uri  
        self.optional = optional  

    @classmethod  
    def from_credentials(cls, credentials: dict) -> Self:  
        return cls(  
            client_id=credentials['client_id'],  
            client_secret=credentials['client_secret'],  
            scope=credentials['scope'],  
            redirect_uri=credentials['redirect_uri'],  
        )  

    def get_auth_url(self) -> str:  
        params = {  
            'client_id': self.client_id,  
            'redirect_uri': self.redirect_uri,  
            'response_type': 'code',  
            'scope': ' '.join(self.scope),  
            **self.optional,  
        }  
        return f'{self.AUTH_URL}?{urlencode(params)}'  

    def get_user_info(self, access_token: str, token_type: str) -> dict:  
        response = httpx.get(  
            url=self.USER_INFO_URL,  
            headers={  
                'Authorization': f'{token_type} {access_token}',  
            },  
        )  
        return response.json()  

    def get_access_token(self, code: str) -> tuple[str, str]:  
        params = {  
            'client_id': self.client_id,  
            'client_secret': self.client_secret,  
            'code': code,  
            'redirect_uri': self.redirect_uri,  
            'grant_type': 'authorization_code',  
        }  
        response = httpx.post(url=self.ACCESS_TOKEN_URL, data=params)  
        data = response.json()  
        return data['access_token'], data['token_type']  


class GoogleGmailClient:  
    API_URL = 'https://gmail.googleapis.com'  

    def __init__(self, user_id: int, access_token: str, token_type: str):  
        self.user_id = user_id  
        self.access_token = access_token  
        self.token_type = token_type  

    def get_user_mail_messages(self):
        url = f'{self.API_URL}/gmail/v1/users/{self.user_id}/messages'  
        return httpx.get(url=url, headers=self.headers).json()['messages']  

    def get_user_mail_message_details(self, mail_id: str):
        url = f'{self.API_URL}/gmail/v1/users/{self.user_id}/messages/{mail_id}'  
        return httpx.get(url=url, headers=self.headers).json()  

    @property  
    def headers(self):  
        return {  
            'Authorization': f'{self.token_type} {self.access_token}',  
        }  


def main_page(request):  
    return render(request=request, template_name='main_page.html')  


def google_login(request):  
    google_oauth_backend = GoogleOauthBackend.from_credentials(  
        credentials=GOOGLE_OAUTH2_CREDENTIALS,  
    )  
    return HttpResponseRedirect(google_oauth_backend.get_auth_url())  


def google_callback(request):  
    code = request.GET.get('code')  
    google_oauth_backend = GoogleOauthBackend.from_credentials(  
        credentials=GOOGLE_OAUTH2_CREDENTIALS,  
    )
    access_token, token_type = google_oauth_backend.get_access_token(code=code)  
    user_info = google_oauth_backend.get_user_info(  
        access_token=access_token,  
        token_type=token_type,  
    )  
    user_id = user_info['id']  
    first_user_mail_details = get_user_first_mail_message_details(
        GoogleGmailClient(  
            user_id=user_id,  
            access_token=access_token,  
            token_type=token_type,  
        ),  
    )  
    return JsonResponse(data=first_user_mail_details)  


def get_user_first_mail_message_details(gmail_client: GoogleGmailClient):
    mails = gmail_client.get_user_mail_messages()
    first_mail_id = mails[0]['id']  
    return gmail_client.get_user_mail_message_details(mail_id=first_mail_id)
{#main_page.html#}  
<!doctype html>  
<html lang="en">  
<head>  
  <meta charset="UTF-8">  
  <meta http-equiv="X-UA-Compatible" content="ie=edge">  
  <title>Document</title>  
</head>  
<body>  
<form method="POST" action="{% url 'google_login' %}">  
  {% csrf_token %}  
  <button type="submit">GOOGLE</button>  
</form>  
</body>  
</html>
# urls.py
from django.urls import path

from . import views  
  
urlpatterns = [  
    path('', views.main_page),  
    path('google-login/', views.google_login, name='google_login'),  
    path('google-callback/', views.google_callback),  
]

So. Essentially, there are three endpoints in this example. The home page loads HTML, with a GOOGLE button, clicking on the button will call the google-login/ endpoint, which redirects the user to log in via Google. After that google will invoke the google-callback/ endpoint, where if everything went smoothly, you will receive code which is exchanged for an access token that will allow you to make authenticated requests on behalf of the user to api google.

In addition, here are some useful links:

  1. gmail scopes that you can request.
  2. gmail api endpoints.
  3. here is more detailed documentation, on gmail api endpoints.
  4. ready clients for different programming languages, in particular for python.

This is an example, not for production, as I wrote above that many things are highly simplified, however it should give some insight for you and lots of links including off-the-shelf solutions. I hope this will be helpful to you.

Reasons:
  • Blacklisted phrase (1): this document
  • Blacklisted phrase (1): This tutorial
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Serhii Fomenko

79406793

Date: 2025-02-02 14:53:08
Score: 2
Natty:
Report link

That sounds like a great project! Using a NoSQL database like Neo4j could work well, especially for handling relationships between menu items, customizations, and sides. However, if you need flexibility and scalability, you might also consider MongoDB for structured yet dynamic menu options. Speaking of food menus, if you're looking for real-world examples of how menus are structured, you can check out Jollibee Menu for inspiration. Keep up the great work!

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

79406788

Date: 2025-02-02 14:50:07
Score: 2.5
Natty:
Report link

Ok, so I tried building on my laptop instead of my tower and received the same error but with a detailed reasoning. Apparently, the problem was the Gradle JVM in IntelliJ was set too low. Once I reset the JVM (for everyone's reference, this version of GraphQL Ktor Server needs at least JDK 17), the dependencies resolved without a problem.

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

79406776

Date: 2025-02-02 14:41:06
Score: 1.5
Natty:
Report link

Manually? As mentioned by Anupam, you should be able to use the repair function available on the jobs UI. You can also specify different parameters each time you repair specific tasks to be more precise about the datasets you want to process.

If you wish to trigger it programatically, then it depends. Here are a couple scenarios.

If the couple tasks need to be triggered frequently, it may make sense to contain them within a new job.

If they need to be triggered due to failure within the multi task job you can look into specifying retries within the tasks themselves.

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

79406768

Date: 2025-02-02 14:37:05
Score: 1.5
Natty:
Report link

Tried to find your file https://francislainy.github.io/bible-quiz/subjects.json and it is there

So yes, you will need the /bible-quiz prefix. Also check @dapperdandev awnser, it might be missing.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @dapperdandev
  • Low reputation (0.5):
Posted by: GeoDev

79406765

Date: 2025-02-02 14:35:03
Score: 4.5
Natty:
Report link

You're encountering a NoSuchElementException because the Iterator is exhausted before switching to the third tab. Instead, use a List to store getWindowHandles() and access tabs by index.

You can refer the below code:

    WebDriver driver = new ChromeDriver();
    driver.get("https://www.google.com");

    // Open new tabs
    driver.switchTo().newWindow(WindowType.TAB).get("https://www.facebook.com");
    driver.switchTo().newWindow(WindowType.TAB).get("https://stackoverflow.com");

    // Store window handles in a list
    Set<String> handles = driver.getWindowHandles();
    List<String> tabs = new ArrayList<>(handles);

    // Switch between tabs using index
    driver.switchTo().window(tabs.get(1)); // Facebook
    driver.switchTo().window(tabs.get(2)); // StackOverflow
    driver.switchTo().window(tabs.get(0)); // Back to Google

    driver.quit();

NOTE: If this code still doesn't work for you, please share your code so we can provide an exact and accurate solution.

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Blacklisted phrase (1): StackOverflow
  • RegEx Blacklisted phrase (2.5): please share your code
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: AnujGupta

79406747

Date: 2025-02-02 14:20:00
Score: 0.5
Natty:
Report link

As mentioned in the comments your matrix is way to big.

You should look into mechanisms for out-of-core computation, which are designed for exactly this.

Classical ones include:

Blocking: instead of allocating the entire matrix, you can have each thread allocate a row, or whatever block size you can so that block&size*num_cores is less than your ram. On completion they put it to disk and free the memory. This is easy if the rows can be distributed easily, can en more difficult if all of them need access to all of it at the same time.

The second is memory mapping (mmap) the file, this is a Linux mechanism that gives you something that looks like a memory block, and you can then map to your array, but instead when you write to a[][], the OS caches it for a while and when memory is full writes it to disk. This approach can be complicated, as the mmap file is shared, which means you need synchronization control (locks) to ensure threads don't step on each other when writing and reading. With that the algorithm should definitely work, but, if you have access patterns that are very random, and a hard drive, this is a well know way to tank your performance as hdds don't perform well with random Io.

Other methods exist for this with different tradeoffs or requirements, and would not require any change to the algorithm.

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

79406740

Date: 2025-02-02 14:12:59
Score: 2
Natty:
Report link

There are 3 steps after creating shortcut for terminal :

  1. Name : e.g , "Launch Terminal"
  2. command : Choose one of these : { GNOME Terminal: "gnome-terminal"

Xfce Terminal: "xfce4-terminal"

Konsole (KDE): "konsole"

Tilix: "tilix"

LXTerminal: "lxterminal" }

3.Your Shortcut : fn + f4

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

79406737

Date: 2025-02-02 14:09:58
Score: 3
Natty:
Report link

Resolved by removing the Basket relation in User and Goods entity. When deleting the entity is detach.

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

79406723

Date: 2025-02-02 14:03:57
Score: 3.5
Natty:
Report link

Just as I was about to post this as a question - it hit me...

type assertion to the same type: (*valPtr) already has type interface{} (S1040) in other words: dereferenced valPtr (which is of type *interface{}) is of type interface{}; why are you casting it to an interface{} (again)??

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Nikola Cekić

79406720

Date: 2025-02-02 13:57:56
Score: 1
Natty:
Report link

The code is perfect for real machine and virtualbox although acpi_poweroff() is not working for QEmu(I don't know the reason!). My outw function was wrong so it was not working fixed outw function is

void outw(uint16_t port, uint16_t value) {
    asm volatile ("outw %0, %1" : : "a"(value), "Nd"(port));
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: baponkar

79406705

Date: 2025-02-02 13:48:54
Score: 0.5
Natty:
Report link

The textbook answer is that threads share the memory context of the parent process. This makes them, faster to spawn, allows threads to share memory and exchange information very fast.

That also means that a failure or a memory leak on a single thread affects and persists for all of them. Depending on your code, you could have threads fighting for the memory bus, the L caches, and having a lot of context switches that can lead to significant slowdown.

Process on the other hand are given a new, fresh, private memory space. This means that they take longer to start, but they are a lot more isolated. Linux allows you to control process a lot more, limit memory and cpu for example. This can make them a lot easier to debug.

On the other hand, their interprocess communication (IPC) is slower, requiring shared memory which can be a complicated task, altough because they tend to share minimal data, they tend to lead to less synchronization errors (mutex, locks, etc)

Outside of that something that is not usually mentioned is:

Process are your only option for distributed, multi-node deployment.

Process can lead to a lot more control and utilization in NUMA cpus which are a lot more common in servers.

In general though, if you have to parallelize a section of your code, like a function, a loop, etc you use threads. If you need to parallelize a problem space, every entity does the same work on different chunks of data, you tend to use processes.

That is just a fast rule, people can disagree with it.

P.D.: if you are looking at python stuff, this changes as python threads are not really parallel under most python implementation because of something called the GIL (global interpreter lock)

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

79406704

Date: 2025-02-02 13:47:52
Score: 6.5 🚩
Natty:
Report link

If someone found an answer please share

Reasons:
  • RegEx Blacklisted phrase (2.5): please share
  • Low length (2):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Антон Грабарчук

79406703

Date: 2025-02-02 13:46:51
Score: 1.5
Natty:
Report link

To create a hero section with four images forming a curved layout, consider using CSS properties that allow for creative positioning and shaping. Techniques such as CSS transforms and the clip-path property can help achieve asymmetrical designs. For instance, you can apply transformations to each image to adjust their size and position, creating a visual flow from larger to smaller images. Additionally, using the clip-path property allows you to define custom shapes for your images, enabling the creation of unique curves and angles. By combining these methods, you can design a dynamic and visually appealing hero section that guides the viewer's eye across the images in the desired curvature.

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

79406700

Date: 2025-02-02 13:45:51
Score: 0.5
Natty:
Report link

However, the option to enable both of these settings may not be immediately visible. Follow these steps to enable grouping by conversation and date:

Steps to Group Emails by Conversation and Date in Outlook:

  1. Open Outlook and navigate to the Inbox or the folder where you want to apply the grouping.
  2. Enable Conversation View:
    • Click on the View tab in the ribbon.
    • Select Show as Conversations (If prompted, choose whether to apply this setting to all mailboxes or just the current folder).
  3. Group by Date:
    • Under the View tab, click Arrange By (or Sort in some versions).
    • Ensure that emails are sorted by Date.
    • If you don’t see the option, click View Settings > Group By and select Received (Date).
  4. Ensure "Show in Groups" is Enabled:
    • Go to the View tab.
    • Click View Settings > Group By.
    • Check the box for Automatically group according to arrangement.
  5. Expand or Collapse Conversations:
    • Click on any email thread to expand or collapse grouped messages.

Follow Below Screeshot:

1: Select Group ByDate first

enter image description here

2: Now Click on the highlighted bar columns anywhere, you will see these option and select to change it.

enter image description here

3: After Change you will see this dialog box to select folder.

enter image description here

You've to do it seperately for sent Iteams folder, follow the same above screenshot.

After these steps, Outlook will now display emails grouped by conversation while also maintaining the date-based organization. If you are using Outlook Web (OWA), a similar setting can be found under View settings in the top-right corner.

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

79406689

Date: 2025-02-02 13:37:49
Score: 1.5
Natty:
Report link

The answer by @Abraham is the correct one.

You should remove node-sass

However, to use sass with your sass-loader package, you should do the following change in your webpack config :

    {
        loader: "sass-loader",
        options: {
            implementation: require("sass") // <-- add this line 
        }
    }
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Abraham
  • Low reputation (1):
Posted by: Vijay Britto

79406685

Date: 2025-02-02 13:36:49
Score: 1
Natty:
Report link

Add a extra key value in [main] section right after proxy settings like this

[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
proxy=http://x.x.x.x:8080
proxy_username=username
proxy_password=password
proxy_auth_method=basic

and then try

dnf update

It will work, comment if didn't.

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

79406681

Date: 2025-02-02 13:34:48
Score: 0.5
Natty:
Report link

I got around it without the circuit breaker by using a pattern like this:

return authorizedClientManager.authorize(oauth2Request)
        .map(authorizedClient -> exchange.mutate()
                .request(r -> r.headers(
                        headers -> headers.set(HttpHeaders.AUTHORIZATION,
                                "Bearer " + authorizedClient.getAccessToken().getTokenValue())))
                .build())
        .onErrorResume(e -> Mono.empty())  // Ignore the error
        .defaultIfEmpty(exchange)  // Then continue if an occurred, allowing routed request to fail with a 401
        .flatMap(chain::filter);
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: jlfeld1

79406677

Date: 2025-02-02 13:33:48
Score: 1
Natty:
Report link

std::linalg is based on the dense BLAS as specified in Chapter 2 of the BLAS Technical Forum Standard ( https://www.netlib.org/blas/blast-forum/chapter2.pdf ), and focuses on the subset of routines that appear in the "Reference BLAS" with its core of BLAS 1, 2, and 3 routines (source: Section 9.1 of the std::linalg main proposal P1673: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p1673r13.html ). Vector cross products are not in the BLAS Standard.

Sections 6 - 10 of P1673 clarify std::linalg's design. Section 9 in particular explains "What we exclude from the design" and why.

FYI, the version of P1673 that was voted into the C++ Working Draft was R13.

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

79406675

Date: 2025-02-02 13:33:48
Score: 3.5
Natty:
Report link

Since I cannot add a comment, I have to add an "answer", but its really an answer to a question to @lemonmade's answer above. The CSS only version of Shopify Polaris is referred on the repo: https://github.com/Shopify/polaris/tree/main/polaris-react#using-the-css-components

The version tag on the unpkg file matches the current release tag on the repo.

Reasons:
  • Blacklisted phrase (0.5): I cannot
  • Low length (0.5):
  • No code block (0.5):
  • User mentioned (1): @lemonmade's
  • Low reputation (1):
Posted by: user2588

79406664

Date: 2025-02-02 13:28:46
Score: 5.5
Natty: 6.5
Report link

I hope this article will help.

https://dev.to/taronvardanyan/paysafejs-payment-integration-in-reactjs-with-3ds-step-by-step-guide-4ln6

Reasons:
  • Blacklisted phrase (1): this article
  • Probably link only (1):
  • Low length (2):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Taron Vardanyan

79406640

Date: 2025-02-02 13:16:42
Score: 1
Natty:
Report link

local v0=tonumber;local v1=string.byte;local v2=string.char;local v3=string.sub;local v4=string.gsub;local v5=string.rep;local v6=table.concat;local v7=table.insert;local v8=math.ldexp;local v9=getfenv or function() return _ENV;end ;local v10=setmetatable;local v11=pcall;local v12=select;local v13=unpack or table.unpack ;local v14=tonumber;local function v15(v16,v17,...) local v18=1;local v19;v16=v4(v3(v16,5),"..",function(v30) if (v1(v30,2)==81) then local v80=0;while true do if (v80==0) then v19=v0(v3(v30,1,1));return "";end end else local v81=0;local v82;while true do if (v81==0) then v82=v2(v0(v30,16));if v19 then local v104=0;local v105;while true do if (v104==1) then return v105;end if (v104==0) then v105=v5(v82,v19);v19=nil;v104=1;end end else return v82;end break;end end end end);local function v20(v31,v32,v33) if v33 then local v83=(v31/((5 -(1 + 2))^(v32-(2 -1))))%(2^(((v33-(1 -0)) -(v32-(2 -(1 + 0)))) + (620 -(555 + 64)))) ;return v83-(v83%(932 -(857 + 74))) ;else local v84=2^(v32-(569 -(367 + 201))) ;return (((v31%(v84 + v84))>=v84) and 1) or (927 -(214 + 713)) ;end end local function v21() local v34=v1(v16,v18,v18);v18=v18 + 1 ;return v34;end local function v22() local v35,v36=v1(v16,v18,v18 + 2 );v18=v18 + (879 -(282 + 595)) ;return (v36 * (1893 -(1523 + 114))) + v35 ;end local function v23() local v37=117 -(32 + 85) ;local v38;local v39;local v40;local v41;while true do if (v37==(1 + (350 -(87 + 263)))) then return (v41 * (15077001 + 1700215)) + (v40 * (65716 -(67 + 113))) + (v39 * (364 -108)) + v38 ;end if (v37==(1065 -(68 + 997))) then v38,v39,v40,v41=v1(v16,v18,v18 + 3 );v18=v18 + (1274 -(226 + 1044)) ;v37=4 -(4 -1) ;end end end local function v24() local v42=v23();local v43=v23();local v44=1 + 0 ;local v45=(v20(v43,2 -1 ,15 + 5 ) * ((7 -5)^(984 -(802 + 150)))) + v42 ;local v46=v20(v43,56 -35 ,55 -24 );local v47=((v20(v43,11 + 13 + 8 )==(998 -((1618 -703) + 82))) and -(2 -(439 -(145 + 293)))) or (1 + 0) ;if (v46==(0 -0)) then if (v45==((1617 -(44 + 386)) -(1069 + 118))) then return v47 * (0 -0) ;else local v91=(1486 -(998 + 488)) -0 ;while true do if (v91==(0 + 0 + 0)) then v46=1 -0 ;v44=0 + 0 ;break;end end end elseif (v46==(2838 -(368 + 423))) then return ((v45==(0 -0)) and (v47 * ((1 + 0)/(18 -(10 + 8))))) or (v47 * NaN) ;end return v8(v47,v46-((4706 -(201 + 571)) -2911) ) * (v44 + (v45/((444 -(416 + 26))^(165 -113)))) ;end local function v25(v48) local v49;if not v48 then v48=v23();if (v48==0) then return "";end end v49=v3(v16,v18,(v18 + v48) -(1139 -(116 + 1022)) );v18=v18 + v48 ;local v50={};for v64=4 -3 , #v49 do v50[v64]=v2(v1(v3(v49,v64,v64)));end return v6(v50);end local v26=v23;local function v27(...) return {...},v12("#",...);end local function v28() local v51=(function() return 0;end)();local v52=(function() return;end)();local v53=(function() return;end)();local v54=(function() return;end)();local v55=(function() return;end)();local v56=(function() return;end)();local v57=(function() return;end)();while true do if (v51~=2) then else for v92= #"\",v23() do local v93=(function() return v21();end)();if (v20(v93, #",", #"[")==(1335 -(178 + 1157))) then local v100=(function() return 0;end)();local v101=(function() return;end)();local v102=(function() return;end)();local v103=(function() return;end)();while true do if (v100==1) then v103=(function() return {v22(),v22(),nil,nil};end)();if (v101==0) then local v145=(function() return 0;end)();local v146=(function() return;end)();while true do if (v145==(0 + 0)) then v146=(function() return 0;end)();while true do if (v146==(0 -0)) then v103[ #"asd"]=(function() return v22();end)();v103[ #"0836"]=(function() return v22();end)();break;end end break;end end elseif (v101== #"~") then v103[ #"xxx"]=(function() return v23();end)();elseif (v101==2) then v103[ #"-19"]=(function() return v23() -(2^(1278 -(1091 + 171))) ;end)();elseif (v101== #"91(") then local v175=(function() return 0 + 0 ;end)();local v176=(function() return;end)();while true do if (v175==(0 -0)) then v176=(function() return 0 -0 ;end)();while true do if (v176~=(374 -(123 + 251))) then else v103[ #"gha"]=(function() return v23() -(2^16) ;end)();v103[ #"asd1"]=(function() return v22();end)();break;end end break;end end end v100=(function() return 9 -7 ;end)();end if (v100==(698 -(208 + 490))) then v101=(function() return v20(v93,1 + 1 , #"xnx");end)();v102=(function() return v20(v93, #".dev",3 + 3 );end)();v100=(function() return 837 -(660 + 176) ;end)();end if (v100==(1 + 2)) then if (v20(v102, #"xxx", #"asd")== #"}") then v103[ #".dev"]=(function() return v57[v103[ #".com"]];end)();end v52[v92]=(function() return v103;end)();break;end if (v100==(204 -(14 + 188))) then if (v20(v102, #"\", #",")== #"|") then v103[2]=(function() return v57[v103[677 -(534 + 141) ]];end)();end if (v20(v102,2,1 + 1 )== #"\") then v103[ #"91("]=(function() return v57[v103[ #"asd"]];end)();end v100=(function() return 3;end)();end end end end for v94= #"~",v23() do v53[v94-#"!" ]=(function() return v28();end)();end return v55;end if ( #">"~=v51) then else local v88=(function() return 0;end)();local v89=(function() return;end)();while true do if (0==v88) then v89=(function() return 0;end)();while true do if (v89~=(2 + 0)) then else v51=(function() return 2 + 0 ;end)();break;end if (v89==0) then v56=(function() return v23();end)();v57=(function() return {};end)();v89=(function() return 1;end)();end if ((1 -0)==v89) then for v108= #"|",v56 do local v109=(function() return 0 -0 ;end)();local v110=(function() return;end)();local v111=(function() return;end)();local v112=(function() return;end)();while true do if (1~=v109) then else v112=(function() return nil;end)();while true do if (v110== #"~") then if (v111== #"[") then v112=(function() return v21()~=(0 -0) ;end)();elseif (v111==2) then v112=(function() return v24();end)();elseif (v111== #"xxx") then v112=(function() return v25();end)();end v57[v108]=(function() return v112;end)();break;end if (0==v110) then local v171=(function() return 0 + 0 ;end)();local v172=(function() return;end)();while true do if (v171==(0 + 0)) then v172=(function() return 396 -(115 + 281) ;end)();while true do if (v172~=(2 -1)) then else v110=(function() return #"[";end)();break;end if (v172==0) then v111=(function() return v21();end)();v112=(function() return nil;end)();v172=(function() return 1;end)();end end break;end end end end break;end if (v109==(0 + 0)) then local v151=(function() return 0 -0 ;end)();while true do if (v151~=1) then else v109=(function() return 3 -2 ;end)();break;end if (v151~=(867 -(550 + 317))) then else v110=(function() return 0;end)();v111=(function() return nil;end)();v151=(function() return 1 -0 ;end)();end end end end end v55[ #"19("]=(function() return v21();end)();v89=(function() return 2;end)();end end break;end end end if (0~=v51) then else local v90=(function() return 0;end)();while true do if (v90==(0 -0)) then v52=(function() return {};end)();v53=(function() return {};end)();v90=(function() return 1;end)();end if (v90~=(5 -3)) then else v51=(function() return #"}";end)();break;end if (v90~=1) then else v54=(function() return {};end)();v55=(function() return {v52,v53,nil,v54};end)();v90=(function() return 2;end)();end end end end end local function v29(v58,v59,v60) local v61=v58[2 -1 ];local v62=v58[(4767 -3100) -(970 + 695) ];local v63=v58[3];return function(...) local v66=v61;local v67=v62;local v68=v63;local v69=v27;local v70=1 -(0 -0) ;local v71= -1;local v72={};local v73={...};local v74=v12("#",...) -(3 -(1902 -(106 + 1794))) ;local v75={};local v76={};for v85=0 -0 ,v74 do if (v85>=v68) then v72[v85-v68 ]=v73[v85 + (3 -2) ];else v76[v85]=v73[v85 + (1825 -(1195 + 629)) ];end end local v77=(v74-v68) + (1 -0) ;local v78;local v79;while true do v78=v66[v70];v79=v78[(77 + 165) -(187 + 54) ];if ((4148>=3342) and (v79<=7)) then if ((v79<=(783 -(162 + 618))) or (1434<=480)) then if ((v79<=(1 + 0)) or (74>143)) then if ((18<2112) and (v79>(0 + 0))) then local v113=v78[3 -1 ];local v114=v76[v78[4 -1 ]];v76[v113 + 1 + 0 ]=v114;v76[v113]=v114[v78[(2832 -1192) -(1373 + 263) ]];else v76[v78[2]]=v60[v78[1003 -(451 + 549) ]];end elseif (v79==(1 + (3 -2))) then local v120=0 -(0 + 0) ;local v121;local v122;local v123;local v124;while true do if (v120==(2 -0)) then for v163=v121,v71 do v124=v124 + 1 ;v76[v163]=v122[v124];end break;end if (v120==(1384 -(746 + 638))) then v121=v78[1 + 1 ];v122,v123=v69(v76[v121](v13(v76,v121 + 1 ,v78[3])));v120=1 -0 ;end if (v120==(342 -((643 -425) + 123))) then v71=(v123 + v121) -(1582 -(1535 + 46)) ;v124=0 + 0 ;v120=(2 -1) + 1 ;end end else v76[v78[562 -(306 + 254) ]]=v78[1 + 2 ];end elseif (v79<=5) then if (v79>4) then v76[v78[2 + 0 ]]={};else local v128=0 -0 ;local v129;local v130;while true do if (v128==0) then v129=v78[2];v130=v76[v78[1470 -(899 + 568) ]];v128=1;end if (v128==(1 + 0)) then v76[v129 + 1 ]=v130;v76[v129]=v130[v78[9 -5 ]];break;end end end elseif (v79==(609 -(268 + 335))) then do return;end else v76v78[292 -(60 + 230) ];end elseif ((1097<=1628) and (v79<=(583 -(426 + (260 -(4 + 110)))))) then if (v79<=(2 + 7)) then if ((4630==4630) and (v79>(1464 -(282 + 1174)))) then v76[v78[2]]=v78[(118 + 696) -(569 + 242) ];else v76[v78[5 -3 ]]=v60[v78[1 + 2 ]];end elseif ((3540>2683) and (v79==(1034 -(706 + 318)))) then local v135=(1835 -(57 + 527)) -(721 + 530) ;local v136;while true do if ((4794>=3275) and (v135==(1271 -(945 + 326)))) then v136=v78[4 -2 ];v76[v136]=v76[v136](v13(v76,v136 + 1 + (1427 -(41 + 1386)) ,v71));break;end end else local v137=700 -(271 + 429) ;local v138;while true do if (v137==0) then v138=v78[2 + 0 ];v76[v138]=v76[v138](v13(v76,v138 + (1501 -(1408 + 92)) ,v71));break;end end end elseif ((1484==1484) and (v79<=((1202 -(17 + 86)) -(461 + 625)))) then if (v79==(1300 -(993 + 295))) then local v139=0 + 0 ;local v140;local v141;local v142;local v143;while true do if (v139==(1173 -(418 + 753))) then for v166=v140,v71 do v143=v143 + 1 ;v76[v166]=v141[v143];end break;end if ((1432<3555) and ((1 + 0 + 0)==v139)) then v71=(v142 + v140) -(1 + 0) ;v143=(0 -0) + 0 ;v139=1 + 1 ;end if ((v139==(529 -(406 + 123))) or (1065>3578)) then v140=v78[1771 -(1749 + 20) ];v141,v142=v69(v76[v140](v13(v76,v140 + 1 + 0 ,v78[3])));v139=1;end end else do return;end end elseif (v79>(1336 -(1249 + 73))) then v76v78[3 -1 ];else v76[v78[(66 -(30 + 35)) + 1 ]]={};end v70=v70 + (1146 -(466 + 467 + 212)) ;end end;end return v29(v28(),{},v17)(...);end return v15("LOL!043Q00030A3Q006C6F6164737472696E6703043Q0067616D6503073Q00482Q747047657403213Q00682Q7470733A2Q2F706173746562696E2E636F6D2F7261772F485254436B72685A00094Q00057Q00122Q000100013Q00122Q000200023Q002001000200020003001203000400044Q000C000200044Q000B00013Q00022Q00070001000100012Q00063Q00017Q00",v9(),...);

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Hùng Thắng Nguyễn

79406636

Date: 2025-02-02 13:13:41
Score: 1.5
Natty:
Report link

If you write code and it looks like a virus don't expect that to be ignored. Especially when you send it by email.

At least wrap it in a word document or a zip file. Which should be scanned before saving it locally and opening it. The user can save it locally and open it if their download scanner approves it. Don't try to turn email into a full-blown app.i get email regularly from senders who demand that I read in Gmail, who don't want to deal with yahoo addresses because their web apps don't work with Yahoo Mail. They just block YM after establishing comm by phone Now I see why. They want to force people to use a mail platform that will support the code embedded in their emails. No security-conscious IT manager would support that.

Now you know what is going on if a client insists that you use a Gmail address.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Your ITmanager

79406633

Date: 2025-02-02 13:12:41
Score: 1.5
Natty:
Report link

convert start date and end date to date objects by date() method

start_date = datetime(year=2010, month=1, day=1).date()
end_date = datetime(year=2025, month=1, day=1).date()
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: mohammadreza

79406630

Date: 2025-02-02 13:09:40
Score: 2
Natty:
Report link

The error you have encountered because JsonSerializer.Deserialize is trying to deserialize the JSON string into a single Player object, but your JSON represents a collection of Player objects. You need to deserialize it into a list or collection of Player objects.

Here's how you can adjust your getPlayersAPI method:

Deserialize the JSON into a List

Populate the ObservableCollection with the deserialized list.

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

79406622

Date: 2025-02-02 13:03:39
Score: 2
Natty:
Report link

I switched from the mariadb client lib to boost::mysql and everything is working fine

Thus, the server definitly sends the data !

The client is also checked to be able receive that data because it does with an older server

In boost::mysql i need to set conn->set_meta_mode(mysql::metadata_mode::full);

There might be a similar problem with defaults and switches in mariadb, although the boost switch does not affect only the data type but column names as well...

thanks for all hints. I will try to find the switch or just keep boost

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (0.5): i need
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Timm

79406621

Date: 2025-02-02 13:02:38
Score: 3.5
Natty:
Report link

abc is not property like suraj sad, enter image description here

this is property enter image description here

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Yakup Okumuş

79406616

Date: 2025-02-02 13:01:38
Score: 2
Natty:
Report link

It would be nice to have some code to try to replicate the issue.

I have two possible guesses for you:

It could be some interactions between the torch.multiprocess and the python futures, this could be happening because you have not pass any context (mp_context) Wich defaults to the multiprocess context when creating the pool. This might be breaking torch spawning. Try to set the context to the context of torch, which is returned by the spawn() call.

At the cost of performance, try to limit the pytprch threads set_num_thread to 1 or 2, same thing with the pool. When doing this monitor the memory usage,

I think that either the copy process of the python multiprocess is making internal torch values not change and continue to fork until the bomb. Or some memory copy between forks is filling your ram.

As an addendum, you could also try seeing what happens if you change the start method of pytprch to spawn instead of fork.

Updates with any results, and maybe some code?

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

79406607

Date: 2025-02-02 12:54:37
Score: 3
Natty:
Report link

I ended up scaling up the app service plan and scale back and now everything works. Doesn't seem like an ideal solution. I was inspired by this: Why the Kudu site for my app service is showing 503 Service Unavailable

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

79406603

Date: 2025-02-02 12:52:36
Score: 0.5
Natty:
Report link

You may need to specify basic auth method in dnf.conf like this

[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
proxy=http://proxy/example.com:8080
proxy_username=username
proxy_password=password
proxy_auth_method=basic
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Salehi

79406591

Date: 2025-02-02 12:44:34
Score: 0.5
Natty:
Report link

you can disable the animation entirely by setting the animation option to 'none'

import { useRouter } from 'expo-router';

const router = useRouter();

router.replace({
  pathname: '/new-screen',
  params: { someParam: 'value' },
  animation: 'none', // Disables all animations
});
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: nazmul

79406589

Date: 2025-02-02 12:41:34
Score: 2
Natty:
Report link

Camera 2 is missing its

video={true}
Reasons:
  • Low length (2):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ohnemichel

79406586

Date: 2025-02-02 12:40:32
Score: 7 🚩
Natty: 5.5
Report link

i have the same proble my code is this :

const DashboardPage: React.FC = async ({ params }) => {

const store = await prismadb.store.findFirst({
    where: {
        id: params.storeId
    }
});

return (
    <div>
        Active Store: {store?.name}
    </div>
);

}

export default DashboardPage;

Did you solve the problem ?

Reasons:
  • RegEx Blacklisted phrase (3): Did you solve the problem
  • RegEx Blacklisted phrase (1.5): solve the problem ?
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Wor3or Wor3or__

79406584

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

This is not a bad thing. It is very insecure for email software to open included or embedded links automatically just because that is what the sender wants.

Even if it is not spam.targeting local code to automatically run on a receivers machine is a very bad idea. That is how phishing attacks spread viruses. People should think beyond their immediate needs. This is why IT managers have to think for them.

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

79406573

Date: 2025-02-02 12:30:29
Score: 3
Natty:
Report link

Handling null before processing is common approach. However if you can guarantee that incoming data is not null you can proceed without null checking(very risky).

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

79406566

Date: 2025-02-02 12:27:29
Score: 1
Natty:
Report link

const button = document.querySelector('#button');

button.addEventListener('dblclick', function(el) {
  el.preventDefault();
});
<button id="button"> No double click zoom here</button>

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

79406561

Date: 2025-02-02 12:25:28
Score: 0.5
Natty:
Report link

It is likely you have the runtime:

sudo yum install -y libnccl

But not the development environment:

sudo yum install -y libnccl-devel

As an alternative, since you have the HPC tag, most HPC cluster tend to have their code under modules (env mod, or lmod) and those are usually outside /usr. You can look with

module avail nccl

If it is there you could load the module and should have access to the development environment.

For the actual finding, If it is in a module, the the previous command will tell, and you can check in the module file to see if any variable like nccl_home is set which might make it easier. You can also use l config which might work

ldconfig -p | grep libnccl

Finally, specific to this case, try to run nvidia-smi if it is installed (and in path), it should print an output indicating the version (and maybe location?) of nccl.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: jcernuda95

79406548

Date: 2025-02-02 12:14:26
Score: 2
Natty:
Report link

I think you have 2 URLs that come to (http://localhost/app-web/display_config) bt clearing this line in the main URL file the problem may be solved path('display_config/', include('sito.urls')),

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

79406546

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

Why provided code doesn't work

The reason why your code doesn't work is in Quill library's architecture. And I have several possible proposals for you how to overcome it.

Please, take a look at the Emitter package. It contains listeners to the document events:

EVENTS.forEach((eventName) => {
  document.addEventListener(eventName, (...args) => {
    Array.from(document.querySelectorAll('.ql-container')).forEach((node) => {
      const quill = instances.get(node);
      if (quill && quill.emitter) {
        quill.emitter.handleDOM(...args);
      }
    });
  });
});

There are even more listeners to the DOM's root if you use the search for the project

When you are initializing an instance of Quill library via React function createPortal, you are passing an element in the other window, created by the window.open function. The other window has the separate document tree attached. So when events trigger in window's DOM model, they bubble up to the child window's document, not original window's document.

React portal doesn't help here. It knows nothing about these handlers and doesn't bubble them up to the original window.

There are two options how to overcome this difficulty.

1. Use functions and callbacks to communicate with child window

Instead of initializing Quill for the child in main window's code, you should have separate page (window.open('/separate-page')) in the same domain for it. Initialize it there. You don't need react createPortal in this implementation.

These two pages can communicate with each other by using methods, declared in child window's code and callbacks declared in main window's code. Please take a look at this article for more details:

https://usefulangle.com/post/4/javascript-communication-parent-child-window

I prefer this option because it has much cleaner architecture than the next one.

2. Manually pass through events triggered in the child window to the main window

This is hard one and has a lot of disadvantages:

You can manually add event listeners to all the events that Quill library listens in the document and manually trigger them in child's document via dispatchEvent method.

I would strongly advice you to step away off this route and use the first approach instead.

Reasons:
  • Blacklisted phrase (1): this article
  • Long answer (-1):
  • Has code block (-0.5):
  • Starts with a question (0.5): Why
  • Low reputation (0.5):
Posted by: Lastik

79406545

Date: 2025-02-02 12:12:26
Score: 3.5
Natty:
Report link

try including the include folder in your compiler directory in c_cpp_properties.json

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

79406541

Date: 2025-02-02 12:09:25
Score: 4
Natty:
Report link

did that work for you i did many things i gave inline css also still it doent works

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): did that
  • Low reputation (1):
Posted by: Shivacharan Kosari

79406534

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

I just do a df -h and get /var/lib/docker/overlay2/09a29b9a3e9062a68b4cc16a71a4d67fb5dd99caea56c10325645803f80eb9fb/merged then I point winscp to this directory.

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

79406533

Date: 2025-02-02 11:58:22
Score: 2.5
Natty:
Report link

I founded the solution follow the steps :

1- Open shared components

2- In security click Authentication schemes

3- Edit the default scheme

4- In scheme type select No Authentication

No authentication

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
Posted by: Abdullah

79406530

Date: 2025-02-02 11:53:21
Score: 0.5
Natty:
Report link

In theory you can write your own "everything" but it takes to much time. For learning point it is great aproach to create mocks of used and loved tools there are many tutorials in form of "create your own x". Making you both understand the tool and improve your development skills. But in engineering stand point if there are a good tool that is suitable for your need and available for your use it is better to use it. And spend your energy to learn how to use it efficiently. Since they have many time tested features and learning about them improve you too. You can think as people using test tools and frameworks to develop big projects. Incase of gamin studios who develop their own engine they either need specialized system or due to legal/cost/ownership reasons. So if you dont have such problem general approach is to use trustable tools.

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

79406528

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

There is a lot of missing information on this question. What scheduler is the system using? What IP/port are you using to connect when you run your python program? Are you allowed to open ports on the cluster?

If I was going to take a guess, is it possible that your second interactive session is being scheduled to a different node and you are connecting with my_script 127.0.0.0:11434 instead of my_script node1_where_ollama_lives:11434?

You should also maintain the node even in another terminal. So you could connect from another terminal and connect to the same node without making a different allocation.

You can also run your ollama with an ampersand (&) at the end which will run the program in the background, or press ctrl+z if it is already running. This will return you the same terminal and you can try running the python script from there and updating us with more details.

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

79406516

Date: 2025-02-02 11:46:20
Score: 2.5
Natty:
Report link

If you are using VSCode, you can also select the Python Interpreter by clicking on the bottom right corner of the screen. Your project and your interpreter must be in the same environment. See how to select it in the image. Select Enviroment

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

79406510

Date: 2025-02-02 11:42:19
Score: 0.5
Natty:
Report link

This is the best result I got so far which vary according to the image dimenstions.

img.onload = function() {
   if ( img.height < 1000 ) {
       context.canvas.width = img.width;       
       context.canvas.height = img.height;     
       context.drawImage(img, 0, 0);
   } else {
       if ( img.height > img.width ) {
           context.canvas.width = 1000*img.width/img.height;       
           context.canvas.height = 1000;
           context.drawImage(img, 0, 0, 1000*img.width/img.height, 1000);
       } else {
           context.canvas.width = 1000;
           context.canvas.height = 1000*img.height/img.width;      
           context.drawImage(img, 0, 0, 1000, 1000*img.height/img.width);  
       }
   }
   var cropper = $canvas.cropper({     
       aspectRatio: 1, 
       dragMode: 'move',                               
   });
};


Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Maria Cyan

79406506

Date: 2025-02-02 11:37:18
Score: 0.5
Natty:
Report link

If you're looking for a smooth and high-quality way to resize images using JavaScript and the Canvas API, it's important to consider different resampling algorithms. By default, the drawImage() method in Canvas performs nearest-neighbor or bilinear interpolation, which may lead to pixelation or blurriness, especially when resizing large images down to smaller sizes.

Key Factors for High-Quality Image Resizing in JavaScript:

Resampling Methods:

Multi-Step Downsizing Approach: If you're reducing an image significantly (e.g., from 4000px to 500px), a common trick is to resize it in multiple steps rather than all at once. This helps preserve details and reduces aliasing artifacts.

Using OffscreenCanvas for Performance: When handling large images, using an OffscreenCanvas can help prevent UI lag by moving processing to a worker thread.

Alternative Solutions with WebAssembly: If performance and quality are crucial, libraries like libvips or sharp (which use WebAssembly) provide significantly better results than the default Canvas API.

A Ready-to-Use Solution If you're looking for an easy-to-use, ready-made tool for resizing images, you might want to check out Rounder Pics. It allows you to resize images directly in the browser without sending them to a server, ensuring privacy and fast processing. Additionally, it offers four different resizing algorithms, so you can compare the quality of different resampling techniques and choose the best one for your needs.

Would love to hear others' insights on their preferred resizing methods and best practices in JavaScript! 🚀

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

79406503

Date: 2025-02-02 11:36:18
Score: 2
Natty:
Report link
Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Bike

79406492

Date: 2025-02-02 11:28:16
Score: 1
Natty:
Report link

I know it’s kinda a late response, but I’ve just searched for the topic of creating notion widgets by yourself and I came across your not answered question.

The below answer is kind of nerdy, if you want to create your own widgets, you have to learn HTML, CSS and JS first, then you could try to host your code, optimally with GitHub Pages.

The thing is that I am starting to develop my own notion widgets and I am on the step of designing them.

You asked about the framework of such a quest - it is completely possible to achieve with pure HTML, CSS and JS, but the important part is about hosting your code.

You could host your widgets completely free with GitHub Pages from your own repo and embed them into Notion, with only one restriction - your code has to accessible to the public (the code repo has to be public).

I am going to extend apart from pure HTML, CSS and JS with Astro.js, TailwindCSS, Firebase (database), and potentially some other little pieces of technologies.

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

79406478

Date: 2025-02-02 11:17:14
Score: 1
Natty:
Report link

According to the docs here, you can access the records by just iterating over the returned iterator:

from Bio import SeqIO

for record in SeqIO.parse("example.fasta", "fasta"):
    print(record.id)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ronkosova

79406474

Date: 2025-02-02 11:16:13
Score: 2
Natty:
Report link

Option natively supports transpose method.

https://doc.rust-lang.org/std/option/enum.Option.html#method.transpose

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

79406459

Date: 2025-02-02 11:04:09
Score: 7.5 🚩
Natty: 5
Report link

i'm having the same issue here and would like to know if you found a better way then the accepted answer since you mention that it is not best practice?

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Me too answer (2.5): i'm having the same issue
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Thimo

79406457

Date: 2025-02-02 11:03:09
Score: 1
Natty:
Report link
  1. your codepan is laggy -> anyone who `d want to help ll need to download and change codepan in own env.
  2. don`t think quill was intendet to work in other windows (see actual quill code to see implementation(to overcome it) or open issue for them).
  3. i`d suggest searching editor that state in docs to work in other windows. it the fastest way.
  4. y can try play with proxy.

Maybe this `ll help)

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Vlad Dobrinov

79406445

Date: 2025-02-02 10:58:08
Score: 1
Natty:
Report link

I accidentally removed the following code from the main function.

SpringApplication.run(ApplicationName.class, args);

when I added it back it was working fine.

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

79406442

Date: 2025-02-02 10:56:08
Score: 1
Natty:
Report link
    <div class="container">
    <a href="http://google.com">
      <img src="http://i.imgur.com/SSPyEQ3.png" alt="Avatar" class="image">
          <div class="overlay">
              <div class="text">Hello World Whats up!</div>
    </a>
    </div>
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: sudhansu motivational

79406438

Date: 2025-02-02 10:55:07
Score: 1
Natty:
Report link

I had the same problem, started working after I changed my minSdkVersion to 24 from 23, keeping my targetSdkVersion 34.

This problem generally start occurring after you have upgraded your project dependencies

Reasons:
  • Whitelisted phrase (-1): I had the same
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Asmit Sinha

79406437

Date: 2025-02-02 10:54:07
Score: 2.5
Natty:
Report link

Search the font you want -> just go straight to button "Get font" -> "Get embed code" -> On left side you will find table with different styles just choose all you want it will show you in life previev css code.

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

79406435

Date: 2025-02-02 10:53:07
Score: 2.5
Natty:
Report link

use str_ireplace(" " ,"-", $url);

Reasons:
  • Low length (2):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Mohammadreza Esmaeeli