79272598

Date: 2024-12-11 17:13:21
Score: 2.5
Natty:
Report link

So i found the Mistake in my Code, i still dont understand why it would be that way, or why it does work but here is my solution to my problem:

Just move the route.post before the route.get

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

79272596

Date: 2024-12-11 17:13:21
Score: 4
Natty: 5
Report link

where isnull(column_name, '') not like '%somevalue%' works for me. when I want to include NULL as a default in the results, converting it to a blank char allows the evaluation.

Reasons:
  • Whitelisted phrase (-1): works for me
  • RegEx Blacklisted phrase (1): I want
  • Low length (1):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): where is
  • Low reputation (1):
Posted by: ESearing

79272592

Date: 2024-12-11 17:11:20
Score: 1.5
Natty:
Report link

I needed this too, and I wanted it to be robust and as international-friendly as possible. I used regex and character classes to get the characters I want and array ops to split/join it together:

export function camelize(s) {
    const sa = s
        .replace(/[^\w\d\s]/g, '')
        .toLowerCase()
        .split(/\s+/);

    return sa
        .filter(v => !!v)
        .map((w, i) => (i > 0 ? w[0].toUpperCase() + w.substr(1) : w))
        .join('');
}

Enjoy!

Reasons:
  • Blacklisted phrase (0.5): I need
  • RegEx Blacklisted phrase (1): I want
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Scott Means

79272591

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

In my case, I was attempting to write to a folder that didn't exist. I simply had to manually create the folder and then uploading succeeded.

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

79272587

Date: 2024-12-11 17:09:20
Score: 1
Natty:
Report link

Downgrading to mysql-connector-python 9.0.0 seemed to fix this for me.

I was having the same issue. In your example, my code would print A, B, and then exit before hitting C. Running the loggers Marcin mentioned would not give me any output.

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

79272582

Date: 2024-12-11 17:07:19
Score: 3
Natty:
Report link

I updated the project to the latest version - now the build works.

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

79272556

Date: 2024-12-11 16:59:17
Score: 5.5
Natty: 5.5
Report link

For me it doens't work. Can add more details?

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

79272539

Date: 2024-12-11 16:55:15
Score: 0.5
Natty:
Report link

what works for me was to uninstall it and install it again by:

pip install flask-mongoengine-3

in Additional make sure your flask version is Flask >= 2.0.0

Reasons:
  • Whitelisted phrase (-1): works for me
  • Low length (1):
  • Has code block (-0.5):
  • Starts with a question (0.5): what
  • Low reputation (0.5):
Posted by: ally leandre

79272530

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

For anyone coming here from a search turns out I can just do:

import attrs


@attrs.define
class C:
  val: int | str = attrs.field(validator=attrs.validators.instance_of((str, int)))

This may mypy doesn't complain and runtime behavior is unaffected

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

79272523

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

The issue is with your code , please check get(String) method in your code , whether it exist or not in CreateParticipantContextResponse class also check whether it is being pass with the correct parameter.

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

79272522

Date: 2024-12-11 16:49:11
Score: 6 🚩
Natty:
Report link

Hello @Sayali and @amit We are looking for a way to get real-time audio and video streams while on a Microsoft Teams call using Node.js. We reviewed the Microsoft documentation, and it seems they only support real-time streaming with C# and .NET.

Is there a way to achieve this with Node.js, or are there any workarounds or third-party libraries that could help us access Teams audio and video streams in real time?

Any guidance or suggestions would be greatly appreciated!

