79349335

Date: 2025-01-12 04:21:32
Score: 2
Natty:
Report link

Drag and move your svg or jpeg file in which the image is in the same folder or same sub-folder as your html file, browser is not able to search the path or location of file and hence show - file not found when you inspect the url, you can also read the error message. I did this and my code worked.

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

79349327

Date: 2025-01-12 04:11:30
Score: 4
Natty:
Report link

passenger start --instance-registry-dir /tmp

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Has no white space (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Евгеннй Угаев

79349324

Date: 2025-01-12 04:05:28
Score: 3.5
Natty:
Report link

I used yarn build and it works,thank you so much

Reasons:
  • Blacklisted phrase (0.5): thank you
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Andres Percy Chavez Ortuño

79349321

Date: 2025-01-12 03:58:27
Score: 1
Natty:
Report link

I had same issue, but it worked when i replaced the the fucntion createEmailSession with createEmailPasswordSession.

Reasons:
  • Whitelisted phrase (-1): it worked
  • Low length (1):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: ABDUL BASIT SHER

79349318

Date: 2025-01-12 03:55:27
Score: 1.5
Natty:
Report link

Create Custom Middleware in Laravel Laravel middleware is a mechanism that filters HTTP requests entering your application. It sits between the request and the application’s core, allowing you to intercept, modify, or reject requests based on certain conditions. Middleware can be used for tasks like authentication, logging, and request manipulation. It provides a flexible way to handle cross-cutting concerns in your application’s HTTP lifecycle, ensuring clean and modular code organization. Read More

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

79349312

Date: 2025-01-12 03:48:25
Score: 4
Natty:
Report link

I've been having the same issue for a bit in PyCharm. The solution is quite odd, simply install keras as a package by itself, and then replace imports to import tensorflow.keras to keras.api and it will compile just fine.

Would appreciate it if anyone could give further explanation as to why this works..

Reasons:
  • Blacklisted phrase (1.5): Would appreciate
  • Whitelisted phrase (-1): solution is
  • Low length (0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): having the same issue
  • Low reputation (1):
Posted by: aadi

79349292

Date: 2025-01-12 03:29:21
Score: 5
Natty:
Report link

JanVerbeke, your approach of either using a table alias or the actual tableName.field works. However, the challenging I am having is when I want to do this dynamically and my frontend doesn't have any idea of the tableName.fieldName but rather the fieldName only. I have a DTO object that contains all the fields I am exposing to the frontend which I want to use for sorting on both the frontend and the backend but due to nested associations I have, I can't get this to work.

Any suggestions will be appreciated.

Reasons:
  • Blacklisted phrase (1): appreciated
  • RegEx Blacklisted phrase (2): Any suggestions
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Marvian

79349291

Date: 2025-01-12 03:28:20
Score: 1
Natty:
Report link

Could you please try this? Extract it and use the dlls in bin folder.
Also, you can try delete dbgcore.dll and dbghelp.dll, and check your PATH envvar to find if there's another dbgcore.dll on your computer that would result in a 'DLL Hell'.

Reasons:
  • Whitelisted phrase (-1): try this
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: 万顷茫然

79349270

Date: 2025-01-12 03:03:16
Score: 1
Natty:
Report link

I faced the same problem on my Mac today. I also noticed, that Docker didn't work at all. The fix that worked for me was completely removing Docker Desktop from my Mac and reinstalling a fresh version of it. I use Homebrew for Docker Desktop, so there might have been an issue with some upgrades.

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

79349265

Date: 2025-01-12 02:56:14
Score: 8 🚩
Natty: 5
Report link

I am having the same issue. In my case, a Raspberry Pi 2B was running Jessie. I wrote a PHP program accessing two solar charger controllers. It has worked since 2018.

The 2B's SD card crashed. I can not rebuild a card for Jessie, so now I am running Bookwork. The Modbus commands fail. I get the "Watchdog time expired [ 5 sec]!!! Connection to 192.168.1.1 is not established." error.

Any suggestions?

Reasons:
  • RegEx Blacklisted phrase (2): Any suggestions?
  • No code block (0.5):
  • Me too answer (2.5): I am having the same issue
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Wade Elmore

79349257

Date: 2025-01-12 02:43:11
Score: 4
Natty: 4
Report link

The Creative Pencil एक क्रिएटिव ड्रॉइंग चैनल है जहाँ आपको बेहतरीन आर्टवर्क देखने को मिलते हैं। इस बार मैं अपने चैनल पर भगवान कृष्ण का एक खास आर्टवर्क लेकर आ रहा हूँ। उनकी दिव्य छवि और आशीर्वाद को पेंसिल आर्ट के ज़रिए दर्शाने की कोशिश की है। अगर आपको आर्ट और क्रिएटिविटी पसंद है, तो चैनल को ज़रूर विजिट करें और सपोर्ट करें!

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • No latin characters (2):
  • Low reputation (1):
Posted by: Manoj Chaudhary

79349234

Date: 2025-01-12 02:22:05
Score: 4
Natty: 4
Report link

To what extent did your parents encourage you to pursue a career in nursing.

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

79349229

Date: 2025-01-12 02:19:05
Score: 1.5
Natty:
Report link

The FirstPersonController comes with its own "Cursor" as a crosshair kind of thing. You can change it by doing player.cursor.color or .scale or whatever you need to do with it. You can even change the texture or whatever you need.

Here is the documentation for the FirstPersonController

https://www.ursinaengine.org/api_reference.html#FirstPersonController

Here is the discord if you need any more help

https://discord.gg/Rh7Xfd98BU

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

79349225

Date: 2025-01-12 02:09:03
Score: 1
Natty:
Report link

Not ideal but does exactly what is wanted:

  1. git commit -p small change (along with already staged changes)
  2. git stash
  3. git reset HEAD^
  4. git commit -p small change
  5. git add -u
  6. git stash pop

We end up where we started, with the same material staged and unstaged, except the small change is committed.

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

79349216

Date: 2025-01-12 01:59:01
Score: 2
Natty:
Report link

I know this question is old, but I just came across the same problem. While the solution from This answer did not work directly, I just tried setting the config http-host=127.0.0.1 (not publically documented) in keycloak.conf and it seems to work for me. Probably also works equally using keycloaks other config variants. If I were to guess, keycloak manually overrides quarkus.http.host with its own internal default.

Reasons:
  • Blacklisted phrase (1): did not work
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: theIpatix

79349209

Date: 2025-01-12 01:49:59
Score: 3.5
Natty:
Report link

I found below link helpful:

https://repost.aws/questions/QUN7Su2fgATae98bGurizQgQ/new-ec2-instance-launching-after-termination-how-to-stop-prevent-this-cycle

In short: Navigate in the console to "Spot Requests" and then: "actions" --> "cancel request".

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

79349206

Date: 2025-01-12 01:44:58
Score: 3.5
Natty:
Report link

It's used to collapse sections of code for better readability, it's especially useful when dealing with long code blocks. Here's an example:

Collapsing code in Android Studio

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

79349192

Date: 2025-01-12 01:30:55
Score: 2
Natty:
Report link

You can specify the version of dart to use in pubspec.yaml:

environment:
  sdk: '>=3.6.0 <4.0.0'

See the documentation on this

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

79349185

Date: 2025-01-12 01:21:54
Score: 1
Natty:
Report link

Self plug: I wrote a library to do this because TC39 recently abandoned the proposal to introduce it: https://www.npmjs.com/package/@nano-utils/op

User-side looks like:

import { op } from '@nano-utils/op';

class Vector {
    constructor(...elems) {
        this.arr = elems;
    }

    'operator+'(other) {
        return new Vector(...this.arr.map((e, i) => e + other.arr[i]));
    }
}

const a = new Vector(1, 2),
    b = new Vector(3, 4);

console.log(op`${a} + ${b}`); // -> Vector(4, 6)
Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Jason Xu

79349168

Date: 2025-01-12 01:00:50
Score: 2
Natty:
Report link
data = {'a': [3, 2], 'b': [[4], [7, 2]]}
df = pd.DataFrame(data)
df['c'] = df.apply(lambda row: [row['a'] * x for x in row['b']]**, axis=1**)
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: STOWE

79349160

Date: 2025-01-12 00:54:49
Score: 2
Natty:
Report link

I had the same problem: post such upgrade, War was up but not running.

see here https://medium.com/@hsjoshi28/java-ee-to-jakarta-ee-with-jdk-17-and-spring-boot-step-by-step-guide-e73744d3e2f4

"Step -1 (minus 1): Do not replace all javax to jakarta"

It looks like you did replace also to javax.ws.rs

Good luck

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • Whitelisted phrase (-1): I had the same
  • Probably link only (1):
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: ShaharT

79349153

Date: 2025-01-12 00:39:46
Score: 1
Natty:
Report link

Did you really say list of tuples by list comprehension? Okay, you're supposed to have it if you really, really have to:

n=3783780 # e.g.
print(
[(k,v)for k,v in{k:l.count(k)for l in[(lambda f,p,i:[]if i<p else f(f,p+1,i)if i%p else[p]+f(f,p,i/p))(lambda g,q,j:[]if j<q else g(g,q+1,j)if j%q else[q]+g(g,q,j/q),2,n)]for k in l}.items()]
      )

It could probably be written a little shorter. Here the core is a list of prime factors (I had that written earlier), and that was just modified into tuples of prime+exponent pairs. It would be better to generate the desired pairs directly and put them as tuples in a list, or at least in a dict and then convert that to a list.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Did you
  • Low reputation (1):
Posted by: 1jack

79349152

Date: 2025-01-12 00:38:46
Score: 0.5
Natty:
Report link

I believe I have it figured out:

def plot2(scores, mean_scores, times, mean_times):
  display.clear_output(wait=True)
  display.display(plt.gcf())
  plt.clf()
  plt.title('Some Titile')
  plt.xlabel('Number of games')
  plt.ylabel('Score')
  ax1 = plt.gca()
  ax2 = ax1.twinx()
  ax2.plot(times)
  ax2.plot(mean_times)
  ax2.set_ylabel('Game Time')
  plt.plot(scores)
  plt.plot(mean_scores)
  plt.ylim(ymin=0)
  plt.text(len(scores)-1, scores[-1], str(scores[-1]))
  plt.text(len(mean_scores)-1, mean_scores[-1], str(mean_scores[-1]))

  plt.show()
  plt.pause(0.1)
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Nadim Ghaznavi

79349148

Date: 2025-01-12 00:32:45
Score: 2
Natty:
Report link

I had a similar issue. Support for Blazor WebAssembly projects isn't in Aspire yet. It's because Aspire has no way to pass the service discovery information to the client application except over HTTP.

I made a Nuget package that passes the service discovery information from the AppHost to the client by writing it to the client's appsettings.json files. Hopefully one day the feature will be baked into Aspire.

You use it like this:

Example Program.cs in AppHost

var builder = DistributedApplication.CreateBuilder(args);

var inventoryApi = builder.AddProject<Projects.AspNetCoreWebApi>("inventoryapi");
var billingApi = builder.AddProject<Projects.SomeOtherWebApi>("billingapi");

builder.AddProject<Projects.Blazor>("blazorServer")
    .AddWebAssemblyClient<Projects.Blazor_Client>("blazorWasmClient")
    .WithReference(inventoryApi)
    .WithReference(billingApi);

builder.Build().Run();

Example Program.cs in your Blazor WebAssembly Client Install (on the WebAssembly client) the Microsoft.Extensions.ServiceDiscovery Nuget package to get the official Aspire service discovery functionality that is going to read your resource information from your app settings.

builder.Services.AddServiceDiscovery();
builder.Services.ConfigureHttpClientDefaults(static http =>
{
    http.AddServiceDiscovery();
});

builder.Services.AddHttpClient<IInventoryService, InventoryService>(
    client =>
    {
        client.BaseAddress = new Uri("https+http://inventoryapi");
    });

    builder.Services.AddHttpClient<IBillingService, BillingService>(
    client =>
    {
        client.BaseAddress = new Uri("https+http://billingapi");
    });

I hope it solves your problem.

Reasons:
  • RegEx Blacklisted phrase (2.5): please send me
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
Posted by: benjamin

79349143

Date: 2025-01-12 00:27:44
Score: 0.5
Natty:
Report link

I just installed VS2022 on Windows10, and didn't know that I had to install Windows 11 SDK. I got the ctype.h error.

I did a search on the laptop for Visual Studio Installer, ran it, hit Modify, and checked Windows 11 SDK (10.0.22621.0). Then I could build and run C++ solution.

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

79349142

Date: 2025-01-12 00:27:44
Score: 5.5
Natty:
Report link

Can someone advise how to block or prevent this? illegalwebsite.com is hiding behind Cloudflare, so I cannot see their host IP.

If you go to Dashboard > Websites > Add a domain as if you would add a domain for your self, and you place there the "illegalwebsite.com" domain, Cloudflare will show you the A record with the IP address (I know, is weird, but that's how it works CF, even with our domains) along with all the other records. You can move from there to understand what is going on.

Ciao!

Reasons:
  • Blacklisted phrase (0.5): I cannot
  • RegEx Blacklisted phrase (2.5): Can someone advise how
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Can someone
  • Low reputation (1):
Posted by: AndySem

79349128

Date: 2025-01-12 00:11:40
Score: 1
Natty:
Report link

I had the same problem, on localhost I could access mongodb atlas, when I accessed it on another computer it gave me this error, I was able to solve it by changing the axios url, instead of leaving localhost I gave the IP of the computer that is running the server type http:/ /localhost:3000 moved to http:192.168.1.2:3000. That resolved it.

Reasons:
  • Whitelisted phrase (-1): I had the same
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: José Ronaldo dos santos

79349119

Date: 2025-01-12 00:04:39
Score: 2
Natty:
Report link

I have found an answer: Turn off "Enable Chrome V8 runtime" for your Apps Script. When this is enabled the failure occurs within 10 transactions, often within the first 3. When this is disabled I have run 400 transactions without a single failure.

After changing this setting you will need to Deploy your script again, even though you have not changed any code.

screen capture of Apps Script settings

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

79349117

Date: 2025-01-12 00:02:38
Score: 2
Natty:
Report link

Yes, find the CUDA version with nvcc --version and run pip install cupy-cuda{major_version}x.

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

79349112

Date: 2025-01-11 23:52:36
Score: 1
Natty:
Report link

lrx!

My goal is to host this second Wordpress website on https://domain/myfolder.

...

I am able to redirect subdomain.domain.com to https://domain/myfolder but then I get a 404 error...

I think this is because this URL structure can be either for a normal page/post URL or sub-directory subsite URL in a WordPress multisite installation (which is actually and easily supported by Runcloud - though dealing with WP multisite on subdirectories is trickier than multisite on some domains).

I have many WP single sites and several multisites on Runcloud, and I will encourage you to reflect on the goals you are trying to achieve, because what you are saying you're trying to do is unusual and maybe a little bit hacky (although I admit I've tried to do it when I started dealing with the WP beast, around 13 years ago).

You'd better open a ticket on Runcloud and they will answer promptly and quickly, as they usually do.

God bless!

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

79349110

Date: 2025-01-11 23:49:36
Score: 2
Natty:
Report link

I had a similar issue, and contacted twilio. It turns out the connect to stripe button in twilio console does not currently work. Twilio is unable to get the OAuth Token From Stripe, and they are working on this issue. https://status.twilio.com/incidents/21lnz91yrxpv

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

79349096

Date: 2025-01-11 23:32:33
Score: 2
Natty:
Report link

Based on your description and the provided code, the issue seems to lie in the configuration or the connection process itself rather than with the Oracle database services since SQL Developer can successfully connect. Here are some steps to diagnose and resolve the issue:


1. Verify Connection String

Ensure your DBConnection connection string in the configuration file (e.g., App.config or Web.config) is correct. The connection string for Oracle typically looks like:

<connectionStrings>
  <add name="DBConnection" 
       connectionString="User Id=<username>;Password=<password>;Data Source=<datasource>" 
       providerName="Oracle.ManagedDataAccess.Client" />
</connectionStrings>

2. Check for Oracle.ManagedDataAccess.Client Setup

Ensure you have the Oracle.ManagedDataAccess NuGet package installed in your project. It can be added using:

dotnet add package Oracle.ManagedDataAccess

Make sure the version of this library is compatible with the Oracle database version.


3. Debug Exception Details

Update the catch block in your constructor and log detailed exception information:

catch (OracleException oracleEx)
{
    Console.WriteLine($"OracleException: {oracleEx.Message}");
    Console.WriteLine($"Error Code: {oracleEx.ErrorCode}");
    Console.WriteLine($"Stack Trace: {oracleEx.StackTrace}");
}
catch (Exception ex)
{
    Console.WriteLine($"General Exception: {ex.Message}");
    Console.WriteLine($"Stack Trace: {ex.StackTrace}");
}

This will provide more specific details about why the connection fails.


4. Verify Network Configuration


5. Test Connection Using a Minimal C# Example

Try connecting with a minimal example to isolate the problem:

using Oracle.ManagedDataAccess.Client;

class TestOracleConnection
{
    static void Main(string[] args)
    {
        string connectionString = "User Id=<username>;Password=<password>;Data Source=<datasource>";
        
        try
        {
            using (var connection = new OracleConnection(connectionString))
            {
                connection.Open();
                Console.WriteLine("Connection successful!");
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Error: {ex.Message}");
        }
    }
}

6. Check Connection Timeout

If the database connection is slow, increase the Connection Timeout in the connection string:

<add name="DBConnection" 
     connectionString="User Id=<username>;Password=<password>;Data Source=<datasource>;Connection Timeout=60" 
     providerName="Oracle.ManagedDataAccess.Client" />

7. Ensure Disposal of Resources

The Dispose method in your DBManager class is not implemented. Ensure proper disposal of resources:

public void Dispose()
{
    if (_connection != null)
    {
        if (_connection.State != ConnectionState.Closed)
        {
            _connection.Close();
        }
        _connection.Dispose();
        _connection = null;
    }
}

8. Use Explicit .NET Assembly Version

Sometimes, mismatches in versions can cause issues. Verify the correct version of Oracle.ManagedDataAccess assembly is loaded using:

Console.WriteLine(typeof(OracleConnection).Assembly.FullName);

9. Check Logs

Look at the Oracle Database logs for any relevant errors, or enable tracing for your Oracle client to gather more information.


If none of the above resolves the issue, please share the exact error message and stack trace for further assistance.

Reasons:
  • RegEx Blacklisted phrase (2.5): please share
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Harold Noble Bright

79349086

Date: 2025-01-11 23:26:32
Score: 3
Natty:
Report link

Just use this and your GUI will close only after you click on the window.

win.exitonclick()

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

79349074

Date: 2025-01-11 23:19:31
Score: 1.5
Natty:
Report link

Just for completeness:

alik@linux:~/people/didalik/dak/cd/ci(main)$cat << HD | cat
> This works too.
> 
> Cheers,
> 
> Дід Alik
> HD
This works too.

Cheers,

Дід Alik
alik@linux:~/people/didalik/dak/cd/ci(main)$

Flexibility!

Reasons:
  • Blacklisted phrase (1): Cheers
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Дід Alik

79349072

Date: 2025-01-11 23:18:31
Score: 3.5
Natty:
Report link

After turning off SIP (System Integrity Protection) everything worked.

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

79349061

Date: 2025-01-11 23:07:28
Score: 1
Natty:
Report link

As a general rule, in order to redirect ALL the traffic of your www.somnovozamcan.eu to your main site somnovozamcan.eu (called Canonical URL) you have to do it via the DNS settings of your domain: Record type: CNAME Name: www Target: somnovozamcan.eu. Is as simple as that, if you have access to your domain DNS.

Maybe, since you are using a shared hosting - and perhaps they are holding you from your DNS settings - you should find some settings on your admin/control panel.

BUT, all that said with an important CAVEAT and WARNING (precisely because you're using a shared hosting service): since you have your site on a "www" subdomain, that means all your files (let apart the database) are stored in a precise folder of your shared hosting provider's server. That said, before making any intervention, you should know your website situation, and the best way to do this is to ask your hosting provider.

Take care.

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

79349055

Date: 2025-01-11 23:05:28
Score: 1
Natty:
Report link

ScheduledTaskRegistrar can be used in that way (Spring Boot version 3.4.1):

import org.springframework.context.annotation.Configuration;
import org.springframework.lang.NonNull;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
import org.springframework.scheduling.Trigger;
import org.springframework.scheduling.TriggerContext;
import org.springframework.scheduling.support.CronTrigger;

import java.time.Instant;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

@Configuration
@EnableScheduling
public class SchedulingConfig implements org.springframework.scheduling.annotation.SchedulingConfigurer {

    private final CustomCronTrigger customCronTrigger = new CustomCronTrigger("0/10 * * * * ?"); // Runs every 10 seconds.

    @Override
    public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
        taskRegistrar.setScheduler(taskScheduler());
        taskRegistrar.addTriggerTask(
                new Runnable() {
                    @Override
                    public void run() {
                        LocalDateTime scheduledTime = customCronTrigger.getScheduledTime();
                        System.out.println("Method was scheduled at: " + scheduledTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                    }
                },
                customCronTrigger
        );
    }

    public Executor taskScheduler() {
        return Executors.newScheduledThreadPool(1); // Use the executor of your liking.
    }

    class CustomCronTrigger implements Trigger {
        private LocalDateTime scheduledTime;
        private final CronTrigger cronTrigger;

        public CustomCronTrigger(String cronExpression) {
            this.cronTrigger = new CronTrigger(cronExpression);
        }

        public LocalDateTime getScheduledTime() {
            return scheduledTime;
        }

        @Override
        public Instant nextExecution(@NonNull TriggerContext triggerContext) {
            Instant nextExecutionInstant = cronTrigger.nextExecution(triggerContext);
            if (nextExecutionInstant != null) {
                scheduledTime = nextExecutionInstant.atZone(java.time.ZoneId.systemDefault()).toLocalDateTime();
            }
            return nextExecutionInstant;
        }

    }
}

Output:

2025-01-12T00:56:04.804+0200 INFO Initializing ProtocolHandler ["http-nio-8080"]
2025-01-12T00:56:04.805+0200 INFO Starting service [Tomcat]
2025-01-12T00:56:04.805+0200 INFO Starting Servlet engine: [Apache Tomcat/10.1.34]
2025-01-12T00:56:04.825+0200 INFO Initializing Spring embedded WebApplicationContext
2025-01-12T00:56:04.827+0200 INFO Root WebApplicationContext: initialization completed in 398 ms
2025-01-12T00:56:05.033+0200 INFO Starting ProtocolHandler ["http-nio-8080"]
2025-01-12T00:56:05.043+0200 INFO Tomcat started on port 8080 (http) with context path '/'
2025-01-12T00:56:05.050+0200 INFO Started CrudCoreApplication in 0.847 seconds (process running for 1.127)
Method was scheduled at: 2025-01-12 00:56:10
Method was scheduled at: 2025-01-12 00:56:20
Method was scheduled at: 2025-01-12 00:56:30

Please move CustomCronTrigger in a separate class file, and if possible for Runnable as well, to have better organization of code. The class and runnable are provided as such for demonstration purposes of the answer.

Out of curiosity, why do you need to be that exact though?

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

79349046

Date: 2025-01-11 23:01:27
Score: 3
Natty:
Report link

Try to install this library manually, works for me https://www.npmjs.com/package/@splinetool/runtime

Reasons:
  • Whitelisted phrase (-1): works for me
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Anton Bodniev

79349037

Date: 2025-01-11 22:55:25
Score: 8 🚩
Natty: 5.5
Report link

Have you find out how to do that?

Reasons:
  • Blacklisted phrase (2): Have you find
  • Low length (2):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Moussa Saidi

79349031

Date: 2025-01-11 22:51:24
Score: 1
Natty:
Report link

For those who are not able to get a correct HH:mm:ss format from java.sql.Date, just set it as java.sql.Timestamp in field class type.

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

79349027

Date: 2025-01-11 22:49:23
Score: 5.5
Natty: 4
Report link

I literally don’t have words… this is some sick twisted (pun intended) shit going on. Gas lighting, preventing people from living their lives with freewill and using them as test subjects 24/7 is wrong. And beyond this, to abuse and hurt people just because you think u can hide behind a screen and not get caught is the most disturbing part of this. Time (lol) to get RIGHT… (not left)… wait switch? No thanks. Seriously u need to look into this because it’s the most fucked up situation in a long time. My name is Kelly lucido. I live in Carmel, ca and I am 38 years old.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (2): fuck
  • Contains signature (1):
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Kelly lucido

79349020

Date: 2025-01-11 22:44:22
Score: 1.5
Natty:
Report link

For persistent occurrence of this error, you may need to clear your cache

expo start -c
Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Olaniyi Philip Ojeyinka

79349009

Date: 2025-01-11 22:36:20
Score: 4.5
Natty: 4.5
Report link

Hola que tal prueba con newDevice.register() despues de haber creado la instancia :D espero te funcione!

Reasons:
  • Blacklisted phrase (2): espero
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Jonathan Alejandro

79349007

Date: 2025-01-11 22:35:19
Score: 1
Natty:
Report link

If you have a custom validation, you have to add this in your javascript script once your field is filled out correctly =>

YOUR_FIELD.setCustomValidity('');
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Mohamed T. Bouzid

79349004

Date: 2025-01-11 22:34:19
Score: 2.5
Natty:
Report link

1.) run the touch command followed by the name of the file : 2.) $ touch main.rs 3.) $ ls main.rs 4.) open VS > open file main.rs

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

