79077314

Date: 2024-10-11 08:20:06
Score: 1
Natty:
Report link

The server part may be changed in the following way:

import asyncio
import datetime as dt
import struct

from random import randrange
from zoneinfo import ZoneInfo

writers = []
all_writers = {}
weather = b''


async def prepare_weather_data(t):
    global weather, writers
    try:
        while True:
            await asyncio.sleep(randrange(0, 7))
            now = dt.datetime.now(ZoneInfo("Europe/Kyiv")).replace(microsecond=0).isoformat()
            message = f"{now} The temperature is {str(randrange(20, 30))} degrees Celsius"

            message_encoded = message.encode()
            message_length = struct.pack('>I', len(message_encoded))

            weather = message_length + message_encoded

            writers = []
            print(message)
    except asyncio.CancelledError:
        t.cancel()


async def read_message(reader: asyncio.StreamReader):
    # Read the 4-byte length header
    length_data = await reader.readexactly(4)
    message_length = struct.unpack('>I', length_data)[0]
    message_encoded = await reader.readexactly(message_length)
    return message_encoded.decode()


async def handle_client(
    writer: asyncio.StreamWriter,
):
    socname = writer.get_extra_info('peername')
    try:
        while True:
            # todo: refactor to avoid sleep
            await asyncio.sleep(0)
            if socname not in writers:
                writers.append(socname)
                writer.write(weather)
                await writer.drain()
    except* ConnectionResetError:
        del all_writers[socname]
        writer.close()
        print(f'Socket {socname} closed')
    except* asyncio.CancelledError:
        pass
    except* Exception as e:
        print(f'ERROR: {str(e)}')
        raise e


async def client_handler(reader, writer):
    socname = writer.get_extra_info('peername')
    all_writers[socname] = writer
    message = await read_message(reader)
    print(f"Socket {socname} connected. Received message: \"{message}\"")
    await handle_client(writer)


async def run_server():
    server = await asyncio.start_server(client_handler, "localhost", 8000)
    print(f'Serving on {server.sockets[0].getsockname()}')
    async with server:
        try:
            await server.serve_forever()
        finally:
            for writer in all_writers.values():
                writer.close()

async def main():
    try:
        async with asyncio.TaskGroup() as group:
            t = group.create_task(run_server())
            group.create_task(prepare_weather_data(t))
    except* asyncio.CancelledError:
        print('Stopped by user')


if __name__ == "__main__":
    asyncio.run(main())

It is not a perfect solution, but it is a working one. From my point of view, it may be improved if

  1. avoid the coroutines switch await asyncio.sleep(0)
  2. avoid global variables usage as much as possible
  3. avoid explicitly canceling the task with t.cancel(); add the exception-raising task as it is recommended in the documentation
  4. eliminate the ~2-second delay in notifying client disconnections on the server side; i.e. the delay in printing f'Socket {socname} closed'

I tried improving the script but haven't found working improvements yet. I would be grateful for ideas.

Reasons:
  • RegEx Blacklisted phrase (2): I would be grateful
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Andriy

79077311

Date: 2024-10-11 08:19:06
Score: 2.5
Natty:
Report link

I cannot comment yet, but to clarify Josh Fradley's answer:

The problem with your code is that it is calling unstable_cache() every time you call fetchProductWithCache. The code is creating a new instance of the cached function for each call to fetchProductWithCache, effectively creating a new independent cache entry but for the same key. This is very prone to race conditions in regards to the cached data returned. It is just plain incorrect.

The correct way is to do what Josh Fradley wrote. Declare your cached function once, meaning only call unstable_cache() once for the function you want to cache. Then call that function with your argument for country.

So replace your declaration of fetchProductWithCache with his and it should work.

BTW, just a heads up. You cannot mix time based revalidation with tags.

Reasons:
  • Blacklisted phrase (1): regards
  • Blacklisted phrase (0.5): I cannot
  • RegEx Blacklisted phrase (1): cannot comment
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Michael Zetterberg

79077310

Date: 2024-10-11 08:19:05
Score: 4
Natty:
Report link

I just restarted my pc and it works.

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

79077289

Date: 2024-10-11 08:13:03
Score: 2.5
Natty:
Report link

Having the same issue when using yarn v4, and solved by clearing browser cache, as described in the Vite doc:

Caching

File System Cache

Vite caches the pre-bundled dependencies in node_modules/.vite. It determines whether it needs to re-run the pre-bundling step based on a few sources:

...

If for some reason you want to force Vite to re-bundle deps, you can either start the dev server with the --force command line option, or manually delete the node_modules/.vite cache directory.

Browser Cache

Resolved dependency requests are strongly cached with HTTP headers max-age=31536000,immutable to improve page reload performance during dev. Once cached, these requests will never hit the dev server again. They are auto invalidated by the appended version query if a different version is installed (as reflected in your package manager lockfile). If you want to debug your dependencies by making local edits, you can:

  1. Temporarily disable cache via the Network tab of your browser devtools;
  2. Restart Vite dev server with the --force flag to re-bundle the deps;
  3. Reload the page.

In my case I had to delete the browser data folder, restart browser, then rerun app using vite --force. Clearing site data and doing a hard refresh did not work for me.

Reasons:
  • Blacklisted phrase (1): did not work
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): Having the same issue
  • Low reputation (0.5):
Posted by: ilharp

79077288

Date: 2024-10-11 08:13:03
Score: 3.5
Natty:
Report link

Eperiencing the same issue. Dynamics 365 CRM where it suddenly give

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

79077286

Date: 2024-10-11 08:13:03
Score: 9.5 🚩
Natty: 6.5
Report link

Did you ever manage to solve this? :)

Reasons:
  • RegEx Blacklisted phrase (3): Did you ever manage to solve this
  • RegEx Blacklisted phrase (1.5): solve this?
  • Low length (2):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): Did you
  • Low reputation (1):
Posted by: silencervk

79077279

Date: 2024-10-11 08:08:02
Score: 1
Natty:
Report link

To complete @jens-erat 's answer, with XQuery 1.0 (without string-join),
data() will concatenate your sequences,
a bit of replace will allow you to control (remove) whatever separator it decided to use,
and a substring will remove your tuned separator from before the first item:

