79282126

Date: 2024-12-15 10:19:54
Score: 2
Natty:
Report link

Based on the documentation, the best approach is to use the create or replace and select * EXCEPT

    CREATE OR REPLACE TABLE mydataset.mytable AS (
  SELECT * EXCEPT (column_to_delete) FROM mydataset.mytable
);

as with altering and drop the column, this does not free the storage of the column that was deleted immediately

Check this link for more info, it is useful to understand what is happening under the hood of a query Managing-table-schemas-BigQuery

Reasons:
  • Blacklisted phrase (1): this link
  • RegEx Blacklisted phrase (1): Check this link
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: mohannad rateb

79282117

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

If you want to disable current(cursor line) line highlight in Geany IDE it is very simple you can disable highlight current line in any or default colour schemes. Follow given steps these steps are for linux users.

Step-1) Open Home partition in file manager.

Step-2) Go to your username and enable show hidden files;you can enable it by pressing (ctrl+h) or by right clickin and finding that option.

Step-3) Find (.config) folder by manually or by using search option.

Step-4) Now go to (geany) folder.

Step-5) Go to (colorschemes) folder.

Step-6) Now open themefile which you want to disable highlight cursor line in any text editor.

Step-7) Scroll down and find (current_line=1a1a1a;true) replace 'true' to 'false' like below (current_line=1a1a1a;false). Then save and exit.

Note--- Here it is not necessary that colour name is '1a1a1a' it should change according to your scheme looks like some are '#6f6f6f' and another. Your main task is to replace true to false and than save and exit.

These are paths for easily understand:-

File manager > Home partition or folder > enable hidden files or finding '.config' > geany > colorschemes

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Mohit Kumar

79282116

Date: 2024-12-15 10:08:53
Score: 3
Natty:
Report link

If you are using various libaries for testing

for example: JUnit and TestNG review your imports, you might have imported

@Test from TestNG instead of @Test from Junit

Human mistake was the reason the test was not being detected and excuted as expected

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • User mentioned (1): @Test
  • User mentioned (0): @Test
  • Low reputation (1):
Posted by: JP Navarro V.

79282105

Date: 2024-12-15 09:55:50
Score: 1.5
Natty:
Report link

Unable to load class 'org.gradle.initialization.BuildCompletionListener' org.gradle.initialization.BuildCompletionListener

Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

Re-download dependencies and sync project (requires network) The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.

Stop Gradle build processes (requires restart) Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Digvijay Himanshubhai

79282087

Date: 2024-12-15 09:42:48
Score: 0.5
Natty:
Report link

Use a code obfuscator. While it's true that obfuscated code can be reverse-engineered, it requires a good amount of skill and effort, providing a basic layer of protection. Tools like javascript-obfuscator can make your code harder to read and modify.

Move critical parts of your extension's functionality to a web service if possible. This way, the sensitive logic resides on your server, which you can easily secure, and the extension only interacts with the server through API calls. This setup ensures that even if someone accesses the extension's source code, they won't have access to the core functionality.

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

79282080

Date: 2024-12-15 09:39:47
Score: 0.5
Natty:
Report link

Steps to Convert a Negative Number to Hexadecimal:

Understand the Bit Width:

Decide the bit width (e.g., 8 bits, 16 bits, 32 bits, etc.). This determines how many bits are used to store the number in binary and affects the final hexadecimal result.

Convert the Positive Equivalent to Binary: Take the absolute value of the negative number and convert it to binary. For example, if the number is -10, the absolute value is 10, and its binary representation is 1010 (in 4 bits).

Pad the Binary Number: Pad the binary number with leading zeros to match the chosen bit width. For example, 1010 becomes 00001010 in an 8-bit representation.

