79195963

Date: 2024-11-16 20:08:15
Score: 3.5
Natty:
Report link

I almost know where your bug is, but, unfortunately, you did not show your code sample with that bug. Let's do the following: I'll show you a completely working code sample, so you can compare what's missing.

But I know from experience that the most typical bug here is an incorrect enum definition: missing or incorrect DataContract attribute, missing [EnumMember] attribute, or both. For some reason, you did not show it. Ah, yes, I can see from your exception information that [EnumMember] is missing. Okay, that explains your problem.

Would you like to check it? Please see:

namespace DataContracts {
using System.Runtime.Serialization;
using FileStream = System.IO.FileStream;
using FileMode = System.IO.FileMode;

static class DefinitionSet {
    internal const string dataContractNamespace = "https/www.my.site.org/contracts/demo";
    internal const string filename = "demo.xml";
} //DefinitionSet

[DataContract(Namespace = DefinitionSet.dataContractNamespace)]
enum ConditionType {
    [EnumMember] Excellent, [EnumMember] Good,
    [EnumMember] Fair, [EnumMember] Bad,
    [EnumMember] StackOverflowQuestion, }

[DataContract(Namespace = DefinitionSet.dataContractNamespace)]
class Demo {
    [DataMember] // doesn't have to be public
    public ConditionType Type { get; set; }
}

static class DataContractDemo {

    static void TestSerialization() {
        DataContractSerializer dcs = new(typeof(Demo));
        dcs.WriteObject(new FileStream(
            DefinitionSet.filename,
            FileMode.Create),
                new Demo());
    } //TestSerialization

    static void Main() {
        TestSerialization();
    } //Main

} //class DataContractDemo

}

So, make sure you fix your enum definition. It should fix your problem unless you have bugs in other Data Contract types or member definitions. Please let us know if it fixes your problem and accept the answer unless you have other problems or further question.

Reasons:
  • Blacklisted phrase (1): StackOverflow
  • RegEx Blacklisted phrase (2.5): Please let us know
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Sergey A Kryukov

79195957

Date: 2024-11-16 20:02:14
Score: 1
Natty:
Report link

Just add this line to your Dockerfile:

RUN apk add --no-cache \
 autoconf \
 g++ \
 make \
 openssl-dev\
 brotli-dev

.Should run smoothly onwards.

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

79195950

Date: 2024-11-16 19:57:12
Score: 0.5
Natty:
Report link

You Lambda resides within a VPC, so it doesn't have a direct connection to the internet. and S3 is an external service. Without the internet access, your Lambda hangs becaues it cannot reach S3.

Other service can work out without any issue because AWS offers VPC endpoint, however S3 requires an additional steps if your Lambda resides in the VPC.

To solve this out you need to:

  1. Add an S3 VPC Endpoint

    • Create an S3 VPC Endpoint in the VPC where your Lambda function runs.

    • This allows your Lambda to connect to S3 privately without needing internet access.

or

  1. Use a NAT Gateway or NAT Instance

    • If you want your Lambda to have full internet access, deploy a NAT Gateway or NAT Instance in a public subnet.

    • Ensure your Lambda’s private subnet route table points to the NAT gateway for internet traffic.

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

79195949

Date: 2024-11-16 19:57:12
Score: 0.5
Natty:
Report link

I ended up trying lots of stuff, checking llvm ir from different c programs with variadic functions, clever chat gpt prompts and managed to fix the issue by appenind , i32 128 at the %.va_list:

The working println function code is:

define void @println(i8* %a, ...) {
entry:
    %.va_list = alloca i8, i32 128 ; here is the appended alignment
    call void @llvm.va_start(i8* %.va_list)
    call void @vprintf(i8* %a, i8* %.va_list)
    call void @printf(i8* @.str_3)
    call void @llvm.va_end(i8* %.va_list)
    ret void
}

ChatGPT thread that helped me: https://chatgpt.com/share/6738f7c5-3994-800e-90ab-5af879464fa8

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

79195935

Date: 2024-11-16 19:45:10
Score: 2
Natty:
Report link

I can confirm that installing a version of "setuptools <65" worked for me. I presume this is because it maintained enough backwards compatibility.

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

79195931

Date: 2024-11-16 19:44:09
Score: 2
Natty:
Report link

You can use this website to extract the tables and CTEs separately from any SQL query.

https://sql-table-extracter-site.onrender.com

Reasons:
  • Whitelisted phrase (-1.5): You can use
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Ganesh Chandak

79195925

Date: 2024-11-16 19:41:09
Score: 0.5
Natty:
Report link

Using the comma operator helps you to chain multiple conditions. It's not just about the if statement, you can use it in the variable definition or function calls.

I highly recommend to read this.

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

79195916

Date: 2024-11-16 19:38:08
Score: 1.5
Natty:
Report link

Hello @user21569483 You can try this way

!yolo task=segment mode=predict model='/content/runs/segment/train/weights/best.pt'  source='/content/test.jpeg'   

//  yolo task=segment // segment or detect
Reasons:
  • Whitelisted phrase (-1): try this
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @user21569483
  • Looks like a comment (1):
  • Low reputation (0.5):
Posted by: SILA

79195904

Date: 2024-11-16 19:33:07
Score: 3
Natty:
Report link

I had the same issue migrating dotnet6 to dotnet8 . After a lot of work I just installed System.IdentityModel.Tokens.Jwt and all works fine. Based on this article: https://medium.com/@amund.fremming/integrating-jwt-to-net-8-925c4f60695e

Reasons:
  • Blacklisted phrase (1): this article
  • Blacklisted phrase (0.5): medium.com
  • Whitelisted phrase (-1): I had the same
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Mohammad Hassan Shahrian

79195900

Date: 2024-11-16 19:30:06
Score: 2.5
Natty:
Report link

Yes you need to go to fullscreen mode, and click on the tab on the chart (show indicators legend) Then simply remove the strategies one by one. Good luck

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

79195899

Date: 2024-11-16 19:29:06
Score: 1
Natty:
Report link
val intent = Intent(Intent.ACTION_VIEW)
   .apply {
      data = Uri.parse("mimarket://details?id=com.example.android&back=true|false&ref=refstr&startDownload=true")
}

Some code of idk what language but this is the answer to it

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

79195889

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

I found these to be suitable because the buttons are just above - and + buttons on mac.

    {
        "key": "ctrl+f11",
        "command": "workbench.action.decreaseViewSize"
    },
    {
        "key": "ctrl+f12",
        "command": "workbench.action.increaseViewSize"
    }
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: gndps

