79334290

Date: 2025-01-06 20:49:49
Score: 11.5 🚩
Natty:
Report link

I have a similar problem, and I would like to know if your solution worked. I am trying to use the code below for my structure, but I have not had success yet. Can you help me?

Basically, what I need to do is select the tree item by name and then set its checkbox to true. Because when recording the script directly through SAP, it searches for the file by its Child identifier, as below:

session.findById("wnd[0]/usr/cntlTREE_CONTAINER/shellcont/shell").selectItem "Child12","2"
session.findById("wnd[0]/usr/cntlTREE_CONTAINER/shellcont/shell").ensureVisibleHorizontalItem "Child12","2"
session.findById("wnd[0]/usr/cntlTREE_CONTAINER/shellcont/shell").changeCheckbox "Child12","2",true
session.findById("wnd[0]/usr/btnVALIDAR").press
session.findById("wnd[1]/tbar[0]/btn[0]").press
session.findById("wnd[0]/usr/cntlTREE_CONTAINER/shellcont/shell").selectItem "Child11","1"
session.findById("wnd[0]/usr/cntlTREE_CONTAINER/shellcont/shell").ensureVisibleHorizontalItem "Child11","1"
session.findById("wnd[0]/usr/cntlTREE_CONTAINER/shellcont/shell").changeCheckbox "Child11","1",true
session.findById("wnd[0]/usr/btnVALIDAR").press

My tree: enter image description here

MyCode

If Not IsObject(application) Then
   Set SapGuiAuto  = GetObject("SAPGUI")
   Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
   Set connection = application.Children(0)
End If
If Not IsObject(session) Then
   Set session    = connection.Children(0)
End If
If IsObject(WScript) Then
   WScript.ConnectObject session,     "on"
   WScript.ConnectObject application, "on"
End If
Set tree = session.findById("wnd[0]/usr/cntlTREE_CONTAINER/shellcont/shell")
Set ListNodeKeys = tree.getallnodekeys
For Each nodeKey In ListNodeKeys
   If nodeText = "File_Name" Then
        tree.selectItem (nodeKey)
        tree.ensureVisibleHorizontalItem (nodeKey)
        tree.changeCheckbox (nodeKey),true
   End If
Next nodeKey     

Reasons:
  • Blacklisted phrase (1.5): I would like to know
  • Blacklisted phrase (1): help me
  • Blacklisted phrase (1): I have a similar problem
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (1): I am trying to
  • Blacklisted phrase (1): enter image description here
  • RegEx Blacklisted phrase (3): Can you help me
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): I have a similar problem
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Leonardo Batista

79334284

Date: 2025-01-06 20:47:48
Score: 2
Natty:
Report link

For me, I was running 2 yarn installs simultaneously on 2 different projects on my machine and that caused the issue. I had to do the installs one after the other.

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

79334276

Date: 2025-01-06 20:43:47
Score: 3
Natty:
Report link

Inheriting from the desired type worked and expressed what I want most succinctly:

public class ListOfStringUtility : List<string> {
  public List<string> Items { get; set; }
  //...and appropriate supporting methods for just that one public property/field...
}

Thanks again, @Ctznkane525 and @gunr2171, for your prompt answers!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • RegEx Blacklisted phrase (1): I want
  • Has code block (-0.5):
  • User mentioned (1): @Ctznkane525
  • User mentioned (0): @gunr2171
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: James Craig Burley

79334274

Date: 2025-01-06 20:43:47
Score: 1.5
Natty:
Report link

I added this at the Manifest and worked:

android:enableOnBackInvokedCallback="true"
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Emiliano Schiavone

79334272

Date: 2025-01-06 20:42:47
Score: 0.5
Natty:
Report link

Update to Git Flow

What you have is a decent start and essentially follows basic git flow. However one suggestion I would have is not having branches for specific people, instead specific features which will set you up for a real git flow.

Furthermore instead of constantly freely merging (especially onto main) you could start using pull requests. When linking pull requests to feature branches you gain more control and a better history of updates.


Here is an example of typical git flow for any application:

your 'test' branch is equivalent to the 'development' branch in the diagram below

Typical Git Flow

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

79334271

Date: 2025-01-06 20:42:47
Score: 2
Natty:
Report link

I just used two different autolayout calls.

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

79334267

Date: 2025-01-06 20:40:46
Score: 1
Natty:
Report link

Here are several similar blocks in MSL: CombiTable1Ds, CombiTable2Ds, and CombiTimeTable. Not sure which you mean and I use CombiTimeTable, but the same principle described below holds for all of them.

You need to provide the table size information to CombiTimeTable at time of translation. Thus at least a dummy table that settle the size and you can read that from a file.

After translation and before simulation, you can change the values in the table but you cannot change the size.

The details of how to make your file in a proper way you find here:

https://doc.modelica.org/Modelica%204.0.0/Resources/helpWSM/Modelica/Modelica.Blocks.Sources.CombiTimeTable.html

I am not sure I understand correctly what you means with "I want to dynamically assign it", but it sounds to me like after translation and before simulation, and then you have the limitations as described.

I must also admit that I have not access to Dymola and I base my answer on what holds for Modelica in general.

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • No code block (0.5):
Posted by: janpeter

79334265

Date: 2025-01-06 20:39:46
Score: 2.5
Natty:
Report link

Starting with SvelteKit 2.14, hash-based routing can be configured via svelte.config.js.

export default {
  kit: {
    router: { type: 'hash' }
  }
}
Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Chris Hubbard

79334262

Date: 2025-01-06 20:37:46
Score: 2
Natty:
Report link

I just came across a similar problem, but with glfw. If you manually included the library, you probably want to make a new project because I have no idea how to revert all those settings back to normal. What you want to do is follow all these instructions: https://learn.microsoft.com/en-us/vcpkg/get_started/get-started-msbuild?pivots=shell-powershell, and make sure manifest mode is enabled in your project settings. then run your program once and visual studio will download the library. make sure you include dependencies.

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

79334256

Date: 2025-01-06 20:33:45
Score: 3.5
Natty:
Report link

I've got same issue. Its typical JavaScript project with ESLint and TypeScript without any extra plugins.

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

79334252

Date: 2025-01-06 20:31:45
Score: 3
Natty:
Report link

It turns out that the issue was not having a SSH connection to the computers that can connect to the database. Also, the only change needed to the files is in the yaml file keeping the one line commented out; the entry point does not need to change.

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

79334251

Date: 2025-01-06 20:31:45
Score: 2
Natty:
Report link

Answering in case someone comes across this in the future. I had to cache my routes with php artisan route:cache and it started working correctly.

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Justin Dreher

79334235

Date: 2025-01-06 20:22:43
Score: 1.5
Natty:
Report link

I believe the issue came from misconfigured services in my program.cs file.

builder.Services.AddAuthorization(options => {
    options.FallbackPolicy = options.DefaultPoicy;
});
builder.Services.AddCascadingAuthenticationState();

seemed to be the missing pieces needed to get this to work.

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

79334233

Date: 2025-01-06 20:21:43
Score: 0.5
Natty:
Report link

Problem Explained:

I use Next A LOT - this is a common question/concern but is actually totally normal and working as expected. Next is letting you know code is being injected.

This happens often when you have browser extensions that modify code after next hydrates it which is why sometimes it is flagged as a hydration warning.

The obvious flag here is Date.now and Math.random, these are clearly not in your new app and is common code used in extensions.