substring(replace(data(<ul>{for $v in distinct-values(//li) return concat(", ",$v)}</ul>)," ,",","),3)

(that's for those who like me are stuck 10 years ago with an Oracle 11.2's XMLTable to operate)

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @jens-erat
  • Low reputation (0.5):
Posted by: Guillaume Outters

79077276

Date: 2024-10-11 08:08:01
Score: 11.5
Natty: 7.5
Report link

I faced same issue, do you find any solution?

Reasons:
  • Blacklisted phrase (1.5): any solution
  • RegEx Blacklisted phrase (2.5): do you find any
  • RegEx Blacklisted phrase (2): any solution?
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Chamith Kodithuwakku

79077275

Date: 2024-10-11 08:07:01
Score: 1.5
Natty:
Report link

The problem was the google chrome directory. You can only make one chrome session with that chrome directory. This should because of the file SingletonLock, this prevents me to create multiple session with the chrome directory. So I did a work around before I use the chrome directory, I simply copy and give a time-date stamp at the end of its name. The copied folder should be in the same folder as the original one. Then I use the chrome directory to make chrome sessions. Once I am done. I simply replace the original chrome directory with copied one but keeping the same original name. This way I can make many sessions as needed. And the cookies are not lost I have kept one profile for one directory.

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

79077267

Date: 2024-10-11 08:05:00
Score: 4
Natty:
Report link

We're on the same subject actually and we're trying to test the solution describe in this article by setting the property max-lifetime to 14mn.

Reasons:
  • Blacklisted phrase (1): this article
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Gregory Bevan

79077259

Date: 2024-10-11 08:04:00
Score: 1.5
Natty:
Report link
<Text numberOfLines={2} ellipsizeMode={'tail'}>

On Android, when numberOfLines is set to a value higher than 1, only tail value will work correctly.

See docs

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

79077256

Date: 2024-10-11 08:03:00
Score: 4.5
Natty:
Report link

have you try using PickRandomHelper ? https://wiremock.org/docs/response-templating/#pick-random-helper

e.g.

{{{pickRandom '200' '400' '404' '500' '503'}}}
Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: buccaneer

79077247

Date: 2024-10-11 07:58:59
Score: 0.5
Natty:
Report link

I'd solved this problem last year, now i'll share my method. It seems that MinioClient have max connections or like that. So it is wrong to create one MinioClient object and always use it. Instead, create a MinioClient object pool(like thread pool) or create a new one eachtime could solve this.

  MinioClient client = MinioClient.builder().endpoint(url).credentials(userName, password).build();
  client.putObject(...);
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Joshua

79077244

Date: 2024-10-11 07:57:58
Score: 6.5 🚩
Natty:
Report link

Facing the same issue!

Here is a how it breaks the css -> https://share.cleanshot.com/MpsVZ4nR

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): Facing the same issue
  • Low reputation (1):
Posted by: Mayur More

79077242

Date: 2024-10-11 07:57:58
Score: 4
Natty: 5
Report link

Can I know from where the equation for E1 and E2 came and how does it taken

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): Can I
  • Low reputation (1):
Posted by: Lakshmi K K

79077240

Date: 2024-10-11 07:55:56
Score: 7.5 🚩
Natty: 5.5
Report link

Take a look at this video. Helped me a lot. https://www.youtube.com/watch?v=ENyQr9gVTic

Reasons:
  • Blacklisted phrase (1): youtube.com
  • Blacklisted phrase (1): Helped me a lot
  • Blacklisted phrase (1): this video
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: yonatan

79077238

Date: 2024-10-11 07:53:56
Score: 2.5
Natty:
Report link

Error in callback <bound method UserNamespaceCommandHook.post_command_execute of <dbruntime.DatasetInfo.UserNamespaceCommandHook object at 0x7fba9d58ab30>> (for post_execute): for this error you need to change datatype in pyspark then it will work,got same error in databricks

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

79077236

Date: 2024-10-11 07:53:56
Score: 1.5
Natty:
Report link

Yes @Jester and @ Michael Petch both are right my printf function was broken.I am using print_hex(cs) ... works fine where print_hex in vga.c is

// Outputs a hexadecimal number to the screen. void print_hex(uint32_t n) {
    char hex_chars[] = "0123456789ABCDEF";
    print("0x");

for (int i = 28; i >= 0; i -= 4) // process each nibble (4 bits)
{
    putchar(hex_chars[(n >> i) & 0xF]);
}

}

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Jester
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: baponkar

79077233

Date: 2024-10-11 07:51:55
Score: 2.5
Natty:
Report link

I had the same exact problem. In my case I had to update all packages. After that, everything worked again.

Reasons:
  • Whitelisted phrase (-1): I had the same
  • Low length (1):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: send2wj

79077225

Date: 2024-10-11 07:49:55
Score: 0.5
Natty:
Report link

Same here. You could try this:

https://stackoverflow.com/a/74124477/8526660

Add this to the head

  <meta http-equiv="cache-control" content="no-cache" />
  <meta http-equiv="expires" content="0" />
  <meta http-equiv="pragma" content="no-cache" />

It won't do cache/offline though

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Whitelisted phrase (-2): try this:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Touwer

79077220

Date: 2024-10-11 07:46:54
Score: 0.5
Natty:
Report link

It seems like the problem of uploading the images to Firebase Storage and updating the URL to Firestore is related to how the file is maintained in your code. You should make sure that, after the image upload is complete, you are changing the state correctly using setState, like this: setState(() { ImageUrl = imageUrl; fileImage = File(pickedFile.path); });. Also, let the uploadTask complete by adding TaskSnapshot snapshot = await uploadTask.whenComplete(() => null); right before trying to get the download URL. On web platforms, other than showing the image by the file path, you should directly use Image.network with the download URL because Image.file will only work for local files, which may not be the case for uploading on the web. These will be used to display the uploaded image and update it correctly in Firestore.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: sagor samadder

79077217

Date: 2024-10-11 07:44:54
Score: 0.5
Natty:
Report link

Based from the hint from @QiangFu I did a bit more research. It seems to me, that the DatGrid requeries the database on expanding and isn't able to identify the new and the old instance to be the same dataset. It seems to work if equals() and GetHash() are overriden to identify the datasets by it's id.

public override bool Equals(object? obj)
{
    var OtherObjekt = obj as Testmodel;

    if (OtherObjekt != null)
    {
        if ((Id != null) && (OtherObjekt.Id != null))
        {
            if (Id == OtherObjekt.Id)
            {
                return true; ;
            }
            else
            {
                return false;
            }
        }
    }
    return base.Equals(obj);
}

public override int GetHashCode()
{
    if (Id != 0)
    {
        return Id;
    }
    return base.GetHashCode();
}

Nevertheless it is still not clear to me, why this is only relevant in case the RowExpand event is subscribed. Maybe someone else is able to tell if this is just a bug in RadzenDataGrid or if there is a serious reason for this behavior.

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @QiangFu
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Stef

79077214

Date: 2024-10-11 07:43:54
Score: 2.5
Natty:
Report link

Yes, this solves it!

.navbar { overflow: visible!important; }

Be sure to add the class to the nav container (Elementor Advanced tab)

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

79077211

Date: 2024-10-11 07:43:54
Score: 1.5
Natty:
Report link

Why don't you use CSS Custom Properties (variables)? Something like this:

    #outer {
      container: outer / size;
      --outer-width: 100%;
    }

    @container outer (min-width: 100px) {
      #content {
        width: calc(var(--outer-width) * 0.4);
      }
    }
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): Why don't you use
  • High reputation (-1):
Posted by: AbsoluteBeginner

79077203

Date: 2024-10-11 07:41:53
Score: 4
Natty: 5
Report link

See also https://github.com/python/cpython/issues/76425

It's not solved still python 3.12

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

79077185

Date: 2024-10-11 07:36:52
Score: 1
Natty:
Report link

