79153739

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

Chatted with OneSignal and they recently changed the API to use REST Api key instead of User Auth Key.

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

79153737

Date: 2024-11-03 22:14:19
Score: 1.5
Natty:
Report link

You need to set the following classes html,body {height:100%;} and main {height:100%;}

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

79153734

Date: 2024-11-03 22:12:18
Score: 1.5
Natty:
Report link

Exiftool's QuickTime Tags page lists these (Note: This is not an authoritative source, but still useful):

'gshh'  GoogleHostHeader     string  
'gspm'  GooglePingMessage    string  
'gspu'  GooglePingURL        string  
'gssd'  GoogleSourceData     string  
'gsst'  GoogleStartTime      string  
'gstd'  GoogleTrackDuration  string  

Cheers.

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

79153733

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

The code above seems to work. The names are added to the input box when you select them and removed from the input box when deselected (see demo below)

Can you explain in more detail what the issue is?

 $('input:checkbox').change((e) => {
     if ($(e.currentTarget).is(':checked')) {
         var curVal = $('#name').val();
         if (curVal) {
             $('#name').val(curVal + ', ' + e.currentTarget.value);
         } else {

             $('#name').val(e.currentTarget.value);
         }
     } else if (!($(e.currentTarget).is(':checked'))) {
         var curVal = $('#name').val().split(',');
         var filteredVal = curVal.filter(el => el.trim() !== e.currentTarget.value)
         $('#name').val(filteredVal.join(','));
     }
 });
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>

<input type="text" id="name"></input>
<br/>
<input type="checkbox" value="Alabama">Alabama<br/>
<input type="checkbox" value="Alaska">Alaska<br/>
<input type="checkbox" value="Arkansa">Arkansa<br/>