Solution Explained:

start removing chrome extensions such as Grammerly, css color pickers, or things like json converters that overlay the page etc.

If you do not have extensions like this then just remove them one by one (you can add them back easy). You'll notice that when you remove them, the error will no longer exist.

As soon as you find the extension causing the issue then simply disable it or do not use it while debugging your application.

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

79334232

Date: 2025-01-06 20:21:42
Score: 4
Natty: 4.5
Report link

I tried reading through https://github.com/dart-lang/dart-pad/issues/3061

apparently you'll need at least dart 3.6

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

79334212

Date: 2025-01-06 20:13:40
Score: 1
Natty:
Report link

If anyone encounters a similar issue:

In my case, the problem was related to the domain where the video was hosted, which did not match my site's domain. For instance, my site was hosted on wordpress.com, BUT the videos were hosted on video.wordpress.com. When I migrated my site to my own hosting, with the video hosted on the same domain as my site, it resolved the issue.

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

79334206

Date: 2025-01-06 20:09:39
Score: 2
Natty:
Report link

It also ensures you will only be running one core of a multicore machine.

Try cpu-init-udelay=1000 first. Works better on my Asus motherboard, where the only other options to boot were noapci and noapic

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

79334204

Date: 2025-01-06 20:08:39
Score: 1
Natty:
Report link

Is there a way to do the if/else chain without starting with an if(0)?

I don't know of a better way to generate an if-else chain with macros. I agree it does look a little hacky.

However, here's another way way to validate that this string is one in the set built from X-Macros that compiles for C++14. Up to your taste if you think its better or not for your codebase.

#include <set>
#include <string>

void validate_string(std::string some_thing) {
    /* Build the set of strings to test against with X-Macros */
    static const std::set<std::string> validate_set = {
    #define X(name) #name,
    MY_LIST
    #undef X
    };

    if (validate_set.find(some_thing) != validate_set.end()){
        /* Then some_thing is one of the compile time constants */
    }
    
}
Reasons:
  • Blacklisted phrase (1): Is there a way
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Is there a
Posted by: GandhiGandhi

79334199

Date: 2025-01-06 20:05:38
Score: 1
Natty:
Report link

The recommended way to sort columns from Arcpy is this:

    import arcpy

fc = 'c:/data/base.gdb/well'
fields = ['WELL_ID', 'WELL_TYPE']

# Use ORDER BY sql clause to sort field values
for row in arcpy.da.SearchCursor(
        fc, fields, sql_clause=(None, 'ORDER BY WELL_ID, WELL_TYPE')):
    print(u'{0}, {1}'.format(row[0], row[1]))

See 5B: https://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-data-access/searchcursor-class.htm#P_GUID-3CB1DFF4-983D-445F-9CB2-0FF1CD4B4880

After reading: https://community.esri.com/t5/python-questions/sql-clause-in-arcpy-da-searchcursor-is-not/td-p/51603

I found this reference in the documentation of ArcGIS: https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/the-in-memory-workspace.htm

Limitations Memory-based workspaces have the following limitations:

Memory-based workspaces do not support geodatabase elements such as feature datasets, relationship classes, attribute rules, contingent values, field groups, spatial or attribute indexes, representations, topologies, geometric networks, or network datasets.

Specifically Attribute indexes means you cant sort.

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

79334198

Date: 2025-01-06 20:04:37
Score: 0.5
Natty:
Report link
<!-- https://mvnrepository.com/artifact/com.itextpdf/itext-core -->
<dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>itext-core</artifactId>
    <version>9.0.0</version>
    <type>pom</type>
</dependency>
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: blackmoon

79334195

Date: 2025-01-06 20:04:37
Score: 1
Natty:
Report link

If we publish it in the public folder, people who have the link can openly view this file. For example: example.com/storage/files/abcd1234.png . Anyone can visit this link and view it.

I was advised to access via url using storage facede for this. not sure if it is the best solution.

Here is a code example.

Route::get('/storage/products/{path}', function ($path) {
        $path = 'products/' . $path;
        if (!Storage::disk('local')->exists($path)) {
            abort(404);
        }
    
        $file = Storage::disk('local')->get($path);
        $mimeType = Storage::disk('local')->mimeType($path);
    
        return Response::make($file, 200)->header("Content-Type", $mimeType);
})
Reasons:
  • Blacklisted phrase (1): this link
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Kadir Bay

79334194

Date: 2025-01-06 20:03:36
Score: 4
Natty:
Report link

Yes you can do that. In Metrics Explorer, choose Consumed API > API > Request Count as your metric. Then the key is to set Aggregator: Unaggregated(none), and then click Add aligner (its at the bottom of the aggregator menu), and for alignment function choose Sum.

(this is based on a similar answer about Google Cloud Run: How can I see request count (not rate) for a Google Cloud Run application?

Reasons:
  • Blacklisted phrase (0.5): How can I
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: danevil

79334190

Date: 2025-01-06 20:01:35
Score: 2
Natty:
Report link

For me the issue was that i recently added the package expo-auth-session to use Google Sign in, but I never re-built the app into a new development build. expo-auth-session is a native package so this is required after you install it. I am not sure why it was giving me the "Cannot find native package ExpoApplication" error.

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

79334180

Date: 2025-01-06 19:57:34
Score: 0.5
Natty:
Report link

Introduction

In this post, I will share how to configure Azure AD B2C Custom Policies to dynamically generate a bearer or access token using a token endpoint. This is particularly useful for scenarios where you need to authenticate with a third-party system or API and retrieve dynamic access tokens.

Why This is Useful

Simplifies API authentication by automating token retrieval. Makes it easy to integrate with systems requiring OAuth 2.0 authentication. Enhances the capabilities of Azure AD B2C Custom Policies for advanced scenarios.

Key Concepts

Claims and Technical Profiles: Define claims to hold required values (e.g., client_id, client_secret) and use a Technical Profile to call the token URL. Service URL: Points to the OAuth token endpoint, typically in the format: https://login.microsoftonline.com/``/oauth2/token. Claims Transformation: Ensures that the received access token (bearerToken) can be used in subsequent steps. Step-by-Step Guide

Define Claim Types 1)Define the claims required for the token generation. Place this under the section of your custom policy XML:

<ClaimType Id="grant_type">
  <DisplayName>grant_type </DisplayName>
  <DataType>string</DataType>
  <DefaultPartnerClaimTypes>
    <Protocol Name="OAuth2" PartnerClaimType="grant_type" />
  </DefaultPartnerClaimTypes>
</ClaimType>
<ClaimType Id="client_id">
  <DisplayName>Client ID</DisplayName>
  <DataType>string</DataType>
  <DefaultPartnerClaimTypes>
    <Protocol Name="OAuth2" PartnerClaimType="client_id" />
  </DefaultPartnerClaimTypes>
</ClaimType>
<ClaimType Id="client_secret">
  <DisplayName>Client secret</DisplayName>
  <DataType>string</DataType>
  <DefaultPartnerClaimTypes>
    <Protocol Name="OAuth2" PartnerClaimType="client_secret" />
  </DefaultPartnerClaimTypes>
</ClaimType>
<ClaimType Id="resource">
  <DisplayName>resource</DisplayName>
  <DataType>string</DataType>
  <DefaultPartnerClaimTypes>
    <Protocol Name="OAuth2" PartnerClaimType="resource" />
  </DefaultPartnerClaimTypes>
</ClaimType>