79348996

Date: 2025-01-11 22:30:17
Score: 4.5
Natty:
Report link

Solved by bsimmo over at Github

https://github.com/lawsie/guizero/issues/517

Reasons:
  • Probably link only (1):
  • Low length (2):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: whatsmyname

79348984

Date: 2025-01-11 22:21:15
Score: 1
Natty:
Report link

i was able to add the SMTP env variables in the docker compose file under

x-airflow-common:
    environment:

FYI, airflow has a default connection_id 'smtp_default' that can be edited with the user account credentials. You can also refer to the other ways I tried to test in this answer link airflow smtp not working with docker - section/key [smtp/smtp_user] not found in config / OSError: [Errno 99] Cannot assign requested address

Also as an alternative, you can send email by using python's smtplib in a PythonOperator callable function refer https://docs.python.org/3/library/email.examples.html

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

79348982

Date: 2025-01-11 22:21:13
Score: 4.5
Natty:
Report link

Answering my own question here: had to compile GLFW myself, then compile using gcc instead of gcc -x c++, THEN add -lgdi32 to the compile instruction. This has solved the issue for me on on two separate machines. Thanks to @drescherjm, @Alan Birtles, and @Brecht Sanders for their help resolving the issue.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (0.5):
  • No code block (0.5):
  • User mentioned (1): @drescherjm
  • User mentioned (0): @Alan
  • User mentioned (0): @Brecht
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Sad Robot