Reasons:
  • RegEx Blacklisted phrase (2.5): Can you explain
  • Long answer (-1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • High reputation (-2):
Posted by: blurfus

79153710

Date: 2024-11-03 21:53:14
Score: 3
Natty:
Report link

A wrapper around james-heinrich/getid3 to extract various information from media files.

getid3-laravel

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

79153703

Date: 2024-11-03 21:47:13
Score: 1
Natty:
Report link

If you want the app to display the permission pop up again, the only way to do this is to uninstall the Expo Go app and reinstall it.

Here's a link to the Expo docs on this topic:

Disabling the permissions via the settings does undo the permission, but it will not lead to the app displaying the pop up again.

Apparently, this is not a bug or limitation, but an OS-level restriction imposed by both Android and iOS.

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

79153683

Date: 2024-11-03 21:33:09
Score: 3.5
Natty:
Report link

The custom use-sound hook doesn't suffer from this problem in Safari. Made my day.

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

79153682

Date: 2024-11-03 21:32:08
Score: 7.5
Natty: 8
Report link

What did you end up doing?????

Reasons:
  • Blacklisted phrase (1): ???
  • Low length (2):
  • No code block (0.5):
  • Ends in question mark (2):
  • Single line (0.5):
  • Starts with a question (0.5): What did you
  • Low reputation (1):
Posted by: timoteo bone

79153676

Date: 2024-11-03 21:28:07
Score: 2
Natty:
Report link

From libGDX https://github.com/libgdx/Jamepad works on all desktop platforms

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

79153675

Date: 2024-11-03 21:28:07
Score: 1
Natty:
Report link

Here is a function for splitting a list into 2 parts with random numbers.

lst = [1, 2, 3, 4, 5, 6]
def split(lst,x):
    split=lst[:x]    
    return split

def rest_lst(lst,x):
    rest_lst= lst[x::]
    return rest_lst

print(split(lst,2))
print(rest_lst(lst,2))

The output:
    [1,2]
    [3,4,5,6]
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ming

79153668

Date: 2024-11-03 21:25:06
Score: 2
Natty:
Report link

You can try optimising html2canvas settings to Lower image scale (e.g., window.devicePixelRatio / 2). The second option would be to try an alternative like dom-to-image

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

79153662

Date: 2024-11-03 21:22:05
Score: 3
Natty:
Report link

There's a python tool that does this for you. Maybe run it against your pyproject.toml and see what changes it makes? |

https://pypi.org/project/poetry-to-uv/

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

79153659

Date: 2024-11-03 21:20:04
Score: 2.5
Natty:
Report link

Me too. XCode 16.1. All simulators fail to sync iCloud Data using iOS 18.1 iOS 18 is OK. Bug report about to go in. I'm getting a COre Data error "Failed user key sync". This has been an issue in previous XCode versions too but had been fixed.

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

79153653

Date: 2024-11-03 21:15:03
Score: 3
Natty:
Report link

For me, none of here mentioned solutions ever worked. I had to install php-fpm in the nginx container and use its unix (file) socket instead of tcp socket to fpm container.

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

79153645

Date: 2024-11-03 21:12:02
Score: 2.5
Natty:
Report link

As an alternative solution, I like the answer I got from here. In it, the secondary find box (CtrlShiftF) on the sidebar can be moved to the bottom panel.

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

79153639

Date: 2024-11-03 21:08:01
Score: 0.5
Natty:
Report link

Bash command to detect PostgreSQL synchronous standby by Patroni API and jq

/usr/pgsql-16/bin/pg_isready -q && \
  test "$(hostname -I | xargs):5432" == "$(curl -s localhost:8008/cluster | jq -Mcr '.members[] | select (.role == "sync_standby") | .host + ":" + (.port|tostring)')"
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Rinat

79153626

Date: 2024-11-03 21:01:00
Score: 0.5
Natty:
Report link

To do the toSignal update or refresh, you could use the BehaviorSubject.

enter image description here

This code

 
 product.service.ts
================================
 public product_url = "http://127.0.0.1:8000/api/notes"

  getProducts_(): Observable<any> {
    return this.apiService.get(this.product_url);
  }

product-list.component.ts
================================
 private refresh$ = new BehaviorSubject<void>(undefined);
  dataList$=this.refresh$.pipe(switchMap(()=>this.productService.getProducts_()))
  dataSignal = toSignal(this.dataList$)
  refreshAdd() {
    this.refresh$.next();
  }
<table class="table table-hover">
  <thead>
    <tr>
      <th scope="col">#</th>
      <th scope="col">Product name</th>
    </tr>
  </thead>
  <tbody>
    <tr *ngFor="let product_data of dataSignal(); let i = index">
      <th scope="row">{{i+1}}</th>
      <td>{{product_data.title}}</td>
    </tr>
  </tbody>
</table>

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Jorge Jhovani Valverde León

79153623

Date: 2024-11-03 20:58:59
Score: 1
Natty:
Report link

Even though the answer from Simon Dold works fine, the better solution compatible with typescript would be to map a Sequelize Model instance to JSON serialisible object, like

const user = await User.findOne({where: {id}}).then(user=>({id: user.id, name: user.name}))

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

79153618

Date: 2024-11-03 20:52:58
Score: 2
Natty:
Report link

No. You can also use a .def file to specify exported functions, even if that's not as common.

Module-Definition (.Def) Files | Microsoft Learn

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

79153617

Date: 2024-11-03 20:50:57
Score: 1
Natty:
Report link

Bash command to detect PostgreSQL synchronous standby by Patroni API and jq

/usr/pgsql-16/bin/pg_isready -q && \
  test "$(hostname -I | xargs):5432" == "$(curl -s localhost:8008/cluster | jq -Mcr '.members[] | select (.role == "sync_standby") | .host + ":" + (.port|tostring)')"
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Rinat

79153614

Date: 2024-11-03 20:48:57
Score: 0.5
Natty:
Report link

Use BoxScope.

When BoxScope is used, it defines the scope of the associated composable.

content: @Composable BoxScope.() -> Unit,
Reasons:
  • Low length (1):
  • Has code block (-0.5):
Posted by: Faruk

79153609

Date: 2024-11-03 20:42:54
Score: 13 🚩
Natty:
Report link

@Jonathan Borrelli I have the same problem with SDL3-3.1.6. Can you tell me how you installed the SDL3_Image library?

Reasons:
  • Blacklisted phrase (1): I have the same problem
  • RegEx Blacklisted phrase (2.5): Can you tell me how you
  • Low length (1):
  • No code block (0.5):
  • Me too answer (2.5): I have the same problem
  • Ends in question mark (2):
  • User mentioned (1): @Jonathan
  • Single line (0.5):
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: Niteya

79153594

Date: 2024-11-03 20:33:51
Score: 1
Natty:
Report link

Add these lines in the initial setup to create the repository.

git init my_repo
cd my_repo

Then, run the tooling script.

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

79153592

Date: 2024-11-03 20:32:51
Score: 2
Natty:
Report link

I have problem connecting to Bitbucket from SourceTree using SSH also. Be aware that for Bitbucket the answer from Shrava40 is not correct according to documenttation - https://support.atlassian.com/bitbucket-cloud/docs/configure-ssh-and-two-step-verification/ where they say only key lenght 2048 is supported for rsa key type.

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

79153590

Date: 2024-11-03 20:30:51
Score: 1
Natty:
Report link

(simplified) In the instance of OpenGl the library serves two purposes.

  1. Enable Vertex and Fragment shader compilation
  2. Enable GPU communication

In the process of accomplishing these goals, the graphics libraries get useful features built in that make it easy to experiment with your hardware.

When you make an openGL program, your mainly focused on programming shaders in the GLSL language and seamlessly compiling and running said shaders via the C language to invoke the graphical results you were looking for.

There's entire books on the theory behind graphical programming. Libraries, such as OpenGL, provide programming interfaces for implementing these theories. (EI: 2D and 3D visualization concepts)

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

79153587

Date: 2024-11-03 20:28:50
Score: 4.5
Natty:
Report link

You can access old versions of android studio from this link

https://developer.android.com/studio/archive

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

79153584

Date: 2024-11-03 20:26:49
Score: 2.5
Natty:
Report link

I use Eclipse and build UI front-ends with WindowBuilder in the environment. I got interested in IntelliJ (why? - just curious) and downloaded it. There was no clue onboard about building a UI in it. After hours of only finding YouTube videos on coding your own UI from scratch while using IntelliJ, I came to realize it is TOTALLY USELESS; the IntelliJ IDE is incapable of using a UI builder like WindowBuilder.

Result: Removed the IntelliJ application from my several computers and apologized to Oracle and Eclipse.

Reasons:
  • Blacklisted phrase (0.5): why?
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Clarke Isackson

79153582

Date: 2024-11-03 20:25:49
Score: 1.5
Natty:
Report link

I found a solution. Both Get Playlist Items and Get Playlist respond with a next variable, which is the link to the next 100 tracks of the playlist, or any tracks that are left if not 100, or it gets the value None when there are no more left. In the first case, is it visible immediately in the response, while in the latter, it is nested under the tracks object (tracks.next).

I got all tracks by iteratively getting responded tracks until next was None, and using every time the URL returned in the response .

Cheers!

Reasons:
  • Blacklisted phrase (1): Cheers
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: exch_cmmnt_memb

79153579

Date: 2024-11-03 20:22:48
Score: 2.5
Natty:
Report link

As stated on the Kiwi.com media blog, from 30 May 2024 the API will only work for B2B partners. It is no longer even possible to register new accounts, unless you are chosen as an affiliate partner. You can read the post here. Log in with your credentials and check if you have access to the B2B portal.

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

79153573

Date: 2024-11-03 20:19:47
Score: 2.5
Natty:
Report link

@Rajesh Kumar Sahoo I think you should use something like this (using the code example above):

Public Sub SayHello(ByVal name As String)
    Call YourMacroName
End Sub
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • User mentioned (1): @Rajesh
  • Low reputation (1):
Posted by: Vokoramus Yuriy

79153571

Date: 2024-11-03 20:19:47
Score: 0.5
Natty:
Report link

This error will happen if you upgrade firebase-functions, without upgrading your tooling.

In order to fix it, just run npm i -g firebase-tools

Reasons:
  • Low length (1):
  • Has code block (-0.5):
Posted by: Broda Noel

79153570

Date: 2024-11-03 20:19:47
Score: 3.5
Natty:
Report link

From the plugin page: https://plugins.jetbrains.com/plugin/13882-godot-support

Starting with Rider 2024.2, this plugin is now bundled with the software.

As a result, no further updates will be published on the Marketplace.

Adds support for the Godot engine.

Reasons:
  • Blacklisted phrase (1): this plugin
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Nevinimore

79153565

Date: 2024-11-03 20:17:47
Score: 2
Natty:
Report link

:, you must provide your AWS account ID, not directly like this. <>, this keyword means, you have to replace it with the original one. Also, Diff only shows you the difference between the previous stage and the new stage, not for deployment.

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

79153549

Date: 2024-11-03 20:10:45
Score: 2
Natty:
Report link

You can resolve this memory issue by using the

XMLReader

PHP class instead of

DOMDocument

If you're using the Magento framework, you can use

Laminas\Config\Reader\Xml

instead of

Magento\Framework\Xml\Parser

class.

DOMDocument class will try to load all the XML content to memory at once but XMLReader class will NOT load the content to memory at once. It will read the nodes set by set incrementally.

You can find more info on this one in this article https://medium.com/devops-dev/way-to-read-large-xml-dataset-in-magento-2-using-laminas-config-reader-xml-2b59c936bbcc :)

Cheers!

Reasons:
  • Blacklisted phrase (1): Cheers
  • Blacklisted phrase (1): this article
  • Blacklisted phrase (0.5): medium.com
  • Whitelisted phrase (-1.5): you can use
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Dasitha Abeysinghe

79153544

Date: 2024-11-03 20:07:44
Score: 1.5
Natty:
Report link

Fun problem!

I made some slight changes. For example, I added data %>% to code1 and code2 because I can't remember how to concatenate that programmatically. I prefer rlang to base R's metaprogramming. You can read the metaprogramming section of Advanced R for a deep dive or this PDF cheat sheet for a quick intro.

I used dplyr::enexpr, replacing eval(substitute(...)). You also mistyped some of the column names, e.g. states which should have been state.

Lastly, I used rlang::eval_tidy to run the code.

I haven't checked that the output is correct, however. I'll leave that to you, and please let me know!

apply_conditional_summary <- function(data, code1, code2) {
  
  if ("category" %in% colnames(data)) {
    result <- enexpr(code2)
  } else {
    result <- enexpr(code1)
  }
  
  return(rlang::eval_tidy(result))
}

apply_conditional_summary(
  df2, 
  data %>% group_by(date, state) %>% summarise(units = mean(units), total_amt = sum(amount), .groups = "drop"),
  data %>% group_by(date, state, category) %>% 
    summarise(units = mean(units), total_amt = sum(amount), .groups = "drop") %>%
    group_by(date, state) %>%
    mutate(share = total_amt / sum(total_amt)) %>%
    ungroup()
)
Reasons:
  • RegEx Blacklisted phrase (2.5): please let me know
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: gabagool

79153522

Date: 2024-11-03 20:01:42
Score: 1
Natty:
Report link

For other lost peeps like me, the thing missing in OP's workflow is the checkout step. I was getting the same "empty archive" until I added the always necessary uses: actions/checkout@v4

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

79153510

Date: 2024-11-03 19:53:40
Score: 0.5
Natty:
Report link

Could it just be an error of uploading artifacts to Maven Central?

There is only a sudden "Drools 9.44.x" archive with nothing preceding it in the "9 major" release, and its date is exactly the one of "Drools 8.44.0 Final": Sep 06, 2023

Drools Core at Maven Repository

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • High reputation (-2):
Posted by: David Tonhofer

79153506

Date: 2024-11-03 19:52:40
Score: 1.5
Natty:
Report link

According to documentation

report_to (str or List[str], optional, defaults to "all")

Try to pass

report_to="none"
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Marko Golovko

79153501

Date: 2024-11-03 19:47:38
Score: 2.5
Natty:
Report link
heap = []
for num in nums:
    heapq.heappush(heap, num)

can be reduced to below code, will have O(N) complexity

heapq.heapify(nums)

while this given code -

for _ in xrange(len(nums)-k):
    heapq.heappop(heap)
return heapq.heappop(heap)

can be reduced to below code, will have complexity O(log(n-k))

return heapq.nsmallest(n-k, nums)[0]

For more info on what's the complexity of each function, read - https://dpythoncodenemesis.medium.com/understanding-pythons-heapq-module-a-guide-to-heap-queues-cfded4e7dfca

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • Probably link only (1):
  • Has code block (-0.5):
  • Starts with a question (0.5): can
  • Low reputation (1):
Posted by: Param Bedi

79153495

Date: 2024-11-03 19:43:38
Score: 0.5
Natty:
Report link

https://dev.mysql.com/doc/refman/en/innodb-transaction-isolation-levels.html has the answer:

Consistent reads within the same transaction read the snapshot established by the first read.

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

79153493

Date: 2024-11-03 19:42:37
Score: 2
Natty:
Report link

Hello I had the same problem and I did not work as discussed in this post and was using the MAMP service, but then I noticed that at the bottom of the local page is the username and password in my case for both was root. Image

Reasons:
  • Blacklisted phrase (1): did not work
  • Whitelisted phrase (-1): I had the same
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: LEONARDO BARRIGA GARIBAY

79153468

Date: 2024-11-03 19:29:32
Score: 7 🚩
Natty: 5
Report link

If anyone of you are still alive can you please help me. A have a simmilar problem but instead of 3i+1 a have 1/1+r

Reasons:
  • Blacklisted phrase (1): help me
  • RegEx Blacklisted phrase (3): can you please help me
  • Low length (1):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Marek Szczuka

79153463

Date: 2024-11-03 19:27:31
Score: 5.5
Natty: 5.5
Report link

In the following line: !!sqlcmd /E /S$(SECONDARY) -i DRRestoreDatabase.sql -v BKDIR="$(SBKSHARE)" -v DATADIR="$(SDATADIR)" -v LOGDIR="$(SLOGDIR)"

Where should I get the script "DRRestoreDatabase.sql"?

Reasons:
  • Blacklisted phrase (1.5): Where should I
  • Low length (0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Rafael Valdes

79153458

Date: 2024-11-03 19:27:30
Score: 2
Natty:
Report link

Not sure if this is what you are looking for or not...

Whenever I have created code to create and send emails with the methods I have used there is generally a .HTMLBody property to add the html to rather than adding it to .Body

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

79153434

Date: 2024-11-03 19:14:28
Score: 0.5
Natty:
Report link

I solved it now just by using codesign --force --deep --sign - binaryname

Reasons:
  • Whitelisted phrase (-2): I solved
  • Low length (1.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: tikhonfedulov

79153433

Date: 2024-11-03 19:11:27
Score: 4.5
Natty:
Report link

I use Ray.so and when I want more customization I prefer Snappify

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

79153429

Date: 2024-11-03 19:10:24
Score: 7 🚩
Natty: 5
Report link

Thanks for sharing your knowledge! It helped me a lot! From: Brazil :)

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (2): Thanks for sharing
  • Blacklisted phrase (1): helped me a lot
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Levy Silva

79153419

Date: 2024-11-03 19:06:23
Score: 1.5
Natty:
Report link

When working on Windows and Visual Studio always put class definitions containing the Q_OBJECT macro into a header file, not into a source file. Because that messes with the build process of Qt and Visual Studio. Just seen on Visual Studio 2022 and Qt 6.8

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Starts with a question (0.5): When
  • Low reputation (0.5):
Posted by: ray_ray_ray

79153413

Date: 2024-11-03 19:01:22
Score: 1.5
Natty:
Report link

So I may be wrong on this, but it seems that you are registering your service incorrectly. According to the AddSingleton docs, you have set up the generic parameters backwards. It should be the type you want to add and then the implementation of that type.

AddSingleton docs for <Type, Type> generic parameters.

For example, instead of: services.AddSingleton<ISingletonLoggerHelper, LoggerHelper>();, it should be: services.AddSingleton<LoggerHelper, ISingletonLoggerHelper>();. Hopefully this helps.

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

79153407

Date: 2024-11-03 18:59:21
Score: 2
Natty:
Report link

A wrapper around james-heinrich/getid3 to extract various information from media files. https://packagist.org/packages/plutuss/getid3-laravel

 $media = MediaAnalyzer::fromLocalFile(
         path: 'files/video.mov',
         disk: 's3',  // "local", "ftp", "sftp", "s3","public"
     );
     
  $media->getAllInfo();  
Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Dmytro Konovalenko

79153404

Date: 2024-11-03 18:57:21
Score: 3
Natty:
Report link

the cause was because region don't refresh after change. i used following code before my code

apex.region("PAYEMNTDetails").widget().interactiveGrid("getViews", "grid").refresh();

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

79153393

Date: 2024-11-03 18:49:19
Score: 1.5
Natty:
Report link

Thanks to everyone for your help! Special thanks to Jim Mischel for pointing me in the right direction.

In WPF, there's a handy method called PointToScreen that helped me solve the issue. This method converts a point relative to a WPF element to screen coordinates, which was exactly what I needed.

using System;
using System.Drawing; // For screen capturing (Bitmap, Graphics)
using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;

namespace ScreenCapture
{
    public partial class MainWindow : Window
    {
        private System.Windows.Shapes.Rectangle DragRectangle = null; // Specify WPF Rectangle
        private System.Windows.Point StartPoint, LastPoint;

        public MainWindow()
        {
            InitializeComponent();
        }

        private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Escape) { this.Close(); e.Handled = true; }
        }

        private void canvas_MouseDown(object sender, MouseButtonEventArgs e)
        {
            StartPoint = Mouse.GetPosition(canvas);
            LastPoint = StartPoint;

            // Initialize and style the rectangle
            DragRectangle = new System.Windows.Shapes.Rectangle
            {
                Width = 1,
                Height = 1,
                Stroke = System.Windows.Media.Brushes.Red,
                StrokeThickness = 1,
                Cursor = Cursors.Cross
            };

            // Add the rectangle to the canvas
            canvas.Children.Add(DragRectangle);
            Canvas.SetLeft(DragRectangle, StartPoint.X);
            Canvas.SetTop(DragRectangle, StartPoint.Y);

            // Attach the mouse move and mouse up events
            canvas.MouseMove += canvas_MouseMove;
            canvas.MouseUp += canvas_MouseUp;
            canvas.CaptureMouse();
        }

        private void canvas_MouseMove(object sender, MouseEventArgs e)
        {
            if (DragRectangle == null) return;

            // Update LastPoint to current mouse position
            LastPoint = Mouse.GetPosition(canvas);

            // Update rectangle dimensions and position
            DragRectangle.Width = Math.Abs(LastPoint.X - StartPoint.X);
            DragRectangle.Height = Math.Abs(LastPoint.Y - StartPoint.Y);
            Canvas.SetLeft(DragRectangle, Math.Min(LastPoint.X, StartPoint.X));
            Canvas.SetTop(DragRectangle, Math.Min(LastPoint.Y, StartPoint.Y));
        }

        private void canvas_MouseUp(object sender, MouseButtonEventArgs e)
        {
            if (DragRectangle == null) return;

            // Release mouse capture and remove event handlers
            canvas.ReleaseMouseCapture();
            //canvas.MouseMove -= canvas_MouseMove;
            //canvas.MouseUp -= canvas_MouseUp;

            // Capture the screen area based on the selected rectangle
            CaptureScreen();

            // Clean up: remove rectangle from canvas
            canvas.Children.Remove(DragRectangle);
            DragRectangle = null;
            this.Close();
        }

        private void CaptureScreen()
        {
            // Convert StartPoint and LastPoint to screen coordinates
            var screenStart = PointToScreen(StartPoint);
            var screenEnd = PointToScreen(LastPoint);

            // Calculate the capture area dimensions and position
            int x = (int)Math.Min(screenStart.X, screenEnd.X);
            int y = (int)Math.Min(screenStart.Y, screenEnd.Y);
            int width = (int)Math.Abs(screenEnd.X - screenStart.X);
            int height = (int)Math.Abs(screenEnd.Y - screenStart.Y);

            // Ensure dimensions are valid before capture
            if (width > 0 && height > 0)
            {
                using (Bitmap bitmap = new Bitmap(width, height))
                {
                    using (Graphics g = Graphics.FromImage(bitmap))
                    {
                        // Capture the area of the screen based on converted coordinates
                        g.CopyFromScreen(x, y, 0, 0, new System.Drawing.Size(width, height));
                    }

                    // Save the captured image to the desktop
                    string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
                    //string filePath = System.IO.Path.Combine(desktopPath, $"Screenshot_{DateTime.Now:yyyyMMdd_HHmmss}.png");
                    string filePath = System.IO.Path.Combine(desktopPath, "Screenshot.png");
                    bitmap.Save(filePath);
                    System.Diagnostics.Process.Start(filePath);
                    //MessageBox.Show($"Screenshot saved to {filePath}");
                }
            }
        }
    }
}
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (0.5): I need
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: pcinfogmach