Invert the Bits (One's Complement): Flip all the bits (0 becomes 1, and 1 becomes 0). For 00001010, the one's complement is 11110101.

Add 1 to the Inverted Binary Number (Two's Complement): Add 1 to the one's complement binary number to get the two's complement. For 11110101, adding 1 gives 11110110.

Group Binary Digits into Nibbles: Divide the binary number into groups of 4 bits (nibbles) starting from the right. For 11110110, the groups are 1111 and 0110.

Convert Each Nibble to Hexadecimal: Convert each group of 4 bits into its hexadecimal equivalent. For 1111, the hex is F, and for 0110, the hex is 6.

Combine the Hex Digits: Concatenate the hexadecimal digits to get the final result. For 11110110, the hexadecimal result is F6.

Below is an example:

Convert -10 to 8-bit hexadecimal:

Bit Width: 8 bits.

Positive Binary: โˆฃ10โˆฃ=10 โ†’ 1010.

Pad to 8 Bits: 00001010.

Invert Bits: 11110101.

Add 1: 11110101 + 1 = 11110110.

Group into Nibbles: 1111 and 0110.

Convert to Hex: 1111 = F, 0110 = 6.

Final Hex: F6.

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

79282078

Date: 2024-12-15 09:38:46
Score: 6 ๐Ÿšฉ
Natty: 4.5
Report link

What was the work around that you recommend. I am also having a similar problem for which I would like to have a sampling operator.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Me too answer (2.5): I am also having a similar problem
  • Single line (0.5):
  • Starts with a question (0.5): What was the
  • Low reputation (1):
Posted by: Vyas

79282072

Date: 2024-12-15 09:33:44
Score: 5
Natty: 6.5
Report link

If Use WordPress install This Plugin https://wordpress.org/plugins/youtube-embed-plus/

and Activate this option enter image description here

Enjoy!

Reasons:
  • Blacklisted phrase (1): This Plugin
  • Probably link only (1):
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Hussamedeen

79282070

Date: 2024-12-15 09:32:44
Score: 1.5
Natty:
Report link

You need to set it up in a runtime environment
The script has to include native using -Djava.library.path:
java -Djava.library.path %PATH_TO_NATIVES% -jar app.jar
The classpath in the jar manifest must include relative jar paths
Class-Path: lib/reflections-0.9.10.jar lib/other-library.jar
At runtime, it must look like this:

dir/

app.jar
run.bat or run.sh
lib/

reflections-0.9.10.jar
other-library.jar

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

79282064

Date: 2024-12-15 09:24:42
Score: 1
Natty:
Report link

The error was obvious. The view did not exist !

I didn't know that PHPstan would go so far as to check the existence of resources.

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

79282054

Date: 2024-12-15 09:12:40
Score: 0.5
Natty:
Report link

For rendering Google Maps in virtual reality on iOS using Google Cardboard, you can explore the following VR SDKs and tools:

SDK for Google VR (Cardboard): Google's official VR developer SDK, which works with iOS. supports encounters with Google Cardboard. Although 360-degree environments can be rendered, direct Google Maps integration necessitates special development utilizing the Google Maps SDK for iOS.

Cardboard SceneKit: It is possible to render 3D content using Apple's SceneKit and integrate it with Google Cardboard for virtual reality. Map tiles can be retrieved via the Google Maps SDK for iOS and then rendered as textures in SceneKit.

Google Cardboard and Unity: Using Google Maps Platform APIs, Unity can load Google Maps as textures and facilitate VR development. To integrate VR, use the Cardboard XR Plugin for iOS.

Libraries that are open source: Although not actively updated, ViroReact can still be used for simple virtual reality projects. Using WebXR with Three.js: a web-based VR method that is restricted on iOS because to Safari's incomplete WebXR compatibility.

Note: Because to license and API restrictions, Google Maps cannot be displayed directly in virtual reality. Using the Google Maps Platform API, you will need to retrieve map tiles or 3D data and manually render it into your virtual reality environment.

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

79282046

Date: 2024-12-15 09:02:38
Score: 0.5
Natty:
Report link

Taking the cue in the suggested answer, to pass the variable to a .then(), I have restructured the code, it is now working as expected.

Then('the total amount I have sent to {string} so far is {string}', (toCountry, amountSent) => {

    let amountSentTotal = 0

    trackTransfersPageObj.getRecordCount.each($el => {

        let amountSent = $el.find('td:nth-of-type(5):contains("' + toCountry + '")').next('td').text().trim().replace(/[ยฃN,]/g, '')
        amountSentTotal = Number(amountSentTotal) + Number(amountSent)

    }).then(function () {
        expect(amountSentTotal).equal(Number(amountSent))
    })

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

79282030

Date: 2024-12-15 08:43:35
Score: 3
Natty:
Report link

here's a great explanation provided in this link

(it's for ansible config, but formatting rules mostly apply because they both use yml files)

Reasons:
  • Blacklisted phrase (1): this link
  • Low length (1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Kop3sh

79282007

Date: 2024-12-15 08:16:27
Score: 6.5 ๐Ÿšฉ
Natty: 4.5
Report link

93779 [ZAP-IO-Server-1-1] WARN org.zaproxy.zap.extension.api.API - Request to API URL http://localhost:8080/zap from 172.17.0.1 not permitted

im getting this error please help

Reasons:
  • RegEx Blacklisted phrase (3): please help
  • RegEx Blacklisted phrase (1): im getting this error
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Akash Nayek

79282001

Date: 2024-12-15 08:12:25
Score: 1
Natty:
Report link

Simply:

update-database MigrationName
Reasons:
  • Low length (2):
  • Has code block (-0.5):
  • Has no white space (0.5):
  • High reputation (-1):
Posted by: Elnoor

79281990

Date: 2024-12-15 08:02:24
Score: 3.5
Natty:
Report link

Try this plugin Multiscope code radar, you can search in multiple projects inside workspace : https://plugins.jetbrains.com/plugin/26014-multiscope-coderadar

Reasons:
  • Blacklisted phrase (1): this plugin
  • Whitelisted phrase (-1): Try this
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: mboutir

79281987

Date: 2024-12-15 08:00:23
Score: 1
Natty:
Report link
isDense: true,
    constraints: BoxConstraints(
        minHeight: 60, maxHeight: hasError ? (widget.height + 24) : 60),
    contentPadding: const EdgeInsets.symmetric(vertical: 20, horizontal: 
    20),

Like That.. Without Adding Fixed Height Using SizedBox.

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

79281970

Date: 2024-12-15 07:40:20
Score: 1
Natty:
Report link

The problem is not the combobox but your not-shown-here code that expects a value from the combobox.

Apriumben:

@gustav you certainly put me on the right track! whilst looking for this non-existent code (not shown!)

I discovered that the query 'qryRecentBookings' referenced a different form and I had in fact previously created a new query that referenced this form, but hadn't applied it to this combo box.

The two query names were quite similar but I clearly should have read the error message more intently. I have a feeling I previously copied a form used for another purpose, rejigged the bits I needed to but didn't check this particular combo was working. Thank you for making me recheck everything!

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (0.5): I need
  • Contains signature (1):
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @gustav
  • High reputation (-2):
Posted by: Gustav

79281953

Date: 2024-12-15 07:23:16
Score: 1
Natty:
Report link

I needed to override the background, and it was this solution that helped. It works in all modern browsers:

input:-webkit-autofill {
    /* some other styles */
    /* background-color: white !important; */
    /* -webkit-text-fill-color: black !important; */
    box-shadow: 0 0 0px 1000px white inset !important;
}
Reasons:
  • Blacklisted phrase (0.5): I need
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Maxim Tsatsura

79281949

Date: 2024-12-15 07:16:14
Score: 3.5
Natty:
Report link

you can add ${__threadGroupName} in the Http request sampler name

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

79281933

Date: 2024-12-15 07:02:12
Score: 1
Natty:
Report link

The issue with your program is that the name variable is never updated inside the loop. After the initial input, the while loop keeps running indefinitely because the name variable is still holding its initial value.

To fix this, you need to prompt the user to enter their name again inside the loop. Here's the corrected code:

while name != "John":
    print("Please type your name.")
    name = input()  # Update the value of 'name' within the loop
print("Thank you!")
Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Awlad Hossain

79281904

Date: 2024-12-15 06:29:06
Score: 2
Natty:
Report link

Is it necessary to use regex?

content ='12345 67890 123175 9876'
for item in content.split(' '):
    if not item.endswith('175'):
        print(item)

Output

12345
67890
9876
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): Is it
  • High reputation (-1):
Posted by: moken

79281882

Date: 2024-12-15 06:08:02
Score: 2
Natty:
Report link

SQLAlchemy has since introduced the dimensions= kwarg, e.g. Column('sample', postgresql.ARRAY(Integer, dimensions=2).

See https://docs.sqlalchemy.org/en/13/dialects/postgresql.html#sqlalchemy.dialects.postgresql.ARRAY.

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

79281879

Date: 2024-12-15 06:07:02
Score: 2.5
Natty:
Report link

Use this and the error will be resolved. This error is due to the not usage of ES Modules, so you have to use UMD modules import { ScrollTrigger } from 'gsap/dist/ScrollTrigger';

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Inzemam ul-Haq

79281872

Date: 2024-12-15 05:57:00
Score: 2.5
Natty:
Report link

Bro, Simply add this line and done !

DRFSO2_URL_NAMESPACE = 'drfso2'

and if you have not given url for the pattern then do that else all done

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: ADITYA OJHA Aditya

79281851

Date: 2024-12-15 05:35:56
Score: 1.5
Natty:
Report link

Looks like pyannote cannot download model.bin anymore : (

But I found that it only needs authentication to download once, after which the script can load the models from ~/.cache.

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

79281847

Date: 2024-12-15 05:31:54
Score: 4
Natty:
Report link

Is it useful to set button display as none?(display.none) so you have not to delet the button.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): Is it use
  • Low reputation (1):
Posted by: Navid Abolfathi

79281844

Date: 2024-12-15 05:28:53
Score: 2
Natty:
Report link

This issue, of missing pip, persists Python 3.13.1. I resolve this by uninstall it. Then run the installer as Administrator (on Windows 11).

You'll need to do custom installation and have the installer install to c:\dev\Python313 custom path.

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

79281843

Date: 2024-12-15 05:27:53
Score: 1.5
Natty:
Report link

Since caller() is an async function and await has not been called on it - it will execute in an async manner. This means it may move on to the next line of code, before execution has been completed, If the order of execution matters ( you want to execute in an a sync manner ) you need to use await OR use .then()

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

79281833

Date: 2024-12-15 05:17:51
Score: 3
Natty:
Report link

For using MUI in next make sure :

  1. Read This Article Integration With Next

  2. CacheProvider is not only for caching , make sure you set cache provider , of course the next version of that

  3. Is better to manage theme in a component , define theme and provide in a client component then wrap other components into it in layout

  4. Make sure install and config the required dependencies for Next.js :

    npm install @mui/material-nextjs @emotion/cache

  5. You should consider, according to this article Support the Next.js MUI is not supporting server components yet , and may you have some problem with using MUI in a Next.js app

Reasons:
  • Blacklisted phrase (1): This Article
  • Blacklisted phrase (1): this article
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Amirreza Monfared

79281830

Date: 2024-12-15 05:13:50
Score: 1
Natty:
Report link

For anyone interested in an answer, I used an array to return:

= { "Mins Elapsed"; ""; ARRAYFORMULA(IF(A4:A="", "", (A4:A - A3:A) * 24 * 60)) }

enter image description here

NOTE: For the array to result in a column, not a row, a semi-colon (;) must be used, not a comma (,) to separate the array values.

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: maxhugen

79281820

Date: 2024-12-15 04:54:47
Score: 2.5
Natty:
Report link

You have to added a new CollectionView for new products to the HomePage.The visibility of the CollectionView is controlled via data binding,and based on there new products.The ViewModel loads the products and determines to show or hide the collection view.

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

79281818

Date: 2024-12-15 04:52:47
Score: 1.5
Natty:
Report link

The comments suggesting various pathfinding algorithms are correct! Since you are only looking to determine if a level is playable and you are not looking for a shortest path, I recommend using Breadth-first search.

Simply consider the start of the algorithm to be the position of the character, and consider the children of each node to be a step in each cardinal direction. Run BFS until the door is found or all nodes have been visited and this will let you know if the level is playable.

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

79281810

Date: 2024-12-15 04:38:45
Score: 1.5
Natty:
Report link

Using native image speeds up more than 20 times the batch start up.

Check this article: https://foojay.io/today/speed-up-your-spring-batch-with-native-image-and-graalvm/

For Spring Batch applications, Native Images are a game-changer.

  1. Instantaneous startup: From 4 seconds to 0.2 seconds.
  2. Perfect for batch jobs: Jobs that start, process, and exit benefit the most.
  3. Lower memory usage: No JVM, no warm-up, no extra overhead.

By using GraalVM Native Image, you can build batch jobs that are fast, efficient, and perfectly suited for cloud environments where "scale to zero" is essential.

If you're dealing with micro-batch jobs that run for seconds, Native Image is a must-have. If your batch jobs are long-lived (running for hours), the benefit is less significant, but for fast, one-shot batch jobs, Native Image is unbeatable.

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

79281803

Date: 2024-12-15 04:29:43
Score: 3.5
Natty:
Report link

Just delete the venv. For example for conda env

$$ rm -r /opt/homebrew/Caskroom/miniforge/base/envs/ProjectRocket

enter image description here

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: user1237999

79281798

Date: 2024-12-15 04:26:43
Score: 0.5
Natty:
Report link

Old thread, but thought I'd, add. These days, if you're using coroutines, a common way would be

    scope.launch(Dispatchers.Main) {
        /* code to be executed on main thread */
    }
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Vadim

79281794

Date: 2024-12-15 04:22:41
Score: 3.5
Natty:
Report link

If your repository URL is: https://github.com/techfoon/ToDoApk

To view it in VS Code Online (Read-Only), you simply need to change the .com to .dev

Example: GitHub Repository: https://github.com/techfoon/ToDoApk

VS Code View (Read-Only): https://github.dev/techfoon/ToDoApk

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

79281788

Date: 2024-12-15 04:15:39
Score: 1.5
Natty:
Report link

Please include this healthcheck:

healthcheck: test: ["CMD", "mysql", "-h", "db", "-u", "root", "-p${MYSQL_ROOT_PASSWORD}", "-e", "SELECT 1;"]

Note I have used the db service here.

I was struggling with the error: 'RuntimeError: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods'

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

79281779

Date: 2024-12-15 04:07:38
Score: 0.5
Natty:
Report link

I noticed nobody gave an answer for the second part of your question, about why the code does not work as expected for posterity's sake.

The answer to that is hidden in Eric's answer: Because arithmetic operations must be performed to determine the output of a number (e.g. 9.2), floating point numbers are essentially an estimation of a number, not a precisely defined representation of the number.

For integers, we are simply counting up. A 3 follows a 2, which follows a 1, and that took 2 bits to display. To go to 4, however, we need a third bit. Floating point, however, uses scientific notation to store the number, which is how it's able to represent decimal numbers.

To borrow from this answer for a similar question, in floating-point notation the number "9.2" is actually this fraction:

5179139571476070 * 2 -49

That's not a perfect representation of 9.2, so depending on the size of the float it will be off by some small fraction.

There are boundaries within the floating point "number line" that are more or less accurate. Depending on where things fall, the floating-point representation may be exact.

If you need the exact number, you should use an integer. If you need an exact number that has decimals, your only real option is to split out the decimal portion and use another integer for that portion of the number.

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

79281774

Date: 2024-12-15 03:53:36
Score: 2
Natty:
Report link

Flutter 3.24, create a .ipa file in Flutter without signing, use flutter build ios --release --no-codesign get build/ios/iphoneos/Runner.app .

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

79281773

Date: 2024-12-15 03:52:36
Score: 3
Natty:
Report link

enter image description here

This alsoi worked for me

npm install --save [email protected]

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Whitelisted phrase (-1): worked for me
  • Low length (1.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Tatenda Makandigona

79281768

Date: 2024-12-15 03:45:34
Score: 0.5
Natty:
Report link

I learned that TailwindCSS automatically removes the dark class from the bundled CSS if it is not used in any className attribute in JSX. To force TailwindCSS to bundle the dark class, I added the following to my tailwind.config.ts:

safelist: ['dark']

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Kevin H.

79281761

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

Found my error.

Need to give an alias after my close bracket of UNPIVOT

UNPIVOT
(
   [Postings] FOR [Periods] IN ([Balance Forward],[Net Posting 01], [Net Posting 02], [Net Posting 03], [Net Posting 04], [Net Posting 05], [Net Posting 06], [Net Posting 07], [Net Posting 08], [Net Posting 09], [Net Posting 10], [Net Posting 11], [Net Posting 12] )
) as unpvt
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: David.L

79281748

Date: 2024-12-15 03:14:28
Score: 3.5
Natty:
Report link

See answer to this related question that I believe to be effective: unable to install packages on 3.6.3

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

79281740

Date: 2024-12-15 03:05:26
Score: 2
Natty:
Report link

You just need add this :

 bottomPadding: 0
 topPadding: 0

Some how this not 0 by default

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

79281710

Date: 2024-12-15 02:35:19
Score: 7.5 ๐Ÿšฉ
Natty: 4.5
Report link

Tuve el mismo error, se solucionรณ instalando los siguientes paquetes en termux:

pkg install rust rust-std-i686-linux-android rust-src rustc-src -y

Reasons:
  • Blacklisted phrase (2.5): solucion
  • RegEx Blacklisted phrase (2.5): mismo
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Bartolomรฉ Stern

79281704

Date: 2024-12-15 02:31:18
Score: 0.5
Natty:
Report link

systemd tmpfiles.d /etc/tmpfiles.d/transparent_hugepage.conf

w /sys/kernel/mm/transparent_hugepage/enabled - - - - never
w /sys/kernel/mm/transparent_hugepage/defrag - - - - never

Apply the settings immediately: systemd-tmpfiles --create

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

79281698

Date: 2024-12-15 02:20:16
Score: 1
Natty:
Report link

-n, --numeric-sort compare according to string numerical value

for example:

(base) โžœ  ~ echo -n '3\n10\n1.1\n1\n'          
3
10
1.1
1
(base) โžœ  ~ echo -n '3\n10\n1.1\n1\n' | sort
1
10
1.1
3
(base) โžœ  ~ echo -n '3\n10\n1.1\n1\n' | sort -n
1
1.1
3
10

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

79281687

Date: 2024-12-15 01:58:14
Score: 2.5
Natty:
Report link

just to add for the sake of those who would reuse this answer. To change to or from a .kv predefined screen, you need to reference the root of the app. hence, "self.current" as used in the question would not work. rather "self.root.current " would be the correct reference to produce the desired change

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

79281684

Date: 2024-12-15 01:55:13
Score: 2.5
Natty:
Report link

I have checked your sitemap https://techjobs.xyz/sitemap.xml and it looks OK. Go to Search Console and try deleting the sitemap and add it again. Then refresh the page.

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

79281665

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

you can start by increasing the gRPC server timeout and keep-alive settings in the Milvus configuration file. Adjusting parameters such as grpc.server_keepalive_time_ms and grpc.server_keepalive_timeout_ms ensures the connection remains active during prolonged insert operations. Additionally, reducing the batch size for data insertions can help alleviate server overload; while 10,000 records may work initially, lowering it to a smaller size, like 5,000, can prevent bottlenecks over time. Optimizing your insertion process with parallelization can further improve efficiency, but ensure each thread or process uses an independent connection to avoid overwhelming the server. Monitoring the Milvus serverโ€™s resource utilization is crucial; inadequate CPU, RAM, or network bandwidth can contribute to timeouts, so scaling up hardware resources or deploying Milvus in a distributed setup may be necessary. Implement robust error handling to catch and retry failed insertions with an exponential backoff strategy, which prevents immediate retries from overwhelming the server. Reviewing Milvus server logs and monitoring system metrics will help identify specific constraints or misconfigurations contributing to the issue, enabling a targeted resolution.

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

79281656

Date: 2024-12-15 01:26:08
Score: 3
Natty:
Report link

You need to check with your provider or datacenter if they are block port 25 from their side

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

79281647

Date: 2024-12-15 01:17:06
Score: 1
Natty:
Report link

Issue

I have some recommendations for anyone that is trying to serve basic html page files with javascript and is facing this 404 issue only in production and not locally. A good point to begin debugging is to take a look at what Vercel is receiving and exposing to your public domain.

Configuration

In the Vercel dashboard: visit your project at projectID -> Source tab. From here, take a look at the tabs present on the left side titled Source & Output.

The files present in Output will be available publicly, you may see index & middleware already in there. Vercel will usually be able to locate your index.html from the .root and will automatically generate the middleware if one isn't present.

The Source tab is specifying the files that will be publicly available when accessing your domain. If the .html page you're trying to locate isn't in this Ouput tab that is probably the source of your problems. We'll need to ensure the .html page you're trying to contact exists in this Output directory.

Solution

How can we do this?

Ensure you have a /public folder in your project. Your index.html should be in the .root directory, along with dependency managers and lock files. By moving files over we're telling Vercel to make these available publicly, aka in the Output directory.

Ensure your directory assembles something like the following:

Directory structure

.root/
โ”‚
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ package-lock.json
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ vercel.json
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ styles.css
โ”‚   โ”œโ”€โ”€ images/
โ”‚   โ””โ”€โ”€ page1.html
  

Additional recommendations (cleaning the url):

vercel.json

{
  "cleanUrls": true
}

Utilize a cleanUrls object in your vercel.json to clean the URL:

eg. https://your-website.com/about.html -> https://your-website.com/about

Reasons:
  • Blacklisted phrase (1): How can we
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: nolan boxill

79281645

Date: 2024-12-15 01:16:06
Score: 1.5
Natty:
Report link

Both I think. The resulted pages + the query.

However, this is all good in theory. The reality is that only a small fraction of the world's websites is actually found and indexed by the search engines. Therefor you actually have to try to notify the search engine that you want your website to be indexed. For example to create a search console account and submit a sitemap of your website. And then post your content on various social media etc. Its not as easy as someone may think.

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

79281641

Date: 2024-12-15 01:10:05
Score: 1
Natty:
Report link

My fix was to update Android gradle:

id("com.android.application").version("8.7.0").apply(false)
id("com.android.library").version("8.7.0").apply(false)
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Cipri

79281632

Date: 2024-12-15 01:00:03
Score: 1
Natty:
Report link

There are at least 2 options:

  1. Coding based -> Create simple node.js app that will consume RocketChat webook and call your ticket system API.
  2. No-code -> Use n8n automation software which works just like zapier but it can be launched locally. Install and configure it to use webooks or just RocketChat integration endpoint along with HTTP request to your ticket system.
Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Michal

79281627

Date: 2024-12-15 00:58:03
Score: 2
Natty:
Report link

assuming the data is already in a dataframe df as you describe, try using a list comprehension:

result = pd.DataFrame({ 'name': [df['name'][i] for col in ['A', 'B', 'C'] for i in range(len(df)) if df[col][i] == 1] }, index=['A', 'B', 'C'])

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

79281624

Date: 2024-12-15 00:56:01
Score: 1
Natty:
Report link

Unfortunately, LinearRegression in scikit-learn does not natively support using custom loss functions. The LinearRegression class by default uses Ordinary Least Squares, which minimizes the standard Mean Squared Error. However, you can achieve your goal by implementing a custom loss function using an optimization library like scipy.optimize. The minimize function from scipy.optimize is used to solve the optimization problem. To incorporate the intercept, we append a column of ones to X. This method gives you complete freedom to specify any loss function you like, provided it's differentiable. If your A matrix is very large, be aware of the computational cost associated with its inverse calculation. This is independent of scikit-learn's implementation of LinearRegression, since scikit-learn does not allow to directly change the loss. If you want to use this in a pipeline or together with GridSearchCV you can wrap the logic above into a custom estimator by subclassing BaseEstimator and RegressorMixin from scikit-learn.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Celine Habashy

79281621

Date: 2024-12-15 00:54:01
Score: 0.5
Natty:
Report link

In this case, you are looking to use start() instead of run()

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

79281617

Date: 2024-12-15 00:44:59
Score: 2
Natty:
Report link

Digging up this old thread. According to the wp-hide plugin documentation you can actually hide the plugin name itself (as of 2024).

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

79281615

Date: 2024-12-15 00:42:58
Score: 4.5
Natty:
Report link

I would say you should probably rethink the design :(

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

79281609

Date: 2024-12-15 00:26:55
Score: 1
Natty:
Report link

I have some recommendations for anyone that is trying to serve basic html page files with javascript and is facing this 404 issue only in production and not locally. A good point to begin debugging is to take a look at what Vercel is receiving and exposing to your public domain.

In the Vercel dashboard: visit your project at projectID -> Source tab. From here, take a look at the tabs present on the left side titled Source & Output.

The files present in Output will be available publicly, you may see index & middleware already in there. Vercel will usually be able to locate your index.html from the .root and will automatically generate the middleware if one isn't present.

The Source tab is specifying the files that will be publicly available when accessing your domain. If the .html page you're trying to locate isn't in this Ouput tab that is probably the source of your issue. We'll need to ensure the .html page you're trying to contact, eg. https://www.your-website.com/page1.html exists in this Output directory.

How can we do this?

Ensure you have a /public folder in your project. Your index.html should be in the .root directory, along with dependency managers and lock files. By moving files over we're telling Vercel to make these available publicly, aka in the Output directory.

Ensure your directory assembles something like the following:

.root/
โ”‚
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ package-lock.json
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ styles.css
โ”‚   โ”œโ”€โ”€ images/
โ”‚   โ””โ”€โ”€ page1.html
  
Reasons:
  • Blacklisted phrase (1): How can we
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: nolan boxill

79281606

Date: 2024-12-15 00:16:53
Score: 2.5
Natty:
Report link

According to Linkedin... "LinkedIn backlinks are typically no follow links. This means that they include a rel="nofollow" attribute in the HTML code, signaling to search engines that they should not pass authority or influence rankings to the linked website.May 16, 2023".

However you should not only focus on Linkedin and Medium. Try to use a much wider selection of valuable websites where you can post your articles and gain valuable backlinks. Don't get carried away though, always check the reputation of the websites, you don't want any spammy ones! Also, don't forget your on page SEO work. Building backlinks is not enough on its own.

Reasons:
  • RegEx Blacklisted phrase (1.5): the reputation
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Achilles

79281604

Date: 2024-12-15 00:16:53
Score: 2
Natty:
Report link

You are blocked by Cloudflare WAF. Try with TLS Requests:

pip install wrapper-tls-requests

Unlocking Cloudflare Bot Fight Mode

import tls_requests
r = tls_requests.get('https://getir.com/')
print(r)
<Response [200]>

Github repo: https://github.com/thewebscraping/tls-requests

Read the documentation: thewebscraping.github.io/tls-requests/

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

79281598

Date: 2024-12-14 23:59:50
Score: 1.5
Natty:
Report link

I came up with this:

 template <class T> struct var {
     using  hash_type = unsigned;
     using value_type = T;
     
     value_type value;
     const hash_type cached_id;

     constexpr var(const value_type the_value) noexcept 
      : value(the_value)
      , cached_id([]{ static hash_type k; return k++; }())
     {}

     constexpr operator auto() noexcept { return value; }
 };

 template <class T> var(T const&) -> var<T>;

Live on Compiler Explorer
No macros. Is this what you're looking for?

Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
Posted by: viraltaco_

79281591

Date: 2024-12-14 23:54:49
Score: 5
Natty: 4.5
Report link

This repository will be helpful - Liquibase Multi-Datasource Setup for Spring

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

79281588

Date: 2024-12-14 23:52:47
Score: 5
Natty:
Report link

We were facing the same issues with one of our clients installation and the fix is easy change to LONGTEXT

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Me too answer (2.5): facing the same issue
  • Low reputation (1):
Posted by: 0WebHost

79281583

Date: 2024-12-14 23:46:46
Score: 0.5
Natty:
Report link

Remove color prop:

<a href='#' className='addTableButton'>
    <PlusSquare className='hover' size={32} weight="fill" />
</a>

Use CSS to set its style like:

.addTableButton .hover { color: red }
.addTableButton:hover .hover { color: blue }

That should do the trick.

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

79281580

Date: 2024-12-14 23:40:44
Score: 2.5
Natty:
Report link

I believe I have found the problem. When I call a script in Invoke-AzVmRunCommand, it is automatically executed in the system context with the System user. However, in the system context, you cannot run winget by default because it is an MSIX package. There are some workarounds available, but they are quite cumbersome and none of them have worked so far.I think Iโ€™ll close the ticket.

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

79281579

Date: 2024-12-14 23:39:44
Score: 1
Natty:
Report link

In addition to "source.organizeImports": "explicit" and "isort.args":["--profile", "black"], using "isort.importStrategy": "fromEnvironment" will allow isort to use the current env to properly sort imports in files from the local / dev package being used.

From: https://marketplace.visualstudio.com/items?itemName=ms-python.isort#settings.

Full example:

{
    "[python]": {
        "editor.defaultFormatter": "ms-python.black-formatter",
        "editor.formatOnSave": true,
        "editor.codeActionsOnSave": {
          "source.organizeImports": "explicit"
    },
  },
  "isort.args":["--profile", "black"],
  "isort.importStrategy": "fromEnvironment"
}
Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: immersinn

79281567

Date: 2024-12-14 23:29:42
Score: 1
Natty:
Report link

Not sure if it was again updated, this hack works for now

![test](https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fdrive.google.com/uc?id=<YOUR_ID>)
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: vondravl

79281560

Date: 2024-12-14 23:21:41
Score: 1
Natty:
Report link

First of all, your code/project is way too big in my opinion for someone to retry and give a concise answer to your several questions, which may amount to redoing it for you.

Regarding to your questions, it's not quite clear what's your issue, but I suppose you're concerned more about the "average" times that you are observing while running your Java and C++ implementations. In this regards, I would like to draw your attention to the "max" value of your first "PUT", which is way too big for C++, and it requires further and thorough analysis.

Concerning to Java and C++ compilers, to my knowledge Java is much more optimized for performance than any other C++ compiler can do out-of-the box. That being said, it doesn't mean that C++ can't beat Java in terms of performance. It certainly can, but it also requires some more care from the developers, for example by adding couple of more const keywords or applying some other syntactic formalities.

Generally, to optimize any software for performance, one shall first understand what are the bottlenecks and which parts are the most time-consuming. Let alone the benchmarking techniques and language-specifics, you should not compare apples with oranges, which you are doing here in my opinion by trying to benchmark map-implementations of Java and C++ in a way which is not just comparing their implementations to be honest but also lot of things around each of those, like for example memory allocation/de-allocation and compiler optimization.

What I want to highlight with this my answer is that you need a considerable analysis to be done in order to find the real reason behind your observation. It may be a simple syntactic sugar missing, or it may be complex memory-management, or maybe your benchmarks are skipping the garbage-collection part from Java? What about the process priorities that are being launched in each of those cases? Are you testing both on the same machine? Finally, as it was already pointed out by others in the comments, custom benchmarking is not so reliable.

Reasons:
  • Blacklisted phrase (1): regards
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
Posted by: Hack06

79281549

Date: 2024-12-14 23:06:38
Score: 1
Natty:
Report link

Iโ€™ve noticed the warning, that explains the issue

CSC : warning CS9057: The analyzer assembly '/home/runner/.nuget/packages/verify.mstest/28.2.0/analyzers/dotnet/roslyn4.4/cs/Verify.MSTest.SourceGenerator.dll' references version '4.9.0.0' of the compiler, which is newer than the currently running version '4.8.0.0'.

We will need to find, why the older version of Roslyn is called?

Reasons:
  • No code block (0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • High reputation (-2):
Posted by: Michael Freidgeim

79281543

Date: 2024-12-14 23:00:38
Score: 1.5
Natty:
Report link

make sure your browser isnt hijacked firstly , you need to do some heavy searching tobreak coding while leaving it in place to keep eyes in. keeps them happy

or simply use the dark web avoiding all the limits and limitations to slow and keep you in a lane.

or use the old school OS . linx . thats where you have 100% control and 100% unhackable while almost. this land of tech, is Jesus. very unsafe., very doors opened with no lock button for anyone to walk into your PCs etc.

bots have 100% access to all alls personal information. < worst thing ever to install on a faulty secure internet. they will harvest alls data. thank fuk i dont run social medias .. hehe

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

79281539

Date: 2024-12-14 22:53:37
Score: 1
Natty:
Report link
package main

import "fmt"

type MyType interface {
    int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 | string
}

func Unique[T MyType](m []T) []T {
    var k2 int
    un := []T{}
    for k1, v1 := range m {
        for k2 = 0; k2 < k1 && v1 != m[k2]; k2++ {
        }
        if k1 == k2 || v1 != m[k2] {
            un = append(un, v1)
        }
    }
    return un
}

func main() {
    input := []string{"green", "red", "green", "blue", "red"}
    unique := Unique(input)
    fmt.Println(unique)
}

Playground

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ะ’ะปะฐะด ะะปั‚

79281523

Date: 2024-12-14 22:39:33
Score: 4
Natty:
Report link

sheet.getRow(X).getCell(C).getStringCellValue()

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: Martha Andrade

79281521

Date: 2024-12-14 22:38:32
Score: 5
Natty:
Report link

You can go to https://www.opendatanetwork.com/ and search opendata to find most of the domains.

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

79281508

Date: 2024-12-14 22:31:30
Score: 0.5
Natty:
Report link

There are countless frameworks and approaches, each catering to specific needs. For example:

These are just a few examples; there are dozens, if not hundreds, of popular frameworks, each tailored to different architectural styles and use cases.

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

79281507

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

Check your console if it says creating it means need to wait:

enter image description here

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

79281499

Date: 2024-12-14 22:21:28
Score: 2
Natty:
Report link

Instead of java.net.URL use URI

    val uri = URI.create(yamlUrl)
    //Then you can just use .toURL() to get the url
    val connection = uri.toURL().openConnection()
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: JREalDeal

79281497

Date: 2024-12-14 22:18:27
Score: 4
Natty:
Report link

Camel 4.4 introduced variables.

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Has no white space (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Leponzo

79281486

Date: 2024-12-14 22:08:25
Score: 1
Natty:
Report link

in my script stats failed when all the values read are outside the yrange, but it worked when I set yrange to fit all the data points.

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

79281483

Date: 2024-12-14 22:05:24
Score: 2.5
Natty:
Report link

For keyboard shortcut (doesn't work for mouse click), you can do the following:

Implement your own pause:

Implement your own play:

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

79281474

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

I eventually ended up talking to one of the application developers who explained that I was using the wrong endpoint. I was using the address of the graphiql web app where you can manually run queries and the endpoint is different. I still am not clear if this is common practice, but it was the simple answer.

I did get stuck for a minute after correcting the endpoint because it kept giving me an unauthorized 401 response. I was using the --token flag to send my Auth token for the init. The documentation indicates that the default token scheme is Bearer, but I did have to specify it with the --scheme Bearer flag. Once I added that, it went through without any issue.

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

79281470

Date: 2024-12-14 21:57:23
Score: 3.5
Natty:
Report link

Please turn of the document root option from tweak settings inside your whm

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

79281467

Date: 2024-12-14 21:55:22
Score: 2
Natty:
Report link

The solution of having the QueryClientContextProvider.tsx in a different files works however it comes with one disadvantage. The provider uses the "use client" key word thus if you wrap the entire app inside this provider all you pages are converted to client component. As a result all the benefits of server side rendering are automatically lost. Here is a video how SSR works and when to use the "use client" hook. https://www.youtube.com/watch?v=Qdkg_mrniLk&t=17s

Reasons:
  • Blacklisted phrase (1): youtube.com
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: kyronnyoro

79281465

Date: 2024-12-14 21:53:22
Score: 3
Natty:
Report link

I got the same issue with Beanstalk.

I finally apply this config:

enter image description here

See this discussion on AWS forum.

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

79281446

Date: 2024-12-14 21:30:16
Score: 5
Natty:
Report link

Thanks to the suggestion in the comments and in particular the tip of @Homer512 I have come to this solution, please tell me if you think it could be done better.

// shape.cuh
#pragma once

#include <variant>
#include "sphere.cuh"

using Shape = std::variant<Sphere>;
//sphere.cuh
#pragma once

#include "ray.cuh"
#include "vec3.cuh"

class Sphere {
public:
  __host__ __device__ Sphere(const Vec3 &center, float radius);
  __device__ auto hit(const Ray &r) const -> bool;

private:
  Vec3 center;
  float radius;
};

h_shapes initialized as

const std::vector<Shape> &h_shapes = scene->getShapes();
  const size_t num_shapes = h_shapes.size();
  Shape *d_shapes;
  CUDA_ERROR_CHECK(cudaMalloc((void **)&d_shapes, num_shapes * sizeof(Shape)));
  CUDA_ERROR_CHECK(cudaMemcpy(d_shapes, h_shapes.data(),
                              num_shapes * sizeof(Sphere),
                              cudaMemcpyHostToDevice));

and finally the device function to get the color

template <class... Ts> struct overload : Ts... {
  using Ts::operator()...;
};

__device__ auto getColor(const Ray &ray, const Shape *shapes,
                         const size_t num_shapes) -> uchar4 {
  for (size_t i = 0; i < num_shapes; i++) {
    bool hit = std::visit(
        overload{
            [&ray](const Sphere &s) { return s.hit(ray); },
        },
        shapes[i]);

    if (hit) {
      return make_uchar4(1, 0, 0, UCHAR_MAX);
    }
  }
  return make_uchar4(0, 0, 1, UCHAR_MAX);
}

Here I don't really like the fact that for each new shape I have to write the [&ray](const Sphere/Cube/Pyramid &s) { return s.ray(ray) } when I already have defined a type that represents the union of multiple shapes

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • RegEx Blacklisted phrase (2.5): please tell me
  • RegEx Blacklisted phrase (1): I have come to this solution, please
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @Homer512
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: glowl

79281444

Date: 2024-12-14 21:29:15
Score: 3.5
Natty:
Report link

Try: today_date = datetime.datetime.now()

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Has no white space (0.5):
  • Low reputation (1):
Posted by: Paul Conroy

79281442

Date: 2024-12-14 21:27:14
Score: 4.5
Natty: 5
Report link

dir=$(cd "${self%[/\\]*}" > /dev/null; cd ../laravel/sail/bin && pwd)
is this correct?

Reasons:
  • Low length (1.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): is this
  • Low reputation (1):
Posted by: Adriano Cruz de Oliveira

79281441

Date: 2024-12-14 21:25:14
Score: 0.5
Natty:
Report link

With the P flag at the same level of nesting as the ::= assingment, after transforming the reference parameter to include the desired subscript:

ref=var var='Some value'
: ${(P)${ref/%/[1,4]}::='Cool'}
echo $var

that should output Cool value

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

79281426

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

As @gshpychka says, you should probably use the grantInvoke method instead. I wrote up an example here with an explanation, but basically all you need to do is as follows:

        // the target function will be invoked by the source function
        const targetFunction = new Function(this, "my-target-function", {
            runtime: Runtime.NODEJS_20_X,
            architecture: Architecture.ARM_64,
            handler: "target.handler",
            code: Code.fromAsset("./handlers/invocation"),
        });
        
        // the source function will be invoked by some event source
        const sourceFunction = new Function(this, "my-source-function", {
            runtime: Runtime.NODEJS_20_X,
            architecture: Architecture.ARM_64,
            handler: "source.handler",
            code: Code.fromAsset("./handlers/invocation"),
            environment: {
                // the source function will need the exact function name
                // as generated by CDK
                TARGET_LAMBDA_NAME: targetFunction.functionName,
            },
        });
        
        // we grant the invoke permission to the source function's principal,
        // so that the source function will be authorized to invoke the target
        // function
        targetFunction.grantInvoke(sourceFunction.grantPrincipal);
Reasons:
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @gshpychka
  • Low reputation (0.5):
Posted by: therightstuff

79281424

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

I have the exact same issue. It would be nice to resolve the issue so we can still have two different packages. One for the library and one for the tweak.

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Me too answer (2.5): I have the exact same issue
  • Single line (0.5):
  • Low reputation (1):
Posted by: xelahot

79281423

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

This approach suggested by Chris did not work for me. I got: HighchartsValueError: series_type expects a valid Highcharts series type. Received: <class 'highcharts_stock.options.series.candlestick.candlestickseries' So I did some reverse engineering of the code in the official git depository: https://github.com/highcharts-for-python/highcharts-for-python-demos/blob/master/highcharts-stock/hlc-and-ohlc-charts/hlc-chart.ipynb And converted my padas.DataFrame into JSON string representation. (I did not find any case in official documentaion where DataFame was used, if you know any please post it)

What I did:

droped unnecesary columns

df = df[['date', 'open', 'high', 'low', 'close']]

drop NAs

df = df.dropna(subset=['date', 'open', 'high', 'low', 'close'])

converted my DataFrame from descending to ascending (don't have to do it if it is already correct)

df = df[::-1]

Convert the date to UNIX time stamp

df['date'] = df['date'].apply(lambda date: int(dt.datetime.strptime(date, "%Y-%m-%d").timestamp() * 1000))

converted to list with format of ints and float

data_list = df.apply(lambda row: [int(row['date']), float(row['open']), float(row['high']), float(row['low']), float(row['close'])], axis=1).tolist()

dump it to JSON

json_string = json.dumps(data_list) 

created Chart using json_string as data using Chart.from_options(

as_dicts = {
    'range_selector': {
        'selected': 2
    },
    'title': {
        'text': 'AAPL Stock Price'
    },
    'navigator': {
        'enabled': True
    },
    'series': [
        {
            'type': 'candlestick',
            'name': 'AAPL Stock Price',
            'data': json_string
        }
    
    ]
}
chart = Chart.from_options(as_dicts)
chart.display()

Hope this helps at least some LLM model.

Reasons:
  • Blacklisted phrase (1): did not work
  • Whitelisted phrase (-1): Hope this helps
  • RegEx Blacklisted phrase (2.5): please post
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Qwido

79281408

Date: 2024-12-14 21:04:09
Score: 1
Natty:
Report link

The most easiest way is to deal it with the preg_match if it matches the base 64 data url pattern you can easily get image type

`preg_match('/^data:(image\/\w+);base64,/', $dataUrl, $matches)
 $imageType = $matches[1];`

using this regex you will get image type in $imageType

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

79281402

Date: 2024-12-14 21:02:07
Score: 0.5
Natty:
Report link

I solved that implementing a unit test that collects all endpoints with java reflection and checks for the annotation. If a developer forgets it, Jenkins will complain that this test failed.

Reasons:
  • Whitelisted phrase (-2): I solved
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Oli

79281398

Date: 2024-12-14 20:58:06
Score: 0.5
Natty:
Report link

I am quite unsure if that is the proper solution but the only working way to achieve what I want that I found so far is to wrap SomeModel with a sort of "wrapper" for it that has all it's properties typed as string.

Something like this:

public class SomeModel(decimal someNum = 10.0m)
{
    public decimal SomeValue = someNum;
}

public class SomeModelWrapper(SomeModel data) : ObservableObject, INotifyDataErrorInfo {
    private SomeModel rawData = data;
    private string someValue = data.SomeValue.ToString();
    public string SomeValue { get => someValue; set 
    {
        if (SetProperty(ref someValue, value)) 
        {
            // exctractValueFromString adds "nice" validation error 
            // if value cannot be converted.
            var convertedValue = extractValueFromString(value);
            if (convertedValue != null) 
            {
                // Handle validation here
                ...
                // Update underlying data
                SetProperty(ref rawData.SomeValue, convertedValue, nameof(SomeValue));
            }
        }
    }
    // Implement INotifyDataErrorInfo
    ...
}

The extractValueFromString method accepts string value that we need to convert and tries to parse it into needed type. And if it fails it returns null and adds a validation error for this property.

Now instead of binding DataGrid to actual data in SomeModel I bind it to that "wrapper". This way whenever value in DataGrid changes it is always accepted regardless of it being convertible to target type (the one in SomeModel) and I handle that conversion (and it's errors) myself.

It looks quite bad and adds a lot of extra code with potentially some other problems but it seems to work for me and all the extra problems hopefully are MY problems now and not framework's (which means I don't have to wait for framework devs to solve them for me)

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

79281395

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

I just realized that my shell's SPARK_HOME and SPARK_PATH were causing this problem even though the correct venv entry had been added to my PATH. Everything started working once I removed SPARK_HOME and SPARK_PATH from my shell.

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

79281394

Date: 2024-12-14 20:55:06
Score: 3.5
Natty:
Report link

I face similar problem. I used something like below as an alternative as Prisma does not support using EXCEPT directly.

const result = await prisma.$queryRawSELECT * FROM TABLE_A EXCEPT SELECT * FROM TABLE_B; console.log(result);

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): I face similar problem
  • Low reputation (1):
Posted by: swawge

79281382

Date: 2024-12-14 20:43:03
Score: 1.5
Natty:
Report link

For anyone who might have the same issue, here is how I solved it:
#1) Augment the outerplanar graph to a biconnected outerplanar graph:

def make_biconnected(graph):
    # Find cut vertices
    cut_vertices = list(nx.articulation_points(graph))

    for v in cut_vertices:
        neighbors = list(graph.neighbors(v))

        # Partition neighbors into blocks based on biconnected components
        subgraph = nx.Graph(graph)
        subgraph.remove_node(v)
        blocks = []
        for component in nx.connected_components(subgraph):
            block_neighbors = [n for n in neighbors if n in component]
            if block_neighbors:
                blocks.append(block_neighbors)

        # Add edges between blocks to make the graph biconnected
        for j in range(len(blocks) - 1):
            u = blocks[j][-1]
            w = blocks[j + 1][0]
            if not graph.has_edge(u, w):
                graph.add_edge(u, w)

                # If the edge breaks outerplanarity, revert and try other combinations
                if not is_outerplanar(graph):
                    graph.remove_edge(u, w)
                    for u_alt in blocks[j]:
                        for w_alt in blocks[j + 1]:
                            if not graph.has_edge(u_alt, w_alt):
                                graph.add_edge(u_alt, w_alt)
                                if is_outerplanar(graph):
                                    break
                                graph.remove_edge(u_alt, w_alt)

    return graph

#2) Find the largest simple cycle (this should be the Hamiltonian cycle or the outer face) and use the node ordering to create a circular layout

def generate_pos(graph):
    cycles = list(nx.simple_cycles(graph))
    maxLength = max( len(l) for l in cycles )
    path = list(l for l in cycles if len(l) == maxLength)
    pos = nx.circular_layout(path[0])
    return pos

#3) With the positions in #2 and the edges from the original outerplanar graph, use some math to sort the neighbor list of each node in ccw order and add the edges into an embedding.

def convert_to_outerplanar_embedding(graph, pos):
    # Step 1: Create a PlanarEmbedding object
    planar_embedding = nx.PlanarEmbedding()

    # Step 2: Assign the cyclic order of edges around each node based on positions
    for node in graph.nodes:
        neighbors = list(graph.neighbors(node))
        
        # Sort neighbors counterclockwise based on angle relative to the node's position
        neighbors.sort(key=lambda n: math.atan2(pos[n][1] - pos[node][1], pos[n][0] - pos[node][0]))

        # Step 3. Add edges in sorted order to the embedding
        planar_embedding.add_half_edge(node, neighbors[0])
        for i in range(1, len(neighbors)):
            u = neighbors[i-1]
            v = neighbors[i] 
            planar_embedding.add_half_edge(node, v, ccw = u)
    return planar_embedding

The result can be plotted using nx.draw_planar and should look like an outerplanar graph. I haven't tested it extensively, but it works so far for my use case.

Reasons:
  • Whitelisted phrase (-2): I solved
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): have the same issue
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: N C