79090529

Date: 2024-10-15 15:02:54
Score: 1
Natty:
Report link

I got it.

And that's strange, but maybe someone can explain it ?

My probleme was because of turbo : When i add data-turbo="false" on my button, my flash message reappear.

So it seems that without "data-turbo=false", turbo preload my "submit click", load the flash message and don't reload it when i do the real click, which is not really usefull :x

Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Alan

79090528

Date: 2024-10-15 15:01:54
Score: 1.5
Natty:
Report link

I fixed it. I just added the JDK 17 path to the gradle.properties file. and it's work smoothly

Reasons:
  • Whitelisted phrase (-2): I fixed
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Ratul Hasan Ruhan

79090525

Date: 2024-10-15 15:01:54
Score: 1.5
Natty:
Report link

The problem was that I did not use

- uses: actions/checkout@v4

again after I started the next step.

Then kubectl is aware of all files.

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

79090518

Date: 2024-10-15 14:58:53
Score: 0.5
Natty:
Report link

You can replace this "by lazy" code

val lazyValue by lazy { runBlocking { getValue() } }
// usage: if (...) lazyValue else ...

with this:

val deferredValue = async(start = CoroutineStart.LAZY) { getValue() }
// usage: if (...) deferredValue.await() else ...
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Alex Elkin

79090510

Date: 2024-10-15 14:56:52
Score: 1.5
Natty:
Report link

There's an answer for this at https://community.progress.com/s/question/0D5Pb00001FvXqwKAF/problems-with-ssl-when-performing-http-request .

TL;DR is that you should make sure that you have the corect version of the OpenEdge.Net.pl file installed.

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

79090504

Date: 2024-10-15 14:55:51
Score: 2.5
Natty:
Report link

There IS a portable application that can be used to password-protect(and encrypt) single files such as MP4 video files. I am not sure if it has the one-time view capability, but check it out anyway: VeraCrypt

Let me know if that works for you!

Reasons:
  • Blacklisted phrase (0.5): check it out
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Deacon Griffiths

79090502

Date: 2024-10-15 14:55:51
Score: 3
Natty:
Report link

The answer is in the question and is good to know if you implement HEAD using NestJS 10.4.4

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

79090498

Date: 2024-10-15 14:53:51
Score: 2
Natty:
Report link

Check for permissions on storage folder. In my case I was using docker container and the permissions on folders was not allowing the operation. Read this for more info: https://github.com/verdaccio/verdaccio/issues/2096#issuecomment-927386185

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

79090497

Date: 2024-10-15 14:53:51
Score: 1.5
Natty:
Report link

Have you tried to lower the value of C in svm = OneVsRestClassifier(SVC(kernel='linear', C=1e5))? Maybe you are overfitting to your data because of this (rather high?) value.