79153392

Date: 2024-11-03 18:48:18
Score: 5
Natty:
Report link

@Angelo Mazza, hi!

Please, explain, what 'im using this but doesnt work' means? Because there are plenty of reasons why it might not work actually =)

Reasons:
  • Blacklisted phrase (1): doesnt work
  • Low length (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Angelo
  • Low reputation (1):
Posted by: DesiredName

79153388

Date: 2024-11-03 18:47:18
Score: 0.5
Natty:
Report link

I finally found another workaround without testing the function directly. Instead, I just wrote an assertion that tests the state to not have been changed.

    it('does not toggle sound, when space key is clicked', () => {
        const preloadedState = {
            sound: {
                isMuted: true, 
            },
        };

        const { getByLabelText, store } = renderWithProviders(<SoundBtn />, { preloadedState });
        const button = getByLabelText('click to play sound');

        fireEvent.keyDown(button, { code: 'Space', key: ' ' });

        expect(store.getState().sound.isMuted).toBe(true);
    });

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

79153386

Date: 2024-11-03 18:43:17
Score: 4
Natty:
Report link

Caused by "expo-web-view" library. Issue was gone after I uninstalled it

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

79153383

Date: 2024-11-03 18:38:17
Score: 0.5
Natty:
Report link

Inside onPopInvokedWithResult you should do:

if (didPop) return;

final shouldPop = await webViewController.canGoBack();

if (shouldPop) {
   webViewController.goBack();
}

Check this from Flutter's documentation. The example is different, but the logic is similar.

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

79153377

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

For anyone who is still having trouble installing this, I just tried and quickly succeeded using the nix installer on Mac. Nix is an independent package manager for Linux and Mac that precisely specifies and isolates all dependencies from the system and other packages, so it often resolves broken dependency issues.

The commands I ran:

To install the nix package manager:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install (You may have to restart your terminal now if it can't find the nix command.)

To install threadscope:

nix profile install nixpkgs#haskellPackages.threadscope To run threadscope:

threadscope

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

79153373

Date: 2024-11-03 18:31:15
Score: 3
Natty:
Report link

I am also trying to find the answer for this however never get. if you have fixed this and update me please.

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

79153371

Date: 2024-11-03 18:30:12
Score: 6 🚩
Natty: 5.5
Report link

using 60% from user1 data and 100% from few other imposters cause a huge data inbalance. isnst it?

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Ends in question mark (2):
  • User mentioned (1): user1
  • Single line (0.5):
  • Low reputation (1):
Posted by: Nisal Liyanage

79153368

Date: 2024-11-03 18:27:11
Score: 2.5
Natty:
Report link

try to replace timeout with request_timeout

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

79153363

Date: 2024-11-03 18:25:10
Score: 0.5
Natty:
Report link

To change the theme for the app, you need to add/remove the .my-app-dark class to the HTML tag of the page. To do this, we have to create a button and on click toggle the class .my-app-dark by running following code - document.documentElement.classList.toggle('my-app-dark')

Reference - https://primevue.org/theming/styled/#darkmode

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

79153361

Date: 2024-11-03 18:24:10
Score: 4.5
Natty:
Report link

I found out the answer in

React onClick function fires on render

turns out I was calling this function wrong

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

79153357

Date: 2024-11-03 18:21:09
Score: 2.5
Natty:
Report link

screenshot from xcode

If you recently upgraded to macOS Sequoia, adjusting the project configuration resolved the issue. Choose the configuration you need and link it.

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

79153353

Date: 2024-11-03 18:16:08
Score: 0.5
Natty:
Report link

I did some research to get to the bottom of the issue, opposed to trying to hide the error. (it is my understanding those compiler errors are there to help us).

if the value of the pointer "COULD" be "NULL", Error:'C6387', is warning you to validate the reference prior to the call to it.

unsigned char* data = (unsigned   char*)malloc(sections[i].Size);


fseek(file, sections[i].Offset, SEEK_SET);
fread(data, 1, sections[i].Size, file);

Above you can see that we allocated memory to the pointer, with value of sections[i].Size, from the sections struct defined earlier, then in the fread(data, 1, sections[i].Size, file); Here we try to read that data, this is where things could go wrong if there is no value within our *data pointer.

Since we deference the (*)data (if the value we are looking within the pointer doesn't exist) it could cause undefined behavior (UB), or a security vulnerability &/or just crash the program...

We solve this problem by verifying or checking the pointer value prior to the call to read within it, as follows:

unsigned char* data = (unsigned char*)malloc(sections[i].Size);

// Again we allocated the memory to data but the below if 
// statement checks for NULL value within our *data, 
// then handles graceful shutdown.

if (data == NULL) {
printf(stderr, "Failed to load data to memory");
fclose(file);
return 1;
}

fseek(file, sections[i].Offset, SEEK_SET);
fread(data, 1, sections[i].Size, file); 

now the compiler knows to safely close down the program if something has occurred, for which the deference* data pointer is NULL.

Reasons:
  • RegEx Blacklisted phrase (1): help us
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Black2ooth

79153352

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

Overwriting a table that is also being read from is not supported in Spark. See one of the Spark test cases for example (Spark v3.4.4). However, it is possible to do it with INSERT OVERWRITE when overwriting partitions dynamically (SPARK-30112).

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

79153346

Date: 2024-11-03 18:12:07
Score: 2.5
Natty:
Report link

Good day!

This error occurs in the name of the command

I got the same error when run mvn springboot:build-image

instead of mvn spring-boot:build-image

Reasons:
  • Blacklisted phrase (1): Good day
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user1252381

79153345

Date: 2024-11-03 18:12:07
Score: 2
Natty:
Report link

I have modified your code a bit and it works perfectly fine i guess i mean according to your requirement.

five_ans1 = input ("What is the answer?")

five_ans2 = input ("What is the answer?")

list_q5_mark1 = ["answercondition1", "another way to write answercondition1"] list_q5_mark2 = ["answercondition2", "another way to write answercondition2"] #the 'another way to write' is just to ensure the user doesn't get an false incorrect. It's the same thing, without spaces.

if five_ans1 and list_q5_mark1 in five_ans2 in list_q5_mark2: print ("correct! you got both") elif five_ans1 in list_q5_mark1: print ("correct! it was also answercondition2") elif five_ans2 in list_q5_mark2: print ("correct! it was also answercondition1") else: print ("incorrect")

keep the indenation properly and check it out.

Reasons:
  • Blacklisted phrase (0.5): check it out
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Ravi Teja Bhagavatula

79153344

Date: 2024-11-03 18:12:07
Score: 1.5
Natty:
Report link

Use React.memo to wrap your component and tell React to only re-render when its props change.

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

79153338

Date: 2024-11-03 18:08:06
Score: 0.5
Natty:
Report link

I know this question is old but since I still found it in 2024, here's an update:

The :has() pseudo-selector class can be used to access its parent elements.

div.with-link:has(> a:target) {
    background: yellow
}

Note that this method requires you to define a parent selector div.with-link in this case. All elements matching this selector that have the target in them will be highlighted.

All major browsers support this selector. Refer to https://caniuse.com/css-has to check if your target browser or browser versions have support for it.

If this does not fit your requirements, you may still fall back to the JavaScript alternative.

Source: https://stackoverflow.com/a/1014958/1457596

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

79153329

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

What's in your gdbinit file, if any?

I ran into a similar error when trying to setup debugging in Clion. The solution was to set the Debugger binary xtensa-esp32-elf-gdb in the Toolchain settings, and then select it in the Run Configuration.

Instead of writing -file-exec-and-symbols build/main.elf in the gdb console just pass the symbol file as command line argument: xtensa-esp32-elf-gdb -x gdbinit ../build/main.elf

Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): What's in you
  • Low reputation (0.5):
Posted by: Fabian

79153323

Date: 2024-11-03 17:59:04
Score: 0.5
Natty:
Report link

I think the answer is much more simple ;

SELECT s.name, MAX(t.score) as topScore, t.day AS topScoreDay
FROM student as s
LEFT JOIN testScore AS t ON s.id = t.studentId
GROUP BY s.id
ORDER BY topScore DESC, t.score ASC;

Result :

name topScore topScoreDay
steve 100 5
joe 95 15
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Mike

79153321

Date: 2024-11-03 17:59:04
Score: 1.5
Natty:
Report link

Discord Bot Commands (when not Teporary) can take up to an hour to update. Use temp commands guild.updateCommands().addCommands(Data) for debbugging/testing

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

79153319

Date: 2024-11-03 17:58:04
Score: 0.5
Natty:
Report link

Use ANSI escape codes, like following:

console.log('\x1b[33m%s\x1b[0m', 'COLORFUL');

\x1b[33m Sets the text color to orange

%s Represents the string you want to print

\x1b[0m Resets the text formatting to the default

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

79153318

Date: 2024-11-03 17:58:04
Score: 1
Natty:
Report link

Nothing work for me except just deleting the folder C:\Users\<username>\AppData\Local\Microsoft\VisualStudio But this will fully remove all settings so be aware about it

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

79153315

Date: 2024-11-03 17:57:03
Score: 3
Natty:
Report link

For OnTriggerEnter to work in Unity, I believe it is required to have a rigidbody on at least one of the GameObjects. Here is a reference to their docs describing this.

Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Christian Marcellino

79153314

Date: 2024-11-03 17:54:03
Score: 1
Natty:
Report link

In my case server was running on port 5433 insted of default 5432. After changing PORT variable to default 5432 in C:\Program Files\PostgreSQL\17\data\postgresql.conf. psql finally responded

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

79153310

Date: 2024-11-03 17:53:02
Score: 4.5
Natty: 4
Report link

same issue with imread() , tx for the workaround!

Reasons:
  • RegEx Blacklisted phrase (1): same issue
  • Low length (1.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Migu Be

79153291

Date: 2024-11-03 17:43:00
Score: 1.5
Natty:
Report link

I needed to Cut the Code Die() is here

    public void TakeDamage(int damageAmount)
{
    currentHealth -= damageAmount;

    // Check if health is less than or equal to 0
    if (currentHealth <= 0)
    {
        Die();
    }
    else
    {
        // Trigger hit animation
        anim.SetTrigger("hit"); // Ensure this trigger is correctly set in the Animator
    }
}
Reasons:
  • Blacklisted phrase (0.5): I need
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Das Shiro

79153286

Date: 2024-11-03 17:39:59
Score: 5
Natty:
Report link

can you share the git config? what is the default editor after windows 11 upgrade?

From man git-commit:

ENVIRONMENT AND CONFIGURATION VARIABLES The editor used to edit the commit log message will be chosen from the GIT_EDITOR environment variable, the core.editor configuration variable, the VISUAL environment variable, or the EDITOR environment variable (in that order).

Reasons:
  • RegEx Blacklisted phrase (2.5): can you share
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): can you share the
  • Low reputation (1):
Posted by: SPC0nline

79153285

Date: 2024-11-03 17:39:59
Score: 1.5
Natty:
Report link

This turned out to be a case of the build.sbt file breaking the program. The real app (not my sample app) used sbt-assembly to create a jar. There was logic to remove duplicates with MergeStrategy that was removing the MariaDB service files within the META-INF directory. Without those, the driver didn't know where to find the classes to work with caching_sha2_password.

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

79153278

Date: 2024-11-03 17:35:58
Score: 0.5
Natty:
Report link

The code seems to be right. Could it be possible that you are calling to the function authenticate_user before initializing the DB?

Also I would add a try-except when creating the connection to th DB

try:
    connection_pool = psycopg2.pool.SimpleConnectionPool(
        minconn=1,
        maxconn=10,
        user=USERNAME,
        password=PASSWORD,
        host=HOST,
        port=PORT,
        database=targetDbName
    )
    #The conn will be successfully created.
    #if not, will jump to the error (and it will tell you what is failing).
except psycopg2.Error as e:
    print(f"Error creating connection pool: {e}")
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: raul sanchez

79153266

Date: 2024-11-03 17:27:53
Score: 7 🚩
Natty:
Report link

I have tried in excel but i am not much good in excel could please share excel of moon phase date wise tried but unable to make one.

Reasons:
  • RegEx Blacklisted phrase (2.5): please share
  • RegEx Blacklisted phrase (1): I have tried in excel but i am not much good in excel could please
  • Low length (1):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: rakesh

79153256

Date: 2024-11-03 17:19:52
Score: 1.5
Natty:
Report link

I read the answer from Brando Zhang and Roberto Oropeza, then I added @rendermode InteractiveServer after @page line in my creation blazor page. It's work!

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

79153255

Date: 2024-11-03 17:19:52
Score: 1
Natty:
Report link

Thanks to all. I found the answer and I share it for other people.

In the 3rd way, I put the absolute path for mysqldump:

$command1 = 'D:/xampp/mysql/bin/mysqldump --user=' . $dbUser . ' --password=' . $dbPassword . ' --host=' . $dbHost . ' ' . $dbName . ' > "' . $fnStorage . '"';
exec($command1, $output, $returnVar);

Now, it works for both design (VSCode) and production environments :)

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Morteza M

79153252

Date: 2024-11-03 17:17:51
Score: 3
Natty:
Report link

SELECT price, roomId FROM room inner join Reservation on (reservation.roomId = room.roomId inner join Guest on (reservation._guestId = guest._guestId and age <20) ;

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

79153251

Date: 2024-11-03 17:17:51
Score: 3.5
Natty:
Report link

const sourceCode = document.documentElement.outerHTML; console.log(sourceCode);

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

79153249

Date: 2024-11-03 17:17:51
Score: 4.5
Natty:
Report link

Thank to @Someprogrammerdude and @AndersK, I could reajust my thoughts and correct the code. Please refer to the comments above. Thanks again!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Low length (1):
  • No code block (0.5):
  • User mentioned (1): @Someprogrammerdude
  • User mentioned (0): @AndersK
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: kairotic

79153244

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

You should almost certainly not have sleep in your job script. All it's doing is occupying the job's resources without getting any work done - waste.

Job arrays are just a submission shorthand: the members of the array have the same overhead as standalone jobs. The only difference is that the arrayjob sits in the queue sort of like a Python "generator", so every time the scheduler considers the queue and there are resources available, another array member will be budded off as a standalone job.

That's why the sleep makes no sense: it's in the job, not in the submission. Slurm doesn't have a syntax for throttling a job array by time (only by max running).

But why not just "for n in {1..60}; do sbatch script $n; sleep 10; done"?

I'm a cluster admin, and I'm find with this. You're trying to be kind to the scheduler, which is good. Every 10 seconds is overkill though - the scheduler can probably take a job per second without any sweat. I'd want you to think more thoroughly about whether the "shape" of each job makes sense (GPU jobs often can use more than one CPU core, and is this job efficient in the first place? and there are lots of ways to tune for cases where your program (matlab) can't keep a GPU busy, such as MPS and MIGs.)

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: markhahn

79153242

Date: 2024-11-03 17:15:50
Score: 0.5
Natty:
Report link

The issue you're experiencing is because recent versions of bslib handle Node dependencies differently. Instead of looking for node_modules directly, you can try this approach:

# Get the bslib installation path
bslib_path <- system.file(package = "bslib")

# Check for the actual Bootstrap files
bootstrap_path <- file.path(bslib_path, "lib", "bs")

# If you need specific Bootstrap files, you can look here:
bs_files <- list.files(bootstrap_path, recursive = TRUE)

The Bootstrap files are now typically located in the lib/bs directory within the package installation path. If you're trying to access specific Bootstrap components, you might want to use bslib's built-in functions instead of accessing the files directly:

library(bslib)

# Use bs_theme() to customize Bootstrap
my_theme <- bs_theme(version = 5)  # or whichever version you need

What specific Bootstrap components are you trying to access? This might help me provide a more targeted solution.

Reasons:
  • Blacklisted phrase (1): help me
  • Whitelisted phrase (-1): try this
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Thiago Cezário

79153241

Date: 2024-11-03 17:13:50
Score: 2
Natty:
Report link

The solution was to use this tool: https://www.java.com/en/download/uninstalltool.jsp

Then exit out of System Settings and re-enter it and Java should be gone.

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

79153237

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

The error code -1073741819 (0xC0000005) usually indicates a memory access violation.

Try to check mysql error logs, check pycharm configuration, temporarily disable firewall, update mysql connector.

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

79153234

Date: 2024-11-03 17:10:49
Score: 2
Natty:
Report link

1)Reinstall npm Using npm

npm uninstall -g npm npm cache clean --force npm install -g npm

2)Clear npm Cache npm cache clean --force

  1. Reinstall create-react-app npm uninstall -g create-react-app npm install -g create-react-app

now try npx create-react-app my-app

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Mohammed Altamash Shaikh

79153232

Date: 2024-11-03 17:08:49
Score: 1.5
Natty:
Report link

This will work: https://www.java.com/en/download/uninstalltool.jsp

Worked for me when I saw on my Mac:

Failed to uninstall java xpc connection error

Reasons:
  • Whitelisted phrase (-1): Worked for me
  • Probably link only (1):
  • Low length (1):
  • No code block (0.5):
Posted by: user1689987

79153229

Date: 2024-11-03 17:07:48
Score: 2
Natty:
Report link

What worked for me was removing the image element from the DOM and then recreating it with a new source using JavaScript. When I had tried to simply reassign the image's src attribute using JavaScript, it didn't work.

Reasons:
  • Whitelisted phrase (-1): worked for me
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): What
  • Low reputation (1):
Posted by: Jonathan Woodruff

79153227

Date: 2024-11-03 17:06:48
Score: 2
Natty:
Report link

I had this Issue at some point, my issue was due to circular dependency. you can also cross-check on your end. I Injected a service(Service A) into a class (Class B) and unknowingly wanted to inject Class B in Service A. which caused the error.

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

79153225

Date: 2024-11-03 17:05:48
Score: 0.5
Natty:
Report link

I solved the above by changing the runner from DirectRunner to DataflowRunner it seems directrunner which is meant for local testing does not support fully all the to_dataframe functionalities when streaming is set to True(above am streaming data from a pubsub topic)

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: oyugi.collins

79153221

Date: 2024-11-03 17:03:47
Score: 2.5
Natty:
Report link

First, "scontrol show config" will display all system-wide config settings. Of course, there are many limits which are set per-association (some combination of user and account).

As a large-cluster admin, I beseech you to consider what you're doing. Yes, you have a lot of separate work-units. We love that! The point is that they should probably not be separate jobs - remember that a job array is just a shorthand for submitting jobs. Each jobarray member is a full-scale job that incurs the same cost to the cluster - so short jobarray members are as shameful as short single jobs.

Instead of thinking: I have 18k "jobs", how do I beat the BOFH admins and get them run, think "what is the most efficient resource configuration to run a single unit, and how long does it take on average, and how many resources can I expect to consume from the cluster at once, so how should I lay out those work units into separate jobs?"

  1. measure your units of work. by that I really mean measure the scaling and resource requirements. are each of them serial? measure their %CPU, measure how much memory they need. heck, how much IO do they do? if you run them with plenty of memory, but one core, and the %CPU is not 100%, you're probably waiting on IO. You should know the average %CPU of a unit, it's required memory, and the amount of IO the job performs. you should also understand any parallel scaling of your workload (treating it as serial is a perfectly find initial assumption).

  2. what resources can you realistically expect to consume? you might not be allowed to consume all the cluster's nodes. you might be "charged" for both cpu and memory occupancy. the cluster certainly has limited IO capabilities, so how much of that can use?

  3. now do a sanity-check: what's your total resource demand, and how many resource can you realistically expect to grab? you can do this calculation for cores as well as IO. this exercise will tell you whether you need to make your workflow more efficient (maybe optimizing jobs so they can share inputs, do node-local caching, tune the number of cores-per-task, etc).

  4. schedule batches of work-units onto the resource-units you have available. for instance, you could simply run 180 jobs of 100 work-units each. that could make sense if 100 units take elapsed time within the limits of your cluster. if your work-units are quick, each such job could just be a sequence of those 100 units. if your cluster allows only whole-node jobs, you'll almost certainly want to use something like GNU Parallel to run several work-units at a time.

  5. now also think about your rate of consuming resources: for instance, if your self-scheduling works, what will be the aggregate IO created by the concurrent jobs? is that achievable on your cluster? similarly, unless you have the cluster to yourself, all your jobs may not start instantly, so how does that affect your expectations?

In other words, you need to self-schedule, not just throw jobs at the cluster. You can start with a silly configuration (submit one serial job that runs each of 18k work-units one at a time). that will take forever, so if each work-unit consumes 100% of a cpu, use GNU Parallel (or even xargs!) to run several at the same time, still within one job (presumably allocating more cores for the job). and further is to split the 18k across several such jobs. the right layout depends entirely on your jobs (their resource demands and efficient configs) convolved with cluster policy (like core or job limits), and "clipped" by rate-like capacity such as IO.

Reasons:
  • Blacklisted phrase (1): how do I
  • Blacklisted phrase (1): how should I
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: markhahn

79153213

Date: 2024-11-03 17:00:43
Score: 6 🚩
Natty:
Report link

I'm facing the same issue while adding whatsapp.

Reasons:
  • Low length (1.5):
  • No code block (0.5):
  • Me too answer (2.5): I'm facing the same issue
  • Single line (0.5):
  • Low reputation (1):
Posted by: Ankish Tirpude

79153187

Date: 2024-11-03 16:49:39
Score: 3.5
Natty:
Report link

Try using TCP instead of UDP. Also ensure that u have ffmpeg installed.

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

79153174

Date: 2024-11-03 16:41:37
Score: 3
Natty:
Report link

Made a small project, i will probably change it up a little bit but at its core it has JS syntax highlighting inside CDATA: https://github.com/Hrachkata/RCM-highlighter

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