79348976

Date: 2025-01-11 22:17:13
Score: 1
Natty:
Report link

Problem was in home controller

@RestController
public class HomeController {

    @RequestMapping("/{path:[^\\.]*}")
    public String redirectToReact() {
        return "forward:/index.html";
    }
}

that was blocking requests from websocket, so if you should check if u have the same thing if u got the same problem

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

79348969

Date: 2025-01-11 22:09:10
Score: 2.5
Natty:
Report link

Mines says failed to parse lock file at my directory then caused by "lock file version 4 requires -Znext-lockfile-bump"

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

79348966

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

I faced the same problem, and since there wasn't a solution available, I decided to create a package: https://github.com/dazza-dev/Laravel-Batch-Validation that solves it. This is the first version, so it may have some bugs, but it would be great if you could try it out and help improve it further. It works well for my use case, but I hope it can be helpful to the Laravel community.

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

79348965

Date: 2025-01-11 22:06:10
Score: 3
Natty:
Report link

shut up old manshut up old manshut up old manshut up old manshut up old manshut up old manshut up old man

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

79348957

Date: 2025-01-11 21:58:09
Score: 0.5
Natty:
Report link

Not the best, but. Formula in B3 dragged right:

=LET(a,TAKE(FILTER($A$2:A2,$A$1:A1=1),1,-3),IF(COUNTA(a)>=3,SUM(a),0))