Reasons:
  • Blacklisted phrase (1): appreciated
  • Blacklisted phrase (1): Is there a way
  • RegEx Blacklisted phrase (1): help us
  • No code block (0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Sayali
  • User mentioned (0): @amit
  • Low reputation (1):
Posted by: Umer Karachiwala

79272499

Date: 2024-12-11 16:40:09
Score: 1
Natty:
Report link
import logging
from escpos.printer import Usb
logging.basicConfig(level=logging.DEBUG)
p = Usb(0x0456, 0x0808, 0)
p.text("Hello World\n")
p.cut()`enter code here`

and i got the error, dont know why File "D:\codes\print.py", line 7, in p.text("Hello World\n")

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

79272498

Date: 2024-12-11 16:40:09
Score: 1.5
Natty:
Report link

When changing the cursor color, it is advisable to adjust the background color of the selected text and the selection cursor color in order to maintain visual consistency. Here’s the way how to achieve this on Android API 29 and later:

  1. In shared .NET MAUI code create subclass of Entry, so you can add additional properties/bindings etc, for example create MyEntryView.cs :

    using Microsoft.Maui.Controls.Shapes;
    using MauiEntry = Microsoft.Maui.Controls.Entry;
    
    namespace MyLibrary;
    
    public class MyEntryView : MauiEntry
    {
        public Color CursorColor { get; set; }
    }
    
  2. In shared .NET MAUI code create MyEntryHandler.cs :

    using Microsoft.Maui.Handlers; 
    
    namespace MyLibrary; 
    
    public partial class MyEntryHandler : EntryHandler { }   //empty 
    
  3. Create MyEntryHandler.cs in the Platforms/Android folder:

    using Android.Graphics;
    using AndroidX.AppCompat.Widget;
    using Microsoft.Maui.Handlers;
    using Microsoft.Maui.Platform;
    
    namespace MyLibrary;
    
    public partial class MyEntryHandler : EntryHandler
    {
        protected override void ConnectHandler(AppCompatEditText platformView)
        {
            base.ConnectHandler(platformView);
    
            var v = VirtualView as MyEntryView;
            if (v != null)
            {
                PlatformView.SetBackgroundColor(Android.Graphics.Color.Transparent);  //hide underline
    
                if (v.CursorColor != null && OperatingSystem.IsAndroidVersionAtLeast(29)) 
                {
                    //sets cursor color
                    //for older api versions app will set cursor color according to colorAccent from colors.xml
                    PlatformView.TextCursorDrawable.SetTint(v.CursorColor.ToPlatform());
    
                    //sets color of the selection cursors
                    var f = new BlendModeColorFilter(v.CursorColor.ToPlatform(), Android.Graphics.BlendMode.SrcIn);
                    PlatformView.TextSelectHandleLeft.SetColorFilter(f);
                    PlatformView.TextSelectHandleRight.SetColorFilter(f);
                    PlatformView.TextSelectHandle.SetColorFilter(f);
    
                    //set color of selected text
                    //you can expose the value of alpha to MyEntryView if you like
                    PlatformView.SetHighlightColor(v.CursorColor.WithAlpha((float) 0.4).ToPlatform());
                }
            }
        }
    
        protected override void DisconnectHandler(AppCompatEditText platformView)
        {
            base.DisconnectHandler(platformView);
            platformView.Dispose();
        }
    }
    
  4. Register handlers in CreateMauiApp method in the MauiProgram class like:

    builder.ConfigureMauiHandlers(handlers =>
    {
        handlers.AddHandler(typeof(Entry), typeof(MyEntryHandler));
    });
    
  5. Create instance of MyEntry and place it somewhere in the view tree and that's it. Example of MyEntry :

    var e = new MyEntry
    {
        CursorColor = Colors.Orange
        //set other properties as well to fit your specification ...
    };
    

    Example of how it appears on Android :

    Cursor

    Point

    Select

Reasons:
  • Blacklisted phrase (1): how to achieve
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Starts with a question (0.5): When
  • Low reputation (0.5):
Posted by: R23

79272496

Date: 2024-12-11 16:39:09
Score: 1
Natty:
Report link

You can easily convert

filename.ipynb

into a Python file (filename.py) using this command:

jupyter nbconvert --to python --execute filename.ipynb 

but why not take advantage of the IPython command line? With a single command, you can effortlessly run your Jupyter Notebook without needing to convert it. Simply use the following command:

ipython filename.ipynb

IPython provides a wide range of features to help you improve the process's efficiency. Visit the official IPython documentation to find all that it can do.

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

79272493

Date: 2024-12-11 16:38:08
Score: 0.5
Natty:
Report link
import React, { useRef } from 'react';
import Mapbox from '@rnmapbox/maps';
import {View} from "react-native";

Mapbox.setAccessToken('YOUR_MAPBOX_ACCESS_TOKEN');

const Map = () => {
  const camera = useRef<Mapbox.Camera>(null);
  const map = useRef<Mapbox.MapView>(null);

  const zoomLevel = 10;

  return (
    <View>
        <Mapbox.MapView
          ref={map}
          styleURL="mapbox://styles/mapbox/light-v11"
          projection={'globe'}
          logoEnabled={false}
          attributionEnabled={false}
          scaleBarEnabled={false}>
          <Mapbox.Camera ref={camera} zoomLevel={zoomLevel} animationMode={'flyTo'} animationDuration={2000} />
        </Mapbox.MapView>
    </View>
  );
};
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: matteohcf

79272491

Date: 2024-12-11 16:37:08
Score: 3
Natty:
Report link

please enter about:config into the firefox address bar (confirm the info message in case it shows up) & search for bold preferences starting with security. - right-click and reset those entries to their default values.

That did the trick. I reset the following to their defaults: security.ssl.errorReporting.automatic (from true to false) security.tls.version.min (from 2 to 1)

Thats All

Best Regards

Reasons:
  • Blacklisted phrase (0.5): Best Regards
  • Blacklisted phrase (1): Regards
  • No code block (0.5):
  • Low reputation (1):
Posted by: Juan Sepulveda

79272485

Date: 2024-12-11 16:36:08
Score: 1
Natty:
Report link

I found the reason is that you send owner as a string. You need to send the owner as an object containing the id of the related user.

POST /api/batches
{
  "data": {
    "name": "Test Batch",
    "state": "open",
    "locale": "vi",
    "owner": {
      "id": "rz9blkq8c0bns6bxx81heq9w"
    }
  }
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Sphenix Dev

79272480

Date: 2024-12-11 16:34:07
Score: 3.5
Natty:
Report link

Why not do it with a function?

public function maybe_add_to_array( array &$arr, string $key, $value, $condition ) {
    if (!$condition){
        return;
    }
    $arr[ $key ] = $value;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): Why not
  • Low reputation (1):
Posted by: Meyer Auslander - Tst

79272474

Date: 2024-12-11 16:32:06
Score: 4.5
Natty:
Report link

Well, with given code it's not clearly reproducible. I refered the code from sample app provided by 'ModernWPF' and tried to create sample with your code. Can you provide code for NavigationTemplateSelector and how you are adding menu items ?

<Window x:Class="WpfApp.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ui="http://schemas.modernwpf.com/2019"
    xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
    xmlns:rx="http://reactiveui.net"
    xmlns:local="clr-namespace:WpfApp"
    ui:WindowHelper.UseModernWindowStyle="True"
    ui:ThemeManager.RequestedTheme="Dark"
    Title="WPF Toolbox Example" Height="450" Width="800">
<Window.Resources>
    <!--  Navigation menu item  -->
    <DataTemplate x:Key="NavigationViewMenuItem">
        <ui:NavigationViewItem
            Content="{Binding Title}"
            Icon="{Binding Icon}"
            IsEnabled="{Binding Selectable}"
            MenuItemsSource="{Binding Children}"
            SelectsOnInvoked="{Binding Selectable}"/>
    </DataTemplate>
    <!--  Navigation header item  -->
    <DataTemplate x:Key="NavigationViewHeaderItem">
        <ui:NavigationViewItemHeader Content="{Binding Title}" />
    </DataTemplate>
    <!--  Template selector for navigation items  -->
    <local:NavigationTemplateSelector
        x:Key="NavigationTemplateSelector"
        HeaderTemplate="{StaticResource NavigationViewHeaderItem}"
        ItemTemplate="{StaticResource NavigationViewMenuItem}" />
</Window.Resources>
<Grid UseLayoutRounding="True">
    <ui:NavigationView
        x:Name="NavigationView"
        AlwaysShowHeader="True"
        Grid.Row="0"
        IsPaneOpen="False"
        OpenPaneLength="150"
        IsSettingsVisible="False"
        IsBackButtonVisible="Collapsed"
        IsPaneToggleButtonVisible="true"
        ItemInvoked="NavigationView_ItemInvoked"

        >
        <ui:NavigationView.MenuItems>
            <ui:NavigationViewItem Content="Menu Item1" Tag="SamplePage1" Icon="Play" >
                <ui:NavigationViewItem.MenuItems>
                    <ui:NavigationViewItem Content="Mail" Icon="Mail" ToolTipService.ToolTip="Mail" Tag="SamplePage3"/>
                    <ui:NavigationViewItem Content="Calendar" Icon="Calendar" ToolTipService.ToolTip="Calendar" Tag="SamplePage4"/>
                </ui:NavigationViewItem.MenuItems>
            </ui:NavigationViewItem>
            <ui:NavigationViewItem Content="Menu Item2" Tag="SamplePage2" Icon="Save" />
            <ui:NavigationViewItem Content="Menu Item3" Tag="SamplePage3" Icon="Refresh" />
            <ui:NavigationViewItem Content="Menu Item4" Tag="SamplePage4" Icon="Download" />
        </ui:NavigationView.MenuItems>
        <rx:RoutedViewHost
            x:Name="MainHost"
            Duration="0"
            ToolTip="{x:Null}"
            VerticalContentAlignment="Stretch"
            HorizontalContentAlignment="Stretch"/>
        
    </ui:NavigationView>
</Grid>
Reasons:
  • RegEx Blacklisted phrase (2.5): Can you provide code
  • Long answer (-1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Looks like a comment (1):
  • Low reputation (0.5):
Posted by: Himanshu Mange

79272473

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

I am using vite + vue js + typescript This one works great:

I am using the latest packages with clion on linux as in December 2024.

also don't worry about me using typescript, javascript is already imported using ES6 and the tsconfig.json file. if your having issues and newbie to vue language please pay attention and understand the .vue is not the same as .htm/html. .vue is what you should use to create the SPAs. Thanks Johnny Bahjat Kennesaw.edu

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • No code block (0.5):
  • Low reputation (1):
Posted by: JohnnyB

79272469

Date: 2024-12-11 16:29:04
Score: 4
Natty: 5
Report link

Excellent, simple solution that I was looking for as well. Thank you.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Dr. Damon Bradley

79272465

Date: 2024-12-11 16:28:04
Score: 2.5
Natty:
Report link

Sum of Two Values This problem from CSES problem set, Gives AC with using std::map<int, int> and gives TLE with std::unordered_map<int, int>. so definitely hashmap takes larger memory

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

79272455

Date: 2024-12-11 16:25:03
Score: 0.5
Natty:
Report link

Not ideal, but one option is to reconstruct an object with the checked type:

function typecheck<T extends Language>(code: Code<T>) {
    const { lang, content } = code;
    if (lang === "TYPESCRIPT") {
        typecheckTS({ lang, content });
    } else {
        // ...
    }
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Wyrzutek

79272453

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

have you tried this?

psql -U postgres  -d postgres -c "DROP DATABASE  ""Ajp"" "
Reasons:
  • Whitelisted phrase (-1): have you tried
  • Low length (1.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Evandro Giachetto

79272449

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

Best option in my opinion is to see the data layer tab in Tag Assistant. It'll give you a better view of the structure and it'll make it easier to create the data layer variable.

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

79272437

Date: 2024-12-11 16:21:01
Score: 7.5 🚩
Natty: 6.5
Report link

I am trying this for the first time. Can someone explain this step by step? I am trying to have the workbook tab name update with the value in cell B2.

Reasons:
  • Blacklisted phrase (1): I am trying to
  • RegEx Blacklisted phrase (2.5): Can someone explain
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Sheets User

79272433

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

For iOS 18.1 and macOS 15 SwiftUI map, you can now get the coordinates of the middle point with this:

let middleCoord = route!.polyline.points()[route!.polyline.pointCount/2].coordinate

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

79272429

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

I have found the solution for my question.

it seems that react-three-fiber has conflicts with React 19. so by installing '@react-three/fiber@alpha' seems to fix the issue

npm install @react-three/fiber@alpha

here is the link to where I found the answer:

https://github.com/vercel/next.js/issues/66468#issuecomment-2296319798

thanks for all the answers!

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (1): here is the link
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Jayson Sanon

79272407

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

The behavior you're observing with the Npgsql driver is expected. The Minimum Pool Size setting in the connection string specifies the minimum number of connections that the pool will maintain, but it does not force the pool to open these connections immediately at application startup. See more in https://www.cockroachlabs.com/docs/stable/connection-pooling.

To achieve the behavior you want, you might have to manually open connections up to the minimum pool size at application startup.

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

79272386

Date: 2024-12-11 16:08:58
Score: 2
Natty:
Report link

this creates a circular reference for me:

Items for Display Gallery for ReportsRequired: Filter( ReportsRequired, lbl_rg_state = state_combo_rg.Selected.Value) )

this is my filter: state_combo_rg: Sort( Distinct( Permits, State ), Value, SortOrder.Ascending )

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

79272384

Date: 2024-12-11 16:08:57
Score: 8.5 🚩
Natty: 4
Report link

Did you ever resolved this problem? I've also troubles to integrate wiremock with spring boot 3.3.4.

Reasons:
  • RegEx Blacklisted phrase (3): Did you ever resolved this problem
  • RegEx Blacklisted phrase (1.5): resolved this problem?
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): Did you
  • Low reputation (1):
Posted by: Nenad Jevdjenic

79272373

Date: 2024-12-11 16:03:55
Score: 4.5
Natty: 4.5
Report link

I am having the issue as well. Did find a solution ?

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

79272370

Date: 2024-12-11 16:02:54
Score: 4
Natty:
Report link

Have you looked at PerspectiveFilter from jhlabs? It sounds like what you're looking for.

http://www.jhlabs.com/ip/filters/PerspectiveFilter.html

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Jose

79272353

Date: 2024-12-11 15:54:51
Score: 0.5
Natty:
Report link
from datetime import date, timedelta

def days_in_month(year, month):
    return filter(lambda dt: dt.month == month, [date(year, month, 1) + timedelta(days=i) for i in range(31)])
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Harry Jones

79272349

Date: 2024-12-11 15:53:51
Score: 1.5
Natty:
Report link

run the following command in a Repo checked out the wanted branch:

git ls-remote origin 'pull/*/head' | grep -F -f <(git rev-parse HEAD) | awk -F'/' '{print $3}'
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: elistr

79272340

Date: 2024-12-11 15:50:50
Score: 2.5
Natty:
Report link

for clearing the screen use cls as cmd to clear

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

79272337

Date: 2024-12-11 15:50:50
Score: 5
Natty:
Report link

i have the same problem with jeep-sqlite.entry.js.

    [ERROR] The package "crypto" wasn't found on the file system but is built into node. [plugin angular-browser-node-built-in]
[ng]     node_modules/jeep-sqlite/dist/esm/jeep-sqlite.entry.js:2900:28:
[ng]       2900 │             var a = require("crypto");
Reasons:
  • Blacklisted phrase (1): i have the same problem
  • Low length (0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): i have the same problem
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Andrea Gobbetto

79272333

Date: 2024-12-11 15:49:49
Score: 4
Natty:
Report link

Which Theme are you using?

Try to use Hello Elementor theme.

@Jos is right, Elementor Canvas template doesn't show any Header & Footer. Try another template like Elementor full width or Default.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Jos
  • Starts with a question (0.5): Which Theme are you
  • Low reputation (1):
Posted by: Ahmet Deryahanoglu

79272320

Date: 2024-12-11 15:44:47
Score: 2
Natty:
Report link

Based on the Java resources, distinct() is a stateful operation that maintains some state internally to accomplish its opereation. For parallelization, filter(seen::add) with a ConcurrentHashMap.newKeySet() is better because the filter method is a stateless operation.

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

79272309

Date: 2024-12-11 15:43:47
Score: 2.5
Natty:
Report link

If you want to use .NET8 keep using it, but in global.json file keep the version 9.0.0 this is the SDK version.

Things will work fine this way.

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

79272307

Date: 2024-12-11 15:42:47
Score: 2
Natty:
Report link

In my case Srping Boot v3.4.0 + springdoc-openapi-starter-webmvc-ui v2.6.0 => error

Upgrading springdoc-openapi-starter-webmvc-ui to v2.7.0 => ok

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

79272303

Date: 2024-12-11 15:41:46
Score: 1
Natty:
Report link

Too elaborate on this as per https://nginx.org/en/CHANGES

Changes with nginx 1.15.0 05 Jun 2018

*) Change: the "ssl" directive is deprecated; the "ssl" parameter of the
   "listen" directive should be used instead.
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Anisimow

79272300

Date: 2024-12-11 15:41:46
Score: 2.5
Natty:
Report link

Thanks LMA, Joel, your inputs helped me a lot. I found the below way to get the OA equivalent, it was easy after read your comments

DateTime aDate = DateTime.Now;
originalDateTB.Text = aDate.ToString();
convertedDateTB.Text = aDate.ToOADate().ToString();
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): helped me a lot
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: JC Nunez

79272292

Date: 2024-12-11 15:39:46
Score: 1
Natty:
Report link

I did the following and got rid of the detachment without losing my changes

git branch detached-branch
git checkout detached-branch
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: tarikakyol

79272291

Date: 2024-12-11 15:39:46
Score: 2
Natty:
Report link

If anybody uses Spring Boot v3.4.0 with springdoc-openapi-starter-webmvc-ui v2.6.0 and gets similar error on the swagger page, update springdoc-openapi-starter-webmvc-ui to v2.7.0 should solve the issue.

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

79272290

Date: 2024-12-11 15:38:46
Score: 2.5
Natty:
Report link

I know this is an older question, but you can just call Pageable.unpaged(Sort sort) which will create an unpaged but sorted pageable.

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

79272284

Date: 2024-12-11 15:37:45
Score: 2
Natty:
Report link

Try the stargazer package in R:

library(stargazer)

stargazer(df, type = "text",
summary = F,
row names = F,
title = "[You title here]",
out = "table_output.txt") # You can create a file

For the full list of functions for stargazer, follow this link: Stargazer Package

Reasons:
  • Blacklisted phrase (1): this link
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Will

79272280

Date: 2024-12-11 15:35:44
Score: 1.5
Natty:
Report link

from selenium import webdriver

Initialize the WebDriver

driver = webdriver.Chrome() # Use the appropriate WebDriver for your browser

Navigate to the desired URL

driver.get("https://rueb.co.uk/")

Access the page's HTML source

html_source = driver.page_source print(html_source)

Close the WebDriver

driver.quit()

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

79272275

Date: 2024-12-11 15:34:44
Score: 3
Natty:
Report link

Also had this issue (reproducible multiple browsers and laptops). We figured out that setting PGAdmin k8 pod to be observed by Odigos (eBPF tracing) somehow caused this issue.

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

79272265

Date: 2024-12-11 15:32:44
Score: 0.5
Natty:
Report link

Loading an SSH-based Conda environment in PyCharm can sometimes take a long time due to various reasons like network latency, misconfigured paths, or issues with the environment setup. Here are some troubleshooting steps to address the problem:

  1. Verify SSH Connection Stability Ping the Server: Use the ping command to check for high latency or packet loss to the SSH server. bash Copy code ping <your_server_ip> Network Speed: Ensure your connection has enough bandwidth for data transfer.
  2. Check Conda Initialization on the Server Ensure that the Conda environment is properly configured and can activate quickly when accessed via SSH: bash Copy code conda activate <your_env_name> If activating the environment takes a long time: Check for issues in the .bashrc or .bash_profile files that could be slowing down shell initialization. Remove unnecessary commands or debug any slow startup scripts.
  3. Configure PyCharm's SSH Interpreter Settings Go to Settings > Project: > Python Interpreter. Select the SSH interpreter and click the gear icon to edit it. Ensure that: The correct paths to Python and Conda are specified. There are no invalid or outdated paths.
  4. Optimize the PyCharm Conda Environment Setup Pre-Load Conda Information: PyCharm often fetches environment information. If this process is slow, you can manually set the interpreter:

SSH into the server. Activate the Conda environment and note the Python path: bash Copy code conda activate <your_env_name> which python Use this Python path directly in PyCharm instead of relying on auto-detection. Reduce Sync Overhead:

Go to Settings > Build, Execution, Deployment > Deployment. For your SSH configuration, exclude large directories like node_modules, venv, or unnecessary Conda files. 5. Check for PyCharm Updates Ensure you are using the latest version of PyCharm, as updates often improve performance and SSH handling. 6. Debug Logs for Insight Enable detailed PyCharm logging for SSH connections: Go to Help > Diagnostic Tools > Debug Log Settings. Add the following logs: arduino Copy code #com.jetbrains.python.remote #com.jetbrains.plugins.webDeployment Try loading the environment again and check the logs for specific errors or slow steps. 7. Alternative: Use Remote Development Tools If the issue persists, consider using PyCharm’s Remote Development plugin or tools like VS Code Remote SSH for a smoother experience.

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

79272257

Date: 2024-12-11 15:30:43
Score: 3.5
Natty:
Report link

I'm also facing the same situation as you but I can't find the right answer. You have solved the above problem. Thank you

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Toàn Nguyễn Phúc

79272255

Date: 2024-12-11 15:30:43
Score: 1
Natty:
Report link

I got the same error message with an older version of OpenAI (1.11.1). The issue was caused by recent changes in the httpx package.

Downgrading to httpx==0.27.0 fixed this for me.

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

79272245

Date: 2024-12-11 15:27:43
Score: 1
Natty:
Report link

Although this post is from a year ago, I faced the same issue today and couldn't find a solution anywhere. My colleague and I were able to resolve it. The fix is to change the ttl parameter from a number to an object:

await this.cacheManager.set(keyRfToken, refreshToken, {ttl: 2000} as any)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: tsiwant

79272241

Date: 2024-12-11 15:26:42
Score: 2
Natty:
Report link

Apologies, I'm no Hibernate expert, but should that be:

@Entity
public class Person {
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user-10884042

79272230

Date: 2024-12-11 15:23:41
Score: 0.5
Natty:
Report link

If anyone got this error in Dec 2024 for a previously working python project:

This happens because your packages depend on six, but are not compatible with the new version of six (1.17.0) released on Dec 4, 2024.

Pinning the version to six==1.16.0 fixes the issue.

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

79272217

Date: 2024-12-11 15:19:40
Score: 3
Natty:
Report link

I encountered this problem when we upgraded our Flutter project to JAVA_17 and Gradle 8.

In my case, the solution was just updating all the SDK Tools in Android Studio:

screenshot

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

79272215

Date: 2024-12-11 15:19:40
Score: 2.5
Natty:
Report link

Simple solution is to delete the .git file from your dir then init git again

Reasons:
  • Whitelisted phrase (-1): solution is
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Kessiena Omole

79272212

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

Read (and process) all datagrams in a loop, until none is received within a time interval. A non-blocking socket and select.select can be used with a timeout to accomplish this.

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

79272202

Date: 2024-12-11 15:12:38
Score: 4.5
Natty: 6
Report link

In my case, it was du to the 2 MFA ( https://support.google.com/accounts/answer/185839?hl=en&co=GENIE.Platform%3DDesktop) Once configured, I was able to add my card.

Regards,

Reasons:
  • Blacklisted phrase (1): Regards
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Adame Benadjal

79272189

Date: 2024-12-11 15:08:37
Score: 1.5
Natty:
Report link

The locator identifier has to be change from form to form > input

for element in await page.locator('form > input').all():
              print(element)
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: THANAN JAYAN

79272180

Date: 2024-12-11 15:05:36
Score: 1
Natty:
Report link

<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3652.9415707688636!2d90.35780160000002!3d23.7137805!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x27f1dcde1189f339%3A0x790f126e13687e4b!2zZ2FzIG1pc3RyeSBhbGFrOTct4KaX4KeN4Kav4Ka-4Ka4IOCmruCmv-CmuOCnjeCmpOCnjeCmsOCmvyDgpobgprLgpr7gppU!5e0!3m2!1sen!2sbd!4v1733924413211!5m2!1sen!2sbd" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>

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

79272173

Date: 2024-12-11 15:03:35
Score: 0.5
Natty:
Report link

One way is to dig into Tensorflow code to see where is defined the list of POS and then import it to use in your code. You can find the list of the POS in the Github code of tensorflow Datasets there (UPOS constant): https://github.com/tensorflow/datasets/blob/master/tensorflow_datasets/core/dataset_builders/conll/conllu_dataset_builder_utils.py#L31

The item order is their index so with display(pd.Series(UPOS)), you get:

res


Another way would be to extract the items from the upos column of tfds.as_dataframe (taking a few rows, concatenating the upos values, splitting by the separating character and taking the set() to get the unique values.

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

79272171

Date: 2024-12-11 15:01:35
Score: 2
Natty:
Report link

You haven't set the request.use_ssl = true. Take a look at this post, it's the same problem i think. EOFError: end of file reached issue with Net::HTTP

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

79272162

Date: 2024-12-11 14:59:34
Score: 1.5
Natty:
Report link

PSI uses a specific device profile for its lab tests; local lighthouse reports use the specs of your local machine, so if you have a higher performing machine vs the test machine your lighthouse scores will bias towards indicating higher performance

Also keep in mind these reports are all lab data and don't reflect the real experience of users; consider it a rough guide to guide performance improvement projects.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Dale From CurrentWare

79272157

Date: 2024-12-11 14:58:33
Score: 2.5
Natty:
Report link

你应该给你的 objectMapper添加一些配置

val objectMapper = ObjectMapper().registerKotlinModule()
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • No latin characters (0.5):
  • Low reputation (1):
Posted by: 刚刚好

79272155

Date: 2024-12-11 14:57:33
Score: 2
Natty:
Report link

As far as I know Excel stores that value as floating-point number from their epoch which is 1st of January 1900 you need to calc the days since them and include the fractional part of the current day.

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

79272142

Date: 2024-12-11 14:53:32
Score: 2
Natty:
Report link

You can find your answer here https://discuss.appium.io/t/androidfindby-unsupported-css-selector/36733/3. Using initElements(new AppiumFieldDecorator(appDriver), this); instead of PageFactory.initElements(appDriver, this); should fix your Problem. Please don't use XPath instead of id as it is much slower and not reliable.

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

79272140

Date: 2024-12-11 14:52:32
Score: 2
Natty:
Report link

try creating them in a wrap of try ... finally

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

79272127

Date: 2024-12-11 14:49:31
Score: 1
Natty:
Report link

My problem was that I was stubbornly trying to implement createBrowserRouter that is essentially not compatible with my scenario.

Thanks to the comment by @DrewReese I switched to createHashRouter

import { createHashRouter } from "react-router-dom";
import { HomeView } from "./views/home";
import { SceneryView } from "./views/scenery";
import { NotFoundView } from "./views/not-found";
import { DefaultLayout } from "./layouts/default-layout";
import { PatientView } from "./views/patient";
import { PatientEndView } from "./views/patient-end";
import { CompletedView } from "./views/completed";

const router = createHashRouter([
  {
    path: "/",
    element: <DefaultLayout />,
    children: [
      {
        index: true,
        element: <HomeView />,
      },
      {
        path: "decision-pathways/scenery/:id",
        element: <SceneryView />,
      },
      {
        path: "decision-pathways/patient/:sceneryId/:patientId",
        element: <PatientView />,
      },
      {
        path: "decision-pathways/patient/end/:sceneryId/:patientId",
        element: <PatientEndView />,
      },
      {
        path: "decision-pathways/completed",
        element: <CompletedView />,
      },
    ],
  },
  {
    path: "*",
    element: <NotFoundView />,
  },
]);

export default router;

What's the difference? Basically createHashRouter add an hashtag before react "internal" route. In this way the web server ignores whatever is after that hashtag and resolves always to the same file, in this case my index.html.

For the resources all that is needed to change the paths to relative ones is this line in vite.config.js:

base: "./"
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @DrewReese
  • Self-answer (0.5):
Posted by: Lorenzo

79272111

Date: 2024-12-11 14:46:30
Score: 2
Natty:
Report link

This sometimes happens because of SHA-1 mismatch. Don't forget to download the google-servce.json from Firebase if you update your SHA-1.

Check this thread, it may help

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

79272109

Date: 2024-12-11 14:45:30
Score: 0.5
Natty:
Report link

As this is a client side issue its solution lies in the client side.

I just needed to configure cookies in client side:

    builder.Services
        .AddAuthentication(...)
        .AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, o =>
        {
            o.Cookie.MaxAge = TimeSpan.FromDays(180);
        })
        .AddOpenIdConnect(...);
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Farzad M.

79272107

Date: 2024-12-11 14:45:30
Score: 3
Natty:
Report link

Al subir a la version SDK52 ya trae por defecto NavigationContainer . No se debe agregar nada.

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

79272104

Date: 2024-12-11 14:44:30
Score: 1
Natty:
Report link
Hover over in Runner class --> import io.cucumber.junit.Cucumber;
Click on "Organize imports" Suggestion.

This should remove the failure underline.
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: sathish

79272096

Date: 2024-12-11 14:40:29
Score: 2
Natty:
Report link

For the same issue on macOS, I added the following line at the end of my ~/.zshrc file. I hope this helps anyone facing a similar problem:

export PATH=$PATH:~/go/bin
Reasons:
  • Whitelisted phrase (-1): hope this helps
  • Low length (1):
  • Has code block (-0.5):
  • Me too answer (2.5): facing a similar problem
Posted by: Alexandr S.

79272095

Date: 2024-12-11 14:39:29
Score: 0.5
Natty:
Report link

I can't say this will be particularly useful to what you're trying to do, but the whole EDGE integration capability that supported the legacy Guidewire digital products (the non-Jutro ProducerEngage, etc products) is built on a dependency injection framework. That is tightly linked to the JSON-RPC entry point so it's not intended to be used in a more general sense but if you're looking for an example that's the best one generally available that I'm aware of.

For modern usage where the GWCP Cloud APIs are intended as the primary entry point into the IS applications that example isn't particularly useful or informative. If you can share more information about what problem you're trying to solve the community may have more feedback.

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

79272094

Date: 2024-12-11 14:39:29
Score: 1
Natty:
Report link

I was running into the same issue with kaleido (python 3.13, running on ubuntu wsl)

I could install uv add kaleido==0.2.0, might work for you if you do not specifically need 0.2.1

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

79272083

Date: 2024-12-11 14:37:28
Score: 1
Natty:
Report link

I have had the same problem, checking the filament repository for the same issue some people said to force livewire to downgrade Inside composer.json

"livewire/livewire": "3.5.12"

Then use composer to update livewire

composer update livewire/livewire

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

79272082

Date: 2024-12-11 14:36:28
Score: 0.5
Natty:
Report link

By removing @Component, the filter will not be picked up automatically by the servlet container.

    @Slf4j
    //@Component -> Remove this
    @RequiredArgsConstructor
    public class JwtAuthenticationFilter implements WebFilter {
    
        private final JwtTokenProvider jwtTokenProvider;
    
        @NonNull
        @Override
        public Mono<Void> filter(@NonNull ServerWebExchange exchange, @NonNull WebFilterChain chain) {
            log.debug("Processing request: {} {} at {}", exchange.getRequest().getMethod(), exchange.getRequest().getPath(), System.currentTimeMillis());
            String token = resolveToken(exchange.getRequest());
            if (StringUtils.hasText(token) && this.jwtTokenProvider.isTokenValid(token)) {
                return chain.filter(exchange).contextWrite(ReactiveSecurityContextHolder.withAuthentication(this.getAuthentication(token)));
            }
    
            return chain.filter(exchange);
        }
    
        private String resolveToken(ServerHttpRequest request) {
            String bearerToken = request.getHeaders().getFirst(HttpHeaders.AUTHORIZATION);
            if (StringUtils.hasText(bearerToken) && bearerToken.startsWith("Bearer ")) {
                return bearerToken.substring(7);
            }
            return null;
        }
}

This avoids multiple registrations in the Spring context and ensures that the filter is only applied within the Spring Security filter chain.

@Configuration
@EnableWebFluxSecurity
@RequiredArgsConstructor
public class SecurityConfig {

    private final JwtTokenProvider jwtTokenProvider;

    @Bean
    public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
        JwtAuthenticationFilter jwtFilter = new JwtAuthenticationFilter(jwtTokenProvider); // add it here
        return http
                .csrf(ServerHttpSecurity.CsrfSpec::disable)
                .cors(ServerHttpSecurity.CorsSpec::disable)
                .httpBasic(ServerHttpSecurity.HttpBasicSpec::disable)
                .formLogin(ServerHttpSecurity.FormLoginSpec::disable)
                .logout(ServerHttpSecurity.LogoutSpec::disable)
                .authorizeExchange(exchanges -> exchanges
                        .pathMatchers(WHITE_LIST_URL).permitAll()
                        .anyExchange().authenticated()
                )
                .addFilterAt(jwtFilter, SecurityWebFiltersOrder.AUTHENTICATION)
                .build();
    }
}
Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @Component
  • Low reputation (1):
Posted by: iBouce

79272081

Date: 2024-12-11 14:36:28
Score: 1
Natty:
Report link

Solution was in fetchData settings. It takes by default 10 rows (I understand it in that way).

Query query = entityManager.createNativeQuery(...);
List<Object[]> results = query.unwrap(org.hibernate.query.NativeQuery.class).setFetchSize(1000).getResultList();

Unwrap with fetchData is the solution.

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

79272080

Date: 2024-12-11 14:36:28
Score: 1.5
Natty:
Report link

This code is used to detect only safari browser

const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: stiweb

79272073

Date: 2024-12-11 14:34:28
Score: 0.5
Natty:
Report link

Another possible cause of this warning is a missing quotation marks:

Wrong:

Data    interface{} `json:data`

To resolve this, ensure the field tag is properly formatted with quotes, as shown below:

Correct:

Data    interface{} `json:"data"`
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: YellowStrawHatter

79272071

Date: 2024-12-11 14:33:27
Score: 4
Natty:
Report link

Create Empty Views Activity instead of Empty Avtivity enter image description here

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

79272070

Date: 2024-12-11 14:33:27
Score: 0.5
Natty:
Report link

You can achieve what you want, by processing each group in b using the following code:

import pyarrow as pa
import pyarrow.compute as pc

table = pa.table({'a': [1, 2, 3, 4, 5, 6], 'b': ['x']*3 + ['y']*3})

unique_b = pc.unique(table['b'])

cumsum_list = []
b_list = []

for value in unique_b:
    mask = pc.equal(table['b'], value)
    group = table.filter(mask)
    cumsum = pc.cumulative_sum(group['a'])
    cumsum_list.extend(cumsum)
    b_list.extend(group['b'])

final_result = pa.table({'a': cumsum_list, 'b': b_list})

To visualize the result you can convert it back to pandas using:

print(final_result.to_pandas())

which returns the following:

enter image description here

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

79272065

Date: 2024-12-11 14:32:26
Score: 1
Natty:
Report link

The regular Expression "[a-zA-Z\n\W]+" will match letters, non Word Characters (e.g. Dots, Question Marks) and Line Breaks encapsulated by Double Quotes. The plus looks for a greedy match, securing that multiple line Strings are matched.

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

79272050

Date: 2024-12-11 14:27:25
Score: 4.5
Natty: 4.5
Report link

In https://rubyinstaller.org/downloads/ make sure to install the bold one.

photo

Reasons:
  • Probably link only (1):
  • Low length (2):
  • No code block (0.5):
  • Low reputation (1):
Posted by: M.Boby Pratama

79272045

Date: 2024-12-11 14:25:24
Score: 2
Natty:
Report link

import 'package:flutter/material.dart'; import 'package:webview_flutter/webview_flutter.dart';

class AppScreen extends StatefulWidget {

const AppScreen({super.key});

@override State createState() => _AppScreenState();

}

class _AppScreenState extends State {

final ctr = WebViewController()

..setJavaScriptMode(JavaScriptMode.unrestricted)

//--> Add this line

..setUserAgent( "Mozilla/5.0 (Linux; Android 10; Mobile) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Mobile Safari/537.36", // Custom user-agent )

..loadRequest(Uri.parse('yourUrl'));

@override

Widget build(BuildContext context) {

return SafeArea(

child: Scaffold(

body: WebViewWidget(

controller: ctr

),

),

);

}

}

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @override
  • User mentioned (0): @override
  • Low reputation (1):
Posted by: Rudra Sengar

79272034

Date: 2024-12-11 14:22:23
Score: 1.5
Natty:
Report link

You are facing this issue because your regular expression is not correct.

That's because the \b word boundary works well with Latin string but struggles with RTL and Unicode character.

Try to replace it with g for global and u for Unicode chars

const regex = new RegExp(`(${highlightWordsArray.join("|")})`, "gu")

You can check this article if you wanna discover more

Reasons:
  • Blacklisted phrase (1): this article
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Dallas

79272027

Date: 2024-12-11 14:20:23
Score: 2
Natty:
Report link

I had the same issue and I it happened because I accidentally pressed the "Insert" button on my keyboard. When I went to the cell and pressed the button again, the issue disappeared.

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

79272023

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

Adding the attribute "inert" to the image prevents Edge showing the button completely but the image still displays and prints. You can wrap this with an link and a to get images to work as links.

<a href="www.bing.com" target="_top">
  <div>
    <img inert src="https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png">
  </div>
</a>

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: AmateurD

79272016

Date: 2024-12-11 14:13:21
Score: 1
Natty:
Report link

The simplest solution for this is to go to the

Player Setting -> Other Settings -> Target API Level

And changing the API level to something lower (for me 'API level 33' worked fine)

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

79272015

Date: 2024-12-11 14:13:21
Score: 1
Natty:
Report link

I have created the following structure on my filesystem:

project
  |-pb
  |  |-app.py
  |-test_app.py

File app.py:

def run_this_function(something):
    return 'FOLD', {}

def go_to_the_right_street(street_we_are_on):
    if street_we_are_on == 'pre_flop_play':
        action, extra_information = run_this_function('something') <--- added the string definition for 'something' instead something as variable

In this file is present only a modification (see the comment in it).

File test_app.py

import unittest
from unittest.mock import patch
from pb.app import go_to_the_right_street

# I have defined this function to substitute your function run_this_function()
def run_this_function_patch(something):
    return 'FOLD', {}

class MyTestCase(unittest.TestCase):
    def test_go_to_the_right_street(self):
        with patch('pb.app.run_this_function') as mocked_function:
            mocked_function.side_effect = [run_this_function_patch('something')]  # <--- added this side_effect to return 'FOLD', {}
            actual = go_to_the_right_street('pre_flop_play')
            # mocked_function.return_value = 'FOLD', {}  tried this too but I get the same error
            mocked_function.assert_called_once()

if __name__ == '__main__':
    unittest.main()

The 2 most important changes:

Whit this code the output of the execution is the following:

.
----------------------------------------------------------------------
Ran 1 test in 0.001s

OK
Reasons:
  • RegEx Blacklisted phrase (1): I get the same error
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): I get the same error
  • High reputation (-1):
Posted by: User051209

79272006

Date: 2024-12-11 14:12:20
Score: 2.5
Natty:
Report link

Not an explanation, but I raised a ticket to improve description about this as I faced same concerns, it is already processed so in near future we will have info right from a source. any upvotes will be very welcome , I wish to finally unlock Stack functionalities :) https://github.com/microsoft/vscode/issues/235133

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

79272005

Date: 2024-12-11 14:11:20
Score: 2.5
Natty:
Report link

In such cases, vconcat can handle the job by separately formatting your axis with as many layers as you need. The only downside is that you have to manually adjust the height and width of your canvas.

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

79272004

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

Add a New Computed Column to your Data Set which is an aggregation based on COUNT of any particular column (id makes most sense). In this example I call the new column numRows Add computed column to Data Set

Then you can refer to the variable row["numRows"] in other parts of the report, e.g. to change the visibility of a table. In this example I only want to show the table if there is exactly 1 result in the Data Set

Set visibility based on number of rows in the result

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

79272002

Date: 2024-12-11 14:11:20
Score: 3
Natty:
Report link

select (substr(SDate,7,10) || '-' || substr(SDate,4,2) || '-' || substr(SDate,1,2)) as SDate2 order by SDate2 desc

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

79271993

Date: 2024-12-11 14:07:19
Score: 1.5
Natty:
Report link

There are basically the same in that context and there is no significant problems with doing *p += 1; ,it should also be noted that with modern compilers it will produce the same assembly.

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

79271985

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

You can change the tick display with plt.xticks() and use the format r'$...$' to use latex:

import matplotlib.pyplot as plt
plt.figure(figsize=(3, 3)) 

plt.plot(range(10, 1000), range(10, 1000))
plt.xticks([0, 200, 600, 1000],
           [r'$0$', r'$2 \cdot 10^{2}$', r'$6 \cdot 10^{2}$', r'$1 \cdot 10^{3}$'])
plt.tick_params(axis='x', labelsize=8)
plt.tick_params(axis='y', labelsize=8)
plt.show()

res

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

79271979

Date: 2024-12-11 14:01:18
Score: 3.5
Natty:
Report link

May you share the code snippet which is serving this upload logic

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

79271974

Date: 2024-12-11 14:00:17
Score: 0.5
Natty:
Report link

Try connecting to /console/jolokia instead, e.g.: enter image description here

Reasons:
  • Probably link only (1):
  • Low length (1.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • High reputation (-2):
Posted by: Justin Bertram

79271972

Date: 2024-12-11 13:58:17
Score: 0.5
Natty:
Report link

The earlier answers don't show how to extract the java object into a python list[str]:

_jars_scala = spark.sparkContext._jsc.sc().listJars()
jars = [_jars_scala.apply(i) for i in range(_jars.length()]
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Aaron Zolnai-Lucas