Reasons:
  • Whitelisted phrase (-1): Have you tried
  • Low length (1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Slavensky

79090494

Date: 2024-10-15 14:53:51
Score: 2
Natty:
Report link

Place your LogInView.fxml File not in

src/main/java/org/example/ooplibrary/View/LogInView.fxml

but in

src/main/resources/org/example/ooplibrary/View/LogInView.fxml

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

79090491

Date: 2024-10-15 14:52:50
Score: 3.5
Natty:
Report link

Tried once uninstall extensions, I think some extension are deprecated.

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

79090470

Date: 2024-10-15 14:48:49
Score: 0.5
Natty:
Report link

I found two ways to do this, which work for me, using empty catch or timeout.

const x = async value => await console.log(value);

class Boss {
  constructor() {
    // Option 1: use empty catch
    x(1).catch(_ => {});
    
    // Option 2: use timeout
    setTimeout(() => x(2), 0);
  }
}

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

79090463

Date: 2024-10-15 14:46:49
Score: 3.5
Natty:
Report link

In Build Settings -> Build Options -> Debug Information Format -> Update to ONLY DWARF:

enter image description here

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

79090462

Date: 2024-10-15 14:46:49
Score: 0.5
Natty:
Report link

What you can try to use a while loop to read each line into an array

#!/bin/sh

cmd=$(curl -s https://jsonplaceholder.typicode.com/todos)
echo "$cmd" > Data.json

jq -r '.[] | .title' Data.json > title.txt


myArray=()

# Read each line
while IFS= read -r line; do
    myArray+=("$line")
done < title.txt

for (( i = 0 ; i < 20 ; i++ )); do
  echo "Array[$i]=\"${myArray[$i]}\""
done
Reasons:
  • Has code block (-0.5):
  • Starts with a question (0.5): What you can
  • Low reputation (0.5):
Posted by: Shelton Liu

79090455

Date: 2024-10-15 14:44:48
Score: 1.5
Natty:
Report link

dll files only exist on Windows. Linux and macOS handle libraries differently.

Dynamically linking to an external ffmpeg executable (like ffmpeg.exe) is the same as dynamically linking to the libraries directly. As long as the ffmpeg executable is separate from your project, it should be fine. Just tell your user where they should put their separately downloaded ffmpeg executable and you should be good.

This picture shows how the libraries are connected to the exe

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

79090453

Date: 2024-10-15 14:44:48
Score: 1.5
Natty:
Report link

Arbitrary precision is implemented by dart package decimal.

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: Eugene Gr. Philippov

79090447

Date: 2024-10-15 14:43:48
Score: 1.5
Natty:
Report link

Arbitrary precision is implemented by dart package decimal.

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: Eugene Gr. Philippov

79090445

Date: 2024-10-15 14:42:47
Score: 12
Natty: 9
Report link

same problem, how do you solve it?

Reasons:
  • Blacklisted phrase (1): how do you
  • RegEx Blacklisted phrase (1.5): solve it?
  • RegEx Blacklisted phrase (2.5): do you solve it
  • RegEx Blacklisted phrase (1): same problem
  • Low length (2):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Tomma92

79090440

Date: 2024-10-15 14:41:47
Score: 2.5
Natty:
Report link

In current WSO2 IS implementation (including 5.11.0), the post logout uri is validated against the callback uri that you have configured [1] and therefore, if your call back uri and post logout uri does not match, it will result in an error as mentioned above.

This concern is currently tracked with the git issue [2].

[1] - https://github.com/wso2-extensions/identity-inbound-auth-oauth/blob/5c3c468b6158dc4e4e82fdfe783be0d86d4cd556/components/org.wso2.carbon.identity.oidc.session/src/main/java/org/wso2/carbon/identity/oidc/session/servlet/OIDCLogoutServlet.java#L378-L382

[2] - https://github.com/wso2/product-is/issues/6397

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

79090438

Date: 2024-10-15 14:41:46
Score: 6 🚩
Natty: 6.5
Report link

I continuously get "Error while fetching extensions. Failed to fetch. Thoughts????

Reasons:
  • Blacklisted phrase (1): ???
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Mike

79090430

Date: 2024-10-15 14:39:45
Score: 6 🚩
Natty: 4
Report link

Any solution yet? I am facing the same thing but by using Azure container App Ingress, which creates an Internal Standard Load Balancer, I can't create a private link service to this ILB because I get "You cannot use a load balancer that has an IP based backend pool".

Reasons:
  • Blacklisted phrase (1.5): Any solution
  • RegEx Blacklisted phrase (2): Any solution yet?
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Leart Beqiraj

79090429

Date: 2024-10-15 14:39:45
Score: 1
Natty:
Report link

iPadOS18 introduces UITabBarController.tabBarHidden for tab bar visibility

if (@available(iOS 18.0, *)) {
    self.tabBarController.tabBarHidden = YES;
}
else {
    self.tabBarController.tabBar.hidden = YES;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user3755767

79090422

Date: 2024-10-15 14:37:44
Score: 0.5
Natty:
Report link

There are two types of usages for <exclude> tag in pom.xml
Usage1) Not to include in transtive dependency
Usage2) Not to include in JAR

Your question (and the example code snippet that you provided) belongs to second one (Usage2). You are thinking that it is related to the first one (Usage1). That is the reason for confusion.

let me answer your questions with related concept

:
Question1:
Is this something that lombok is also available and when I add it explicitly, it is excluded by adding this block automatically to the pom.xml?
Answer1:
No. The "lombak" dependency that you added is still there and perfectly valid. The <exclude> block inside <plugin> block does not remove/exclude your "lombak" dependency. Purpose of the <exclude> tag here is completely different. Let me explain below.

You added the following "dependency"

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
    
The following code is added by the system without your knowledge.

        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <excludes>
                    <exclude>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                    </exclude>
                </excludes>
            </configuration>
        </plugin>   
    

The purpose of using "lombak" is to generate the boilerplate code instead of we writing the getters, setters, etc. As you have added the "lombak" dependency, it allows @Getter, @Setter kind of annotations and generates the required code (getters, setters, constructors, etc) and it's work is done. This code generation takes place at the compilation time. Remember, there are different stages like clean, compile, test, package, install in the life cycle. The "lombak" is required at 'compile' stage only. There is no need of "lombak" in the later stages (Eg: package). So, Maven plans to exclude "lombak" for the later stages. The code generated without your knowledge (inside the <plugin> block) belongs to that exclusion.

In this case, the Lombok library (org.projectlombok:lombok) is being excluded from the final packaged artifact. This means that while Lombok is still available as a dependency during compilation (allowing you to use its annotations), it won't be bundled into the final executable JAR/WAR file. Including Lombok in the final JAR/WAR file would be unnecessary and could potentially cause conflicts or increase the size of the final artifact. Therefore, it is common to exclude Lombok from the final package.


The Usage1 that I have mentioned above has a different purpose. Suppose you have added to dependencies and both of them transitively depend on "lombak". In that case, it is not meaningful to import it two times and there may be some version related conflicts also. To avoid that, we can exclude "lombak" from any one of the dependencies.

Look at the following code

    <dependency>
        <groupId>com.example</groupId>
        <artifactId>dependecy-a</artifactId>
    </dependency>

    <dependency>
        <groupId>com.example</groupId>
        <artifactId>dependency-b</artifactId
        <exclusions>
            <exclude>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
            </exclude>
        </exclusions>
    </dependency>

In the above code, we are depending on two dependencies dependency-a and dependency-b and assume both dependencies pull "lombak" transitively. Because of the code above, dependency-a pulls "lombak" transitively and adds to classpath but dependency-b does not pull "lombak". This is because, we mentioned to <exclude> the "lombak".



Question2:
If it is the case, should I use this approach (adding <excludes> block for the related library) when I use a different version for transitive dependencies e.g. snakeyaml ? Or should I just add the properties as shown below and override the transitive dependency version?
Answer2:
Unrelated question (when we understand the Usage1 and Usage2).

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Getter
  • User mentioned (0): @Setter
  • Low reputation (0.5):
Posted by: PoornaChandra

79090418

Date: 2024-10-15 14:35:43
Score: 3.5
Natty:
Report link

Make New folder for Strapi Then strapi it will work

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

79090412

Date: 2024-10-15 14:34:43
Score: 3
Natty:
Report link

Our team has given up on using selenium-docker for mac and have moved to Browserstack for running our automation tests. We have tried both the ARM images and the regular images with no luck. I feel like the selenium team is not supporting the ARM stuff anymore.

Reasons:
  • Blacklisted phrase (1): no luck
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Constantine

79090409

Date: 2024-10-15 14:34:43
Score: 2.5
Natty:
Report link

If a virus messed up your files, try using Recuva, EaseUS Data Recovery, or Disk Drill to get them back. For decryption, you can attempt Kaspersky RakhniDecryptor or Emsisoft Decryptor, but success depends on the type of ransomware type that attacked you.

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

79090408

Date: 2024-10-15 14:34:43
Score: 1
Natty:
Report link

To get the dictionary you can just use:

dtype.fields.copy()

The list can be created by one of the already mentioned list comprehensions.

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

79090405

Date: 2024-10-15 14:33:43
Score: 5.5
Natty: 5.5
Report link

Any way to detect several QR codes on a single image?

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

79090402

Date: 2024-10-15 14:33:42
Score: 2
Natty:
Report link

you might be trying to write vimscript code in your lua file (init.lua).

Either write following to use vimscript:
vim.cmd('set expandtab')
vim.cmd('set tabstop=4')

or use lua:
vim.opt.tabstop = 4
vim.opt.expandtab = true

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

79090397

Date: 2024-10-15 14:31:42
Score: 3
Natty:
Report link

maybe you can try npx i prisma

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

79090379

Date: 2024-10-15 14:25:41
Score: 0.5
Natty:
Report link

Wanted to share my version of @jcalz solution that satisfied our ESLint extensive rules and my need of readability, hope it might helps:

/**
 * Create an object type that can only have one key from a KeyUnion type with a specific ValueType
 * @see https://stackoverflow.com/a/60873215
 * @example
 * const correctlyTypedArray : ObjectWithOnlyOneKeyFromUnion<"a" | "b", string> = [{a: "works"}, {b: "works too"}];
 */
export type ObjectWithOnlyOneKeyFromUnion<
    KeyUnion extends string | number,
    ValueType,
    KeyUnionCopy extends string | number = KeyUnion,
> =
    // make an object type with one key present
    {
        [Key in KeyUnion]: { [keyName in Key]: ValueType } & {
            // make all other keys from KeyUnion as optional-and-never
            [keyName in Exclude<KeyUnionCopy, Key>]?: never;
        } extends infer ObjectType
            ? //merge all intersections into a single object type for type linter readability purposes
              { [keyName in keyof ObjectType]: ObjectType[keyName] }
            : never;
    }[KeyUnion];
Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @jcalz
Posted by: PaulCo

79090369

Date: 2024-10-15 14:23:40
Score: 1
Natty:
Report link

For Python3.6+:

#!/usr/bin/python3

for i in range(0x0, 0x100):
     s = "\\" + "u" + f"{i:#0{6}x}"[-4:]
     print(s[-2:], end=" = ")
     print(s.encode('utf-8').decode('unicode_escape'))
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: life

79090367

Date: 2024-10-15 14:23:40
Score: 5
Natty: 5
Report link

I don't even get the output when using the hacky way (>). If I run it straight in cmd, > works well, but not inside a process in C#.

Did you solve it in any decent way? Only way I've really seen is using the manifest to run the entire app as admin, but that feels like a bit overkill just to get the output from this process

Reasons:
  • RegEx Blacklisted phrase (3): Did you solve it
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Camilla W

79090366

Date: 2024-10-15 14:22:40
Score: 1.5
Natty:
Report link

Add into logback.xml:

<logger name="io.gatling.graphite.sender.TcpSender" level="TRACE" />
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Nikita Chegodaev

79090357

Date: 2024-10-15 14:21:39
Score: 0.5
Natty:
Report link

WARNING: this is only checking if postgres CLIENT is installed (which can be installed WITHOUT installing the server)

psql --version; 

AI suggested this:

pg_isready 
/var/run/postgresql:5432 - accepting connections

possibly a ubuntu only way is to use absolute path to the binary:

/usr/lib/postgresql/14/bin/postgres --version
postgres (PostgreSQL) 14.13 (Ubuntu 14.13-1.pgdg22.04+1)

/usr/lib/postgresql/12/bin/postgres --version
postgres (PostgreSQL) 12.20 (Ubuntu 12.20-1.pgdg22.04+1)

but it is very bewildering that this is so tricky and that this use case was not documented by postgres developers?

during install a soft link should be put from under /usr/lib/postgresql/14/bin/postgres to /usr/bin

that points to the (lastest?) postgres binary installed, so a simple postgres --version would work and show if postgres SERVER is installed.

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

79090351

Date: 2024-10-15 14:19:39
Score: 1
Natty:
Report link

You can override isRoot in CurrentTenantIdentifierResolver.

@Override
public boolean isRoot(String tenantId) {
    return "IDDQD".equals(tenantId);
}
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: pasquale

79090344

Date: 2024-10-15 14:17:38
Score: 2.5
Natty:
Report link

Can you try DATABASE.TABLE instead of TABLE.DATABASE, thanks.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Whitelisted phrase (-2): Can you try
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): Can you
  • Low reputation (1):
Posted by: stenag

79090332

Date: 2024-10-15 14:16:38
Score: 1.5
Natty:
Report link

This is what ended up working.

var mappingSearchResponse = await _elasticClient.SearchAsync<Dictionary<string, object>>(s => s
.Index(mappingIndexName)
.Query(new Elastic.Clients.Elasticsearch.QueryDsl.MatchAllQuery())

);

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

79090298

Date: 2024-10-15 14:08:36
Score: 3
Natty:
Report link

I have faced same issue on react native version 0.75.2.

Solved the issue by

  1. installing @react-native/gradle-plugin
  2. opening project in android studio
  3. clean project and run for reference check this link
Reasons:
  • Blacklisted phrase (1): this link
  • RegEx Blacklisted phrase (1): check this link
  • Low length (0.5):
  • No code block (0.5):
Posted by: Ali

79090290

Date: 2024-10-15 14:06:35
Score: 4
Natty: 4.5
Report link

https://programingsolution.blogspot.com/p/send-email-pdf-generated-from-html2pdf.html

no need to save file on sever check code in c#

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

79090264

Date: 2024-10-15 13:58:20
Score: 1
Natty:
Report link