Result:

enter image description here

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

79348953

Date: 2025-01-11 21:56:08
Score: 3
Natty:
Report link

In my case the webserver in the EC2 was not running, I had to log in to the instance

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

79348944

Date: 2025-01-11 21:50:08
Score: 0.5
Natty:
Report link

Just missing the Initialized notification, which comes immediately after the initialize response is received.

{
  "jsonrpc": "2.0",
  "method": "initialized",
  "params": {}
}

Incidentally the idea that sending and receiving notifications 1 at a time is always the case is a mistake, e.g.

sample log with multiple notifications at once

src: https://iwanabethatguy.github.io/language-server-protocol-inspector/

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: Greedo

79348942

Date: 2025-01-11 21:49:07
Score: 1.5
Natty:
Report link

The problem solved (after explore django source code): The permissions field in AbstractGroup model must have related_query_name as "group".

class AbstractGroup(models.Model):
    name = models.CharField(_("name"), max_length=150, unique=True)
    permissions = models.ManyToManyField(
        Permission,
        verbose_name=_("permissions"),
        blank=True,
        related_name="custom_group",
        related_query_name="group",
    )
    ...

Thanks.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Mah Jal

79348935

Date: 2025-01-11 21:44:07
Score: 3
Natty:
Report link

After a not-so-short research, I found that my problem is actually (almost) the same as the uniform-machines scheduling problem that is formulated in the context of computer task scheduling. In stead of assigning packages to couriers, the uniform-machines scheduling assigns tasks to processors. To my surprise, the problem is much more difficult than I expected. For those who want to learn more about the problem, please refer to the wiki and the paper Exact and Approximate Algorithms for Scheduling Nonidentical Processors. Many thanks to @bsraskr .

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @bsraskr
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: LYL