79195874

Date: 2024-11-16 19:10:03
Score: 1
Natty:
Report link

There seems to be an ongoing issue with the latest version.

As a workaround you could install using an older version of the CLI tool:

npx [email protected] add button
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Alex

79195867

Date: 2024-11-16 19:06:02
Score: 2.5
Natty:
Report link

I think that some additional configuration may be required. See this article (supabase + springboot) on their suggestions regarding SSL and connection pooling. Hope it helps.

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

79195866

Date: 2024-11-16 19:06:02
Score: 1.5
Natty:
Report link

You can start with simple:

git fetch

No damage to worry about and helped in my case.

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

79195863

Date: 2024-11-16 19:03:01
Score: 3
Natty:
Report link

Also check out on your Android client if you're using the correct package variant of your app

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

79195861

Date: 2024-11-16 19:01:01
Score: 1
Natty:
Report link

Use Alternatives (If Non-Headless Isn't Essential) If visual interaction isn't necessary and this is for automation:

options.add_argument('--headless')
options.add_argument('--disable-gpu')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: nehanakrani

79195860

Date: 2024-11-16 19:00:01
Score: 1
Natty:
Report link

It seems like if performing multiple statements, only the "last" eval result is used as the conditional.

if (true, true,  false) alert(true); else alert(false);  (false)
if (false,false, A = 1) alert(true); else alert(false);  (true)

maybe like:

if (eval('false;false;A=1')) alert(true); else alert(false);  (true)
if (eval('true ; true;A=0')) alert(true); else alert(false);  (false)

Use: I needed a case insensitive Array/Object Search. (using get/set)

A = {Apple:12.3,Pear:34.5,Peach:3.22};
if (A.find = "pear",  A.found) alert(A.key + ' = ' + A.value);  (Pear = 34.5)
Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Clif

79195852

Date: 2024-11-16 18:56:00
Score: 0.5
Natty:
Report link

You need to have path like

<link href="assets/style.css" rel="stylesheet" type="text/css" />

or

<link href="../assets/style.css" rel="stylesheet" type="text/css" />

depending upon the location of file.

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

79195847

Date: 2024-11-16 18:52:59
Score: 1
Natty:
Report link

The .ToString() function have multiple formats you can choose from (on any numeric type).

Format Digits

Will add '0' prefix based on D#.

var number = 8;
var formattedNumber = number.ToString("D2");
Console.WriteLine(formattedNumber); // Output: 08

Seperator

var number = 123456789;
var formattedNumber = number.ToString("#,###");
Console.WriteLine(formattedNumber); // Output: 123,456,789

Check the official MS Docs for more information

https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings

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

79195844

Date: 2024-11-16 18:50:59
Score: 4
Natty:
Report link

i am Unable to use non headless mode using selenium webdriver on render deployment in my local machine its properly working, this is my code please tell me how to work-

    chrome_options = webdriver.ChromeOptions()
    chrome_options.add_argument(f"user-data-dir={CHROME_PROFILE_PATH}")
    chrome_options.add_argument("--headless")
    chrome_options.add_argument("--disable-gpu")
    chrome_options.add_argument("--no-sandbox")
    chrome_options.add_argument("--disable-dev-shm-usage")

with webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options) as driver:

Reasons:
  • Blacklisted phrase (1.5): tell me how to
  • RegEx Blacklisted phrase (2.5): please tell me how
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Deep Saha

79195843

Date: 2024-11-16 18:47:58
Score: 3.5
Natty:
Report link

Its possible if your front and backend HTTP method is not matching.

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

79195842

Date: 2024-11-16 18:47:56
Score: 8 🚩
Natty:
Report link

To answer to @phankieuphu with an image, I think the database in phphmyadmin is well set. Is it the right place to check that ?

enter image description here

Reasons:
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • User mentioned (1): @phankieuphu
  • Self-answer (0.5):
  • Single line (0.5):
  • Looks like a comment (1):
  • Low reputation (0.5):
Posted by: Boysteuf

79195834

Date: 2024-11-16 18:41:55
Score: 2
Natty:
Report link

Answering your questions, yes everything is compiled in to the remoteEntry.js and then you load that into another frontend (shell, or parent). Usually this file gets created by your compiler (webpack + babel). For development you will usually have a hot reload for webpack and that will basically regenerate your build during dev.

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

79195830

Date: 2024-11-16 18:37:54
Score: 3.5
Natty:
Report link

Presence of NAT is independent of mode. The NAT presence is identified in 3&4 the packet in main mode, 2 and 3rd packet in quick mode. May be this article can help you: https://takethenotes.com/nat-traversal-in-the-ike/

Reasons:
  • Blacklisted phrase (1): this article
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: King in North

79195827

Date: 2024-11-16 18:37:54
Score: 2
Natty:
Report link

I ran into the same issue with Postgres. I've rolled back my EF assemblies to 8.0.11 as well, and everything's working again. Guess we'll just have to keep an eye on the packages in the next few weeks to see if they fix it.

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

79195824

Date: 2024-11-16 18:36:53
Score: 0.5
Natty:
Report link

Actually, it is not skipped but it causes the concatenation to fail silently.

  1. X is NULL.

  2. When you do '|| X ||', the NULL value of X is not treated as a string but as a missing value.

  3. String concatenation with NULL ('|| NULL ||') results in the entire concatenation expression becoming NULL.

    Thus, the v_sql assignment evaluates to NULL, and you see NVL(,NULL) in your result

    If you want the literal text NULL to appear in the SQL query when X is NULL, you need to explicitly handle this substitution. For example:

    v_sql := 'insert into users(id) values(NVL(' || CASE WHEN X IS NULL THEN 'NULL' ELSE X END || ', NULL))';

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

79195815

Date: 2024-11-16 18:31:52
Score: 2
Natty:
Report link

It's 2024 now. Using ffmpeg static binaries built from current master (here), heic/heif works out of the box, I can convert the images to jpg/png etc.

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

79195814

Date: 2024-11-16 18:31:52
Score: 3
Natty:
Report link

Writing it here if anyone else has a similar problem- me and the development team changed the “run env” file to not have consts- but have functions that return the env variables. –

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

79195811

Date: 2024-11-16 18:30:51
Score: 5
Natty: 5.5
Report link

👇For Modified Free Version Visit👇