Note :You can try by providing the values here or in the Technical profile as well it is up to you.

2) Create the Technical Profile This profile retrieves the access token from the token URL and stores it in the bearerToken claim. Place this under the section:

<TechnicalProfile Id="OAuth2BearerToken">
  <DisplayName>Get OAuth Bearer Token</DisplayName>
  <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.RestfulProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
  <Metadata>
    <Item Key="ServiceUrl">https://login.microsoftonline.com/<YourTeanantId>/oauth2/token</Item>
    <Item Key="HttpMethod">POST</Item>
    <Item Key="AuthenticationType">None</Item>
    <Item Key="HttpBinding">POST</Item>
    <Item Key="SendClaimsIn">Form</Item>
    <Item Key="Content-Type">application/x-www-form-urlencoded</Item>
  </Metadata>
  <InputClaims>
    <InputClaim ClaimTypeReferenceId="client_id" PartnerClaimType="client_id" DefaultValue="Your_Client_Id" AlwaysUseDefaultValue="true" />
    <InputClaim ClaimTypeReferenceId="client_secret" PartnerClaimType="client_secret" DefaultValue="Your_Client_Secret" AlwaysUseDefaultValue="true" />
    <InputClaim ClaimTypeReferenceId="resource" PartnerClaimType="resource" DefaultValue="resource id (Optional)" AlwaysUseDefaultValue="true" />
    <InputClaim ClaimTypeReferenceId="grant_type" PartnerClaimType="grant_type" DefaultValue="client_credentials" AlwaysUseDefaultValue="true" />
  </InputClaims>
  <OutputClaims>
    <OutputClaim ClaimTypeReferenceId="bearerToken" PartnerClaimType="access_token" DefaultValue="default token" />
  </OutputClaims>
  <UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop" />
</TechnicalProfile>
3) Integrate with the Orchestration Step Use the OAuth2BearerToken Technical Profile in your orchestration journey. For example:

<OrchestrationStep Order="1" Type="ClaimsExchange">
  <Preconditions>
    <Precondition Type="ClaimEquals" ExecuteActionsIf="true">
      <Value>bearerToken</Value>
      <Value>NOT_EMPTY</Value>
      <Action>SkipThisOrchestrationStep</Action>
    </Precondition>
  </Preconditions>
  <ClaimsExchanges>
    <ClaimsExchange Id="GetBearerToken" TechnicalProfileReferenceId="OAuth2BearerToken" />
  </ClaimsExchanges>
</OrchestrationStep>

Tips and Best Practices

Always use secure methods to manage client_id and client_secret. Validate the token endpoint and ensure it adheres to OAuth 2.0 standards. Log outputs in development for debugging purposes but avoid exposing sensitive data.

Conclusion

By following these steps, you can dynamically generate bearer tokens in Azure AD B2C Custom Policies, simplifying secure integrations with external systems.

Same I have tried in Postman collection enter image description here Hope this helps :) Thanks, Vamsi Krishna Chaganti

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Whitelisted phrase (-1): Hope this helps
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Vamsi Krishna

79334171

Date: 2025-01-06 19:53:34
Score: 2
Natty:
Report link

For organizations, visit: https://github.com/orgs/org-name/packages

For users, visit: https://github.com/username?tab=packages

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

79334163

Date: 2025-01-06 19:51:33
Score: 1.5
Natty:
Report link

Screen readers will read SVG by default, so you're right you should use aria-hidden="true" to hide it

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

79334160

Date: 2025-01-06 19:49:33
Score: 3
Natty:
Report link

this Link is No Longer Available http://behance.net/dev/apps i don't know why and i'm Also want to do the same thing, i have a website, i don't know how to link Behance APi Key to a Plugin on WordPress, Please if you find the new Page To Create Apps on Behance Tell me and i Appreciate That.

Reasons:
  • Blacklisted phrase (1): this Link
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Eljamali Said

79334158

Date: 2025-01-06 19:48:32
Score: 2
Natty:
Report link

Compiler Explorer, same compiler settings. -O3 optimizes all of this code away and just prints the number.

https://godbolt.org/z/r4hnvqd6s

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

79334147

Date: 2025-01-06 19:44:31
Score: 1
Natty:
Report link

By default, screen readers will announce the <svg> content if it is accessible. So yeah, you should hide it using aria-hidden :)

<svg width="1em" class="inline" aria-hidden="true"><use href="#start-icon"></use></svg>

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

79334145

Date: 2025-01-06 19:44:31
Score: 3
Natty:
Report link

Btw: As of today, January 6, I got a message from ngrok that my quota was exceeded for the rest of the month! It was fine as long as it lasted...

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

79334138

Date: 2025-01-06 19:41:30
Score: 2
Natty:
Report link

Yes you need a device and some TV or monitor to connect it by HDMI. BUT If you want mobility of developing you can connect your Roku device by Video Capture Card (HDMI -> USB) and connect it just like a webcam.

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

79334129

Date: 2025-01-06 19:37:29
Score: 0.5
Natty:
Report link

You need to save as 24-bit, which is not the default. The default is 256-color, and that's why the color's messed up.

Try here

Reasons:
  • Low length (1):
  • No code block (0.5):
  • High reputation (-1):
Posted by: Xavier J

79334116

Date: 2025-01-06 19:30:28
Score: 2.5
Natty:
Report link

My best guess would be related to the installed version of java on your system. all versions 1.16.5 and before use java 8 not java 17+ most users have java 8 installed already but check anyway

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

79334111

Date: 2025-01-06 19:28:27
Score: 1
Natty:
Report link

good afternoon.

Just invert the inheritance order of the first two classes, as well as the inheritance of SQLModel as below:

Your code

class UserRead(SQLModel):
    id: uuid.UUID

class UserBase(UserRead):
    full_name: str
    email: EmailStr
    is_active: bool = True
    is_superuser: bool = False

Below is my code

from typing import Optional
from datetime import datetime
from sqlmodel import Field, SQLModel

class AutoExecutaBaseId(SQLModel):
    """
    BASE DATA MODEL - Auto-execute table
    """

    id: Optional[int] = Field(default=None, primary_key=True)

class AutoExecutaBase(AutoExecutaBaseId):
    """
    BASE DATA MODEL - Auto-execute table
    """

    state: bool = Field(default=False, nullable=False)
    next_execution: Optional[datetime] = Field(default=None, nullable=True)

class AutoExecuta(AutoExecutaBase, table=True):
    """
    ORM DB MODEL - Auto-execute table
    """

    __tablename__ = 'auto_execute'

class AutoExecutaPublico(AutoExecutaBase):
    """
    PUBLIC MODEL - Auto-execute table
    """

    pass

It will work!

Considering the mro() Method Resolution Order, first load the inheritance.

Therefore, to avoid having to mess with the resolution method with magic methods like new or any other means, just do this!

The logic is not to replicate table attributes, unless it is really necessary.

I also wished that the first column would be the id.

This is my table

[table with correct order][1] [1]: https://i.sstatic.net/lCzyVw9F.png

Thanks.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): good afternoon
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Junior Leal

79334107

Date: 2025-01-06 19:28:27
Score: 3
Natty:
Report link

Stimulus already handle the removing, no need to do it yourself :-)

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

79334102

Date: 2025-01-06 19:25:26
Score: 2.5
Natty:
Report link

Apoorva Chikara's response mentioned the option of doing this in a hybrid way, and in my opinion, it seems to be one of the most interesting options. This approach seems to make it easier to organize translations, especially if it's a large and complex project.

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