I use this code to run a CAN-BUS between a ESP32-S3 and an ESP32 ("classical") with CAN-BUS tranceivers TJA1051 which uses this library https://github.com/handmade0octopus/ESP32-TWAI-CAN/tree/master

        // project remarks:
    // On a ESP32-S3-board with DUAL-USB-C-connector the one that is shown as USB-enhanced SERIAL CH434
    // is the one that used by Serial.

    // MACRO-START * MACRO-START * MACRO-START * MACRO-START * MACRO-START * MACRO-START *
    // a detailed explanation how these macros work is given in this tutorial
    // https://forum.arduino.cc/t/comfortable-serial-debug-output-short-to-write-fixed-text-name-and-content-of-any-variable-code-example/888298

    #define dbg(myFixedText, variableName) \
      Serial.print( F(#myFixedText " "  #variableName"=") ); \
      Serial.println(variableName);

    #define dbgi(myFixedText, variableName,timeInterval) \
      { \
        static unsigned long intervalStartTime; \
        if ( millis() - intervalStartTime >= timeInterval ){ \
          intervalStartTime = millis(); \
          Serial.print( F(#myFixedText " "  #variableName"=") ); \
          Serial.println(variableName); \
        } \
      }

    #define dbgc(myFixedText, variableName) \
      { \
        static long lastState; \
        if ( lastState != variableName ){ \
          Serial.print( F(#myFixedText " "  #variableName" changed from ") ); \
          Serial.print(lastState); \
          Serial.print( F(" to ") ); \
          Serial.println(variableName); \
          lastState = variableName; \
        } \
      }

    #define dbgcf(myFixedText, variableName) \
      { \
        static float lastState; \
        if ( lastState != variableName ){ \
          Serial.print( F(#myFixedText " "  #variableName" changed from ") ); \
          Serial.print(lastState); \
          Serial.print( F(" to ") ); \
          Serial.println(variableName); \
          lastState = variableName; \
        } \
      }
    // MACRO-END * MACRO-END * MACRO-END * MACRO-END * MACRO-END * MACRO-END * MACRO-END *

    /*
      Serial.begin(115200);
      Serial.println("Setup-Start");
      PrintFileNameDateTime();

      BlinkHeartBeatLED(OnBoard_LED,250);
      static unsigned long MyTestTimer;
      if ( TimePeriodIsOver(MyTestTimer,1000) ) {
    */

    #include <ESP32-TWAI-CAN.hpp>

    // Showcasing simple use of ESP32-TWAI-CAN library driver.

    // Default for ESP32
    const byte CAN_TX = 5; // which means connect GPIO-Pin with this number with the Tx-output on the CAN-transeiver
    const byte CAN_RX = 4; // which means connect GPIO-Pin with this number with the Rx-input  on the CAN-transeiver

    CanFrame rxFrame;
    int myCounter;

    unsigned long myLinksBlinkerTimer;
    unsigned long myRechtsBlinkerTimer;

    const byte linksBlinkerPin  = 1;
    const byte rechtsBlinkerPin = 2;
    const byte fahrlichtPin     = 42;

    const byte linksBlinkerBitFilter  = 0b00000001;
    const byte rechtsBlinkerBitFilter = 0b00000010;
    const byte FahrlichtBitFilter     = 0b00000100;

    const byte linksBlinkerBitClear  = ~linksBlinkerBitFilter;
    const byte rechtsBlinkerBitClear = ~rechtsBlinkerBitFilter;
    const byte FahrlichtBitClear     = ~FahrlichtBitFilter;




    const byte onBoard_LED      = 38;
    void setup() {
      digitalWrite(fahrlichtPin,     LOW);
      digitalWrite(linksBlinkerPin,  LOW);
      digitalWrite(rechtsBlinkerPin, LOW);
      pinMode(linksBlinkerPin,  OUTPUT);
      pinMode(rechtsBlinkerPin, OUTPUT);
      pinMode(fahrlichtPin,     OUTPUT);

      Serial.begin(115200);
      Serial.println("Setup-Start");
      PrintFileNameDateTime();
      Serial.println();

      Serial.print("linksBlinkerBitFilter binär:");
      Serial.println(linksBlinkerBitFilter, BIN);

      Serial.print("linksBlinkerBitClear binär:");
      Serial.println(linksBlinkerBitClear, BIN);
      
      // You can set custom size for the queues - those are default
      byte QueueSize = 5;
      ESP32Can.setRxQueueSize(QueueSize);
      ESP32Can.setTxQueueSize(QueueSize);
      Serial.print("ESP32Can.setRxQueueSize(");
      Serial.print(QueueSize);
      Serial.println(")");
      Serial.print("ESP32Can.setTxQueueSize(");
      Serial.print(QueueSize);
      Serial.println(")");

      int CAN_Speed = 500;
      Serial.print("ESP32Can.begin(ESP32Can.convertSpeed(");
      Serial.print(CAN_Speed);
      Serial.print("), CAN_TX=");
      Serial.print(CAN_TX);
      Serial.print(", CAN_RX=");
      Serial.print(CAN_RX);
      Serial.print(", 10, 10) )");
      Serial.println();

      if (ESP32Can.begin(ESP32Can.convertSpeed(CAN_Speed), CAN_TX, CAN_RX, 10, 10) ) {
        Serial.println("CAN bus started successfully!");
      }
      else {
        Serial.println("starting CAN bus failed!");
      }
    }


    void loop() {

      BlinkHeartBeatLED(onBoard_LED, 250);

      static byte links;
      static byte rechts;
      
      static unsigned long MyTestTimer;

      /*
        if ( TimePeriodIsOver(myLinksBlinkerTimer, 400) ) {
          digitalWrite(linksBlinkerPin, !digitalRead(linksBlinkerPin) );
        }

        if ( TimePeriodIsOver(myRechtsBlinkerTimer, 250) ) {
          digitalWrite(rechtsBlinkerPin, !digitalRead(rechtsBlinkerPin) );
        }
      */

      // You can set custom timeout, default is 1000 milliseconds
      if (ESP32Can.readFrame(rxFrame, 100)) {
        // Comment out if too many frames
        Serial.printf("Received frame: %03X  \r\n", rxFrame.identifier);
        if (rxFrame.identifier == 0x7FF) {  // Standard OBD2 frame responce ID
          //dbgc("LR",rxFrame.data[7]);

          // links = rxFrame.data[7] & 0b00000001; // xxy
          links = rxFrame.data[7] & linksBlinkerBitFilter;
          
          dbgc("L",links);
          if ( links == 1) {
            digitalWrite(linksBlinkerPin, HIGH);
            //Serial.println("links HIGH");
          }
          else {
            digitalWrite(linksBlinkerPin, LOW);;
            //Serial.println("links LOW");
          }

          rechts = rxFrame.data[7] & 0b00000010;
          dbgc("R",rechts);
          if (rechts == 0b00000010) {
            digitalWrite(rechtsBlinkerPin, HIGH);
            //Serial.println("rechts HIGH");
          }
          else {
            digitalWrite(rechtsBlinkerPin, LOW);;
            //Serial.println("rechts LOW");
          }
        }
      }


      if ( TimePeriodIsOver(MyTestTimer, 1000) ) {
        myCounter++;
        if (myCounter > 999) {
          myCounter = 0;
        }
        sendCanFrame('A', myCounter);
      }



    }


    void sendCanFrame(uint8_t obdId, int Number) {
      char myDigitBuffer[10] = "         ";
      itoa(Number, myDigitBuffer, 10); // itoa convert integer to ASCII-coded char-array
      CanFrame myDataFrame = { 0 };
      //obdFrame.identifier = 0x7DF; // Default OBD2 address;
      myDataFrame.identifier = 0x7FF;
      myDataFrame.extd = 0;
      myDataFrame.data_length_code = 8;

      myDataFrame.data[0] = myDigitBuffer[0];
      myDataFrame.data[1] = myDigitBuffer[1];
      myDataFrame.data[2] = myDigitBuffer[2];
      myDataFrame.data[3] = 'H';
      myDataFrame.data[4] = 'e';
      myDataFrame.data[5] = 'l';
      myDataFrame.data[6] = 'l';
      myDataFrame.data[7] = 'o';
      // Accepts both pointers and references
      printCanFrame(myDataFrame);
      ESP32Can.writeFrame(myDataFrame);  // timeout defaults to 1 ms
    }


    void printCanFrame(CanFrame p_CAN_Frame) {
      Serial.println("sending CAN-frame");
      Serial.print("identifier=");
      Serial.print(p_CAN_Frame.identifier, HEX);
      Serial.print(" frame length=");
      Serial.print(p_CAN_Frame.data_length_code);
      Serial.print(" data as ASCII-Code#");

      for (byte IdxNr = 0; IdxNr < 8; IdxNr++) {
        Serial.print(char(p_CAN_Frame.data[IdxNr]) );
      }
      Serial.print("#");
      Serial.println();
    }


    // helper-functions
    void PrintFileNameDateTime() {
      Serial.println( F("Code running comes from file ") );
      Serial.println( F(__FILE__) );
      Serial.print( F("  compiled ") );
      Serial.print( F(__DATE__) );
      Serial.print( F(" ") );
      Serial.println( F(__TIME__) );
    }


    // easy to use helper-function for non-blocking timing
    boolean TimePeriodIsOver (unsigned long &startOfPeriod, unsigned long TimePeriod) {
      unsigned long currentMillis  = millis();
      if ( currentMillis - startOfPeriod >= TimePeriod ) {
        // more time than TimePeriod has elapsed since last time if-condition was true
        startOfPeriod = currentMillis; // a new period starts right here so set new starttime
        return true;
      }
      else return false;            // actual TimePeriod is NOT yet over
    }


    void BlinkHeartBeatLED(int IO_Pin, int BlinkPeriod) {
      static unsigned long MyBlinkTimer;
      pinMode(IO_Pin, OUTPUT);

      if ( TimePeriodIsOver(MyBlinkTimer, BlinkPeriod) ) {
        digitalWrite(IO_Pin, !digitalRead(IO_Pin) );
      }
    }

ESP32-code

        // MACRO-START * MACRO-START * MACRO-START * MACRO-START * MACRO-START * MACRO-START *
    // a detailed explanation how these macros work is given in this tutorial
    // https://forum.arduino.cc/t/comfortable-serial-debug-output-short-to-write-fixed-text-name-and-content-of-any-variable-code-example/888298

    #define dbg(myFixedText, variableName) \
      Serial.print( F(#myFixedText " "  #variableName"=") ); \
      Serial.println(variableName);

    #define dbgi(myFixedText, variableName,timeInterval) \
      { \
        static unsigned long intervalStartTime; \
        if ( millis() - intervalStartTime >= timeInterval ){ \
          intervalStartTime = millis(); \
          Serial.print( F(#myFixedText " "  #variableName"=") ); \
          Serial.println(variableName); \
        } \
      }

    #define dbgc(myFixedText, variableName) \
      { \
        static long lastState; \
        if ( lastState != variableName ){ \
          Serial.print( F(#myFixedText " "  #variableName" changed from ") ); \
          Serial.print(lastState); \
          Serial.print( F(" to ") ); \
          Serial.println(variableName); \
          lastState = variableName; \
        } \
      }

    #define dbgcf(myFixedText, variableName) \
      { \
        static float lastState; \
        if ( lastState != variableName ){ \
          Serial.print( F(#myFixedText " "  #variableName" changed from ") ); \
          Serial.print(lastState); \
          Serial.print( F(" to ") ); \
          Serial.println(variableName); \
          lastState = variableName; \
        } \
      }
    // MACRO-END * MACRO-END * MACRO-END * MACRO-END * MACRO-END * MACRO-END * MACRO-END *

    /*
      Serial.begin(115200);
      Serial.println("Setup-Start");
      PrintFileNameDateTime();

      BlinkHeartBeatLED(OnBoard_LED,250);
      static unsigned long MyTestTimer;
      if ( TimePeriodIsOver(MyTestTimer,1000) ) {
    */

    #include <ESP32-TWAI-CAN.hpp>
    #include <SafeString.h>

    // Showcasing simple use of ESP32-TWAI-CAN library driver.

    // Default for ESP32
    const byte CAN_TX = 5; // which means connect GPIO-Pin with this number with the Tx-output on the CAN-transeiver
    const byte CAN_RX = 4; // which means connect GPIO-Pin with this number with the Rx-input  on the CAN-transeiver

    CanFrame rxFrame;
    int myCounter;

    cSF(rxData_SS, 16);

    unsigned long myLinksBlinkerTimer;
    unsigned long myRechtsBlinkerTimer;
    boolean linksBlinkerAn  = false;
    boolean rechtsBlinkerAn = false;

    const byte linksBlinkerBitFilter  = 0b00000001;
    const byte rechtsBlinkerBitFilter = 0b00000010;
    const byte FahrlichtBitFilter     = 0b00000100;

    const byte linksBlinkerBitClear  = ~linksBlinkerBitFilter;
    const byte rechtsBlinkerBitClear = ~rechtsBlinkerBitFilter;
    const byte FahrlichtBitClear     = ~FahrlichtBitFilter;

    const byte linksBlinkerPin   = 26;
    const byte rechtssBlinkerPin = 27;

    const byte switchedOn  = LOW;
    const byte switchedOff = HIGH;



    void setup() {
      Serial.begin(115200);
      Serial.println("Setup-Start");
      PrintFileNameDateTime();
      Serial.println();

      pinMode(linksBlinkerPin, INPUT_PULLUP);
      pinMode(rechtssBlinkerPin, INPUT_PULLUP);

      // You can set custom size for the queues - those are default
      byte QueueSize = 5;
      ESP32Can.setRxQueueSize(QueueSize);
      ESP32Can.setTxQueueSize(QueueSize);
      Serial.print("ESP32Can.setRxQueueSize(");
      Serial.print(QueueSize);
      Serial.println(")");
      Serial.print("ESP32Can.setTxQueueSize(");
      Serial.print(QueueSize);
      Serial.println(")");

      int CAN_Speed = 500;
      Serial.print("ESP32Can.begin(ESP32Can.convertSpeed(");
      Serial.print(CAN_Speed);
      Serial.print("), CAN_TX=");
      Serial.print(CAN_TX);
      Serial.print(", CAN_RX=");
      Serial.print(CAN_RX);
      Serial.print(", 10, 10) )");
      Serial.println();

      if (ESP32Can.begin(ESP32Can.convertSpeed(CAN_Speed), CAN_TX, CAN_RX, 10, 10) ) {
        Serial.println("CAN bus started successfully!");
      }
      else {
        Serial.println("starting CAN bus failed!");
      }
      dbg("IO", digitalRead(linksBlinkerPin) );
      dbg("IO", digitalRead(rechtssBlinkerPin) );

    }


    void loop() {
      static unsigned long MyTestTimer;

      dbgc("IO", digitalRead(linksBlinkerPin) );
      dbgc("IO", digitalRead(rechtssBlinkerPin) );

      if ( TimePeriodIsOver(myLinksBlinkerTimer, 1000) ) {
        linksBlinkerAn  = !linksBlinkerAn;
      }


      if ( TimePeriodIsOver(myRechtsBlinkerTimer, 250) ) {
        //rechtsBlinkerAn = !rechtsBlinkerAn;
      }


      if ( TimePeriodIsOver(MyTestTimer, 50) ) {
        //myCounter++;
        if (myCounter > 999) {
          myCounter = 0;
        }
        //sendCanFrame('A', myCounter);
      }

      // You can set custom timeout, default is 1000 milliseconds
      if (ESP32Can.readFrame(rxFrame, 100)) {
        // Comment out if too many frames
        //Serial.printf("Received frame: %03X  \r\n", rxFrame.identifier);
        if (rxFrame.identifier == 0x7FF) {  // Standard OBD2 frame responce ID
          rxData_SS = "";

          for (byte i = 0; i < 8; i++) {
            rxData_SS += char( rxFrame.data[i] );
          }
          Serial.println(rxData_SS);
        }
      }
    }


    void sendCanFrame(uint8_t obdId, int Number) {
      char myDigitBuffer[10] = "         ";
      itoa(Number, myDigitBuffer, 10); // itoa convert integer to ASCII-coded char-array
      CanFrame myDataFrame = { 0 };
      //obdFrame.identifier = 0x7DF; // Default OBD2 address;
      myDataFrame.identifier = 0x7FF;
      myDataFrame.extd = 0;
      myDataFrame.data_length_code = 8;

      myDataFrame.data[0] = myDigitBuffer[0];
      myDataFrame.data[1] = myDigitBuffer[1];
      myDataFrame.data[2] = myDigitBuffer[2];
      myDataFrame.data[3] = 'H';
      myDataFrame.data[4] = 'e';
      myDataFrame.data[5] = 'l';
      myDataFrame.data[6] = 'l';

      if (linksBlinkerAn) {
        //myDataFrame.data[7] = myDataFrame.data[7] | 0b00000001;
        myDataFrame.data[7] = myDataFrame.data[7] | linksBlinkerBitFilter;
      }
      else {
        myDataFrame.data[7] = myDataFrame.data[7] & linksBlinkerBitClear; // xxy
      }

      if (rechtsBlinkerAn) {
        myDataFrame.data[7] = myDataFrame.data[7] | rechtsBlinkerBitFilter;
      }
      else {
        myDataFrame.data[7] = myDataFrame.data[7] & rechtsBlinkerBitClear;
      }

      dbgc("LR", myDataFrame.data[7]);

      //myDataFrame.data[7] = 'o';
      // Accepts both pointers and references
      printCanFrame(myDataFrame);
      ESP32Can.writeFrame(myDataFrame);  // timeout defaults to 1 ms
    }


    void printCanFrame(CanFrame p_CAN_Frame) {
      Serial.println("sending CAN-frame");
      Serial.print("identifier=");
      Serial.print(p_CAN_Frame.identifier, HEX);
      Serial.print(" frame length=");
      Serial.print(p_CAN_Frame.data_length_code);
      Serial.print(" data as ASCII-Code#");

      for (byte IdxNr = 0; IdxNr < 8; IdxNr++) {
        Serial.print(char(p_CAN_Frame.data[IdxNr]) );
      }
      Serial.print("#");
      Serial.println();
    }


    // helper-functions
    void PrintFileNameDateTime() {
      Serial.println( F("Code running comes from file ") );
      Serial.println( F(__FILE__) );
      Serial.print( F("  compiled ") );
      Serial.print( F(__DATE__) );
      Serial.print( F(" ") );
      Serial.println( F(__TIME__) );
    }


    // easy to use helper-function for non-blocking timing
    boolean TimePeriodIsOver (unsigned long &startOfPeriod, unsigned long TimePeriod) {
      unsigned long currentMillis  = millis();
      if ( currentMillis - startOfPeriod >= TimePeriod ) {
        // more time than TimePeriod has elapsed since last time if-condition was true
        startOfPeriod = currentMillis; // a new period starts right here so set new starttime
        return true;
      }
      else return false;            // actual TimePeriod is NOT yet over
    }


    void BlinkHeartBeatLED(int IO_Pin, int BlinkPeriod) {
      static unsigned long MyBlinkTimer;
      pinMode(IO_Pin, OUTPUT);

      if ( TimePeriodIsOver(MyBlinkTimer, BlinkPeriod) ) {
        digitalWrite(IO_Pin, !digitalRead(IO_Pin) );
      }
    }
Reasons:
  • Blacklisted phrase (1): this tutorial
  • Long answer (-1):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user27814533

79090260

Date: 2024-10-15 13:57:19
Score: 1
Natty:
Report link

I have something like this in my Items model

public function orders()
    {
        return $this->belongsToMany(Items::class, 'item_orders', 'item_id', 'order_id')
            ->wherePivotNull('deleted_at'); // It is necessary to remove softdeletes in belongsToMany
    }
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Matias Pereira

79090255

Date: 2024-10-15 13:54:19
Score: 3
Natty:
Report link

About after 3 months asking apple for help, I discovery that problem was a blank space in review form camp of (Test Information).

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

79090252

Date: 2024-10-15 13:53:18
Score: 2.5
Natty:
Report link

Fix provided by @jhole (use the database name directly, e.g. without --variable stuff):

Change:

PGPASSFILE=/root/.pgpass psql --username=myuser --host=myserver.local --port=5432 --variable database_name=mydb

to:

PGPASSFILE=/root/.pgpass psql --username=myuser --host=myserver.local --port=5432 -mydb
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @jhole
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: rmf

79090236

Date: 2024-10-15 13:47:16
Score: 4.5
Natty:
Report link

You can change the secret, I guess

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

79090232

Date: 2024-10-15 13:46:16
Score: 0.5
Natty:
Report link

If it is reporting the error SSLV3_ALERT_HANDSHAKE_FAILURE, perhaps it has something to do with the site not supporting TLSv1.3.

As you mentioned you upgraded the Python version from 3.8 to 3.11, perhaps you also upgraded urllib3 from 1.x to 2.x.

You can check the urllib3 version with the following command.

pip show urllib3

In the 2.x version of urllib3, the version of OpenSSL is required to be above 1.1.1 (reference), and the 1.1.1 version of OpenSSL supports the use of TLSv1.3 to establish connections to websites.

It seems that if the site you are visiting does not support TLSv1.3, it reports the error SSLV3_ALERT_HANDSHAKE_FAILURE.

I found a workaround online, but it didn't seem to work very well.

So I considered downgrading the version of urllib3 to 1.26.20. The code is as follows

pip uninstall urllib3
pip install urllib3==1.26.20

Then I accessed the website using requests and it seemed to work just fine to me.

This actually drops the more secure TLSv1.3, which is not perfect, but after all, we can't make that site support TLSv1.3 :(

Reasons:
  • Blacklisted phrase (1): :(
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ENTNEAZ

79090224

Date: 2024-10-15 13:45:15
Score: 0.5
Natty:
Report link

Yes, you can achieve this by creating a dummy module that has contacts and hr as dependencies. Here's how to do it:

Create a new module, let's call it Wrapper. In the _ _ manifest _ _.py file of Wrapper, set contacts and hr as dependencies like this:

{
    'name': 'Module Wrapper',
    'version': '1.0',
    'summary': 'Wrapper module that installs Contacts and HR',
    'depends': ['contacts', 'hr'],  # Specify dependencies here
    'data': [],
    'installable': True,
    'auto_install': False,
}

This module doesn’t need to contain any functionality or models itself. When you install Wrapper, Odoo will automatically install the contacts and hr modules because they are listed in the depends field.

Why is this useful?

Time Saver: Instead of manually installing both contacts and hr each time, you can just install Wrapper.

Testing Convenience: If you have test cases or workflows involving contacts and hr, testing module Wrapper ensures that both modules and their respective test cases are also loaded.

Reasons:
  • RegEx Blacklisted phrase (0.5): Why is this
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Alesis Joan

79090213

Date: 2024-10-15 13:42:15
Score: 2
Natty:
Report link

Here’s how you can implement the features:

Use react-native-maps to show a map.

npx expo install react-native-maps

Display a map with markers (you can custom markers check the doc):

import MapView, { Marker } from "react-native-maps";

const MyMap = () => {
  const markers = [
    { id: 1, latitude: 48.8564449, longitude: 2.4002913, title: "Location" }
  ];

  return (
    <MapView
      style={{ flex: 1 }}
      initialRegion={{
        latitude: 48.856614,
        longitude: 2.3522219,
        latitudeDelta: 0.2,
        longitudeDelta: 0.2
      }}
      showsUserLocation={true}
    >
      {markers.map(marker => (
        <Marker
          key={marker.id}
          coordinate={{ latitude: marker.latitude, longitude: marker.longitude }}
          title={marker.title}
        />
      ))}
    </MapView>
  );
};

Use expo-location to retrieve the user's current location:

npx expo install expo-location

import React, { useEffect, useState } from "react";
import { Text, View } from "react-native";
import * as Location from "expo-location";

const GetUserLocation = () => {
  const [coords, setCoords] = useState(null);
  const [error, setError] = useState(null);

  useEffect(() => {
    const askPermission = async () => {
      const { status } = await Location.requestForegroundPermissionsAsync();
      if (status === "granted") {
        const location = await Location.getCurrentPositionAsync();
        setCoords(location.coords);
      } else {
        setError("Permission denied");
      }
    };

    askPermission();
  }, []);

  return (
    <View>
      {error ? <Text>{error}</Text> : <Text>User Location: {coords ? `${coords.latitude}, ${coords.longitude}` : "Loading..."}</Text>}
    </View>
  );
};

To open a native maps app for location selection, check out the react-native-map-link library, and for calculating distances the geolib library.

I hope my help was useful to you! Please let me know if it helped.

Reasons:
  • RegEx Blacklisted phrase (2.5): Please let me know
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Tomsko

79090207

Date: 2024-10-15 13:42:15
Score: 2
Natty:
Report link

Step-1 Create a Flutter Project Step-2 Open Terminal Step-3 Step by step all commands to upload project remotely. → 1. git init → 2. git add . → 3. git commit -m "description" → 4. git branch -M branchName → 5. git remote add origin repoUrl → 6. git push -u origin branchName

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

79090206

Date: 2024-10-15 13:42:15
Score: 3
Natty:
Report link

In my case, it all solved after I wrapped all plugins in the root .pom file in pluginManagement tag.

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

79090198

Date: 2024-10-15 13:40:14
Score: 2.5
Natty:
Report link

Don't have enough reputation to comment, so posting instead. In Python 3.10.12 doing

from collections import Counter

a = [1, 0, 1, 0]
s = sorted(a, key=Counter(a).get, reverse=True)
print(Counter(a).most_common())
print(a)
print(s)

gives

[(1, 2), (0, 2)]
[1, 0, 1, 0]
[1, 0, 1, 0]

So using sorted/sort might not give the expected results (I would have expected [0,0,1,1] or [1,1,0,0]). You might want to use another method of sorting for this use case. Doing

from collections import Counter

a = [1, 0, 1, 0]
d = [item for items, c in Counter(a).most_common() for item in [items] * c]
print(a)
print(d)

gives

[1, 0, 1, 0]
[1, 1, 0, 0]

You might need to sort again if the ordering of the sorted list is important.

Reasons:
  • Blacklisted phrase (1): to comment
  • RegEx Blacklisted phrase (1.5): Don't have enough reputation to comment
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: m-julian

79090190

Date: 2024-10-15 13:38:13
Score: 1.5
Natty:
Report link

Some years ago we built an easy-to-use solution for CDC from Oracle to Kafka. Based on DB triggers which is often considered old fashioned and problematic. But completely encapsulated and capable of billions of events per day.

Works as designed. https://github.com/osp-ottogroup/movex-cdc

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

79090187

Date: 2024-10-15 13:37:13
Score: 1
Natty:
Report link

You can also use:

 layout: {
    bottomStart: {
        buttons: ['copy', 'csv', 'excel', 'pdf', 'print']
    }
},
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: user1544428

79090181

Date: 2024-10-15 13:35:12
Score: 2.5
Natty:
Report link

There is no react 1.5.2..... check https://react.dev/versions. Also its good practice to do a course with any version because in the industry you need to support a lot of legacy code.I suggest get your hands around docker. You wont have to worry about versions any more.

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

79090177

Date: 2024-10-15 13:34:12
Score: 1.5
Natty:
Report link

if you have to fight with large tables only the practice will let you know the best way to deal with "deadlocks"..especially in a dynamic environment. A good way for me it could be to wrap the query into a possible retry loop while checking the status of the query like here

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

79090176

Date: 2024-10-15 13:34:12
Score: 0.5
Natty:
Report link

I think the problem is that this line

curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);

must be changed to

curl_easy_setopt(curl, CURLOPT_POSTFIELDS, json_string);

And don't forget to release the allocated data. Good luck!

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

79090175

Date: 2024-10-15 13:34:12
Score: 1
Natty:
Report link

This error arises because certain Python packages require Rust and Cargo for compiling native extensions. These are usually low-level libraries that involve performance-critical tasks or cryptography, and they use Rust as part of their build process. One of the dependencies in the Jupyter Notebook installation process relies on a package written in Rust.

Resolving this issue:

The best way to tackle this issue is to download Anaconda or Miniconda from anaconda/download. Anaconda comes with Jupyter pre-installed and hence avoids the Rust dependency issue.

Note: I also once came across a solution which says that we can resolve this error by installing rust and cargo (package manager of rust) from rust-lang/tools/install which also installs cargo by-default. Even after trying this, I got the same error again. So I do not recommend this method.

Hope this is helpful.

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

79090165

Date: 2024-10-15 13:30:11
Score: 8.5 🚩
Natty:
Report link

Can you show what happening in viewModel.getAllVideoFiles()?

Reasons:
  • RegEx Blacklisted phrase (2.5): Can you show what
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Starts with a question (0.5): Can you
  • Low reputation (1):
Posted by: Wraith007

79090163

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

I was having this exact problem while using Ionic with Capacitor to run the livereload version of the app (debug). The issue arose when I upgraded Android Studio from Giraffe to Ladybug.

I tried most of the things in the other answers but couldn't make it work.

Then I just compiled the app for a standard build (apk) instead of the livereload project and that way actually worked.

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

79090156

Date: 2024-10-15 13:29:10
Score: 1.5
Natty:
Report link

I can't see how you determine the worst case of 37 for shellsort where n = 10. What I mean is what set of gaps did you use and are they the best set for n = 10?

I have found that the best set of gaps where n = 10 produces a worst case of 35 comparisons - which is why I ask.

But perhaps the original question wasn't concerned with the best set of gaps, maybe any set was ok to use?

Reasons:
  • No code block (0.5):
  • Ends in question mark (2):
  • High reputation (-1):
Posted by: Olof Forshell

79090149

Date: 2024-10-15 13:28:10
Score: 0.5
Natty:
Report link

The problem was on getStaticPaths function, instead of passing the id, I passed the object

export async function getStaticPaths() { 
   const productsIds = await prisma.product.findMany(); 
   return {
      paths: productsIds.map((id) => ({
      params: { id: id.toString() },
    })),
fallback: true, // false or "blocking"
};

The correction:

export async function getStaticPaths() {
const productsIds = await prisma.product.findMany({
    select: {id: true},
  });

  return {
    paths: productsIds.map((product) => ({
      params: { id: product.id.toString() },
    })),
    fallback: 'blocking', // false or "blocking"
  };
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Lucas Chini

79090145

Date: 2024-10-15 13:27:09
Score: 3
Natty:
Report link

I haven't worked a lot with Nifi - but the default port for Nifi is 8443! Try opening http://localhost:8443/nifi

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

79090138

Date: 2024-10-15 13:25:09
Score: 0.5
Natty:
Report link

I was struggling with this error for 3 days and tried everything I could find online. I finally managed to fix it by moving the SDK import, which was originally inside an Objective-C condition, to a different location.

Before

` #ifdef FB_SONARKIT_ENABLED #import <FlipperKit/FlipperClient.h> #import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h> #import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h> #import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h> #import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h> #import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>

// Meta SDK #import <FBSDKCoreKit/FBSDKCoreKit-Swift.h> #import <AuthenticationServices/AuthenticationServices.h> #import <SafariServices/SafariServices.h>

static void InitializeFlipper(UIApplication *application) { FlipperClient *client = [FlipperClient sharedClient]; SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; [client addPlugin:[FlipperKitReactPlugin new]]; [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; [client start]; } #endif `

After

` // Meta SDK #import <FBSDKCoreKit/FBSDKCoreKit-Swift.h> #import <AuthenticationServices/AuthenticationServices.h> #import <SafariServices/SafariServices.h>

#ifdef FB_SONARKIT_ENABLED #import <FlipperKit/FlipperClient.h> #import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h> #import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h> #import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h> #import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h> #import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>

static void InitializeFlipper(UIApplication *application) { FlipperClient *client = [FlipperClient sharedClient]; SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; [client addPlugin:[FlipperKitReactPlugin new]]; [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; [client start]; } #endif `

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

79090130

Date: 2024-10-15 13:23:08
Score: 1
Natty:
Report link

Use the key, value;

var o = {a:1, b:2}
var s = "";
for (r in o) {
    s += r + ":" + o[r] + ";";
}

Result: s = a:1;b:2;

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

79090127

Date: 2024-10-15 13:22:08
Score: 0.5
Natty:
Report link

I got this error in Scala 3 when using the extension syntax inside a trait. The classes extending that trait cannot be mocked. Changing the syntax to the good old implicit class fixed the issue.

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

79090126

Date: 2024-10-15 13:22:06
Score: 6.5 🚩
Natty:
Report link

it's two months later. Did you ever find a fix to your issue?

ETIMEDOUT is often a network error, so this might happen if your network is terrible. There's a likelihood it went away on its own, but if not, using things like a VPN, or unstable internet may cause that. you could check your internet connection by pinging a site if you're unsure.

Reasons:
  • RegEx Blacklisted phrase (3): Did you ever find a fix to your
  • RegEx Blacklisted phrase (1.5): fix to your issue?
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: holiday

79090118

Date: 2024-10-15 13:20:05
Score: 5.5
Natty:
Report link

I am new on Ckan. I am trying to search the 100 records of a given dataset unfortunately unable to achieve it.

Here is my code and url: https://catalog.data.gov/api/3/action/ and dataset: crime-data-from-2020-to-present. Help me please

        string baseUri = dataPortal.GetUrlBasedOnPortalType();
        
        var client1 = new RestClient(baseUri);
        var request1 = new RestRequest($"datastore_search?resource_id=4dcec0c7-7cee-4ff6-ac83-7d92b39b3f69&limit={limit}", Method.Get);

        var response1 = client1.ExecuteAsync(request1).Result;
        var content1 = response1.Content;
Reasons:
  • Blacklisted phrase (1): Help me
  • Blacklisted phrase (1): I am trying to
  • RegEx Blacklisted phrase (2): Help me please
  • RegEx Blacklisted phrase (1.5): I am new
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user16008954

79090112

Date: 2024-10-15 13:19:05
Score: 0.5
Natty:
Report link

You want the session to refresh automatically on the frontend after updating the userType in the database. The problem is that the navbar doesn't update until the user logs out and logs back in.

In your backend code, the session callback is updating the session correctly when the user logs in (after token creation), so no issues here.

On the frontend side, you tried refreshing the session manually on the client side using useSession() with update() to fetch the updated session after changing the userType and therefore updite the UI immediately. This is a good approach, and the issue you had was likely not calling update() after the database change or not handling the update correctly.

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

79090106

Date: 2024-10-15 13:17:04
Score: 2.5
Natty:
Report link

A slightly modified version from Herlandro Hermogenes answer (https://stackoverflow.com/a/79067945/27700804)

def download_blob_rate_limited(blob, dest_file, rate_limit=512*1024, freq=10):

    chunk_size = int(rate_limit/freq)
    
    with open(dest_file, 'wb') as file_obj:
        start = 0
        blob_size = blob.size
        while start < blob_size:
            end = min(start + chunk_size, blob_size)
            chunk = blob.download_as_bytes(start=start, end=end)
            file_obj.write(chunk)
            time.sleep(1/freq)
            start = end + 1

I find it easier to specify how many times per second I want to download chunks (and thus on what frequency I want to enforce the rate limit) rather than figuring out the chunk size to achieve that.

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Theo

79090104

Date: 2024-10-15 13:16:04
Score: 2.5
Natty:
Report link

You don't want to put your database calls in the Shared project. The goal of the Maui app is to allow a user to download the application onto their device and run it (we call this the client app). It is not good security practice to call a database directly from a client app. Instead, the Maui app should call an API in the Web app to obtain any data.

So in this case, put the EF related items in your Web project. You can move your models to the Shared Project; however, it is also best practice to leave them in the Web app. Then create POCO versions of the classes in the Shared Project. The POCO versions don't have navigations and remove any fields you don't want the client to know about. The POCO versions could also use data annotations for field form validations. Then use the POCO versions for the Web and Maui UI side.

BTW, as this new template just came out. I am trying to get ASP.NET Core Identity to work with it. After a day, no luck so far. Hopefully someone will put up a tutorial soon.

Hope this helped?

Reasons:
  • Blacklisted phrase (1): I am trying to
  • Blacklisted phrase (1): no luck
  • Whitelisted phrase (-1): Hope this help
  • Long answer (-1):
  • No code block (0.5):
  • Ends in question mark (2):
Posted by: Scott Peal

79090102

Date: 2024-10-15 13:16:04
Score: 1
Natty:
Report link

Use the browser extension Add custom search engine by Tom Schuster. After installing it, simply perform a search query on the website you want to add to the list of browser search engines, copy the resulting path, paste it into the "Search URL" field of the extension interface, replace the keyword you used with %s, add your preferred engine name and a link to the icon (if it was not determined automatically or you do not like it), and click the "Add custom search engine" button.

NB. Due to a technical limitation with Firefox WebExtensions, all data entered when creating your custom search engine is uploaded to paste.mozilla.org. After adding the search engine the data should be automatically removed.

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

79090086

Date: 2024-10-15 13:10:02
Score: 0.5
Natty:
Report link

Nice it works If y are using powershell and ms graph api (google howto toke works)

$headers = @{ 
 "Authorization" = "Bearer $token" 
 "ConsistencyLevel" = "eventual"
} 


# API Endpoint 

$uri = "https://graph.microsoft.com/v1.0/users?`$count=true&`$select=displayName,id,department,jobtitle,extensions&`$filter=(onPremisesExtensionAttributes/extensionAttribute1 eq 'VALUE')"


# Make the API call 
try {
$response = Invoke-RestMethod -Uri $uri -Headers $headers -Method Get 

} catch {
Write-Host "Some Error";
Write-Host "StatusCode:" $_.Exception.Response.StatusCode.value__ 
Write-Host "StatusDescription:" $_.Exception.Response.StatusDescription
Continue
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user27813637

79090085

Date: 2024-10-15 13:10:02
Score: 2.5
Natty:
Report link

You also need to ensure that Logic App Workflow is stateful, as Stateless workflow limit has 100 items, by default. Reference - https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-limits-and-config?tabs=consumption

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

79090081

Date: 2024-10-15 13:09:02
Score: 0.5
Natty:
Report link

The main concept we need to understand here is how Vercel AI and LangChain handles the messages. While AI SDK understands Message from ai package, LangChain deals with subtypes of BaseMessage from @langchain/core/messages package.

The trick to solving this issue was to translate the message between these two formats.

//src/api/chat/+server.ts
import { LangChainAdapter } from 'ai';
import type { Message } from 'ai/svelte';
import { Workflow } from '$lib/server/graph/workflow';
import { convertLangChainMessageToVercelMessage, convertVercelMessageToLangChainMessage } from '$lib/utils/utility';

export const POST = async ({ request, params }) => {
    const config = { configurable: { thread_id: params.id}, version: "v2" };
    const messages: { messages: Message[] } = await request.json();
    const userQuery = messages.messages[messages.messages.length - 1].content;
    
    let history = (messages.messages ?? [])
    .slice(0, -1)
    .filter(
        (message: Message) =>
            message.role === 'user' || message.role === 'assistant'
    )
    .map(convertVercelMessageToLangChainMessage);
    
    let compiledStateGraph = Workflow.getCompiledStateGraph();
    const stream = await compiledStateGraph.streamEvents({question: userQuery,  messages: history}, config);
    const transformStream = new ReadableStream({
        async start(controller) {
            for await (const { event, data, tags } of stream) {
                if (event === 'on_chat_model_stream') {
                    if (!!data.chunk.content  && tags.includes("llm_inference")) {
                        const aiMessage = convertLangChainMessageToVercelMessage(data.chunk);
                        controller.enqueue(aiMessage);
                    }
                }
            }
            controller.close();
        }
    });
    return LangChainAdapter.toDataStreamResponse(transformStream);
};

Before we invoke the graph flow, I am extracting the current user query from the message array of useChat() and then converting the rest of the messages to langchain understandable format using convertVercelMessageToLangChainMessage function. Similarly once i receive the AIMesssageChunks from LangChain streams, I am converting them back to vercel ai understandable format using convertLangChainMessageToVercelMessage function before returning the stream back for useChat() to handle the new messages.

import type { Message } from 'ai/svelte';
import { AIMessage, BaseMessage, ChatMessage, HumanMessage } from '@langchain/core/messages';

/**
 * Converts a Vercel message to a LangChain message.
 * @param message - The message to convert.
 * @returns The converted LangChain message.
 */
export const convertVercelMessageToLangChainMessage = (message: Message): BaseMessage => {
  switch (message.role) {
    case 'user':
      return new HumanMessage({ content: message.content });
    case 'assistant':
      return new AIMessage({ content: message.content });
    default:
      return new ChatMessage({ content: message.content, role: message.role });
  }
};

/**
 * Converts a LangChain message to a Vercel message.
 * @param message - The message to convert.
 * @returns The converted Vercel message.
 */
export const convertLangChainMessageToVercelMessage = (message: BaseMessage) => {
  switch (message.getType()) {
    case 'human':
      return { content: message.content, role: 'user' };
    case 'ai':
      return {
        content: message.content,
        role: 'assistant',
        tool_calls: (message as AIMessage).tool_calls
      };
    default:
      return { content: message.content, role: message._getType() };
  }
};

Also notice if (!!data.chunk.content && tags.includes("llm_inference")) this is how we can filter the last generation. As during the last node execution of graph we can tag the LLM with configs(tags) which we can later use to get the result of that node's execution.

export const llmInference = async (state: typeof GraphState.State) => {
    console.log("---LLM Inference---");
    
    const PROMPT_TEMPLATE = 'You are a helpful assistant! Please answer the user query. Use the chat history to provide context.';
    
    const prompt = ChatPromptTemplate.fromMessages([
        ['system', PROMPT_TEMPLATE],
        ['human', "{question}"],
        ['human', "Chat History: {messages}"],
    ]);
    
    const inferenceChain = prompt.pipe(LLMClient.getClient().withConfig({ tags: ["llm_inference"]}));
    const generation = await inferenceChain.invoke(state);
    return { messages: [generation] };
};
Reasons:
  • RegEx Blacklisted phrase (2.5): Please answer
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: SparkOn

79090079

Date: 2024-10-15 13:09:00
Score: 6.5 🚩
Natty:
Report link

I reccommend you to check these 2 articles:

Reasons:
  • Blacklisted phrase (1): ¿
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Santiago Ortiz Ceballos

79090071

Date: 2024-10-15 13:06:00
Score: 2
Natty:
Report link

Thank you, @gafi, for your response!

If anyone is still looking for the answer, you can visit the Facebook docs for information on sending a flow to a user. There, you can see where to include the flow_token.

You can put your flow_id in the flow token, and you'll receive the flow_id in the response as flow_token. This way, you can check which flow the response corresponds to.

It works for me!

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Whitelisted phrase (-1): works for me
  • No code block (0.5):
  • User mentioned (1): @gafi
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Anshu Meena

79090067

Date: 2024-10-15 13:05:59
Score: 4
Natty:
Report link

nowadays it is fb://profile/{page_id}

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Has no white space (0.5):
  • Low reputation (1):
Posted by: Michael Weber Schmidt

79090051

Date: 2024-10-15 13:01:58
Score: 1
Natty:
Report link

Change the input type to text and use this schema for that field validation

But the downfall is the user can provide negative number.

const schema = z.object({
  numberField: z.string().refine((value) => /^\d*$/.test(value), {
    message: 'Must be a valid positive number',
  }),
});
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Shrey Vadaliya

79090049

Date: 2024-10-15 13:00:58
Score: 1
Natty:
Report link

The "redirect_uri_mismatch" error in Google OAuth occurs when the redirect URI sent in the authentication request doesn’t match any of the authorized URIs registered for your OAuth client in the Google Cloud Console. This typically happens during the OAuth authentication process if the URL that Google is trying to redirect users to is not listed in the allowed redirect URIs for the project.

This post goes into more detail.

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

79090048

Date: 2024-10-15 13:00:58
Score: 0.5
Natty:
Report link

For anyone reading this in 2024 or later: GoldRaccoon will no longer work for uploading any file over FTP! After you configure it, the upload will not work, and the runtime debug log will greet you with this message: "FTP is deprecated for URLSession and related APIs. Please adopt modern secure networking protocols such as HTTPS"

The solution is to move to SFTP, e.g. using this fresh library: https://github.com/mplpl/mft

Wish you all the luck!

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

79090044

Date: 2024-10-15 12:59:57
Score: 2
Natty:
Report link

I opened the DB3 in DB Browser for SQLite, and deleted a table. That created the journal file. I opened the journal file in a text editor and highlighted some characters and replaced it with random keystrokes and saved it. I went back to the open DB3 file and reverted the change. The next time I opened the DB3 file, I got the malformed popup.

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

79090039

Date: 2024-10-15 12:59:57
Score: 3
Natty:
Report link

The should be higher than other scripts

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Amir Nazari

79090036

Date: 2024-10-15 12:58:57
Score: 3
Natty:
Report link

Why is there not an option in both:

  1. https://docs.ansible.com/ansible/devel//collections/community/general/remove_keys_filter.html
  2. https://docs.ansible.com/ansible/latest/collections/ansible/utils/remove_keys_filter.html

To specify that I wish to remove keys recursively or not, it is such a trivial thing imho that should be part of these modules. Also the same should apply to keep_keys which in a partner of these modules.

A little bit frustrated at ansible...

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • No code block (0.5):
  • Starts with a question (0.5): Why is the
  • Low reputation (0.5):
Posted by: Taavi Ansper

79090034

Date: 2024-10-15 12:57:57
Score: 4.5
Natty:
Report link

I am added ‘Connection’ header and set value to ‘keep-alive’ then worked like a charm. But only in HttpClient. RestSharp/Flurl not working.

Reasons:
  • Blacklisted phrase (1): worked like a charm
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: cudev

79090029

Date: 2024-10-15 12:57:57
Score: 0.5
Natty:
Report link

Can also generate them by using some simple regex.

function generateUUID() {
  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
    const r = Math.random() * 16 | 0;
    const v = c === 'x' ? r : (r & 0x3 | 0x8);
    return v.toString(16);
  });
}

console.log(generateUUID());

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): Can also
Posted by: mrconcerned

79090014

Date: 2024-10-15 12:53:55
Score: 1.5
Natty:
Report link

It may be way easier to try to change DB settings (and possibly update): MAX_STRING_SIZE = EXTENDED will allow way more characters (32k). See https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Data-Types.html#GUID-7B72E154-677A-4342-A1EA-C74C1EA928E6

If that is not an option, as pointed in another answer, Java uses UTF-16, you are storing UTF-8 it seems. Use some function to transfer between charsets (sorry, can't help on that part) and then partition. I would not go that low unless absolutely needed.

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

79090009

Date: 2024-10-15 12:52:55
Score: 1
Natty:
Report link

Havent found an official documentation but as the font-sizes are set in "rem" you can just set the font-size of your root element:

:root {
    font-size: 24px;
}
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: LorisBachert

79089996

Date: 2024-10-15 12:49:54
Score: 4.5
Natty:
Report link

is it possible to construct like http address in pom.xml properties? eg:

<properties>
  <app_url>https://${app_name}.${domain_name}</app_url>
</properties>
Reasons:
  • Blacklisted phrase (1): is it possible to
  • Low length (1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): is it
  • Low reputation (0.5):
Posted by: Ravi

79089994

Date: 2024-10-15 12:49:54
Score: 0.5
Natty:
Report link

This can happen if you have the readline library installed but cmake is linking the wrong one.

I had this error recently, and I found that the cmake was linking a different readline installed with anaconda3 rather than the one installed directly via brew. Removing anaconda fixed the issue.

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

79089993

Date: 2024-10-15 12:48:53
Score: 7.5 🚩
Natty: 5.5
Report link

Can you give a try to this project https://github.com/skntbcn/mysql.migrator

Reasons:
  • RegEx Blacklisted phrase (2.5): Can you give
  • Probably link only (1):
  • Low length (2):
  • No code block (0.5):
  • Starts with a question (0.5): Can you give a
  • Low reputation (1):
Posted by: Carlos Calvo Rivas

79089992

Date: 2024-10-15 12:47:52
Score: 0.5
Natty:
Report link

I have identified the issue, which can be resolved by comparing the versions. You are currently using a version greater than 3, which requires the use of a lowercase 's' in Fieldset instead of FieldSet:

https://filamentphp.com/docs/3.x/forms/layout/fieldset
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Nilesh

79089989

Date: 2024-10-15 12:47:52
Score: 2.5
Natty:
Report link

i know that you wrote that tried css, but this must work if you have an css custom for the rmarkdown doc:

.main img { max-width: 36%; #ajust for your please height: auto; }

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Guilherme Brückmann

79089980

Date: 2024-10-15 12:45:51
Score: 1
Natty:
Report link

I had a slightly similar question which I tested out.

My conclusion: nullable and optional fileds are the same.

I thought if a schema have an optional avro field (a field defining a default value) than it can accept records which are not defining that field. And I thought if a schema have a nullable avro field (a field which type is something or null) than it can accept records which have a null value for that field.

My tests resulted the following: if your record not provide a nullable, non-optional field with a null or other type of value, it will cause an exception, which is what I was expecting. If you provide a null value to an optional non-nullable field, it will not cause an exception thus, optionality make the field nullable, but nullability doesnt cause optionality as a default value is not defined.

In your use-case if the specific field is not present in the record, than the default null value will be used as its value.

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

79089979

Date: 2024-10-15 12:45:51
Score: 3
Natty:
Report link

In case somebody misses it like me, one just needs extended positional argument in the format:

-outfmt "17 delim=\t SR"

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

79089976

Date: 2024-10-15 12:44:51
Score: 2
Natty:
Report link

I needed to run

killall -9 'tmux: server'
Reasons:
  • Blacklisted phrase (0.5): I need
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Hasan Salim Kanmaz

79089970

Date: 2024-10-15 12:43:51
Score: 2
Natty:
Report link

string destinationPath = "C:\Folder1 "; //note the space on the end string destinationFileNameAndPath = Path.Combine(destinationPath, "file.txt");

if (!Directory.Exists(destinationPath)) Directory.CreateDirectory(destinationPath);

File.Move(sourceFileNameAndPath, destinationFileNameAndPath);

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

79089966

Date: 2024-10-15 12:42:50
Score: 4
Natty: 4.5
Report link

crear un vector con los datos de las columnas

labels <- attr(data, "variable.labels")

convertir el vector a marco de datos

labels_df <- data.frame(variable = names(labels), label = as.character(labels))

Reasons:
  • Blacklisted phrase (2): crear
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: David Schomwandt

79089960

Date: 2024-10-15 12:41:50
Score: 1
Natty:
Report link

You can write a className for Tabs tag & Iterate Button tag to change styles.

I have added tabsContainer as className below & changed button styles from the parent tag.

<Tabs aria-label="Default tabs" className="tabsContainer" variant="default">

CSS:-

.tabsContainer button:focus {
  color: #80143c;
}

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

79089939

Date: 2024-10-15 12:34:47
Score: 10.5 🚩
Natty: 5.5
Report link

i am facing same issue, please help

Reasons:
  • RegEx Blacklisted phrase (3): please help
  • RegEx Blacklisted phrase (1): i am facing same issue, please
  • Low length (2):
  • No code block (0.5):
  • Me too answer (2.5): i am facing same issue
  • Single line (0.5):
  • Low reputation (1):
Posted by: Abhishek yadav

79089933

Date: 2024-10-15 12:33:47
Score: 1
Natty:
Report link

I was looking for the same and found that this query gives me the desired result. Although, I used Ruby on Rails to serialize the column product_ids, but if this can help for future readers

SELECT * FROM coupons WHERE product_ids LIKE '%---\\n- \\'71591\\'\\n%'
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Vishal SebastiAn Sharma