https://allsoftscr.college/download/

Reasons:
  • Probably link only (1):
  • Low length (2):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: jimhokkins0

79195805

Date: 2024-11-16 18:25:50
Score: 2.5
Natty:
Report link

Thanks for your help! Here is a slightly modified code that produces the kind of figure I wanted:

p <- ggplot( data, aes(x, y) ) + geom_point_interactive( aes(data_id = facet) ) + facet_wrap_interactive( ~facet, interactive_on = "both", labeller = labeller_interactive( aes(data_id = facet) ) ) + theme( strip.background = element_blank(), strip.text.x = element_text( colour="black", size = 12) )

girafe( ggobj = p, options = list( opts_hover(""), opts_hover_inv(css = "opacity:0.1;") ) )

I think the problems were 1. mouse-over needs to be rather precisely on the text in the facet strip - here a single letter, 2. in the original code, data_id = facet was part of the global aestethics, but it seems it needs to be placed inside labeller_interactive to make the facets interactive

enter image description here

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): enter image description here
  • Whitelisted phrase (-0.5): Thanks for your help
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: ThomasW

79195786

Date: 2024-11-16 18:14:48
Score: 2
Natty:
Report link

In general, there is a cool solution. 1. Variables on the server side are transmitted as needed and at the time of the build of the nextjs server side they are available -> we make the upper-level components server-side (without using 'use client') -> we take the necessary variables from the environment and drill our component in which we already set the values of the inputs on the client or in another way

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

79195785

Date: 2024-11-16 18:13:48
Score: 1
Natty:
Report link

I think the code below will solve my problem

TheModel model = new TheModel();
MemoryStream memoryStream = new MemoryStream();
XmlSerializer serializer = new XmlSerializer(typeof(TheModel));
serializer.Serialize(memoryStream, model);
FtpClient client = new FtpClient();
client.AutoConnect();
client.UploadStream(memoryStream, "", FtpRemoteExists.NoCheck, true);
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Xia

79195766

Date: 2024-11-16 18:05:45
Score: 1.5
Natty:
Report link

Just change this

import org.springframework.data.annotation.Id;

to this: import jakarta.persistence.Id;

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

79195759

Date: 2024-11-16 17:58:44
Score: 1.5
Natty:
Report link
import numpy as np
n = 8
matrix = np.fromfunction(lambda i, j:(i+j) % 2, (n, n) dtype=int)
print(matrix)
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Karunya Mothukuri

79195740

Date: 2024-11-16 17:50:42
Score: 1
Natty:
Report link

I managed to get it working by applying the following CSS:

.mud-popover-cascading-value {
    position: fixed;
}

The tooltip now follows the scrolling or page resize properly.

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Drunken Code Monkey

79195721

Date: 2024-11-16 17:40:39
Score: 2.5
Natty:
Report link

I know this is an old question. You might have already figured it out. Anyway, I found it in "/opt/homebrew/Cellar/odin/2024-11/libexec/vendor" if you installed with brew, of course.

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

79195719

Date: 2024-11-16 17:39:39
Score: 2
Natty:
Report link

Install googletrans pip install googletrans==4.0.0-rc1