79334098

Date: 2025-01-06 19:22:26
Score: 3
Natty:
Report link

For C++ I searched for C_Cpp.clang_format_fallbackStyle in Settings and changed it to { BasedOnStyle: Google, IndentWidth: 4 }. Now my braces are in sameLine.

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

79334093

Date: 2025-01-06 19:20:25
Score: 1
Natty:
Report link

If i understand it correctly then your example is wrong ssdp is udp so you need to create a UDP package. ssdp send its payload in http Format over udp so you can only use "Net". Your example shows a http request what should not work because it use TCP. So you can create the ssdp request with Sprintf, or Just a predifined string because i Thing it would always be the same, and send the Bytes via udp

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

79334092

Date: 2025-01-06 19:20:23
Score: 13 🚩
Natty:
Report link

were you able to resolve it?

I'm working on a similar use case where I'm uploading images to media library and then extracting their hash using API.

Upload script worked well and all the required files are uploaded which I can see on the platform but when i'm trying to extract the hash, name and created date using API or even query explorer I only get 1663 images whereas there are more than 10000 images in the media library.

What I think is that maybe I'm only able to get the data for all the files that were uploaded manually and not the ones that were uploaded using API.

What bothers me the most is that I'm getting the data but it's incomplete, did you got it working? were you able to extract data for all the files that you uploaded using API?