79348929

Date: 2025-01-11 21:39:05
Score: 0.5
Natty:
Report link

A)A short-short answer is : in some file like

 x:\MSYS2\home\some_name\.bash_profile    , 

add these lines:

#   ----  modify :   j   is  j-Windows  drive  
tt=/j/MSYS2/mingw64/bin

PATH="${tt}:${PATH}"

B)A short answer is : in some file like

 x:\MSYS2\home\some_name\.bash_profile    , 

add these lines:

#   pathz  was defined in   Windows  using  e.g.   set pathz=%cd%    before loading  MSYS2
#   You can also set it here (in Windows-format   like  'c:\my\bin)
tt="${pathz}"

tt=\/"${tt}"
tt="${tt/:/}"
tt="${tt//\\//}"

PATH="${tt}:${PATH}"
#   ----  modify these 2 lines :
mkdir -p "${tt}"/../2WORK
cd "${tt}"/../2WORK


#some tests :
input="a\b\c\d"
echo ${input}
echo "${input/\\//}"
echo "${input//\\//}"
echo "Note that : only the last echo with '//', not '/', to begin, give us global replace !!"

C)An instructive answer is :

1)Create a dir . In this dir, create a file named qqq.cmd that contains :

rem  cd = current dir
set pathz=%cd%
set path=%pathz%;%path%
set pathzz=%path%

:: pathz and pathzz can be used in cygwin and MSYS2 , but must be translated.

if "%1" == "" (

  rem   ----  modify this line :
  I:\MSYS2\msys2_shell.cmd   -ucrt64
  exit
)


set ZZZZZZ=123aBBC1111111111111
set zZZz=123aBBC

rem   ----  modify this line :
I:\CYG\bin\mintty.exe -i /Cygwin-Terminal.ico -

exit
      

2)In this dir, create another file named ss that contains :

#ss
#in notepad++  :  click Edit , choose EOL conversion , then choose unix  for this file  ss.  (no extension).

echo $PATH
echo $path"assss----------"
echo $ZZZZZZ
echo $zZZz
echo $ZZZZ--=====++++++
echo $zZZz
echo $PATHZ  --------
echo $pathz --====


cd /c
echo --------Note current dir :
pwd

if false; then
    # ... Code I want to skip here ...  
  fdsgfsdsgfs
  dfsdgfdsgfds
fi


exit
      

3)Do as in B) .
4)Create shortcut for qqq.cmd and move the short cut to any where.
5)Then execute qqq.cmd by double clicking the shortcut and now you have MSYS2. Type ss and check the output and note the current dir now!!

NB: if you modify qqq.cmd to load Cygwin then 3) above not needed

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

79348928

Date: 2025-01-11 21:37:05
Score: 1
Natty:
Report link

The only way I found to bind multiple keys or combinations is to bind them separately:

root.bind("<Control-Alt-g>", close_app)
root.bind("<F9>", close_app)

# Remaining code

root.mainloop()
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: xenomorphed

79348919

Date: 2025-01-11 21:25:02
Score: 1
Natty:
Report link

Besides the implementation in statsmodels as described in @Josef's answer, the E-test is also implemented in the SciPy library, with the function scipy.stats.poisson_means_test.

Usage example:

import scipy.stats as stats
count1, n1, count2, n2 = 0, 100, 3, 100
res = stats.poisson_means_test(count1, n1, count2, n2)
res.statistic, res.pvalue
(-1.7320508075688772, 0.08837900929018157)
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Josef's
  • Low reputation (0.5):
Posted by: J-J-J

79348915

Date: 2025-01-11 21:23:02
Score: 1
Natty:
Report link

You're providing the wrong path I think as an input to your workflow. You're passing local-vars: '.github/workflows/variables/local-vars.env' as an input. However your file seems to be at the following path: .github/variables/local-vars.env.

Try it with: local-vars: '.github/variables/local-vars.env'

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

79348910

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

to accept keys, you have to use the imported <Fragment> instead of <> as <> cannot accept keys.

i.e.

import { Fragment } from 'react';

...

<Fragment key={yourKey}>...</Fragment>
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: tim

79348908

Date: 2025-01-11 21:18:01
Score: 1.5
Natty:
Report link

Sorry for the brevity in the comment Your Common Sense,. Still getting used to Stackoverflow. Thank you for your reply. It has been very helpful. How about:

require_once("db_fns2025.php");

// Query to get table names
$sql = "SHOW TABLES";
$rs =  mysqli_query($link, $sql);
// Check if there are tables
$tblCnt = 0;
if ($rs->num_rows > 0) {
echo "<h2>Tables in the $dbname database:</h2>";
echo "<ul>";
// Output data from each row
while ($row = $rs->fetch_array()) {
$tblCnt++;
echo "<li>" . $row[0] . "</li>";
 }
echo "</ul>";
 if ($tblCnt==1) {
 echo "There is $tblCnt table<br />\n";
}
else if ($tblCnt>1){
 echo "There are $tblCnt tables<br />\n";
} 
} else {
echo "No tables found in the $dbname database.";
}
mysqli_close($link);
?>
Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (1): Stackoverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Mark P

79348884

Date: 2025-01-11 21:05:58
Score: 4
Natty:
Report link

I had a similar issue when I updated Flutter.

This video helped me to solve it https://www.youtube.com/watch?v=mC25tCXdPY8

After running the command "dart pub upgrade --major-versions" I managed to run the app on my emulated device.

Hope it can help.

Regards.

Reasons:
  • Blacklisted phrase (1): Regards
  • Blacklisted phrase (1): youtube.com
  • Blacklisted phrase (1): This video
  • Whitelisted phrase (-1): Hope it can help
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Gastón Gaitan

79348882

Date: 2025-01-11 21:05:58
Score: 0.5
Natty:
Report link

Try this and it should help you out.

For the column add the valueFormatter property

{
headerName: "Earned", field: "revenue", sortingOrder: ['asc', 'desc'], valueFormatter: currencyFormatter
}

Use this function for the formatting