Fixed Code: `from googletrans import Translator # Input for source and target languages translate_from = input("Translate from (e.g., 'en'): ") translate_to = input("Translate to (e.g., 'bn'): ") # Input for text translate_text = input("Enter text to translate: ") # Translate the text translator = Translator() translation = translator.translate(translate_text, src=translate_from, dest=translate_to) # Print the result print("Translation:", translation.text)

Input

Translate from (e.g., 'en'): en
Translate to (e.g., 'bn'): bn
Enter text to translate: Hello, how are you?

Output

Translation: হ্যালো, আপনি কেমন আছেন?
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Md. Saiful Islam

79195715

Date: 2024-11-16 17:36:39
Score: 1.5
Natty:
Report link

Does this work for you with the video_player plugin?

SizedBox.expand(
  child: FittedBox(
    fit: BoxFit.cover,
    child: ListenableBuilder(
      listenable: _videoController,
      builder: (context, _) => SizedBox(
        width: _videoController.value.size?.width ?? 0,
        height: _videoController.value.size?.height ?? 0,
        child: VideoPlayer(_videoController),
      ),
    ),
  ),
),
Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
Posted by: Mäddin

79195711

Date: 2024-11-16 17:33:37
Score: 0.5
Natty:
Report link

The issue you’re encountering with the MudTooltip not updating its position after scrolling is likely due to the way the tooltip is positioned on the page. Tooltips often use absolute positioning based on their initial rendering position, which can lead to the behavior you're describing in certain scenarios.

Possible Solutions

  1. Check for Updates in MudBlazor Ensure that you are using the latest version of MudBlazor. Older versions might have bugs or lack features that handle tooltip repositioning correctly. Update MudBlazor and test again.

  2. Enable Tooltip Repositioning on Scroll MudBlazor tooltips should automatically reposition themselves when the page scrolls. However, in some cases, especially in InteractiveServer mode, this behavior might require manual adjustments. To force the tooltip to recalculate its position after scrolling, you might need to trigger a re-render or ensure it is configured correctly.

  3. Workaround Using CSS or JavaScript If the above doesn’t resolve the issue, you can ensure proper tooltip positioning with a workaround:

CSS Approach: Avoid tooltips being affected by scrolling. Use position: fixed in your custom CSS for the tooltip container.

JavaScript Approach: Use a JavaScript interop to notify MudBlazor to reposition the tooltip on scroll. For example, you can listen to the scroll event and trigger a re-render or reposition function.

  1. Alternative MudTooltip Settings Try tweaking the MudTooltip settings to see if they influence the behavior:

Use AutoClose or ensure the tooltip updates dynamically. Experiment with Delay, Placement, and Offset to minimize potential conflicts. 5. Fallback to a Custom Tooltip If the issue persists and cannot be resolved using MudBlazor's built-in tooltip, you can implement your own tooltip using basic HTML and CSS for more control.

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

79195707

Date: 2024-11-16 17:30:37
Score: 0.5
Natty:
Report link
1. Modify SEOURLPatterns.xml with Care
Adjust the patterns to remove /LanguageToken/StoreToken while ensuring that default values are passed where required.
Update the defaultValue attributes in the <seourl:paramToUrlMapping> section:

<seourl:paramToUrlMapping>
    <seourl:mapping name="LanguageToken" value="?langId?" defaultValue="en"/>
    <seourl:mapping name="StoreToken" value="?storeId?" defaultValue="clientstorename"/>
    <seourl:mapping name="CatalogToken" value="?catalogId?" defaultValue="defaultCatalogId"/>
</seourl:paramToUrlMapping>
Ensure that the removed tokens are mapped to backend defaults where needed.


2. Update the SEO URL Mapper
Extend or override the default SEOURLMapper class to handle custom URL parsing and mapping.
Example: Intercept and rewrite URLs dynamically in the mapRequest or resolveURL methods.

public class CustomSEOURLMapper extends SEOURLMapper {
    @Override
    public void mapRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
        String requestURL = request.getRequestURI();
        if (requestURL.contains("/en/clientstorename")) {
            String newURL = requestURL.replace("/en/clientstorename", "");
            response.sendRedirect(newURL);
        } else {
            super.mapRequest(request, response);
        }
    }
}

3. Update Struts or Servlet Configuration
If direct XML changes don’t resolve the issue, configure Struts actions or servlet filters to map incoming requests without /en/clientstorename to the appropriate views.
4. Debugging and Testing
Enable detailed logging in WebSphere Commerce by updating the logging.properties file or enabling verbose trace logging in the admin console.
Look for errors or unhandled exceptions in the mappings and validate backend service calls.
5. Alternative Approach Using URL Rewriting
Add URL rewriting logic in a servlet filter to remove /en/clientstorename and forward the modified request to the backend:

public class URLRewriteFilter implements Filter {
    public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
            throws IOException, ServletException {
        HttpServletRequest httpRequest = (HttpServletRequest) req;
        String requestURL = httpRequest.getRequestURI();
        if (requestURL.contains("/en/clientstorename")) {
            String newURL = requestURL.replace("/en/clientstorename", "");
            req.getRequestDispatcher(newURL).forward(req, res);
            return;
        }
        chain.doFilter(req, res);
    }
}

Click Here

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

79195696

Date: 2024-11-16 17:25:35
Score: 0.5
Natty:
Report link

Based on your explanation it seems like you don't need: RANGE BETWEEN INTERVAL '60' SECOND PRECEDING AND CURRENT ROW Or am I missing a requirement here?

If you eliminate this in your query, it will compute the running total per row it sees, despite the duplicates.

SELECT timestamp, SUM(volume) OVER (
        PARTITION BY ID
        ORDER BY timestamp
    ) AS total_volume
FROM YourTable;

The results:

timestamp               total_volume
2024-11-16 08:00:00.00  10
2024-11-16 08:00:00.00  20
2024-11-16 08:01:00.00  30
2024-11-16 08:02:00.00  40
2024-11-16 08:02:00.00  50
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Rafael Llopis

79195684

Date: 2024-11-16 17:18:34
Score: 0.5
Natty:
Report link

I think what you're looking for is @apply. This could be one of the things you can combine mostly used combination of classes and create a new class.

<!-- Before extracting a custom class -->
<button class="py-2 px-5 bg-violet-500 text-white font-semibold rounded-full shadow-md hover:bg-violet-700 focus:outline-none focus:ring focus:ring-violet-400 focus:ring-opacity-75">
  Save changes
</button>

<!-- After extracting a custom class -->
<button class="btn-primary">
  Save changes
</button>

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
  .btn-primary {
    @apply py-2 px-5 bg-violet-500 text-white font-semibold rounded-full shadow-md hover:bg-violet-700 focus:outline-none focus:ring focus:ring-violet-400 focus:ring-opacity-75;
  }
}

For more info reusing styles.

Hope, this helps.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @apply
  • Low reputation (0.5):
Posted by: Naeem Akhtar

79195682

Date: 2024-11-16 17:16:33
Score: 4.5
Natty:
Report link

why do they need to scan records if $nin or $ne contains only one value.

for eg: user | ispayed 1 | Y 2 | N

if i ask ispayed != 'Y', they still can scan the index and come to a decision right?

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): why do the
  • Low reputation (1):
Posted by: Joby Joseph

79195667

Date: 2024-11-16 17:10:31
Score: 3.5
Natty:
Report link

Kindly provide detailed error logs, to have clear understating of the issue.

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

79195663

Date: 2024-11-16 17:08:31
Score: 3
Natty:
Report link

In my case accidently I put the component outside of the app directory. Make sure the path of the component is inside the /app

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

79195654

Date: 2024-11-16 17:04:29
Score: 1
Natty:
Report link

There isn't enough information here to know exactly what your problem is. You haven't provided a stacktrace or exception, or specified whether the issue is with the bot, downloading from instagram, digital ocean, or something else.

That said: If the issue is downloading from Instagram, it's very likely that Instagram is identifying your connection as coming from a cloud provider and blocking it. Changing your IP address in DigitalOcean would not be enough, because you would need to be coming from an IP which is not a cloud provider's. Using a different library for downloading data from instagram, or even implementing it yourself, would not avoid this issue.

You would need a VPN, or at least to proxy your requests through a host that is not identifiably a cloud provider.

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

79195647

Date: 2024-11-16 17:01:29
Score: 1
Natty:
Report link

np.random.binomial() won't provide the desired outcome because it generates a truly random distribution.

Instead, you can create such a matrix using array indexing and NumPy's array manipulation functions.

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

79195627

Date: 2024-11-16 16:53:28
Score: 2
Natty:
Report link

Reading through the documentation for pandas.json_normalize the record_path takes a str variable.

Thus you would need to create two dataframes for each record path and then merge them together based on a common field.

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

79195625

Date: 2024-11-16 16:52:28
Score: 0.5
Natty:
Report link
  1. If you have Impulse-Responce system in binary mode: either "switch-on"-regime or "switch-off"-regime - it's enough to define only these 2 regimes in filter. If you want to make them big (as you mentioned in OP) simply do:

    import numpy as np from scipy import signal import matplotlib.pyplot as plt from scipy.ndimage import gaussian_filter

    original = np.repeat([0., 1., 0., 0., 0., 1.], 100) impulse_response_filterKernel = [20, 1] x= np.arange(len(original))

    filtered = signal.convolve(impulse_response_filterKernel, original) recovered, remainder = signal.deconvolve(filtered, impulse_response_filterKernel) print(recovered)

    fig, ax = plt.subplots(1,1) ax.plot(x, original, label="original", lw=7, alpha=0.2) ax.plot(x, filtered[:len(filtered)-1], label="filtered", lw=3) ax.plot(x, recovered, label="recovered", color='black', lw=1, ) plt.legend() plt.show()

enter image description here

  1. If you instead need gaussian filter smoothing all noisy points, can see here to do it correct manually
Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: JeeyCi

79195620

Date: 2024-11-16 16:50:24
Score: 6 🚩
Natty:
Report link

You mention you have indexes on the id of each table but do you have indexes on the foreign keys (a_id, b_id) in your example? And do you have and index for the column you use in the query if it is a common search?

Reasons:
  • RegEx Blacklisted phrase (2.5): do you have an
  • Low length (0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Tavo

79195605

Date: 2024-11-16 16:45:23
Score: 3
Natty:
Report link

This issue may be related to route caching.

I think this is a similar case you're looking for: https://laracasts.com/discuss/channels/devops/laravel-pest-test-fails-when-run-together-but-pass-when-alone

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

79195589

Date: 2024-11-16 16:39:22
Score: 2.5
Natty:
Report link

Thanks RuthC. That solves it. Also interesting that the color is not case sensitive: c="none", c="None", c="NONE" etc. all work.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Steffen R

79195578

Date: 2024-11-16 16:36:21
Score: 3
Natty:
Report link

I suggest trying changing the device emulation settings.

Kindly update after checking.

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

79195573

Date: 2024-11-16 16:33:20
Score: 1.5
Natty:
Report link

I think you should use different websites to test your site's responsive-ness like https://responsivetesttool.com/ and https://www.browserstack.com/responsive if it live or hosted at some place.

Prima facie, it looks like you have to work more on responsive of your project.

I would recommend to go through online courses available or youtube.

Hope, this helps.

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

79195568

Date: 2024-11-16 16:32:20
Score: 0.5
Natty:
Report link

Your benchmarking results are consistent with the reality of how Python handles these operations. While f-strings are known for being efficient in many cases, they do not inherently optimize string concatenation operations that involve slicing or combining strings.

Why String Addition Can Be Faster in This Case String Addition (+):

String concatenation using + is straightforward: Python internally allocates enough memory for the resulting string and directly appends the components. When the strings involved are simple slices (a[:2], b, a[2:]), this operation is quite efficient. For your specific case, the + operation avoids extra formatting steps, directly performing the concatenation. F-Strings (f'{a[:2]}{b}{a[2:]}'):

F-strings are powerful and flexible, but they involve formatting logic under the hood. Python first evaluates the expressions inside the {} brackets, then formats them into a single string. This added layer of processing (especially evaluating multiple slices like a[:2] and a[2:]) introduces overhead that makes f-strings slower than + concatenation in this particular scenario.

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

79195559

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

To Backup a database using pgAdmin4 (To get a data dump using a pgAdmin4):

  1. Open pgAdmin 4 and connect to your server.
  2. Select the database you wish to back up from the left sidebar.
  3. Right-click on the database and choose Backup.
  4. Specify the file path and name for the backup file in the Filename field.
  5. Choose the format you want (e.g., Custom, Tar, Plain, Directory) from the format dropdown.
  6. Click Backup

The Custom and Tar formats save the backup in binary SQL, which is more suitable for restores involving more complex data types and faster restoration.

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

79195553

Date: 2024-11-16 16:22:18
Score: 1
Natty:
Report link

I figured out the issue I was facing on iOS, and it was caused by the new architecture being enabled by default with React Native. Apparently, it creates compatibility issues with certain modules, especially those related to Hermes or other specific configurations.

To resolve this, I had to disable the new architecture on iOS by using the following command:

RCT_NEW_ARCH_ENABLED=0 pod install

After running this command, everything worked perfectly again. If anyone else is having the same issue, give this a try! It really solved the problem for me.🆗

Reasons:
  • Whitelisted phrase (-2): I figured out
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): having the same issue
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: FrenchBoy

79195545

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

I wanted to put this out there. I ordered the Funky Chicken Kit and I tried to contact, My Fabric Addition. I received the kit and the squares not right. I did talk to Jean Fletcher and she sent another kit. I opened the kit and it was still wrong with less materials. WHY WOULD SOMEONE DO THAT? THANK YOU, for reading letter. Sincerely, Rachel Hass

Reasons:
  • Blacklisted phrase (0.5): THANK YOU
  • Contains signature (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Rachel Hass

79195544

Date: 2024-11-16 16:19:17
Score: 2
Natty:
Report link

That is indeed a possible answer, however in the above example it will return all the search results including C2, like references to cells C21, C22, C245, etc etc. I think the user above is missing the functionality that MS Excel offers, with the arrows showing immediately whether a cell is being used in another formula. If there is any function like that in Google Sheets, I'd love to know, as well!

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

79195540

Date: 2024-11-16 16:18:17
Score: 1
Natty:
Report link

Check with npm ls @react-navigation/native or yarn list @react-navigation/native . If there is duplication in dependency , for me it was something like

├─ @react-navigation/[email protected]
└─ [email protected]
   └─ @react-navigation/[email protected]

so i removed the later and it works now

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

79195538

Date: 2024-11-16 16:17:16
Score: 0.5
Natty:
Report link

If you are logged in using gcloud, there a way you can individually update your functions to avoid the runtime error:

gcloud functions deploy api \
--runtime=nodejs18 \
--trigger-http \
--region=us-central1 \
--project=`YOUR_PROJ_ID`

I normally run firebase deploy --only functions:api --project YOUR_PROJ_ID

to deploy my api function, but I got hit with the same error. Even changing firebase tools versions did not work. Hope this helps!

Reasons:
  • Blacklisted phrase (1): did not work
  • Whitelisted phrase (-1): Hope this helps
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Rene Ortega

79195535

Date: 2024-11-16 16:14:16
Score: 3
Natty:
Report link

Make sure that the allchannel channel is created in the orderer and that all the nodes have joined it

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

79195521

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

After a lot of scratching of head, I got it to work by simply using instead: <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId> <version>2.6.0</version> </dependency>

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

79195519

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

But i think you if you understand street view in iframe embedded map, there is a pattern and if you are taking street view of any building,house , any local market, the angle of 3f! goes from 200 to 310 and 210, 303 ,279 are mostly used, Please check the format ,then you understand what i am saying, and give user multiple street view,let him decide hy his own.

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

79195499

Date: 2024-11-16 15:56:12
Score: 2
Natty:
Report link

(1) Firstly is your css file named styles.css ?

(2) Is your folder structure similar to as follows: blog/ static/ css/ styles.css templates/ your_template.html

(3) Does this reflect your settings.py: STATIC_URL = '/static/' # Base URL for static files

Ensure STATICFILES_DIRS is correctly set

STATICFILES_DIRS = [ BASE_DIR / "blog" / "static",
]

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

79195490

Date: 2024-11-16 15:50:10
Score: 2
Natty:
Report link

Solved. In my case, Im deplying NextJS v14.0.2. Downgrading packages mongoose 8.3.4 → 8.1.0 mongodb 6.10.0 → 6.3.0 Solved the issue. NodeJS 12.13.0

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

79195487

Date: 2024-11-16 15:50:10
Score: 1.5
Natty:
Report link

I got what the problem was!

  1. When I upload an image it has the original size: Image Width: 4032 Image Height: 3024
  2. Based on that size Google Vision returns coordinates.
  3. But on display Preview image/canvas has a smaller size based on the screen: Preview Image: 391 293
  4. So when I tried to draw a polygon based on Original size coordinates it simply could not fit those coordinates into the Preview image size.

Conclusion: Check the image size!

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

79195481

Date: 2024-11-16 15:47:10
Score: 3
Natty:
Report link

Typically cpanel runs on top of apache httpd so port 443 is already taken. Use apache .htaccess file to define the reverse proxy.

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

79195472

Date: 2024-11-16 15:40:08
Score: 1.5
Natty:
Report link

Try to reinstall package curl

remove.packages("curl")
install.packages("curl", type = "source")

or try to reinstall in brew/apt/yum

brew update
brew install curl
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Azincc

79195470

Date: 2024-11-16 15:39:08
Score: 1.5
Natty:
Report link

I think your goal in this question is clustering nodes and getting each cluster from node object. also each cluster has multi nodes but every node has just one cluster. but the the aggregating is not for this application. it is for "has one" relationship. For doing this you can define a singleton class and save every cluster in it. next you need to add a function to get each cluster by it's id. also you must save cluster id in each node too. I hope this works for you.

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

79195462

Date: 2024-11-16 15:33:07
Score: 2
Natty:
Report link

I had faced similar issue with community page. Instead of using NavigationMixin, please try using Lightning-Modal component.

This component helps in generating a pop up in same window.

Refer: https://developer.salesforce.com/docs/component-library/bundle/lightning-modal/documentation

Please upvote, If this helps in resolving your issue.

Let me know if you face any issue in incorporating Lightning-Modal component in your use-case.

Reasons:
  • Blacklisted phrase (0.5): upvote
  • No code block (0.5):
  • Low reputation (1):
Posted by: sumankanth kuruba

79195460

Date: 2024-11-16 15:33:07
Score: 0.5
Natty:
Report link

Those who are wondering why all these solutions are working for others and not for you.. let me tell you just turn on disable permission monitoring and restart your device. And as soon as your device restarts just run your permission grant command. This worked for me :-)

Reasons:
  • Whitelisted phrase (-1): This worked for me
  • Whitelisted phrase (-1): worked for me
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Parth Shitole

79195455

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

Please what if I have an html file, How do you make sure that this is rendered at the appropriate position. A situation whereby I have a whole web page to be placed inside the editor, within the webpage there are custom designed images. My challenge is how to place the customBlot in the proper position while other tags used the embedded quill blot. Is it something that is possible to achieve?

For instance, I want to get the thumbnail of a video inside the video tag. I want the thumbnail to be render in the position of the video tag; whenever I place the html inside the editor.

Reasons:
  • Blacklisted phrase (1): How do you
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Taiwo

79195454

Date: 2024-11-16 15:30:05
Score: 3
Natty:
Report link

This only returns promise which can be pending. Getting value requires you to await for promise.

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

79195452

Date: 2024-11-16 15:30:05
Score: 2.5
Natty:
Report link

The code runs in O(1) time, and rep bsf is not a loop, it is a single instruction that runs in a fixed amount of time. The compiler chose this implementation because there is no std::countr_zero counterpart on x86, so bsf is used to get the first bit set

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

79195444

Date: 2024-11-16 15:26:04
Score: 1
Natty:
Report link

I finally found what works. You create a translate "client" and then pass the credentials to that client.

from google.cloud import translate_v3beta1 as translate
client = translate.TranslationServiceClient(credentials=credentials)

Then you can access the translate_document method of client.

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

79195442

Date: 2024-11-16 15:23:03
Score: 0.5
Natty:
Report link

The best solution for your problem is closures.which helps to return the function from the function and the inner function stores the value of the variables of outer function without regards of function call.

This fibonacci function is written using closure to generate the Fibonacci series by just calling the function without storing the variables curr , prev in global scope.


function fibonacci() {
    let prev = 1, curr = 1;

    return function () {
        const next = prev + curr;
        [prev, curr] = [curr, next];
        return prev;
    };
}


let next_fibonacci = fibonacci();

for(let i=1; i <= 5;i++){
   console.log(next_fibonacci());
}

If you don't know about closures then go and refer closures

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

79195436

Date: 2024-11-16 15:20:03
Score: 1
Natty:
Report link

This worked pretty well for me

const response = await axios.get('url', {
        auth: {
          username: 'Jane',
          password: 'doe'
        },
      });
      const result = response.data;
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Yusuf Yasir

79195435

Date: 2024-11-16 15:19:03
Score: 1.5
Natty:
Report link

version not mentioned in the Docs that seems to work

distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: user237462

79195426

Date: 2024-11-16 15:17:02
Score: 2
Natty:
Report link

Your gradle files are corrupted Enter this path to solve this problem user/{user}/.gradle/wrapper/dists And delete your Gerdle folder so that Android Studio downloads the Gerdle files again to solve the problem

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

79195413

Date: 2024-11-16 15:10:00
Score: 1.5
Natty:
Report link

Here's a trick you can try:

git switch -c <new-branch>

(if you to make a new branch and switch to it)
OR

git checkout -b <new-branch>

(if you just want to make a new branch)

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

79195411

Date: 2024-11-16 15:08:00
Score: 2
Natty:
Report link

Define a distinct regex pattern for each data type (dates, times, numbers, ...) and combine them using the OR (|) operator.

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

79195403

Date: 2024-11-16 15:04:59
Score: 1
Natty:
Report link

I found the solution.

So, in PyCharm you need to install pyserial not serial, even though in code you call it as as serial! Of course!!!

Reasons:
  • Whitelisted phrase (-2): I found the solution
  • Low length (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Fred_was_here

79195402

Date: 2024-11-16 15:03:59
Score: 2
Natty:
Report link

By visiting this site you can see your report. Anyone with your powerbi credentials can see the report. Also if you want to embed the report in your personal website can do this by using embedded token.

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

79195394

Date: 2024-11-16 14:59:58
Score: 1
Natty:
Report link

SELECT usertype, CONCAT(start_station_name, " to ", end_station_name) AS route,
COUNT(*) AS num_trips, ROUND(AVG(CAST(tripduration AS INT64) / 60), 2) AS duration
FROM
bigquery-public-data.new_york.citibike_trips
GROUP BY start_station_name, end_station_name, usertype
ORDER BY
num_trips DESC
LIMIT 10;

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

79195388

Date: 2024-11-16 14:56:58
Score: 2
Natty:
Report link
http://newsabe.ir/2024/02/21/%D9%86%D9%85%D8%A7%DB%8C%D9%86%D8%AF%DA%AF%DB%8C-%D8%AA%D8%B9%D9%85%DB%8C%D8%B1%D8%A7%D8%AA-%D9%84%D9%88%D8%A7%D8%B2%D9%85-%D8%AE%D8%A7%D9%86%DA%AF%DB%8C-%D8%A7%D9%84`enter code here`-%D8%AC%DB%8C-%D8%AF%D8%B1-%D9%BE/
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Has no white space (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: متین باتوته

79195385

Date: 2024-11-16 14:56:58
Score: 0.5
Natty:
Report link

To dynamically change the color of a button in a Lightning Data Table row, you need to update the data associated with the row and reassign it to the data property of the lightning-datatable. This involves updating the buttonColor field of the clicked row.

Here’s how you can achieve this:

  1. Ensure each row in the data array has a buttonColor field. This field will control the variant of the button.

  2. Update the buttonColor value of the clicked row in the onRowAction handler.

  3. After modifying the data array, reassign it to trigger reactivity.

Code:

JavaScript Controller:

import { LightningElement, track } from 'lwc';

export default class DataTableWithButton extends LightningElement {
@track data = [
    { id: 1, invoiceNumber: 'INV001', buttonColor: 'neutral' },
    { id: 2, invoiceNumber: 'INV002', buttonColor: 'neutral' },
    { id: 3, invoiceNumber: 'INV003', buttonColor: 'neutral' },
];

columns = [
    {
        label: 'Include GST',
        type: 'button',
        fieldName: 'invoiceNumber',
        typeAttributes: {
            title: 'Include GST',
            alternativeText: 'Include GST',
            name: 'Include_GST',
            label: 'Include GST',
            variant: { fieldName: 'buttonColor' },
        },
        cellAttributes: {
            width: '3rem',
        },
    },
];

handleRowAction(event) {
    const actionName = event.detail.action.name;
    const row = event.detail.row;

    if (actionName === 'Include_GST') {
        // Update the button color
        this.data = this.data.map((dataRow) => {
            if (dataRow.id === row.id) {
                return { ...dataRow, buttonColor: 'success' }; // Change to "success" or any variant
            }
            return dataRow;
        });
    }
}
}

HTML Template:

<template>
<lightning-datatable
    key-field="id"
    data={data}
    columns={columns}
    onrowaction={handleRowAction}>
</lightning-datatable>
</template>

In the above code,

  1. The typeAttributes.variant dynamically binds to the buttonColor field of each row.

  2. The @track decorator ensures changes to the data array are reactive and reflected in the UI.

  3. When the button is clicked, the onrowaction event handler identifies the clicked row and updates its buttonColor field.

  4. Common button variants in Salesforce LWC include neutral, brand, destructive, and success. Use these for color changes.

Mark as best answer if this helps.

Below are the screenshots for your reference.

  1. Before clicking on button
  2. After clicking on first button.
  3. After clicking on second button.
Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @track
  • Low reputation (1):
Posted by: sumankanth kuruba

79195380

Date: 2024-11-16 14:51:57
Score: 1
Natty:
Report link

I did some further testing of the code that was suggested. On reflection it wasn't complete as per my original question. For that reason, I'm posting here the working code, which has been called a few times to prove it works in all possible modes (with basic arguments only - not a list as has been suggested will not work)

I found it fascinating that the redirect to tee needs a sleep 0 afterwards because the first command to echo will often do that prior to the tee being set up. I don't know how to wait only until that redirect is set before continuing.

The following code echos quite a bit to the various destinations, each echo is done via a method to ensure a unique sequential id. This was needed to confirm they are logged in the correct order.

The initial solution unfortunately has the bug my question has, that is log statements would be out of order. This is less neat because I need to bookend the block I want redirected to script_output.log with two statements rather than just wrap it in {}, but at least it keeps things as you'd expect from execution order.

#!/bin/bash

script_log="script_output.log"
process_log="output.log"

function store_output_redirects() {
    exec 3>&1 4>&2
}

function redirect_all_output_to_file() {
    exec  1>> "${script_log}" 2>&1
}

function clear_output_redirects() {
    exec 1>&3 2>&4
}

#!/bin/bash
my_function() {
    local pid_file=$1; logfile=$2
    local tee_output="none"
    if [ "$3" = "tee" ] || [ "$3" = "tee_console" ] ; then
        tee_output=$3
        shift
    fi
    cmd=("${@:3}")
    log "console: inside function"
    store_output_redirects
    redirect_all_output_to_file
    {
        # this block is redirected to ${script_log}
        log "${script_log}: inside redirected block"
        
        if [[ "$logfile" = "console" ]]; then
            # swap the output to the default (console)
            clear_output_redirects
        elif [ "$tee_output" = "tee" ] ; then
            #clear_output_redirects
            
            exec 1> >(tee "$logfile")
            # insert a tiny time delay for the tee redirect to be set up (otherwise output will go to the previous destination).
            sleep 0
        elif [ "$tee_output" = "tee_console" ] ; then
            clear_output_redirects
            exec 1> >(tee "$logfile")
            # insert a tiny time delay for the tee redirect to be set up (otherwise output will go to the previous destination).
            sleep 0
        else
            exec >>"$logfile"
            # insert a tiny time delay for the tee redirect to be set up (otherwise output will go to the previous destination).
            sleep 0
        fi
        
        echo "$BASHPID" > "$pid_file"
        
        if ! [ "$tee_output" = "none" ] ; then
            log "tee: command to be executed with output to $logfile and console: ${cmd[*]}"
        else
            log "$logfile: command to be executed with output to $logfile: ${cmd[*]}"
        fi
        # this cannot be escaped as per shellcheck.net as error 'command not found' when not using tee.
        ${cmd[@]}

        
        # reset the defaults for this block
        redirect_all_output_to_file
        
        log "${script_log}: end of redirected block"
    }
    clear_output_redirects
    log "console: function ends"
}

function log() {
    (( log_line = log_line + 1 ))
    echo "${log_line} $*"
}

function print_log() {
    local logfile="$1"
    echo
    if ! [ -f "$logfile" ] ; then
        echo "log file $logfile does not exist"
    else
        echo Contents of "$logfile":
        cat "$logfile" | while read -r logline 
        do
            echo "$logline"
        done
    fi
}

function test_redirection() {
    log_line=0
    local cmd_log_file=$1; shift
    local tee=$1; shift
    
    
    [ -f "${process_log}" ] && rm "${process_log}"
    [ -f "${script_log}" ] && rm "${script_log}"
    log "console: Redirecting requested cmd output to $cmd_log_file"
    log console: making copy of the stdout and stderr destinations
    
    log console: calling function
    my_function cmd.pid "$cmd_log_file" "$tee" echo hi
    
    log console: stdout and sterr reset to the defaults for the next test
    
    print_log "$script_log"
    echo
    print_log "$process_log"
}

echo "*****************************"
echo "** Testing output to console"
echo "*****************************"
test_redirection "console" 
echo "*****************************"
echo "** Testing output to logfile"
echo "*****************************"
test_redirection "$process_log" 
echo "*****************************"
echo "** Testing output to logfile and console"
echo "*****************************"
test_redirection "$process_log" "tee_console"
echo "*****************************"
echo "** Testing output to logfile and default"
echo "*****************************"
test_redirection "$process_log" "tee"

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

79195378

Date: 2024-11-16 14:51:57
Score: 2
Natty:
Report link

Points to consider:

  1. Any metric can be arbitrarily small. It's represented up to a certain decimal place, usually the 4th. That said, being it limited to the 4th decimal place, number smaller than 0.00001 are not visible in the logs. It's worth waiting a little bit while the training runs so the metric can accumulate up to larger, visible values.

  2. If it's a custom metric, thoroughly review your implementation. Specially if the other metrics are logging values that make sense, you must re-asses your custom implementation. From a software engineering perspective, even better if a someone else can help you with it in a peer-review-like drill.

  3. Whenever possible, stick to the "native", embedded metrics available in the package you are using. Once again, from a SE perspective, re-implementing well-known calculations or customizing whatever will inexorably add risk.

  4. You did everything apparently correctly and the values are still non-sense: Be sure that you are using the metric to the purpose it was originally designed. For instance, F1 and Accuracy are typically label classification metrics (e.g: You are checking if the model predicts correctly if a football/baseball game should occur or be suspended/delayed). Scenarios where you want to predict a behavior (e.g: A curve) during a certain period of time is more likely a regression task. For regression tasks you want to know how far away from the ground truth you are, then you are more prone to use MAE and MRE, for example.

  5. Get familiar with the data preprocessing and how exactly you are feeding your model: Do you need the normalization? Do you need clipping (clamping)? Should you convert/map the original input values to boolean (or 1s and 0s) representation?

Finally, good luck!

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

79195374

Date: 2024-11-16 14:50:54
Score: 11.5 🚩
Natty:
Report link

Could you solve it ? I have the same issue.

Reasons:
  • Blacklisted phrase (1): I have the same issue
  • Blacklisted phrase (2): Could you solve
  • RegEx Blacklisted phrase (1.5): solve it ?
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I have the same issue
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: user28332025

79195347

Date: 2024-11-16 14:31:50
Score: 3
Natty:
Report link

Try using router.back() instead

import {router} from "expo-router";

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

79195344

Date: 2024-11-16 14:30:49
Score: 3.5
Natty:
Report link

you can't, you can compare if it has Clara, but not the order

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

79195342

Date: 2024-11-16 14:29:49
Score: 0.5
Natty:
Report link

This question was just answered in this post.

Lexilabs has a Kotlin Multiplatform library that enables AdMob @Composables called basic-ads.

The only downside is that it requires Android's Context to initialize and build @Composables, but there's already a tutorial out there for how to do that.

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

79195339

Date: 2024-11-16 14:28:48
Score: 0.5
Natty:
Report link

This question was just answered in this post.

Lexilabs has a Kotlin Multiplatform library that enables AdMob @Composables called basic-ads.

The only downside is that it requires Android's Context to initialize and build @Composables, but there's already a tutorial out there for how to do that.

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

79195331

Date: 2024-11-16 14:25:48
Score: 1
Natty:
Report link

Lexilabs has a Kotlin Multiplatform library that enables AdMob @Composables called basic-ads.

The only downside is that it requires Android's Context to initialize and build @Composables, but there's already a tutorial out there for how to do that.

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

79195330

Date: 2024-11-16 14:24:47
Score: 3.5
Natty:
Report link

for the audio part, type "audio" in that kind-of-search-box and repeat the procedure with the link

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

79195329

Date: 2024-11-16 14:24:47
Score: 0.5
Natty:
Report link

If you are using slackeventsapi python package along with ngrok, then you don't need to add following piece of code-

@app.route('/slack/events', methods=['POST'])
def get_events():
  # print(request)
  return request.json['challenge']

You app should work fine without above piece of code. I have a similar app in python flask used with ngrok.

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

79195325

Date: 2024-11-16 14:22:47
Score: 3.5
Natty:
Report link

Not sure what happened but it seems to be back up now. Maybe some weird timing issue

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

79195316

Date: 2024-11-16 14:19:46
Score: 1
Natty:
Report link

ULID is not sorted correctly on MS SQL SERVER. ULID is supposed to be sorted from left to right (left side is date) If you create a table with uniqueidentifier and DateTime, and then insert data into it in chronological order (ULID and date created at the same time) You will see that the dates are in random order. Also, my tests with the benchmark showed that the insertion time has a large spread from 2 to 22 seconds for inserting 100_000 rows. If you convert your ULID to string => nvarchar(26) then it will be sorted correctly. Or use long as snowflake id.

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