To delete a build from the App Bundle Explorer, follow these steps:

  1. Go to your App Bundle Explorer and locate your build.
  2. If there's no "Delete" button available, go back to your Releases section.
  3. Discard the release associated with that build.
  4. After discarding the release, return to the App Bundle Explorer.
  5. You should now see the option to delete the build.
Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Daniel Kabu Asare

79077176

Date: 2024-10-11 07:34:51
Score: 3.5
Natty:
Report link

There is a bug on iOS 18 simulator(Rosseta)

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

79077166

Date: 2024-10-11 07:30:50
Score: 1
Natty:
Report link

Just found a way to make the changes visible in the dashboard as well.

First of all, let me say that I don't really understand why my code didn't work, as I used the existing scada symbols as a guide. I also adjusted the logging a bit and was able to see that the value stored for the color actually changed, even though the appearance didn't.

Fortunately, I was still able to get it to work by using element.css('fill', color); instead of element.attr({ fill: color });.

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

79077164

Date: 2024-10-11 07:29:50
Score: 3.5
Natty:
Report link

This issue has gone by itself, probably after an Xcode update, I did not notice which one.

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

79077161

Date: 2024-10-11 07:28:50
Score: 2
Natty:
Report link

you can try to filter the data with blank Delivery date like following:

Avg Days = CALCULATE( AVERAGEX( 'Table', DATEDIFF('Table'[ETA], 'Table'[Delivery], DAY), FILTER('Table', ISBLANK ([Delivery]) = FALSE) ) )

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

79077153

Date: 2024-10-11 07:25:49
Score: 1
Natty:
Report link

Here we will talk about how to use JavaScript properly To show off position and value of the largest string in an array, based on the length of string that is used.

javascript

let arr = ['apple', 'banana', 'strawberry', 'kiwi','pineapple'];

let largestString = arr. (y, x) => y.length > x.length? a : b);

let position = arr. indexOf(largestString);

console. log(Position: ${position}, Value: ${largestString})

In this case the output will be aware of this array: []

Rank: 2, Fruit: strawberry

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

79077149

Date: 2024-10-11 07:25:49
Score: 1.5
Natty:
Report link

No, you can not use SAS token in http request header, currently only support SAS token combined in trigger url. If you want to use auth in header, you should integrate with azure ad authorization policy, docs

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

79077146

Date: 2024-10-11 07:25:49
Score: 2
Natty:
Report link

I tried, first creating the table like yours and inserting the same data, everything works regularly. In order to do an actual test, you should have your file available, see if you can post an example.

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

79077145

Date: 2024-10-11 07:24:49
Score: 2.5
Natty:
Report link

@vaibhav The answer of @Saxtheowl is correct you need to add the resto of the expected parameters edit

def custom_serialize_value(value):
    return json.dumps(value, cls=CustomJSONEncoder).encode('UTF-8')

to

def custom_serialize_value(value, key, task_id, dag_id, run_id, map_index):
    return json.dumps(value, cls=CustomJSONEncoder).encode('UTF-8')
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @vaibhav
  • User mentioned (0): @Saxtheowl
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: Michael Groenewegen vd Weijden

79077142

Date: 2024-10-11 07:23:48
Score: 1
Natty:
Report link

To fix this problem add this line to .tsconfig.json file

"compilerOptions": {
    ....,
    "paths": {
      ....,
      "react": [ "./node_modules/@types/react" ]
    }
 }
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Hekmat

79077141

Date: 2024-10-11 07:22:48
Score: 2
Natty:
Report link

After adding the bot to the group chat, you need to give the bot admin rights and then get this url to get the group chat id:

https://api.telegram.org/bot<myapikey>/getUpdates
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Sondl

79077137

Date: 2024-10-11 07:20:47
Score: 1
Natty:
Report link

To fix this problem add this line to .tsconfig.json file

"compilerOptions": {
    ....,
    "paths": {
      ....,
      "react": [ "./node_modules/@types/react" ]
    }
 }
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Hekmat

79077127

Date: 2024-10-11 07:16:47
Score: 1.5
Natty:
Report link

The Chain of Responsibility pattern is very appealing to me.

However, after using it in my project, I realized that I had been using it incorrectly. I misunderstood the Chain of Responsibility. I do agree CoR pattern is a overkill if it is used in wrong place.

One of the most common misuses of CoR is to decompose a business requirement into a sequential chain of handlers. As requirements change, the responsibilities of each handler become unclear, leading to messy state management.

Check out this post before considering using it.

https://medium.com/@HobokenDays/design-pattern-chain-of-responsibility-to-use-it-or-not-to-use-it-7d33534379a3

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: HideInStackOverFlow

79077121

Date: 2024-10-11 07:12:46
Score: 4
Natty:
Report link

Im also doing kind of similar work with BERT. However I want true probabilities instead of using softmax on logits. Anyone know how to get the true probabilities using BERT.

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: sameera perera

79077118