function currencyFormatter(params) {
    var usd = new Intl.NumberFormat('en-US', {
        style: 'currency',
        currency: 'USD',
        minimumFractionDigits: 2
    });

    return usd.format(params.value);
}

The output

Reasons:
  • Whitelisted phrase (-1): Try this
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Harold Noble Bright

79348881

Date: 2025-01-11 21:04:56
Score: 11 🚩
Natty: 5.5
Report link

@Hellen, Did you find a solution?

Reasons:
  • RegEx Blacklisted phrase (3): Did you find a solution
  • Low length (2):
  • No code block (0.5):
  • Ends in question mark (2):
  • User mentioned (1): @Hellen
  • Single line (0.5):
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: Craitose

79348877

Date: 2025-01-11 21:02:56
Score: 2
Natty:
Report link

As an alternative, it seems like there actually is a library (record) that allows to record in all platforms in flutter: See https://pub.dev/packages/record .

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

79348875

Date: 2025-01-11 21:01:55
Score: 5.5
Natty:
Report link

Found the perfect function to turn off drop-highlighting by self.setDropIndicatorShown(False).

However for curiosity sake, I was wondering if there's a stylesheet for dropIndicator to customize its look? OR is the only option to use QStyleItemDelegate or something?

Reasons:
  • Blacklisted phrase (2): was wondering
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Shobhit Khinvasara

79348867

Date: 2025-01-11 20:54:54
Score: 1.5
Natty:
Report link

With modern eslint (from v8.21.0), if you're using the new config file eslint.config.js, the --ext option is no longer supported. Instead, specify the files to lint in the config, and then run eslint . to lint all specified files.

Example eslint.config.js:

/** @type {import('eslint').Linter.Config[]} */
export default [
  { files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
  { ignores: ["dist" ] },
  // Other config options here
];
Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Adam

79348862

Date: 2025-01-11 20:52:53
Score: 1.5
Natty:
Report link

Instead of creating multiple workflows, you could create one workflow with multiple jobs that need each other via the needs: keyword. https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds

on:
  pull_request:

jobs:
  tf-plan-upload:
    runs-on: ubuntu-latest
    steps:
      - run: echo "This job does TF plan and uploads"

  tf-plan-download-opa-scan:
    needs: [tf-plan-upload]
    runs-on: ubuntu-latest
    steps:
      - run: echo "This job downloads the TF plan and runs the OPA scan"
Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Arno

79348860

Date: 2025-01-11 20:50:52
Score: 1.5
Natty:
Report link

You can do :

use App\Http\Controllers as Controllers;

and then in routes

Route::get('/user', [Controllers\UserController::class, 'index']);
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Marcin Kałat

79348859

Date: 2025-01-11 20:50:52
Score: 2.5
Natty:
Report link

def programmersLife(): while asAlive: eat() #sleep() code()

#if name == "main":

programmersLife()

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

79348858

Date: 2025-01-11 20:48:52
Score: 3
Natty:
Report link

Ok so after banging my head against this question for a while I have found something interesting..

When using Document ID 2PACX we get a 404. At first I thought it was a something related to service account not having proper permissions. Just for the record:

Still I got 404.

So, I tried a different method, I used the drive method to fetch all the documents and I found that the document that I wanted to fetch was associated to different ID.

Document ID from doc was "2PACX-1vTuwWllBnBa9StNEd1JzUI0sFi2jqOHG0sjL6WeN8j0Nv2nvP0UAETpEKx3zZDt2FqDKIdseJLOdKhT"

Document ID from drive fetch api was "1Hk-WnhWbE3yjfx0jKmrtbBN3CJsMtRIsCDauELOma2o"

I am not sure if there is some mismatch or that is how these IDs are intended to work. Anyways I modified your code with this knowledge and it seems to works. (FYI, just like google doc API u will need to enable drive API for this to work)

Please let me know if this helps to achieve what you want or do we need to strictly do it with using drive API

   const { google } = require("googleapis")
    
    const auth = new google.auth.GoogleAuth({
        keyFile: "<path_to_service_account_key_json_file>",
        scopes: [
            "https://www.googleapis.com/auth/documents",
            "https://www.googleapis.com/auth/drive.readonly"
        ]
    })
    
    async function getDocumentContents(documentId) {
        try {
            const authClient = await auth.getClient();
    
            const response = await google.docs({ version: "v1", auth: authClient }).documents.get({ documentId: documentId })
            return response.data;
        } catch (error) {
            console.error(error)
        }
    }
    
    async function getDocumentID() {
        try {
            const authClient = await auth.getClient();
            
            const drive = google.drive({ version: "v3", auth: authClient });
            /* 
            In my case I know that i want to get file by name "Test" else u can use something like -
            q: `name = ${fileName} and mimeType = 'application/vnd.google-apps.document'`
            also u can fetch specific fileds only by passing fields parameter
            fields: 'files(id, name)',
            */
            const specificFileData = await drive.files.list({
                q: `name = "Test" and mimeType = 'application/vnd.google-apps.document'`
            });
    
            return specificFileData.data.files[0].id;
        } catch (error) {
            console.error(error);
        }
    }
    
    (async () => {
        const documentId = await getDocumentID();
        const documentContents = await getDocumentContents(documentId)
        console.log('documentContents', documentContents.body.content)
    })()
Reasons:
  • RegEx Blacklisted phrase (2.5): Please let me know
  • RegEx Blacklisted phrase (1): i want
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Gaurav

79348855

Date: 2025-01-11 20:44:50
Score: 13.5 🚩
Natty: 6
Report link

did you solve this problem? I am currently struggling with the same one and don't know how to solve it

Reasons:
  • Blacklisted phrase (1): how to solve
  • RegEx Blacklisted phrase (3): did you solve this problem
  • RegEx Blacklisted phrase (1.5): solve this problem?
  • RegEx Blacklisted phrase (2): don't know how to solve
  • RegEx Blacklisted phrase (2): know how to solve
  • 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 solve this
  • Low reputation (1):
Posted by: Kamil Patryniak

79348848

Date: 2025-01-11 20:39:48
Score: 5
Natty: 5
Report link

Me aparece security alarma tamperig detected. (000c10) Please reboot que puedo hacer para que opere normal mente es verifone vx 520 gracias

Reasons:
  • Blacklisted phrase (2): gracias
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Alejandro Prado

79348845

Date: 2025-01-11 20:38:48
Score: 3
Natty:
Report link

I used incompatible version of KMP plugin with my Android Studio version. So I installed Android Studio Meerkat and latest KMP plugin. And now it's ok.

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

79348844

Date: 2025-01-11 20:38:48
Score: 1.5
Natty:
Report link

It looks like you're facing an issue with getting your subdomain to work with NGINX as a reverse proxy for your Node.js app. Let’s walk through the process step by step to make sure everything’s set up correctly. Here are some things to check:

1. Check Your DNS Setup:

First, double-check that the DNS for your subdomain is properly set up. If you’re pointing app.example.com to your server, make sure you have the correct A record. This should point directly to the IP address of the server running NGINX.

You can verify DNS resolution by using dig or nslookup:

dig app.example.com

This should return the correct IP address. If it’s not showing up, there could be a delay in DNS propagation, or something might be off in the DNS configuration.

2. NGINX Configuration:

Next, check your NGINX configuration. It should look something like this:

server {
    listen 80;
    server_name app.example.com;  # Replace with your subdomain

    location / {
        proxy_pass http://127.0.0.1:3000;  # Address of your Node.js app
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

A few things to make sure of:

sudo nginx -t  # To test the configuration
sudo systemctl reload nginx  # To apply changes

3. Firewall and Network:

Make sure that the firewall is allowing traffic through ports 80 (HTTP) and 443 (HTTPS). This can be critical if your firewall settings are restrictive.

You can check your NGINX status by running:

sudo systemctl status nginx

This will tell you if NGINX is running smoothly and listening on the expected ports.

4. Node.js App Configuration:

Double-check that your Node.js app is listening on the correct interface. If it’s set to localhost or 127.0.0.1, NGINX might not be able to reach it. You want it to listen on 0.0.0.0 so it can accept connections from anywhere, including your NGINX reverse proxy.

In your Node.js app, you should have something like this:

app.listen(3000, '0.0.0.0', () => {
    console.log('Node.js app is running on port 3000');
});

5. Testing and Debugging:

Once everything is set up, you can test your setup by running a curl request to check if it’s working:

curl http://app.example.com

If you see the expected result from your Node.js app, then everything is good to go!

If it’s still not working, check your NGINX error logs:

sudo tail -f /var/log/nginx/error.log

Any errors or misconfigurations will likely show up here and can help point you in the right direction.

6. Clearing DNS Cache:

DNS changes can sometimes take time to propagate. If you've recently updated your DNS, it might take a few hours or even up to 48 hours for the changes to fully propagate. If you’ve been testing with a cached version of DNS, try clearing it on your local machine or use a different network to test.

Reasons:
  • Blacklisted phrase (2): still not working
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ahmadu Abubakar

79348843

Date: 2025-01-11 20:38:46
Score: 4.5
Natty: 5.5
Report link

I'm late on this but the sizeof() function uses ch as a pointer and the type of ch (int, char*, struct... etc) as a guide to interpreting what value to return. So isn't ch the same as &ch[0] ??? Just sayin'

Reasons:
  • Blacklisted phrase (1): ???
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Jerryl T

79348828

Date: 2025-01-11 20:27:43
Score: 1
Natty:
Report link

AWS support replied that Private DNS is not yet supported for DynamoDB.

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

79348825

Date: 2025-01-11 20:27:43
Score: 2.5
Natty:
Report link

Please check my course: Cisco CUCM Automation (Bulk Provisioning) with Python Zeep & Pandas

Course Link (with discount code) https://shasoft.thinkific.com/

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

79348810

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

in console tab > type sel > press tab > type your table name > hit enter

coming from mysql, i was looking for something quick like this too for datagrip. yea takes a few more actions but its actually quicker than clicking now so i can accept this, plus jetbrains suite overall is amazing so i have no problem doing this now

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

79348802

Date: 2025-01-11 20:08:39
Score: 0.5
Natty:
Report link

The previous answer by @supputuri works, however I needed to make a little modification which took hours to figure out. Here is the script that worked for me in case anyone else can't figure it out:

# navigate to chrome downloads page first
driver.get("chrome://downloads/")
driver.execute_script("document.querySelector('downloads-manager').shadowRoot.querySelector('#downloadsList downloads-item').shadowRoot.querySelector(\"button[id='cancel']\").click()")

The main changed part is button[id='cancel']

Reasons:
  • Blacklisted phrase (0.5): I need
  • Whitelisted phrase (-1): worked for me
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @supputuri
  • Low reputation (1):
Posted by: Hannan Javed

79348801

Date: 2025-01-11 20:08:39
Score: 0.5
Natty:
Report link

I am using xCode 16. Perhaps it's because these solutions worked for an earlier version, but whatever the reason, none worked for me. Then I came upon this issue CocoaPods did not set the base configuration ... which was another error that was seen. The solution there was to remove the configurations, see link for more.

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

79348800

Date: 2025-01-11 20:08:39
Score: 0.5
Natty:
Report link

spaCy doesn't explicitly mark the imperative mood, but you can infer it using syntactic clues.

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

79348798

Date: 2025-01-11 20:07:39
Score: 2
Natty:
Report link

Hi, this is a DFC version problem. For Yolo 11 you need the latest version which unfortunately doesn't work under wsl because of hailo_platform which we can't install. So for the moment, apart from switching to linux, we're limited to yolov10. And no, you didn't make a mistake by putting yolov11m with a v because hailo has the v (an aberration for me).

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

79348794

Date: 2025-01-11 20:05:38
Score: 3
Natty:
Report link

You can follow the styling solution provided in this blog.

It will align the components to the center and be a better version. Yet its applied on the parent div. Play around the css

Reasons:
  • Blacklisted phrase (1): this blog
  • Low length (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Selvam Raju

79348787

Date: 2025-01-11 19:58:37
Score: 0.5
Natty:
Report link
(HY000/1130): Host 'xxx.xxx.xxx' is not allowed to connect to this MariaDB server

It indicates the database server doesn't recognize the host you're connecting from as a valid source. The user @'xxx.xxx.xxx does not have the appropriate privilages to connect from that IP/hostname.

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

79348784

Date: 2025-01-11 19:56:37
Score: 1
Natty:
Report link

I would also add some padding to inside area of buttons for example

padding:10px;

because align will work of course but it needs space inside button area, You can create adding paddings, margins

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Marcin Kałat

79348768

Date: 2025-01-11 19:48:35
Score: 1.5
Natty:
Report link

Actually I was able to resolve the issue I had with Deno by importing the aws-sdk from esm.sh which basically translates the library to ES Modules.

Kudos to ESM.SH for providing an easy way of Denofying this SDK :)

deno.json

"@aws-sdk/client-s3": "https://esm.sh/@aws-sdk/[email protected]"
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Miguel

79348767

Date: 2025-01-11 19:48:35
Score: 0.5
Natty:
Report link

Since we cannot place our localStorage calls directly into our initial state (like below) because those will also run on the server side, throwing an undefined error

That's the main problem! Nextjs runs everything that is outside of a useEffect on the server side so you cannot initialize the token with const [token, setToken] = useState(window.localStorage.getItem("token"); directly because localStorage is undefined in the server scope.

You can add a flag in your AuthContext named "initializing" or something like that, and pass it through the AuthContext.Provider value. In that way the consumers of this context value can wait until the AuthContext useEffect run at least once.

Here is an example:

const AuthContext = createContext<AuthContextProps>({
  user: null,
  token: null,
  login: () => {},
  logout: () => {},
  initializing: true,
});

const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
  children,
}) => {
  const [user, setUser] = useState<User | null>(null);
  const [token, setToken] = useState<string | null>(null);
  const [initializing, setInitializing] = useState(true);
  const router = useRouter();

  useEffect(() => {
    console.log("AuthProvider useEffect", localStorage.getItem("token"));
    const storedToken = localStorage.getItem("token");
    if (storedToken) {
      if (isTokenExpired(storedToken)) {
        setToken(null);
        setUser(null);
        localStorage.removeItem("token");
        return;
      }
      setToken(storedToken);
      localStorage.setItem("token", storedToken);
      const decodedToken = jwtDecode<User>(storedToken);
      setUser(decodedToken);
    }
    setInitializing(false);
  }, []);

  const login = (token: string) => {
    setToken(token);
    localStorage.setItem("token", token);
    const decodedToken = jwtDecode<User>(token);
    setUser(decodedToken);
  };

  const logout = () => {
    setToken(null);
    setUser(null);
    localStorage.removeItem("token");
    router.push("/login");
  };

  const isTokenExpired = (token: string) => {
    const decodedToken = jwtDecode<{ exp: number }>(token);
    return Date.now() >= decodedToken.exp * 1000;
  };

  return (
    <AuthContext.Provider value={{ user, token, login, logout, initializing }}>
      {children}
    </AuthContext.Provider>
  );
};

const useAuth = () => {
  const context = React.useContext(AuthContext);
  if (context === undefined) {
    throw new Error("useAuth must be used within an AuthProvider");
  }
  return context;
};

export { AuthContext, AuthProvider, useAuth };

And then you can reuse that initializing flag to know when to control or not yet if the user is loggedIn in the protected pages.

export const useLeads = () => {
  const router = useRouter();
  const { user, token, initializing } = useAuth();
  const [data, setData] = useState<Lead[]>([]);
  const [totalRecords, setTotalRecords] = useState(0);
  const [pageIndex, setPageIndex] = useState(0);
  const [pageSize, setPageSize] = useState(10);
  const [filters, setFilters] = useState({});
  const [loading, setLoading] = useState(false);

  useEffect(() => {
    if (initializing) {
      return;
    }

    if (!token) {
      router.push("/login");
      return;
    }
    const fetchData = async () => {
      setLoading(true);
      try {
        const result = await getLeads(token, pageIndex, pageSize, filters);
        setData(result);

        const count = await countLeads(token, filters);
        setTotalRecords(count);
      } catch (error) {
        console.error("Error fetching data:", error);
      } finally {
        setLoading(false);
      }
    };

    fetchData();
  }, [user, token, pageIndex, pageSize, router, filters, initializing]);

  return {
    data,
    totalRecords,
    pageIndex,
    pageSize,
    filters,
    loading,
    setPageIndex,
    setPageSize,
    setFilters,
  };
};

I encountered this solution in this article https://dev.to/ivandotv/protecting-static-pages-in-next-js-application-1e50

Reasons:
  • Blacklisted phrase (1): this article
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ale Mendieta

79348758

Date: 2025-01-11 19:41:33
Score: 1
Natty:
Report link

Kube Startup CPU Boost is a controller that increases CPU resource requests and limits during Kubernetes workload startup time. Once the workload is up and running, the resources are set back to their original values.

https://github.com/google/kube-startup-cpu-boost

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

79348754

Date: 2025-01-11 19:40:33
Score: 3.5
Natty:
Report link

For resolving this issue simply use "with" instead of "assert" error can be resolved by it

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

79348752

Date: 2025-01-11 19:39:32
Score: 1.5
Natty:
Report link

It's the client you use. You need to use the document client.

Have a read of this blog post:

https://aws.amazon.com/blogs/database/exploring-amazon-dynamodb-sdk-clients/

Reasons:
  • Blacklisted phrase (1): this blog
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • High reputation (-2):
Posted by: Leeroy Hannigan

79348747

Date: 2025-01-11 19:37:32
Score: 0.5
Natty:
Report link

Ubuntu doesn't have the Times New Roman font by default. This is the default font used by Graphviz, so I was getting poor results when dot layout was done on Ubuntu as compared to Windows or Mac (which come natively with the correct fonts).

The most important thing is to do if you are generating Grapviz images on Ubuntu is:

sudo apt install ttf-mscorefonts-installer1

Beware that will pop up on your terminal an EULA from Microsoft, and you may not see the prompt to respond 'yes'.

However that may not be enough to get consistent results if you have built GraphViz completely by yourself. You may still get anomalous results results unless you have pre-installed certain libraries. So you should also do:

apt-get install --no-install-recommends -y build-essential clang-format cmake git pkg-config autoconf bison libtool dh-python flex d-shlibs debhelper fakeroot freeglut3-dev libgts-dev swig libgtkglext1-dev libglade2-dev libqt5gui5 qt5-qmake qtbase5-dev libann-dev libaa1-dev libdevil-dev libgd-dev libgtk-3-dev ghostscript libgs-dev liblasi-dev libpoppler-dev libpoppler-glib-dev librsvg2-dev libwebp-dev ruby golang-go guile-3.0 guile-3.0-dev lua5.3 liblua5.3-dev libperl-dev php-dev libsodium-dev libargon2-0-dev libpython3-dev ruby-dev tcl-dev python3-venv gcovr lcov shellcheck

The guidance to help me determine the packages needed came from the Gitlab page with the Dockerfile that is used to build Graphviz for testing: https://gitlab.com/graphviz/graphviz/-/blob/main/ci/ubuntu-22.04/Dockerfile )

Once I had done the above apt installs and rebuilt Graphviz, it generated the same layouts on Ubuntu as it does on Mac and Windows.

The above was tested with Graphviz 12.2.1. I am running on ARM architecture (which was why I needed to rebuild Graphviz from source as there was no up to date deb available).

Reasons:
  • Blacklisted phrase (1): help me
  • Blacklisted phrase (0.5): I need
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Timothy C. Lethbridge

79348739

Date: 2025-01-11 19:31:30
Score: 0.5
Natty:
Report link

for jan 11 2025 go to android > build.gradle and update ext.kotlin_version like below

    buildscript { ext.kotlin_version = '1.8.22' //only change this line
    repositor.... //here do not touch'
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: mkiziltay

79348735

Date: 2025-01-11 19:31:30
Score: 1
Natty:
Report link

There's a workaround for those cases, lets say you want to make a button like this:

<Button WidthRequest="20" HeightRequest="20" />

This may result in the following output: Button not showing properly

Button not showing properly

So to fix this you could make the button big enough so that it shows properly lets say

<Button WidthRequest="30" HeightRequest="30" />

output: Button now showing properly but bigger than what we want

Button now showing properly but bigger than what we want

But now here's the trick: to make it smaller you can play around with the ScaleX and ScaleY properties like this:

<Button WidthRequest="30" HeightRequest="30" ScaleX="0.7" ScaleY="0.7" />

And we get: Button now is smaller and showing propertly

Button now is smaller and showing propertly

There may be other ways to get the desire output, but this is the one I know. I hope this can be of help to you.

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

79348726

Date: 2025-01-11 19:26:29
Score: 1.5
Natty:
Report link

You can use the calculate function in css to calculate the width and adjust the padding , width accordingly.

Reasons:
  • Whitelisted phrase (-1.5): You can use
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Akshay Shahi

79348725

Date: 2025-01-11 19:26:29
Score: 1.5
Natty:
Report link

It's very important to test :

input="a\b\c\d"
echo ${input}
echo "${input/\\//}"
echo "${input//\\//}"
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: exactzen

79348721

Date: 2025-01-11 19:23:28
Score: 4.5
Natty:
Report link

Updating to the newest Docker Desktop version(v 4.37.2) fixed the problem from me.

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

79348713

Date: 2025-01-11 19:18:27
Score: 3
Natty:
Report link

I found your script for backing up databases, I have one question. How can I use this script to back up databases either to a separate folder, for example /backups/$Date$Time$MYSQL_backup or to pack all databases into .tar.gz in the format for example $Date$Time$MYSQL_backup.tar.gz

Reasons:
  • Blacklisted phrase (0.5): How can I
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Maxximus999