Reasons:
  • RegEx Blacklisted phrase (3): did you got it
  • RegEx Blacklisted phrase (1.5): resolve it?
  • RegEx Blacklisted phrase (3): were you able
  • RegEx Blacklisted phrase (2): working?
  • Long answer (-0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user29079364

79334090

Date: 2025-01-06 19:19:23
Score: 1
Natty:
Report link

Answer based on @dale-k's comment:

ORDER BY
  CASE WHEN :sortField = 'creationDate' AND :sortDirection = 'DESC' THEN update_.creation_date END DESC,
  CASE WHEN :sortField = 'creationDate' AND :sortDirection = 'ASC' THEN update_.creation_date END ASC,
  CASE WHEN :sortField is NULL THEN update_.default_time_field END DESC;
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @dale-k's
  • Self-answer (0.5):
Posted by: ritratt

79334084

Date: 2025-01-06 19:17:22
Score: 2
Natty:
Report link

Just to correct what @gabriel.hayes said:

.then() is not recursive. Each step is independent of the next, with only the resolved value being passed along, thus once a .then() step completes, its memory can usually be released unless it holds references.

In contrast, recursion involves a function calling itself (or another function in a recursive chain). Each step in a recursive process remains unresolved until all subsequent steps resolve. For example, if Func(n) calls Func(n+1), it cannot finish until Func(n+1) resolves, which in turn depends on Func(n+2), and so on. This creates a stack of unresolved calls that stays in memory until the recursion fully unwinds.

You can think of .then() as passing a message along a chain: once the message is passed, you're done. In recursion, each step requests something from the next and must wait for a response, leaving it unresolved until the response arrives.

An analogy for this could be a restaurant:

So no, every part of the .then() chain is not retained in memory until the final step resolves.

If you want a more in-depth look at how it works under the hood, this video does a great job of visualizing it.

And as we just entered 2025, I'm wishing you all a Happy New Year! 🎉

Reasons:
  • Blacklisted phrase (0.5): best regards
  • Blacklisted phrase (1): regards
  • Blacklisted phrase (1): this video
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Sir. ZyPA

79334083

Date: 2025-01-06 19:17:22
Score: 9
Natty: 7.5
Report link

I have the same question. Is there an R equivalent of STATA's metobit?

Reasons:
  • Blacklisted phrase (1): I have the same question
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I have the same question
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Roozm Safi

79334064

Date: 2025-01-06 19:11:20
Score: 1
Natty:
Report link

You can take screenshots and even record video of any app on your device. For doing that you need to buy Video Capture Card (HDMI -> USB) and than it will connect to your PC as webcam. This is good think for demo and mobility (You can test your app even without an external monitor or TV) just with your laptop.

But you cannot take screenshots of apps except dev one. If this is your case and you want to take a screenshot of your dev app you need to open device ip in browser and in Tools select create a screenshot.

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

79334063

Date: 2025-01-06 19:10:19
Score: 2
Natty:
Report link

Try get component FreeLook from the script: var freeLook_cam = <CinemachineFreeLook>(); and then set the FOV value: freeLook_cam.m_Lens.FieldOfView = value;

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

79334051

Date: 2025-01-06 19:04:18
Score: 1.5
Natty:
Report link

Try adding view-transition-name: anything to your sticky elements. The value can be literally anything and does not even have to have the old and new state. This fixed the problem for me.

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

79334039

Date: 2025-01-06 18:59:16
Score: 0.5
Natty:
Report link

I haven't used it, but I've heard people recommend GrayLog.

The Open version seems like what you're looking for.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • High reputation (-1):
Posted by: Mihail Minkov

79334036

Date: 2025-01-06 18:58:16
Score: 1.5
Natty:
Report link

Change final AgroData? agroData; to required AgroData agroData; where you define your entity. That's because don't support nullables.

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

79334032

Date: 2025-01-06 18:56:16
Score: 1.5
Natty:
Report link

I am facing the same issue with it today, even the older versions of code isn't working which was working fine till yesterday.

I literally went through 1000s of lines to code comments/uncommenting and trying to make it work as my production build is failing.

Please someone help with the resolution.

Here is the issue I am facing

 npm run build --debug

> [email protected] build
> vite build

vite v6.0.7 building for production...
✓ 2302 modules transformed.
x Build failed in 8.28s
error during build:
[vite:esbuild-transpile] Transform failed with 1 error:
assets/index-!~{001}~.js:81956:38160: ERROR: Unexpected "case"

Unexpected "case"

_Error logs of 781 lines. .... here_
                                                                                                                                                                                                                          ^
81957|  /**
81958|   * @license

    at failureErrorWithLog (/Users/akashrathor/Personal/referlynk/node_modules/esbuild/lib/main.js:1476:15)
    at /Users/akashrathor/Personal/referlynk/node_modules/esbuild/lib/main.js:755:50
    at responseCallbacks.<computed> (/Users/akashrathor/Personal/referlynk/node_modules/esbuild/lib/main.js:622:9)
    at handleIncomingPacket (/Users/akashrathor/Personal/referlynk/node_modules/esbuild/lib/main.js:677:12)
    at Socket.readFromStdout (/Users/akashrathor/Personal/referlynk/node_modules/esbuild/lib/main.js:600:7)
    at Socket.emit (node:events:520:28)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at Pipe.onStreamRead (node:internal/stream_base_commons:191:23)
Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): I am facing the same issue
  • Low reputation (0.5):
Posted by: Akash Rathor

79334022

Date: 2025-01-06 18:50:13
Score: 14.5
Natty: 7.5
Report link

I have the same problem, do you have a solution?

Reasons:
  • Blacklisted phrase (1): I have the same problem
  • Blacklisted phrase (3): have a solution?
  • RegEx Blacklisted phrase (2.5): do you have a
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I have the same problem
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Italo Goes

79334014

Date: 2025-01-06 18:48:13
Score: 0.5
Natty:
Report link

The most efficient way to update detached objects efficiently as far as I know is to use update() to create UPDATE sql calls which as you saw can be very repetitive and wasteful in its own way, ie. how can you tell what has changed?

You could possibly detach and clone the original db model and then try to determine the diff yourself with the changes after your service makes changes and then replay those changes onto the db model but you are then just re-creating SQLAlchemy's unit of work pattern yourself and only for the simplest case possible and you are probably going to have a bad time...

Luckily in this case SQLAlchemy + the database model is providing most of the Data Access Layer as I understand it:

In software, a data access object (DAO) is a pattern that provides an abstract interface to some type of database or other persistence mechanism. By mapping application calls to the persistence layer, the DAO provides data operations without exposing database details.

SEE: Data access object

As you make changes to database objects within the session SQLAlchemy can track those changes and then perform the appropriate updates to the database. For example setting user.verified = True in my example will automatically submit an UPDATE SQL statement to the database when commit() is called.

This won't always be the most efficient but usually it is fine. If you need to update many rows with complicated conditions then you can drop down to SQL if needed using update() or insert() and building statements in Python.

You can also set echo=True on your engine to see what changes produce what SQL.

Finally sqlalchemy is meant to be used with an understanding of SQL. You can never fully abstract the fact that you are using a database unless you want terrible performance or massive complexity. It sort of provides the best of both worlds, most of the time you don't need to know you are but you can access all the database features when you need them.

Example

I also usually have a service class that provides some more common data access functions, in this example UserService.

Other business logic is placed into various applicable services like AuthService in this example. Sometimes these services will need direct access to the database session but sometimes they will just work directly on the DAO, ie. User, without knowing there is a database at all.

Whether it is via a commandline or a web app I set up a db session, then combine the services to handle the given request and finally commit and close out the session. Hard to replicate a full flow of control here so I just tried to approximate some common tasks.

import os
from dataclasses import dataclass, fields

from sqlalchemy import (
    Column,
    Integer,
    String,
    BigInteger,
    create_engine,
    ForeignKey,
    Boolean,
)
from sqlalchemy.sql import (
    func,
    select,
    insert,
    text,
)
from sqlalchemy.orm import (
    DeclarativeBase,
    Session,
    relationship
)
from sqlalchemy.schema import MetaData, CreateSchema


def get_engine(env):
    return create_engine(f"postgresql+psycopg2://{env['DB_USER']}:{env['DB_PASSWORD']}@{env['DB_HOST']}:{env['DB_PORT']}/{env['DB_NAME']}", echo=True)


class Base(DeclarativeBase):
    pass


class User(Base):
    __tablename__ = 'users'
    id = Column(Integer, primary_key=True)
    name = Column(String, nullable=False)
    email = Column(String, nullable=False)
    verified = Column(Boolean(), nullable=False, server_default=text('false'), default=False)
    verify_token = Column(String, servier_default=text('null'), default=None, nullable=True)


def run(conn):
    # After signup maybe we set verify token and send email with link ...
    with Session(conn) as db:
        user_service = UserService(db=db)
        auth_service = AuthService()

        u1 = user_service.get_user_by_email('[email protected]')
        verify_token = auth_service.set_verify_token(u1)
        db.commit()

    # Later on after following email link or something better...
    with Session(conn) as db:
        user_service = UserService(db=db)
        auth_service = AuthService()

        u1 = user_service.get_user_by_email('[email protected]')
        if auth_service.verify_user(u1, verify_token):
            print("Verified!")
        else:
            print("Failed to verified!")
        db.commit()

    # On a subsequent login we can check if verified
    with Session(conn) as db:
        user_service = UserService(db=db)
        auth_service = AuthService()

        u1 = user_service.get_user_by_email('[email protected]')
        assert auth_service.is_verified(u1)


class UserService:
    """ Handle some common data access functions. """

    def __init__(self, db):
        self.db = db

    def get_user_by_email(self, user_email):
        return self.db.scalars(select(User).where(User.email == user_email)).first()


class AuthService:
    """ Our business logic goes here. """

    def verify_user(self, user, supplied_verify_token):
        was_verified = False
        if user.verify_token == supplied_verify_token:
            user.verified = True
            user.verify_token = None
            was_verified = True
        return was_verified

    def set_verify_token(self, user):
        user.verify_token = 'MADEUP'
        return user.verify_token

    def is_verified(self, user):
        return user.verified


def populate(conn):
    # Make some fake users.
    with Session(conn) as session:
        u1 = User(name="user1", email="[email protected]")
        session.add(u1)
        u2 = User(name="user2", email="[email protected]")
        session.add(u2)
        session.commit()


def main():
    engine = get_engine(os.environ)

    with engine.begin() as conn:
        Base.metadata.create_all(conn)
        populate(conn)
        run(conn)


if __name__ == '__main__':
    main()


Once you get a feel for how things are working and if you have a large project with many many services stringing them all together all the time is not fun and you probably want to use some sort of dependency injection system and create the services with factories not by calling the constructors as I have done in this example.

Reasons:
  • RegEx Blacklisted phrase (2.5): can you tell what
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • High reputation (-1):
Posted by: Ian Wilson

79333994

Date: 2025-01-06 18:40:11
Score: 1
Natty:
Report link

Unfortunately, my research in the docs has shown that you cannot configure the ruff formatter to ignore trailing commas. There is a difference between the ruff linter (which you CAN configure to ignore trailing commas using ignore = ["COM812"]) and the ruff formatter, which is intended to have very limited configuration options.

From https://docs.astral.sh/ruff/formatter/#philosophy:

Like Black, the Ruff formatter does not support extensive code style configuration; however, unlike Black, it does support configuring the desired quote style, indent style, line endings, and more. (See: Configuration.)

This links to https://docs.astral.sh/ruff/formatter/#configuration, which contains nothing for disabling trailing commas.

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

79333991

Date: 2025-01-06 18:37:10
Score: 1.5
Natty:
Report link

In the newer version, you may want to try use this in .env

BROADCAST_CONNECTION=reverb

I had the same issue before, after change to BROADCAST_CONNECTION from BROADCAST_DRIVER, it works for me

Reasons:
  • Whitelisted phrase (-1): I had the same
  • Whitelisted phrase (-1): works for me
  • Contains signature (1):
  • Low length (0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Sam

79333986

Date: 2025-01-06 18:36:10
Score: 0.5
Natty:
Report link

I assume you use the header file from https://webrtc.googlesource.com/src/+/refs/heads/main/api/peer_connection_interface.h. If that is the case, that peer_connection_interface.h file includes vector.h (https://webrtc.googlesource.com/src/+/refs/heads/main/api/peer_connection_interface.h#78), and probably your local vector.h is similar to https://github.com/microsoft/STL/blob/main/stl/inc/vector#L8 and needs yvals_core.h, an internal header file in Microsoft's Standard Library implementation for C++.

Below is where the error message is coming from.

// This does not use `_EMIT_STL_ERROR`, as it needs to be checked before we include anything else.
// However, `_EMIT_STL_ERROR` has a dependency on `_CRT_STRINGIZE`, defined in `<vcruntime.h>`.
// Here, we employ the same technique as `_CRT_STRINGIZE` in order to avoid needing to update the line number.
#ifndef __cplusplus
#define _STL_STRINGIZE_(S) #S
#define _STL_STRINGIZE(S)  _STL_STRINGIZE_(S)
#pragma message(__FILE__ "(" _STL_STRINGIZE(__LINE__) "): STL1003: Unexpected compiler, expected C++ compiler.")
#error Error in C++ Standard Library usage
#endif // !defined(__cplusplus)

jextract uses clang C API to parse the header file and when you try to run jextract over the peer_connection_interface.h, the indirect reference to yvals_core.h signals that processing does not occur according to C++ standards. Moreover, https://webrtc.googlesource.com/src/+/refs/heads/main/api/peer_connection_interface.h is a C++ header file that does not have a C interface that jextract can further process (please look at https://github.com/openjdk/jextract/blob/master/doc/GUIDE.md#other-languages).

If you would like to generate Java bindings for the webrtc lib, my colleague Jorn Vernee found another standalone implementation of some of the WebRTC features that has a C interface: https://github.com/paullouisageneau/libdatachannel. He gave it a try on a Windows machine and works with jextract.

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

79333982

Date: 2025-01-06 18:32:09
Score: 2
Natty:
Report link

An old question but this happened to me along with the csrf not working and I had no idea why... until I reinstalled the symfony/dotenv package and both started working... I HAVE NO IDEA WHY, my .env file is empty...

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

79333973

Date: 2025-01-06 18:27:06
Score: 8 🚩
Natty: 6.5
Report link

I can't figure out though why this occurs. In researching there are multiple posts about GPO policies but I don't know exactly what is necessary to change and I also don't have access to update these global policies. Anyone else have any solutions?

Reasons:
  • Blacklisted phrase (1.5): any solution
  • RegEx Blacklisted phrase (2): any solutions?
  • Low length (0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Ken Balestrieri

79333966

Date: 2025-01-06 18:26:06
Score: 1.5
Natty:
Report link

I think this could be a case of instance error rather than issue with the retry policy itself. When the instance fails, the retry number get reset to 0. ref

"It's possible for an instance to have a failure between retry attempts. When an instance fails during a retry policy, the retry count is lost."

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: that one guy on the internet

79333964

Date: 2025-01-06 18:26:06
Score: 1
Natty:
Report link

you are on the right way!

Use LazyVGrid with pinnedViews parameter of it initialiser. docs

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
Posted by: Nikolai Nagornyi

79333960

Date: 2025-01-06 18:24:05
Score: 3
Natty:
Report link

In your listing the item you have indicated would cause the CPU to push RBX (64-bit) onto the stack whereas if the 40h prefix was not present then this would push EBX (32-bit) onto the stack.

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

79333938

Date: 2025-01-06 18:14:03
Score: 0.5
Natty:
Report link

After further analysis of my code I managed to find the error. It was on the xaml side, since it used an absolutlayout. It did not allow the SKCanvasView to render correctly.

It was solved by using the SKCanvasView, outside of an absolutlayout. A grid was designed to allow correct rendering.

 <skia:SKCanvasView x:Name="CanvasView" PaintSurface="CanvasView_PaintSurface" 
                       HeightRequest="450"
                       ZIndex="0"/>

The aforementioned code together with the code used from c# works perfectly.

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

79333912

Date: 2025-01-06 18:02:00
Score: 2.5
Natty:
Report link

I think Tradiny is a good option for finance charts, it is a lightweight yet full-featured, highly-extensible, open-source charting platform. You can draw time-series data such as line charts, candlestick charts or bar charts.

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

79333900

Date: 2025-01-06 17:56:58
Score: 10 🚩
Natty: 6
Report link

I'm having the same issues. Did you ended up finding a fix?

Reasons:
  • RegEx Blacklisted phrase (1.5): fix?
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I'm having the same issue
  • Ends in question mark (2):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: user29078439

79333899

Date: 2025-01-06 17:56:58
Score: 1.5
Natty:
Report link

Note - I have not tested this code; I'm using other conversion tools.

user667489 is answering a question about SAS code; Ban Sun is answering a question about how to get the same functionality as some SAS code in PySpark. In PySpark, you use Window.partition functions to set up groups, and orderBy to sort within those groups.

If you choose the correct parameters, that allows you to duplicate the functionality of 'sort by groupingVar', 'set by groupingVar', and then the first. and last. properties.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): user667489
  • Low reputation (0.5):
Posted by: Barry DeCicco

79333897

Date: 2025-01-06 17:56:58
Score: 1.5
Natty:
Report link

You can query the metadata tables to get a list of columns. For example:

Oracle:

select column_name 
from all_tab_cols 
where table_name='YOUR_TABLE' 
order by column_id;

Snowflake:

select column_name 
from information_schema.columns 
where lower(table_name)='YOUR_TABLE'
order by ordinal_position;
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: mgscarn

79333895

Date: 2025-01-06 17:55:57
Score: 0.5
Natty:
Report link

There were a few problems that @jqurious pointed out and would like to provide a solution.

  1. Changed geometric_mean() function to take in a Float64Chuck instead of a &[f64]
  2. gmean() function, passed the series name into the new Float64Chunked array, instead of using Series::from_iter().
  3. when using lit(1.0) at the beginning of an expression, this will cause the error above "the name 'literal' is duplicate".

For example, the literal error is caused by having lit(1.0) in front of + self.gmean()

fn gmean_annualized_expr(self, freq:Option<&str>) -> Expr {
        let annualize_factor = lit(annualize_scaler(freq).unwrap());
        ( lit(1.0) + self.gmean()).pow(annualize_factor) - lit(1.0)
    }

By moving lit(1.0) after self.gmean() fixed the problem.

fn gmean_annualized_expr(self, freq:Option<&str>) -> Expr {
        let annualize_factor = lit(annualize_scaler(freq).unwrap());
        (self.gmean() + lit(1.0)).pow(annualize_factor) - lit(1.0)
    }

Here is the full expression for reference

fn geometric_mean(values: &Float64Chunked) -> f64 {
    let adjusted_values: Float64Chunked = values.apply(|opt_v| opt_v.map(|x| x + 1.0));
    let product: f64 = adjusted_values
        .into_iter()
        .filter_map(|opt| opt) // Remove None values
        .product(); // Compute the product of present values
    let count = adjusted_values.len() as f64;
    product.powf(1.0 / count)
}

fn gmean(series: &[Series]) -> PolarsResult<Series> {

    let _series = &series[0]; // This is getting the actual values from the series since there are multiple types of data returns from a series
    let _chunk_array = _series.f64()?;

    let geo_mean= geometric_mean(_chunk_array) - 1.0;
    let new_chunk = Float64Chunked::from_vec(_series.name().clone(), vec![geo_mean]);

    Ok(new_chunk.into_series())
}


fn gmean_column(series: &Column) -> Result<Option<Column>,PolarsError> {
    let materialized_series_slice = std::slice::from_ref(series.as_materialized_series());
    Ok(Some(gmean(materialized_series_slice)?.into_column()))

}

pub trait GeoMean {
    fn gmean(self) -> Expr;
}

impl GeoMean for Expr {
    fn gmean(self) -> Expr {
        self.apply(|column| gmean_column(&column),GetOutput::from_type(DataType::Float64))
    }
}


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

79333890

Date: 2025-01-06 17:51:56
Score: 0.5
Natty:
Report link

Sometimes, restarting the runner can resolve the issue.

Stop the runner:

./svc.sh stop

Start the runner again:

./svc.sh start

This can help refresh the runner's connection and resolve any temporary issues.

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

79333877

Date: 2025-01-06 17:45:54
Score: 2.5
Natty:
Report link

Remove && node.children.length > 0 from hasChild.So the hasChild should looks like, hasChild = (_: number, node: FoodNode) => !!node.children;

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

79333875

Date: 2025-01-06 17:44:54
Score: 3.5
Natty:
Report link

The fastest way I know to diagonalize a matrix is O(n!). That would get slow quickly.

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

79333872

Date: 2025-01-06 17:43:54
Score: 2
Natty:
Report link

The reason pandas isn't available in your ct-env environment is because conda environments are isolated.

Activate your environment: conda activate ct-env

Install pandas: conda install pandas

Just because pandas is in your base environment doesn't mean it's automatically available in other environments.

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

79333840

Date: 2025-01-06 17:28:50
Score: 0.5
Natty:
Report link

After slogging through a few LLM hallucinations, one of them (ChatGPT 4o) impressed me quite a bit and gave me a glimpse into the future of search. It found a needle-in-haystack source indicating that ffprobe consistently outputs in a standardized period for decimal notation without being influenced by the user's locale. It was a very cursory mention of ffprobe behavior in an Apple discussion forum which couldn't have been found via a Google search: https://discussions.apple.com/thread/255558546?answerId=260330140022&sortBy=rank#260330140022

Reasons:
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: pete

79333839

Date: 2025-01-06 17:28:50
Score: 2.5
Natty:
Report link

Try Tradiny, it is a lightweight yet full-featured, highly-extensible, open-source charting platform.

Docs: https://docs.tradiny.com/

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

79333836

Date: 2025-01-06 17:27:50
Score: 2
Natty:
Report link

I think it is related to the cell.xib constraints (leading). check that and reply back to me.

good luck.

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

79333833

Date: 2025-01-06 17:25:50
Score: 2
Natty:
Report link

This worked. https://www.latcoding.com/how-to-solve-kubernetes-dashboard-unauthorized-401-invalid-credentials-provided/

Solution 1: Migrating from kubectl proxy to kubectl port-forward. Add https at the beginning or you'll get 400 Bad Request error. i.e. https://localhost:8443/

Solution 2: Downgrade kubernetes dashboard version and keep using kubectl proxy

Credits to Author [Ambar Hasbiyatmoko].

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

79333829

Date: 2025-01-06 17:25:50
Score: 0.5
Natty:
Report link

I have managed to get it working. I was thinking in the first when case was a '1' when it is a 'l'. As the code was written by someone else who was helping and to be fair they look identical but thanks to @ADyson it now works well. I simply changed the 'l' for liked to a new 'v' for viewed. It may not be the most efficient way but it works.

   CASE 
        WHEN l.to_user IS NOT NULL THEN 'true'
        ELSE 'false'
    END AS isLiked,
    
        CASE 
        WHEN v.to_user IS NOT NULL THEN 'true'
        ELSE 'false'
    END AS hasViewed
    
FROM clients u

LEFT JOIN likes l 
    ON u.userID = l.to_user 
    AND l.from_user = '$logged_user'
    
    LEFT JOIN viewed v 
    ON u.userID = v.to_user 
    AND v.from_user = '$logged_user'

I would not mind any feedback to a better way of doing this if possible but I hope it helps someone struggling with the sample problem.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Whitelisted phrase (-1): hope it helps
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @ADyson
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: JulesUK

79333826

Date: 2025-01-06 17:24:49
Score: 4.5
Natty:
Report link

Hey You can watch this video to handle the UI with the safe area in Unity Using package in the video given.

https://youtu.be/VXztZYU9YdA?si=NehaeFJ4Qf3Ui8J6

Reasons:
  • Blacklisted phrase (1): youtu.be
  • Blacklisted phrase (1): this video
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Rahmat Ali

79333813

Date: 2025-01-06 17:20:47
Score: 3
Natty:
Report link

I have EditText to enter credit card number. I just want to secure first 12 digits and last 4 digits as normal. There should be spaces in between as well. Like the

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

79333812

Date: 2025-01-06 17:20:47
Score: 1.5
Natty:
Report link

@orphic-lacuna most helpful - thank you. I have all those options set. But I see a different effect of 'new'.

Consider the following script:

outer();

function outer(){
    middle();
    }

function middle(){
    inner();
    }

function inner(){
    bullseye();
    }

function bullseye(){
    throw("Inside bullseye");
    }

As written, it displays just "Inside bullseye". If I replace the penultimate line with

throw new Error("Inside bullseye");

then I get

middle line 8 Error: Inside bullseye
called from outer line 4
called from line 1

However, when I omit the new

throw Error("Inside bullseye");

then I get

inner line 12 Error: Inside bullseye
called from middle line 8
called from outer line 4
called from line 1

which is a deeper trace.

I am happy with this.

Reasons:
  • Blacklisted phrase (0.5): thank you
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @orphic-lacuna
  • Low reputation (1):
Posted by: Antipole

79333810

Date: 2025-01-06 17:19:47
Score: 0.5
Natty:
Report link

If I understand correctly, you're wanting to interopolate between two values? It sounds like you're describing "linear interpolation".

newValue = valueA + (valueB - valueA) * t

Where 't' ranges from 0 to 1.

So if your lowest value is 40 and the max value is 100 then at 50% (0.5) you'll get 70.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
Posted by: Phaelax z

79333803

Date: 2025-01-06 17:16:46
Score: 1
Natty:
Report link

Here’s an example of a linear search implementation in Python:

def linear_search(list, target_element):
    for i, element in enumerate(list):
        if element == target_element:
            return i  # Element found, return its index
    return -1  # Element not found
  
if __name__ == '__main__':
    list = [2, 3, 4, 10, 40]
    target_element = 10
    result = linear_search(list, target_element)
    if result != -1:
        print(f'Element {target_element} found at index {result}.')
    else:
        print(f'Element {target_element} not found in the list.')

You can learn and visualize the step-by-step execution of this code interactively on Coding Canvas, a platform designed to help students understand algorithms and programming visually!
https://codingcanvas.io/
https://codingcanvas.io/topics/
https://codingcanvas.io/topics/python/
https://codingcanvas.io/topics/python/linear-search

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

79333792

Date: 2025-01-06 17:11:45
Score: 1.5
Natty:
Report link

Problem has been resolved by using Swagger to generate the json file. Also as mentioned in one of the links from @dbc, [JsonDerivedType] needed to be added to all classes and interfaces in the inheritance hierarchy. This failed when using app.MapOpenApi() due to the duplicate key issue.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Chris K

79333790

Date: 2025-01-06 17:10:45
Score: 1
Natty:
Report link
`enter code here`# Process streaming response
response_text = ""
for chunk in stream:
    if hasattr(chunk, 'choices') and chunk.choices:
        if hasattr(chunk.choices[0], 'delta'):
            if hasattr(chunk.choices[0].delta, 'content'):
                content = chunk.choices[0].delta.content
                if content is not None:
                        print(content, end="", flush=True)
                        response_text += content
print(response_text)
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Sekar

79333787

Date: 2025-01-06 17:09:44
Score: 1.5
Natty:
Report link

I try to answer the above as follows:

In order to invert a dictionary, we need to do the following:

  1. Identify the set of (the original) dictionary values that shall become keys in the inverse dictionary.
  2. Create groups of keys from the original dictionary partitioned by the values from the previous step. Later we would generate a list of elements (original keys) from each group in order to make it a value in the inverse dictionary.
  3. Generate the new (inverse) dictionary by merging information from the two previous steps.

On condition the LINQ expression in the question does these 3 steps, the LINQ rewrite is correct and fully replaces the "ugly" 20 lines' method I had started with.

There remains one more question:

Is the LINQ compaction worth doing in this case? It might darken the purpose of the method rather than illuminate it.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Pavel Foltyn

79333776

Date: 2025-01-06 17:04:43
Score: 2
Natty:
Report link

ANSWER:

I have it figured out, as i'm new to flask and working with full stack I wasn't aware of this, but it seems you only use url_for to reference static outside of the static folder.

When inside the static folder you use the standard relational paths.

(instead of)

@font-face {
  font-display: block;
  font-family: "bootstrap-icons";
  src: url("{{url_for('static', filename='/fonts/vendor/bootstrap/bootstrap-icons.woff2')}}") format("woff2"),
    url("{{url_for('static', filename='/fonts/vendor/bootstrap/bootstrap-icons.woff')}}") format("woff");
}

(it's this)

@font-face {
  font-display: block;
  font-family: "bootstrap-icons";
  src: url("../../../fonts/vendor/bootstrap/bootstrap-icons.woff2") format("woff2"),
    url("../../../fonts/vendor/bootstrap/bootstrap-icons.woff") format("woff");
}

(not sure if i should delete this question but seeing as I couldn't find the answer on stack overflow will leave it up in case anyone runs into a similar issue)

Reasons:
  • RegEx Blacklisted phrase (1.5): i'm new
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: ShaAnder

79333769

Date: 2025-01-06 17:02:43
Score: 1
Natty:
Report link

If you have an internal registry then you can configure it as an env var or in the testcontainers.properties file. See the docs

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: Eddú Meléndez

79333768

Date: 2025-01-06 17:02:43
Score: 1
Natty:
Report link

For me, the fix was far simpler. I had a hung instance of node running. Killed that in Task Manager and it worked after that.

This was true on a Windows system; not sure if this happens on other platforms.

Reasons:
  • Whitelisted phrase (-1): it worked
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Travis Vroman

79333764

Date: 2025-01-06 17:01:43
Score: 1
Natty:
Report link

you can create a new Schema by combining all of them in to a single One by spreading those schemas in to the new one

export const formSchema = z.object({
...imagePostSchema.shape,
...videoPostSchema.shape,
...textPostSchema.shape,
});

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

79333760

Date: 2025-01-06 16:59:42
Score: 0.5
Natty:
Report link

You can find a complete example here. It uses org.testcontainers.kafka.KafkaContainer, but you can replace it with org.testcontainers.kafka.ConfluentKafkaContainer. Both, allow to register additional listeners.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: Eddú Meléndez

79333754

Date: 2025-01-06 16:57:42
Score: 9
Natty: 7
Report link

Can anyone help me i want json file for 1.20.2

Reasons:
  • Blacklisted phrase (1): help me
  • RegEx Blacklisted phrase (3): Can anyone help me
  • RegEx Blacklisted phrase (1): i want
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): Can anyone help me i
  • Low reputation (1):
Posted by: MOHAM ALI

79333748

Date: 2025-01-06 16:54:40
Score: 2.5
Natty:
Report link

try to add "sudo" to your command line, following command prints to console: sudo influxd inspect export-lp --bucket-id YOURBUCKETID --engine-path /var/lib/influxdb/engine --output-path -

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

79333741

Date: 2025-01-06 16:51:40
Score: 3.5
Natty:
Report link

Same issue here, I moved my repo in question to the Public directory. The repo was previously located within the Documents directory.

TCC issue averted!

Reasons:
  • RegEx Blacklisted phrase (1): Same issue
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: MB123

79333734

Date: 2025-01-06 16:48:39
Score: 10.5 🚩
Natty: 4.5
Report link

I have the same issue and indeed changing the bot residency from "Europe" to "Global" worked but isn't that bad for security concerns ? Did someone found another way to make it work ?

Reasons:
  • Blacklisted phrase (1): I have the same issue
  • RegEx Blacklisted phrase (3): Did someone found
  • Low length (0.5):
  • No code block (0.5):
  • Me too answer (2.5): I have the same issue
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: M Cho

79333732

Date: 2025-01-06 16:47:38
Score: 4.5
Natty: 7
Report link

With this code it works very well on the product page but how can I do the same on the archive-product catalog page to display only the minimum price and when they are also on sale. How to do it? Thank you for your feedback,

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (0.5): how can I
  • Blacklisted phrase (1): can I do
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: user29059777

79333721

Date: 2025-01-06 16:43:36
Score: 2.5
Natty:
Report link

Delphi has got a global variable AssertErrorProc. Maybe you have assigned a handler to it?

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

79333715

Date: 2025-01-06 16:40:35
Score: 1
Natty:
Report link

Unexpectedly, i have tried change const URL = 'ws://websocket-server:2700'; with const URL = 'ws://localhost:2700'; and it worked.

Reasons:
  • Whitelisted phrase (-1): it worked
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Fedor

79333711

Date: 2025-01-06 16:39:35
Score: 1
Natty:
Report link

In my case the problem was with LocalDate in Java 17, even though my project was configured as Java 11 project, IntelliJ was using Java 17, so I change the configuration on IntelliJ to use Java 11 and then it worked, apparently Java 17 is not entirely compatible with GSON dependency.

Reasons:
  • Whitelisted phrase (-1): it worked
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Carlos Marmolejo

79333710

Date: 2025-01-06 16:38:35
Score: 1.5
Natty:
Report link

I just started getting this error when calling an Instagram feed. I had to replace my Instagram Basic Display app with a new app running the Instagram API, and the error was fixed.

In my case, I think it had to do with the Dec 4, 2024 Instagram Basic Display deprecation.

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

79333709

Date: 2025-01-06 16:37:34
Score: 3.5
Natty:
Report link

In 2021, Microsoft introduced compiler warnings if using .NET Remoting that you had to manually suppress: https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/5.0/remoting-apis-obsolete

Replacement: use WCF or HTTP REST

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

79333702

Date: 2025-01-06 16:34:34
Score: 1.5
Natty:
Report link

OK, so I have an answer, and it's stupid, but I'm going to leave the question and post an answer here in case it helps someone. In this case, the max queue size was set to 1, so the system was dropping the other span. That value is an erroneous and historical wart that I hadn't noticed until I'd put way too much work into debugging this.

Long story short: if you're seeing this behavior, check your configuration for dumb values. :)

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

79333694

Date: 2025-01-06 16:32:33
Score: 3.5
Natty:
Report link

It is now possible using the database roles in your provider account. Please see: https://community.snowflake.com/s/article/How-to-use-Database-Roles-in-a-Data-Share

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

79333693

Date: 2025-01-06 16:32:33
Score: 3.5
Natty:
Report link

There is an online tool npz-web-viewer where you can view the numpy array along with some visualizations.

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

79333684

Date: 2025-01-06 16:29:33
Score: 1
Natty:
Report link

I could think of two ways to handle it with Kafka.

  1. Single partition for a topic. You could have only one partition and a consumer that can process messages. Issue would be blocking parallelism processing and bottleneck in performance.
  2. You may have multiple partitions, and producer can insert messages to a specific partition based on a hash outcome. For ex. if you want to make sure a messages for a specific domains are processed in the order, Producer can decide a partition based on a domain value. So all the messages for a particular domain go to same partition, will be processed by the same consumer in order. Possible issue with this approach is uneven data distribution.
Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Digant Patel