Date: 2024-10-11 07:11:45
Score: 1.5
Natty:
Report link
  1. Convert to a string in PST timezone: First convert it in a string then concatenate it with timezone you want.

  2. Using the date_format function, you can ensure the timestamp remains unchanged but gets the desired timezone tag for presentation.

    df = df.withColumn( "updated_timestamp_pst", concat( date_format("last_updated_timestamp", "yyyy-MM-dd HH:mm:ss"), lit("[PST]") )

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

79077107

Date: 2024-10-11 07:07:45
Score: 1.5
Natty:
Report link

SEO TRANG 1 là một trong những đơn vị đào tạo SEO hàng đầu tại Việt Nam, được biết đến với sự uy tín, tận tâm, và hiệu quả trong việc giảng dạy. Với phương châm "Đào tạo chất lượng - Chi phí hợp lý", SEOTRANG1 cam kết mang lại cho học viên những giá trị thiết thực, giúp họ nắm vững kiến thức SEO trong thời gian ngắn mà không cần đầu tư vào nhiều công cụ hỗ trợ phức tạp.

seo trang 1

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

79077104

Date: 2024-10-11 07:06:44
Score: 3
Natty:
Report link

Apoorv's answer worked for me,thank

Reasons:
  • Whitelisted phrase (-1): worked for me
  • Low length (2):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Ethan Hunt

79077103

Date: 2024-10-11 07:06:44
Score: 1.5
Natty:
Report link

You can re-check the target URL as well carefully, as in my case when I was facing this issue there was a slight change in the URL I was passing mistakenly. Fixing the URL simply fixed this issue for me.

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

79077102

Date: 2024-10-11 07:05:44
Score: 1.5
Natty:
Report link

You can re-check the target URL as well carefully, as in my case when I was facing this issue there was a slight change in the URL I was passing mistakenly. Fixing the URL simply fixed this issue for me.

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

79077101

Date: 2024-10-11 07:05:44
Score: 1.5
Natty:
Report link

You can re-check the target URL as well carefully, as in my case when I was facing this issue there was a slight change in the URL I was passing mistakenly. Fixing the URL simply fixed this issue for me.

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

79077098

Date: 2024-10-11 07:05:44
Score: 1.5
Natty:
Report link

You can re-check the target URL as well carefully, as in my case when I was facing this issue there was a slight change in the URL I was passing mistakenly. Fixing the URL simply fixed this issue for me.

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

79077095

Date: 2024-10-11 07:04:44
Score: 3.5
Natty:
Report link

Try sharing the folder (Everyone) & provide the network path as the output directory. Folder sharing

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

79077081

Date: 2024-10-11 06:57:42
Score: 1
Natty:
Report link

Steps to install tailwindcss in a new deno vite app and configure.

  1. Install tailwindcss.

    deno add npm:tailwindcss

  2. Install dependencies.

    deno add npm:postcss

    deno add npm:autoprefixer

  3. Initialize tailwindcss

    deno run npm:tailwindcss init

  4. Configure tailwind.config.js

    content: [ "./src/**/*.{js,ts,jsx,tsx}", ],

follow rest of the steps from step 4 as mentioned in the https://tailwindcss.com/docs/guides/vite

Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: akw

79077066

Date: 2024-10-11 06:51:41
Score: 2.5
Natty:
Report link

Separate all elements using extracts with propagation and complementary mode. Use search of selection to find first edge of remaining topology as extract input until the last is empty and runs to an error. Then you can measure the distance for each extract and use the one with the longest distance.

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

79077062

Date: 2024-10-11 06:49:40
Score: 1.5
Natty:
Report link

DataSync is ideal for moving large data between on-premises and AWS.

Storage Gateway allows you to extend on-premises storage to AWS. It's best suited for hybrid cloud storage.

The thing to keep in mind is that DataSync only supports NFS and SMB file types. Hence you wouldn't be able to use it for moving tape data. In this case, a Tape Gateway should be used to move data and maintain access to it.

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

79077060

Date: 2024-10-11 06:47:39
Score: 1
Natty:
Report link

One option is to use Julia language package JMPReader.jl. Assuming juliacall and pandas packages are installed

from juliacall import Main as jl
jl.seval("using JMPReader")
df = jl.readjmp("example1.jmp")
pt = jl.pytable(df, "pandas")
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user2558368

79077056

Date: 2024-10-11 06:46:39
Score: 2
Natty:
Report link

The Chain of Responsibility pattern is very appealing to me.

In this pattern, the request and receiver are decoupled, and each handler is isolated, forming a chain of handlers to process the request.

If an algorithm requires completely different implementations, I recommend using the Strategy pattern. Each algorithm implementation is encapsulated, so changing one does not require changes to the others.

Check out this post before considering using it.

https://medium.com/@HobokenDays/design-pattern-chain-of-responsibility-to-use-it-or-not-to-use-it-7d33534379a3

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • No code block (0.5):
  • Low reputation (1):
Posted by: HideInStackOverFlow

79077043

Date: 2024-10-11 06:42:38
Score: 1
Natty:
Report link

The issue with me was that my project included openSSL static libs and among the include headers was a file "ctype.h", that has the same name as the one of the files in macOS SDK /usr/include folder.

So, yeah, it has to do with "search and discovery" phase of the compiler.

I packed openSSL as a framework and added it to the project, solved this mix-up.

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

79077037

Date: 2024-10-11 06:40:38
Score: 2
Natty:
Report link

Before digging deeper into problem I have a question, did you try to removing:

  1. node_modules
  2. package-lock.json
  3. clear npm cache (npm cache clean --force)
  4. use npx to ensure you are using the correct version of node-gyp? npx node-gyp
Reasons:
  • Blacklisted phrase (1.5): I have a question
  • Whitelisted phrase (-2): did you try
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: GimmeSomeCode

79077030

Date: 2024-10-11 06:37:37
Score: 2
Natty:
Report link

Often, you can simply specify the output format and give an example before asking the question, and ChatGPT will follow it. Prompt for your example:

Answer a question with bullet points in the following format:

• point 1

• point 2

• point 3

Question: Give me five uses of Next.js

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

79077025

Date: 2024-10-11 06:32:36
Score: 2
Natty:
Report link

I had the same situation and I used vite-plugin-commonjs. I found it on the internet years ago and it fixed everything, but I have no idea how it works.

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

79077022

Date: 2024-10-11 06:29:36
Score: 2.5
Natty:
Report link

This method can meet your needs:

SELECT REGEXP_REPLACE(content, SUBSTR(content, 1, 1), '', 'ig')
FROM string;

https://dbfiddle.uk/vl7OfVUX

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

79077014

Date: 2024-10-11 06:26:35
Score: 2
Natty:
Report link

you must go to .eslintrc.json file and configure it like this

{

"extends": ["next/core-web-vitals", "next/typescript"] ,

"rules": { "@typescript-eslint/no-empty-object-type": "off" } }

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

79077010

Date: 2024-10-11 06:25:35
Score: 1.5
Natty:
Report link
  1. Open the configuration file located at /etc/grafana/grafana.ini and navigate to the [dataproxy] section. Increase the timeout setting to 360 (which equals 360 seconds).

  2. Restart the Grafana server by running the command:

    systemctl restart grafana-server

  3. In the Grafana UI, go to the Data Sources section, select the Loki data source, and update the timeout setting to 360 (360 seconds).

Following these steps should resolve the error you encountered.

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

79076999

Date: 2024-10-11 06:20:33
Score: 3.5
Natty:
Report link

I don't think that there would be an issue while adding this SDK, I did the same steps & able to import the XCFramework in the project. There might be a case that you have not added the xcframework correctly. You must have to check options while drag & drop the framework.enter image description here

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Akash Gupta

79076996

Date: 2024-10-11 06:19:33
Score: 0.5
Natty:
Report link

Thank you, everyone, for your help. In the end, what was bothering me was that when changing pages, the entire page transitioned in a weird way, and I wanted the app bar to remain the same while the page changed.

All I did was simply modify the animation of the page transitions.

Here is a code example:

Function to move to another page:

onTap: () {
  Navigator.push(
    context,
    PageRouteBuilder(
      pageBuilder: (context, animation, secondaryAnimation) =>
          UserInfoPage(data: 'Hello from Home Page!'),
      transitionsBuilder:
          (context, animation, secondaryAnimation, child) {
        return FadeTransition(opacity: animation, child: child);
      },
    ),
  );
},

To add the back button and prevent the app bar from transitioning weirdly, all I did was move the title to the center:

import 'package:flutter/material.dart';

class UserAppBar extends StatelessWidget implements PreferredSizeWidget {
  @override
  final Size preferredSize;

  // Constructor to allow custom height if needed
  UserAppBar({super.key, this.customHeight = kToolbarHeight})
      : preferredSize = Size.fromHeight(customHeight),
        userIconHeight = customHeight * 0.75;

  final double customHeight;
  final double userIconHeight;

  @override
  Widget build(BuildContext context) {
    return AppBar(
      backgroundColor: Colors.black,
      centerTitle: true,
      title: const Text(
        "Heyo",
        style: TextStyle(
            color: Colors.white,
            fontWeight: FontWeight.bold,
            fontStyle: FontStyle.italic),
      ),
      actions: [
        IconButton(
          onPressed: () {},
          icon: ClipOval(
              child: Image.asset(
            'assets/icons/profile-pic.jpg',
            width: userIconHeight,
            height: userIconHeight,
            fit: BoxFit.cover,
          )),
        )
      ],
    );
  }
}
Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Guy Mayo

79076992

Date: 2024-10-11 06:18:32
Score: 2
Natty:
Report link

I seem to have gotten farther than most here on this exact issue.

Unfortunately haven’t cracked it yet.

https://github.com/nextauthjs/next-auth/discussions/12022

TLDR is it’s working for me only in ui mode and only on the 2nd and subsequent test runs.

Absolutely no idea why the cookie behaves like this.

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

79076988

Date: 2024-10-11 06:16:31
Score: 4
Natty:
Report link

This answer here by @MichaelChirico is actually trying to explain what is going on under the hood: data.table join is hard to understand

Using:
library(data.table)
DT = data.table(x = rep(c("b", "a", "c"), each = 3),
                y = c(1, 3, 6),
                v = 1:9)
X = data.table(x = c("c", "b"),
               v = 8:7,
               foo = c(4, 2))

He says:

Note also that we are using the right table to "look up" rows of the left table. That means we go through the rows of X and see which rows of DT match.

This is where me saying we are working inside the scope of the left table comes from. This makes total sense to me, except when we don't get a match. When we don't get a match, we still get the rows from the right table in DT[X - because this is in effect DT right join X or X left join DT. So, the quote that we are using the right table to "look up" rows of the left table is incorrect?

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • User mentioned (1): @MichaelChirico
  • Self-answer (0.5):
  • Looks like a comment (1):
  • Low reputation (0.5):
Posted by: Helen

79076981

Date: 2024-10-11 06:12:31
Score: 0.5
Natty:
Report link

I had the same issue with Visual Studio 2022. Just restart the Solution solved the issue.

Reasons:
  • Whitelisted phrase (-1): I had the same
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: Chamila Maddumage

79076977

Date: 2024-10-11 06:11:30
Score: 1
Natty:
Report link

Get the trash folder:

var trashFolder = imapClient.GetFolder(SpecialFolder.Trash);

Copy message to trash (do not move message, move may not work using MailKit):

inboxFolder.CopyTo(uid, trashFolder); //copy the message to trash

Then delete the original messages after it is copied:

inboxFolder.AddFlags(uids, MessageFlags.Deleted, true); //mark them as deleted

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Wasiqul Islam

79076974

Date: 2024-10-11 06:10:30
Score: 5.5
Natty:
Report link

watch this video, it should help he explains pointers and also function pointers: https://youtu.be/2KuI-ohfDDk

Reasons:
  • Blacklisted phrase (1): youtu.be
  • Blacklisted phrase (1): this video
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Uzumaki

79076967

Date: 2024-10-11 06:06:29
Score: 3.5
Natty:
Report link

Per the following GitHub issue:

https://github.com/thonny/thonny/issues/2913

and through some deduction, I think you need to change the link value in here

https://github.com/thonny/thonny/blob/master/data/rpi-pico-firmware.json

which seems to be the file that Thonny uses to download the appropriate firmware.

So basically: download the source from the GitHub repo, change the link to the appropriate one on the website for downloading MicroPython (https://micropython.org/download/RPI_PICO2/), and then setup Thonny from source and it should be fixed.

I am having the same issue and will get down to fixing it right now, hopefully the above will provide you with some useful information.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Me too answer (2.5): I am having the same issue
  • Low reputation (1):
Posted by: lt4g

79076966

Date: 2024-10-11 06:05:28
Score: 7.5 🚩
Natty:
Report link

I have similar issue. I am trying to expose the custom-port 27190 . I have even added 27190 in haproxy , but still curl command is failing

Please find my analysis/settings below:

(base) [root@m1305001 ~]# oc get route my-route -n istio-system -o yaml
spec:
  host: my-route-istio-system.apps.ocp-m1305001.lnxero1.boe
  port:
    targetPort: app-port
  to:
    kind: Service
    name: istio-ingressgateway
    weight: 100
  wildcardPolicy: None

(base) [root@m1305001 ~]# oc get svc istio-ingressgateway -n istio-system -o yaml
ports:
  - name: status-port
    port: 15020
    protocol: TCP
    targetPort: 15020
  - name: http2
    port: 80
    protocol: TCP
    targetPort: 8080
  - name: https
    port: 443
    protocol: TCP
    targetPort: 8443
  - name: app-port
    port: 27190
    protocol: TCP
    targetPort: 27190
  selector:
    app: istio-ingressgateway
    istio: ingressgateway
  sessionAffinity: None
  type: ClusterIP

(base) [root@m1305001 ~]# oc get gw bookinfo-gateway -o yaml
spec:
  selector:
    istio: ingressgateway
  servers:
  - hosts:
    - '*'
    port:
      name: http
      number: 8080
      protocol: HTTP
  - hosts:
    - '*'
    port:
      name: app-port
      number: 27190
      protocol: HTTP
(base) [root@m1305001 ~]# ~/istioctl pc listeners istio-ingressgateway-5b7d59898f-426bm.istio-system
ADDRESSES PORT  MATCH DESTINATION
0.0.0.0   8080  ALL   Route: http.8080
0.0.0.0   15021 ALL   Inline Route: /healthz/ready*
0.0.0.0   15090 ALL   Inline Route: /stats/prometheus*
0.0.0.0   27190 ALL   Route: http.27190

(base) [root@m1305001 ~]# ~/istioctl pc routes istio-ingressgateway-5b7d59898f-426bm.istio-system
NAME           VHOST NAME     DOMAINS     MATCH                  VIRTUAL SERVICE
http.27190     *:27190        *           /productpage           bookinfo.bookinfo
http.27190     *:27190        *           /static*               bookinfo.bookinfo
http.27190     *:27190        *           /login                 bookinfo.bookinfo
http.27190     *:27190        *           /logout                bookinfo.bookinfo
http.27190     *:27190        *           /api/v1/products*      bookinfo.bookinfo
http.8080      *:8080         *           /productpage           bookinfo.bookinfo
http.8080      *:8080         *           /static*               bookinfo.bookinfo
http.8080      *:8080         *           /login                 bookinfo.bookinfo
http.8080      *:8080         *           /logout                bookinfo.bookinfo
http.8080      *:8080         *           /api/v1/products*      bookinfo.bookinfo
               backend        *           /stats/prometheus*     
               backend        *           /healthz/ready*     

(base) [root@m1305001 ~]# oc get virtualservice bookinfo -o yaml
spec:
  gateways:
  - bookinfo-gateway
  hosts:
  - '*'
  http:
  - match:
    - uri:
        exact: /productpage
    - uri:
        prefix: /static
    - uri:
        exact: /login
    - uri:
        exact: /logout
    - uri:
        prefix: /api/v1/products
    route:
    - destination:
        host: productpage
        port:
          number: 9080

(base) [root@m1305001 ~]# oc get svc productpage -o yaml
spec:
  clusterIP: 172.30.247.193
  clusterIPs:
  - 172.30.247.193
  internalTrafficPolicy: Cluster
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  ports:
  - name: http
    port: 9080
    protocol: TCP
    targetPort: 9080
  selector:
    app: productpage
  sessionAffinity: None
  type: ClusterIP

curl commands work only with port 80 & not with 27190

(base) [root@m1305001 ~]# curl -v http://my-route-istio-system.apps.ocp-m1305001.lnxero1.boe:27190/productpage
* Host my-route-istio-system.apps.ocp-m1305001.lnxero1.boe:27190 was resolved.
* IPv6: (none)
* IPv4: 172.23.230.142
*   Trying 172.23.230.142:27190...
* Connected to my-route-istio-system.apps.ocp-m1305001.lnxero1.boe (172.23.230.142) port 27190
> GET /productpage HTTP/1.1
> Host: my-route-istio-system.apps.ocp-m1305001.lnxero1.boe:27190
> User-Agent: curl/8.7.1
> Accept: */*
> 
* Request completely sent off
* Empty reply from server
* Closing connection
curl: (52) Empty reply from server

I have added in haproxy

Haproxy 
————————

frontend ocp4-router-http
   mode tcp
   option tcplog
   bind apps.ocp-m1305001.lnxero1.boe:80
   default_backend ocp4-router-http

frontend ocp4-router-http-app
   mode tcp
   option tcplog
   bind apps.ocp-m1305001.lnxero1.boe:27190
   default_backend ocp4-router-http-app

backend ocp4-router-http
   mode tcp
         server worker-0 worker-0.ocp-m1305001.lnxero1.boe:80 check
         server worker-1 worker-1.ocp-m1305001.lnxero1.boe:80 check
   
backend ocp4-router-http-app
   mode tcp
         server worker-0 worker-0.ocp-m1305001.lnxero1.boe:27190 check
         server worker-1 worker-1.ocp-m1305001.lnxero1.boe:27190 check

Can someone guide me here

Reasons:
  • Blacklisted phrase (1): guide me
  • Blacklisted phrase (1): I am trying to
  • Blacklisted phrase (1): I have similar
  • RegEx Blacklisted phrase (2.5): Can someone guide me
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): I have similar issue
  • Low reputation (1):
Posted by: Mudassar Rana

79076958

Date: 2024-10-11 06:03:27
Score: 3.5
Natty:
Report link

had the same issue, try downgrading the app, Its working for me

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

79076935

Date: 2024-10-11 05:51:24
Score: 2.5
Natty:
Report link

In my case it was the CDN problem

my CDN service has caching feature for URLs with or without the query string so I disabled the caching feature in the CDN service, then everything worked fine.
Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: mohammad pourmami

79076934

Date: 2024-10-11 05:50:23
Score: 1.5
Natty:
Report link

Check your MySQL configuration (my.cnf or my.ini) and make sure the socket file(socket '/tmp/mysql.sock') is correctly specified in both Sequel Ace and the MySQL server.

If you can’t connect, ensure your MySQL server is running (brew services start mysql or sudo systemctl start mysql).

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Bijomon Varghese

79076930

Date: 2024-10-11 05:48:23
Score: 1.5
Natty:
Report link

Ok I think I managed to solve my problem. I change the code below: -

a = box.new(bar_index[1]+ 6, ta.highest(sl, 1), bar_index[1]+ 12, ta.lowest(Price, 1), color.white, 1, line.style_solid, extend.none, xloc.bar_index, color.new(color.red, 60)) b = box.new(bar_index[1]+ 6, ta.highest(Price, 1), bar_index[1]+ 12, ta.lowest(take_profit, 1), color.white, 1, line.style_solid, extend.none, xloc.bar_index, color.new(color.lime, 60))

to

a = box.new(bar_index[1]+ 6, ta.highest(sl, 1), bar_index[1]+ 12, ta.lowest(Price, 1),force_overlay = false, border_color = color.white, border_style = line.style_solid, bgcolor = color.new(color.red, 60)) b = box.new(bar_index[1]+ 6, ta.highest(Price, 1), bar_index[1]+ 12, ta.lowest(take_profit, 1),force_overlay = false, border_color = color.white, border_style = line.style_solid, bgcolor = color.new(color.lime, 60))

making use of "force_overlay = true

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

79076929

Date: 2024-10-11 05:48:23
Score: 1
Natty:
Report link

Try This

Directionality( textDirection: TextDirection.rtl, child: GridView.count( crossAxisCount: 4, mainAxisSpacing: 0,
crossAxisSpacing: 0,
childAspectRatio: 1,
children: items, ), );

Reasons:
  • Whitelisted phrase (-1): Try This
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Utkarsh Bhardwaj

79076926

Date: 2024-10-11 05:45:22
Score: 0.5
Natty:
Report link

To connect Godaddy domain with Firebase Hosting:

(Process to point www.yourdomain.com -> yourdomain.com)

  1. Goto Godaddy portal -> Forwarding -> Subdomains -> Add Forwarding -> Enter subdomain as www -> Add destination url as yourdomain.com

  2. Step 1 will add two A records

  3. Goto Firebase hosting -> Connect Domain -> Enter domain yourdomain.com -> Connect

  4. Add the A and TXT records provided by Firebase in the DNS records on Godaddy portal.

This steps worked for me & should solve the issue.

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

79076925

Date: 2024-10-11 05:44:22
Score: 1.5
Natty:
Report link

In case your root level points to Warning, you can set the root logger level as follows:

logging.getLogger().setLevel(logging.INFO)

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

79076922

Date: 2024-10-11 05:43:22
Score: 2
Natty:
Report link

Basic Caching Connection Factory: This code creates a CachingConnectionFactory with default settings, which generally does not specify any session, producer, or consumer caching. Default Cache Behavior: Without any specific cache settings, the factory may not cache sessions, producers, or consumers, or it might use the default cache settings, which might be minimal or none depending on the implementation.

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

79076919

Date: 2024-10-11 05:42:22
Score: 1
Natty:
Report link

This is because Java heap space is not enough, just need to increase your Java heap space memory.

add this line to gradle.properties. org.gradle.jvmargs=-Xmx1536M

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

79076915

Date: 2024-10-11 05:39:21
Score: 1.5
Natty:
Report link

Using Firefox, open Developer Tools, go to the Network tab, reload the page, find the appropriate .m3u8 entry, right-click, Copy Value > Copy as cURL. Then paste the resulting cURL command into here: https://windyakin.github.io/curl2ffmpeg. Download and install the free, open source FFMpeg tool if you don't already have it, paste the resulting ffmpeg command into your commandline and enjoy the video!

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

79076911

Date: 2024-10-11 05:37:21
Score: 1
Natty:
Report link

I'm sure that the answers to this is not an appropriate place to leave this, but as I do not have 50 reputation I am unable to leave a comment.

The currently accepted answer giving a solution for a RoundUpOnMidpoint does not work if you are attempting to round a datetime 1 tick before the midpoint. The following test written with FluentAssertions proves this.

[Test]
public void RoundUpOnMidpoint_JustBeforeMidpoint()
{
    var span = TimeSpan.FromMinutes(1);
    var originalDateTime = new DateTime(2021, 08, 26, 20, 01, 0);
    var midpoint = originalDateTime + (span / 2);
    var justBeforeMidpoint = midpoint.AddTicks(-1);
    RoundUpOnMidpoint(justBeforeMidpoint, span).Should().Be(originalDateTime, $"{justBeforeMidpoint:O} is one tick closer to {originalDateTime:O} than {originalDateTime + span:O}");

    DateTime RoundUpOnMidpoint(DateTime date, TimeSpan span)
    {
        var ticks = (date.Ticks + span.Ticks / 2 + 1) / span.Ticks;

        return new DateTime(ticks * span.Ticks, date.Kind);
    }
}

The test fails and says

Expected RoundUpOnMidpoint(justBeforeMidpoint, span) to be <2021-08-26 20:01:00> because 2021-08-26T20:01:29.9999999 is one tick closer to 2021-08-26T20:01:00.0000000 than 2021-08-26T20:02:00.0000000, but found <2021-08-26 20:02:00>.

A more correct round up on midpoint would be.

DateTime RoundUpOnMidpoint(DateTime date, TimeSpan span)
{
    var ticks = (date.Ticks + span.Ticks / 2) / span.Ticks;
    return new DateTime(ticks * span.Ticks, date.Kind);
}
Reasons:
  • RegEx Blacklisted phrase (1.5): I do not have 50 reputation
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: William Robertson

79076896

Date: 2024-10-11 05:26:19
Score: 1.5
Natty:
Report link

I dug further and found this:

If the parent pipeline is a merge request pipeline, the child pipeline must use workflow:rules or rules to ensure the jobs run.

If no jobs in the child pipeline can run due to missing or incorrect rules configuration:

Adding following rules section to the jobs fixes my issue (This is because I need the child pipelines to run on a merge request only):

  rules:
    - if: $CI_MERGE_REQUEST_ID
Reasons:
  • Blacklisted phrase (0.5): I need
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Dev Khan

79076892

Date: 2024-10-11 05:25:18
Score: 2.5
Natty:
Report link

try using the debugger to monitor what's happening when you select 2 in your proram. but looking at your code, are you sure it's scanf("%c", ...) instead of scanf("%s",...)? i know %c is used for a single character and %s for a string.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: dieuleveut__

79076889

Date: 2024-10-11 05:22:17
Score: 3.5
Natty:
Report link

Other than set in json setting, it can also be set in GUI.

enter image description here

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

79076885

Date: 2024-10-11 05:19:16
Score: 0.5
Natty:
Report link

I have updated @Oguz Vuruskaner's answer and article to support newer version of TensorRT

import numpy as np
import pycuda.driver as cuda
import pycuda.autoinit  # Note: required! to initialize pycuda
import tensorrt as trt

class TensorRTInference:
    def __init__(self, engine_path):
        # initialize
        self.logger = trt.Logger(trt.Logger.ERROR)
        self.runtime = trt.Runtime(self.logger)

        # setup
        self.engine = self.load_engine(engine_path)
        self.context = self.engine.create_execution_context()

        # allocate buffers
        self.inputs, self.outputs, self.bindings, self.stream = self.allocate_buffers(
            self.engine
        )

    def load_engine(self, engine_path):
        # loads the model from given filepath
        with open(engine_path, "rb") as f:
            engine = self.runtime.deserialize_cuda_engine(f.read())
        return engine

    class HostDeviceMem:
        def __init__(self, host_mem, device_mem, shape):
            # keeping track of addresses
            self.host = host_mem
            self.device = device_mem
            # keeping track of shape to un-flatten it later
            self.shape = shape

    def allocate_buffers(self, engine):
        inputs, outputs, bindings = [], [], []
        stream = cuda.Stream()

        for i in range(engine.num_io_tensors):
            tensor_name = engine.get_tensor_name(i)
            shape = engine.get_tensor_shape(tensor_name)
            size = trt.volume(shape)
            dtype = trt.nptype(engine.get_tensor_dtype(tensor_name))

            # allocate host and device buffers
            host_mem = cuda.pagelocked_empty(size, dtype)
            device_mem = cuda.mem_alloc(host_mem.nbytes)

            # append the device buffer address to device bindings
            bindings.append(int(device_mem))

            # append to the appropiate input/output list
            if engine.get_tensor_mode(tensor_name) == trt.TensorIOMode.INPUT:
                inputs.append(self.HostDeviceMem(host_mem, device_mem, shape))
            else:
                outputs.append(self.HostDeviceMem(host_mem, device_mem, shape))

        return inputs, outputs, bindings, stream

    def infer(self, input_data):
        # transfer input data to device
        np.copyto(self.inputs[0].host, input_data.ravel())
        cuda.memcpy_htod_async(self.inputs[0].device, self.inputs[0].host, self.stream)

        # set tensor address
        for i in range(self.engine.num_io_tensors):
            self.context.set_tensor_address(
                self.engine.get_tensor_name(i), self.bindings[i]
            )

        # run inference
        self.context.execute_async_v3(stream_handle=self.stream.handle)

        # transfer predictions back
        for i in range(len(self.outputs)):
            cuda.memcpy_dtoh_async(
                self.outputs[i].host, self.outputs[i].device, self.stream
            )

        # synchronize the stream
        self.stream.synchronize()

        # un-flatten the outputs
        outputs = []
        for i in range(len(self.outputs)):
            output = self.outputs[i].host
            output = output.reshape(self.outputs[i].shape)
            outputs.append(output)

        return outputs

Note: above snippet is pretty much same as the article that I have referenced but with some small tweaks.

If you are also using plugins in your model you will have to add following before calling the self.load_engine(engine_path)

 # loading plugins
# Note: default namespace is ""
# https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#register-plugin-create
trt.init_libnvinfer_plugins(self.logger, namespace="")
Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @Oguz
  • Low reputation (1):
Posted by: Harin Khakhi

79076882

Date: 2024-10-11 05:19:16
Score: 4
Natty:
Report link

PKD. Thank you for bringing this issue to our attention.

Your problem concerns a bug in the editor, which was resolved in the new release of Froala version 4.3.

According to the release, the version resolved the issue where setting fontSizeDefaultSelection in the config results in multiple wrapper divs added to the content on subsequent edits.

By updating to the new version, you can be confident that this issue will be resolved. This is the most effective solution to your problem.

After updating the version, some approaches keep your code from issues like these:

  1. Check for Redundant Formatting
  2. Use html.set to load content programmatically
  3. Check for Cleaning Options
  4. Preventing Empty Space/Line Addition
  5. Dirty Check Improvement

I'm confident that these actions will fix your issue.

Please let me know if you need further assistance.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • RegEx Blacklisted phrase (2.5): Please let me know
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Daniel Roncaglia

79076877

Date: 2024-10-11 05:17:15
Score: 1
Natty:
Report link

While FCM messages themselves don't directly control the notification behavior on Android, you're on the right track with options (B) and (C):

(B) Flutter Code: You'll need to use FCM.instance.makeAndroidShowBannerInBackground(true) in your Flutter code to enable banners when the app is in the background.

(C) Custom Message Channels (Recommended): This is the more robust solution. Creating custom message channels with the IMPORTANCE_HIGH setting allows fine-grained control over how notifications appear, even when the app is backgrounded or killed.

Here's why (C) might be preferable:

More Control: Channels offer greater customization for notification appearance and behavior. Future-Proofing: This approach aligns with the latest Android notification practices. https://cafelam.com/elizabeth-fraley-leads-kinderready-to-unleash-real-time-tracking-analytics-to-enhance-childrens-development-and-parental-engagement/

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

79076871

Date: 2024-10-11 05:12:14
Score: 1
Natty:
Report link

im not sure you can deserialize the proto data within chrome itself, but you can easily do it with mitmproxy, install it and start a instance using "mitmweb",setup a system wide proxy to point to localhost and mitmweb port(default is 8080), mitmweb should deserialize the data automatically, if not, copy the hexdump of the request or response you're interested in,to and head over to cyberchef, decode the data from hexdump and use proto decode, make sure to remove the first 3-n bytes based on the message length, it should decode it successfully

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: ahmed mani

79076870

Date: 2024-10-11 05:10:14
Score: 2
Natty:
Report link

The Chain of Responsibility pattern is very appealing to me.

In this pattern, the request and receiver are decoupled, and each handler is isolated, forming a chain of handlers to process the request.

However, after using it in my project, I realized that I had been using it incorrectly. I misunderstood the Chain of Responsibility.

Check out this post before considering using it.

https://medium.com/@HobokenDays/design-pattern-chain-of-responsibility-to-use-it-or-not-to-use-it-7d33534379a3

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • No code block (0.5):
  • Low reputation (1):
Posted by: HideInStackOverFlow

79076864

Date: 2024-10-11 05:08:13
Score: 4
Natty: 4
Report link

read the given below i ave fix the issue with the artical

https://medium.com/@podcoder/connecting-flutter-application-to-localhost-a1022df63130

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

79076855

Date: 2024-10-11 05:05:12
Score: 5
Natty: 4
Report link

Has anyone had success using next-auth in nextron's production environment? If it has been successfully implemented, please be sure to share an example with me. I would be very grateful.

Reasons:
  • RegEx Blacklisted phrase (2): I would be very grateful
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: mebius

79076852

Date: 2024-10-11 05:04:12
Score: 1
Natty:
Report link

RN supposed to do autolinking now, however it doesn't seem to work properly linked with react-native-vector-icons package. After the linking just install the ios/pod file using pod install.

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Pratik Prakash Bindage

79076847

Date: 2024-10-11 05:02:11
Score: 1.5
Natty:
Report link

After more than 10 years of this question, I was looking for some C++ code equivalent to the Java code in the question.

As I could not find any, I ended up doing my own version as close as possible to the original Java but in C++17.

Note1: I was not considering performance, etc.

Note2: Yes, you need to know ahead the types you are going to use (using variants=etc), but that is in the Java code as well, right?

#include <iostream>
#include <variant>
#include <vector>

template <typename T>
class GenericAttribute {
private:
    T m_value;

public:

    GenericAttribute(T value) {
        setValue(value);
    }

    T getValue() {
        return m_value;
    }

    void setValue(T value) {
        m_value = value;
    }
};

class Custom {
public:
    Custom() {}

    std::string toString() const {
        return "My custom object";
    }
};

static std::ostream& operator<<(std::ostream& os, const Custom& obj) {
    return os << obj.toString();
}

int main() {
    using variants = std::variant<
        GenericAttribute<int>*,
        GenericAttribute<double>*,
        GenericAttribute<Custom>*
    >;

    std::vector<variants> attributes = {};
    attributes.push_back(new GenericAttribute<int>(1));
    attributes.push_back(new GenericAttribute<double>(3.1415926535));
    attributes.push_back(new GenericAttribute<Custom>(Custom{}));

    for (auto& attr : attributes) {

        std::visit([](auto& object) {
            std::cout << object->getValue() << std::endl;
        }, attr);
    }

    return 0;
}
Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: fbussolin

79076844

Date: 2024-10-11 04:59:11
Score: 1
Natty:
Report link
firstUpdated(){
    window.addEventListener('mousedown', this.handleClickOutside);
  }

  handleClickOutside = (e) => {
    if(!this.contains(e.target)){
      this.activeList = false;
    }
}

Use arrow functions, if you use normal functions the context of "this" is a window object

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

79076843

Date: 2024-10-11 04:58:11
Score: 1.5
Natty:
Report link

I encountered a similar issue recently when reading json file with a shcema. After investigation, I discovered that the root cause was a mismatch between the expected and actual schema. To resolve this, I recommend the following approach:

  1. Print out the expected schema for reference.
  2. Load the JSON file into Spark, allowing it to infer the schema automatically.
  3. Compare the inferred schema with the expected one to identify any discrepancies.
Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Qiao

79076842

Date: 2024-10-11 04:58:11
Score: 2
Natty:
Report link

I found out by trial and error that the easiest way to fix that was to add an id to the entire jsx file and in css just use that id for the entire code. eg: #id_name{ //your entire css }

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

79076832

Date: 2024-10-11 04:53:09
Score: 11.5
Natty: 7.5
Report link

for me , that's not wokring for image as well, do you found any solutions?

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

79076831

Date: 2024-10-11 04:52:08
Score: 7 🚩
Natty:
Report link

This code is from 9 years ago, there are no solutions to this problem to this date in 2024.

This package is provided by universities to teach a race condition and the problem needs to be solved using locks.

Using atomic variables is not acceptable by professors.

I am also having the same exact problem. I cannot find the source of this package however the code is has credits as follows.

/**

public class BankSimMain ..... snip

Someone please help where we can use locks and semaphores to fix this code.

Reasons:
  • Blacklisted phrase (1.5): I cannot find
  • Blacklisted phrase (0.5): I cannot
  • RegEx Blacklisted phrase (3): please help
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @author
  • User mentioned (0): @author
  • User mentioned (0): @author
  • User mentioned (0): @author
  • User mentioned (0): @author
  • Low reputation (1):
Posted by: Nab Man

79076830

Date: 2024-10-11 04:51:07
Score: 1.5
Natty:
Report link

In my case,my issue was related to the emulator I was using

Device: Resizable (Experimental) API 35

Using the same system image on Pixel Fold, the app was able to install without any issues.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: M Ashhal

79076829

Date: 2024-10-11 04:51:07
Score: 4.5
Natty:
Report link

It can be done using babel & pkg. Detailed Video is here

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

79076819

Date: 2024-10-11 04:44:05
Score: 2.5
Natty:
Report link

I was facing the same issue with Azure Storage service. I had to enable CORS on the storage account settings in addition to adding the header: 'Access-Control-Allow-Origin: *' in the post request.

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

79076809

Date: 2024-10-11 04:38:03
Score: 1
Natty:
Report link

The code shows you loaded a dynamic library "callee.so" rather than an object file.

To load a dynamic library, Use this API to replace calling add_obj2jit:

J->loadPlatformDynamicLibrary("callee.so");
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Xiangyu Meng