instruction
stringlengths
0
30k
null
When using Poetry to create a new project with `poetry new project-name`, it consistently defaults to Python 3.10, despite having Python 3.12 installed on my Ubuntu system. Although I managed to configure Python's global version to 3.12, this adjustment occurred after installing Poetry. Consequently, Poetry persists in...
I am trying to display my post on my home page. But i get an error "NameError in Home#index". Here is the code - i am new to coding so the code my look wierd. I have tried to use Chatgpt and nothing seem to help. Does anyone have any suggestions? before_action :set_stories Home Controller: def...
Assume there is **a third type** called `Car`; ```rust pub struct Car { name: String, price: i64, } ``` I need to implement some custom method, such as get the car category or validate, so I create a new type which wraps the `Car`. ```rust pub struct NewCar(Car); impl NewCar{ fn category(&self) ...
Helps: rust wrap a third type to implement custom method , but allow to access it just like the origin one, include move fields
|rust|wrapper|
I’m encountering an issue when performing quantile regression in R. The process works fine for the lower percentiles, but I do not receive any output when attempting to run it for the 75th percentile. Instead, I receive the error message that singular matrix is backsolve. This suggests a problem with a singular matrix ...
In my case, google-services.json file "client" -> "oauth_client" -> has no details. "oauth_client": [ { } ], Therefore I download google-services.json file from my Firebase Project Settings and replace the file in my project.
I have a .cdf file which have variables `Epoch, FEDU and L`. I want to plot a spectrogram having `Epoch` (which represents time) on x axis and varying `L` and `FEDU`. The data I used is located at [text](https://rbsp-ect.newmexicoconsortium.org/data_pub/rbspa/rept/level3/pitchangle/2014/). Also I tried plotting for 3 d...
Im trying to give white color to the font titles of the columns in my pivot table. [![enter image description here](https://i.stack.imgur.com/NCkYP.png)](https://i.stack.imgur.com/NCkYP.png) I tried doing it like this: ``` ' Format column field headers For Each pvtField In pvtTable.ColumnFields With p...
Trying to give color to column field headers in pivot table with vba
|excel|vba|
null
The problem is that when you enter the anonymous function passed to *$watch*, the context changes and *"this"* refers to the *window object* (you can check this thing by adding a `console.log(this);` in the function). To get around the problem we can use an arrow function which does not have its own context, so *"th...
when i try to log in to my WordPress website through /wp-admin, or /wp-login than after correct login and password details, it will redirect to homepage rather than to dashboard. I have tried the followings: 1- Disable all plugins. 2-Changed theme from generatepress to default wp theme. 3-restore .htaccess file to ...
Wordpress redirect to homepage after successfully logged in
|wordpress|
null
The behavior here is dictated by the JMS specification. Simply put, `javax.jms.Connection.start()` applies to consumers not producers. It tells the broker to begin delivering messages to the consumers associated with the connection. The [JavaDoc for `Connection`][1] says this: > It is typical to leave the connection...
Since JDK 15 I believe the ClassDataSharing option has been available. JDK 17 is the first version it was officially enabled. If you encounter this warning you simply need to add -Xshare:off to disable the unavailable feature. The default value is -Xshare:auto which tries to use CDS but fails with a warning. With...
I'm trying to make a calculator in shiny where the user can edit one column and the data table will update the calculations in the other columns that uses the user input within the DT, the user input in the side panel, and/or the other calculated values in the other columns. Here is what I have so far. I want the ...
null
Forking vs Cloning in GitHub
|github|fork|clone|
null
This error occurs due to dependencies issue. **Solution:** **step1:** uninstall these3 libraries pip uninstall opencv-contrib-python pip uninstall opencv-contrib-python-headless pip uninstall opencv-python **step2:**Install opencv pip install opencv-python **Thanks me later :)**
Use and installable trigger and edit sheet name. I assumed one header row function onMyEdit(e) { //e.source.toast('Entry'); const sh = e.range.getSheet(); if(sh.getName() == "Sheet Name" && e.range.columnStart > 1 && e.range.columnStart < 5 && e.range.rowStart > 1) { //e.source.toa...
As I mentioned in the comments on your question, I think the only way to do this effectively (that is, in a way that isn't easy for someone to re-enable the `kill` command) is to build a custom `bash` binary with the `kill` command disabled. Here's one option for that; we replace the `kill` builtin with a modified c...
I have two dataframe. The df1 has 12000 entries of different tasks w.r.t ' 3 tower' with 5 different dates. The df2 has 100 entries of associate names w.r.t that '3 tower''. I have to allocate 100 associate names for the task 12000 task, upto limit 11 task per associate. Please suggest. I have tried PD.merge but i...
There are a lot of solutions you could implement, basing on my experience, **working with Transform's Tags is way easier** than anything else. What I would do is create a **Player tag** and *assign it to the* **Player prefab** that you mentioned. (**But I just saw you did it so you are already good to go for the ne...
The standard (even as early as [ECMA-262 1st Ed., §15.3.2.1](https://ecma-international.org/wp-content/uploads/ECMA-262_1st_edition_june_1997.pdf), and all later ones too) specifies that invoking the `Function` constructor will only parse and compile the code it is given, not execute it; so on paper, and in modern, mai...
You can use string_split with the line feed character to separate your text into lines, and then use substring to separate your values within those lines, using charindex to identify their positions. declare @text varchar(max) = '0: {answer: "yes↵", question: "Is the keyboard separate from the screen?", st...
null
null
null
null
null
Thank you for reaching out My name is Conar and I'm with DocuSign Developer Support. We are investigating and will update you as soon as possible. Let us know if you need anything else in the meantime. Best regards, Conar | DocuSign Developer Support
I've made [something similar in concept][1] so I might have an idea on what went wrong. You need to transfer property values from the old player to the new one. That way it'll seem like `player_2` picks up exactly where `player_1` left off. Something like this: ``` extends Node3D @onready var player_1 = $"../...
The same error here, after a lot of hours I found the problem. In the sylius_resource.resources declaration you must use "sylius.product_image" instead of "app.product_image". Before: sylius_resource: resources: app.product_image: classes: model: ...
|python|py-shiny|
I'm using MediaRecorder to record audio files, I have set up the necessary code to do, the code works fine until I press stop recording right after an exception is thrown crashing the application don't know exactly what is the issue! I'd be happy to get some help from you guys and thank you ``` override fun ...
{"Voters":[{"Id":8422953,"DisplayName":"braX"},{"Id":8162520,"DisplayName":"Mayukh Bhattacharya"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}]}
|php|mysql|mysqli|out-of-memory|
The following works for me. I'm using Windows 10 64-bit and Python 3. ``` import os import ctypes as ct import ctypes.wintypes as w drive = 'c:\\' folder = 'test' image = 'midi turmes.png' image_path = os.path.join(drive, folder, image) SPI_SETDESKWALLPAPER = 0x0014 SPIF_UPDATEINIFILE = 0x0001 SPIF_...
I created a Flutter project on project idx, everything works fine and runs on the web, but the problem is that the Android emulator doesn't work and there are no obvious problems. ``` 2024-03-30T04:33:43Z [android] : Launching lib/main.dart on Android SDK built for x86 in debug mode... 2024-03-30T04:33:43Z [andr...
Android emulator dosn't work in Project idx With flutter workspace
|android|flutter|idx|
null
{"OriginalQuestionIds":[30812919],"Voters":[{"Id":285587,"DisplayName":"Your Common Sense","BindingReason":{"GoldTagBadge":"mysqli"}}]}
How do I get a caller's HTML "Label" surrounding my Custom Element to bubble its "click" events to my shadow root? Is there not something in the shadowRoot that I can listen for Click events for my LightDOM label? I believe this [clicking labels][1] answer comes close but I am inheriting from HTMLElement. In the ...
TASK allocation to empoyee
|python|pandas|
null
I am unfamiliar with how to convert Json objects to Dataframe. I am hoping to get some ideas of more efficient ways to convert Json object to data frame. As I loop through 2 rows of my input_df, I will get 2 json objects when I print(suggestion_string) as follow: [![enter image description here](https://i.stack.i...
Converting Json object to Dataframe
|python|json|pandas|
null
## Context After quite some experimenting, I automated generating a nested Sphinx structure of all python source and test files including their classes and functions (which is the main difference with the module overview): ``` :ref:`modindex` ``` So I thought I'd share it here, it implements the structure given i...
This error occurs due to dependencies issue. **Solution:**. **step1:** uninstall these3 libraries. Run these commands. pip uninstall opencv-contrib-python pip uninstall opencv-contrib-python-headless pip uninstall opencv-python **step2:**Install opencv pip install opencv-python **Thanks me later :)**
I'm trying to make a prediction based on training data. I am using 10 training data with their correct input and outputs, the training results are 80% accurate. After training the model I use an input value and the result does not match at all. Note: I do the training with these entry and exit numbers, and it ...
prediction model with python tensorflow and keras, gives error when predicting
|python|tensorflow|keras|prediction|
null
(I'm brand-new to kid3, and I'm using the GUI version rather than CLI. ) I'm trying to finally organize my mp3 collection, most of which have an artist and title, but no album name. Since I don't know off the top of my head what album any particular track is from, I've been using the Import from Discogs function of ...
It sounds like you have 2 completely different systems for these 2 websites, as in, what you're describing is that each website has its own account storage and logging mechanisms and the only common thing is that the account's information is the same. To have a common/shared SSO session you need a centralized Identi...
`vector_of_ts.emplace_back(std::move(*t))` will let you move the T from the unique_ptr into the vector: [example](https://godbolt.org/z/1qdzznz7h) ``` #include <memory> #include <vector> struct T { // Can't be copied T() = default; T(const T&) = delete; T(T&&) = default; T &operator=(c...
When you call it like this: s += dfs(n + 1) The initial value of `s` before the increment is taken _before_ it has been modified in the recursive call, so the assignment ends up overwriting whatever change was made in the recursive call. But when you call it like this: i = dfs(n + 1) s += i ...
I am using GORM to connect to mysql DB and have a schema with many to many relationship between two tables. When I try to save the entity where the relationship is defined, it also tries to insert the other entity which is part of the association. My model: ``` type Language struct { gorm.Model Name string...
I use springboot project; version:[enter image description here](https://i.stack.imgur.com/IBZPv.png)[enter image description here](https://i.stack.imgur.com/8gKto.png) rabbitmq config:[enter image description here](https://i.stack.imgur.com/OhkDY.png) error detail: [enter image description here](https://i.stack....
When sending message getting Exception: org.springframework.amqp.AmqpIOException: java.io.IOException
|java|rabbitmq|amqp|
null
Check your Angular veersion and make sure it is up-to-date. In your `angular.json` ... `buildTarget`: "serve": { "builder": "@angular-devkit/build-angular:dev-server", "configurations": { "production": { "buildTarget": "Flight:build:production" }, "developm...
{"Voters":[{"Id":992484,"DisplayName":"MadProgrammer"},{"Id":286934,"DisplayName":"Progman"},{"Id":522444,"DisplayName":"Hovercraft Full Of Eels"}],"SiteSpecificCloseReasonIds":[13]}
I have a slightly different need. My need is to be taken either one or the other in a balance, by not considering the default one as a priority. I notice while having a similar mapping like yours map $http_x_server_select $pool { default "https://prod"; staging "http://staging"; } it is always...
Using SOAP with WSDL in python with the suds-py3 library: Why doesn't it show me anything when I use the following code? What am I doing wrong? ```lang-python3 from suds.client import Client url = "https://appweb.dane.gov.co/sipsaWS/SrvSipsaUpraBeanService?xsd=1" client = Client(url) results = client pri...
Using SOAP with WSDL in python with the suds-py3 library: Why doesn't it show me anything when I use the following code?
|python-3.x|soap|wsdl|suds|
null
I use springboot project; version:[enter image description here](https://i.stack.imgur.com/IBZPv.png)[enter image description here](https://i.stack.imgur.com/8gKto.png) rabbitmq config:[enter image description here](https://i.stack.imgur.com/OhkDY.png) error detail: 2024-03-30 09:18:32.715 org.springframework.a...
Actually you can use pnpm built in functionality to install dependency with peers. [Related question](https://stackoverflow.com/questions/72468635/pnpm-peer-dependencies-auto-install) Execute this in your project directory. ```sh pnpm config set auto-install-peers true --location project ``` It will creat...
MediaRecorder.stop() throwing illegalException
From [YAML schema - variables definition](https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/variables?view=azure-pipelines): The variables keyword uses two syntax forms: variable list and mapping (string dictionary). In mapping syntax, all keys are variable names and their values are variable v...
XLA is a domain-specific compiler for linear algebra that optimizes TensorFlow computations. Use tag [tag:xla-compiler] if your question is about XLA since it was moved from TensorFlow to the OpenXLA project.
null
It miss an answer to this question, **"How to duplicate selection of code"** Similar to Sublime's <kbd>cmd</kbd>/<kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>d</kbd> or Jetbrains' <kbd>cmd</kbd>/<kbd>ctrl</kbd>+<kbd>d</kbd> behaviour. Install plugin **Duplicate selection or line** from VS Code Marketplace [![Duplicate s...
null
Solution in [TXR](https://nongnu.org/txr), **almost** precisely matching the required output format: ``` $ txr extract4.txr even-longer-data AAA retrieveA BBB retrieveB CCC retrieveD EEE retrieveE FFFFF retrieveF GGGGGG getG HHHHHHH getH determineI IIIII callI ``` What is not exactly cl...
How to listen for LightDOM Label "FOR=" events via ShadowDOM Custom Element
|javascript|checkbox|dom-events|shadow-dom|custom-element|
I'm trying to create a "toggle" (don't know if the name is right) from bootstrap 4. I couldn't find any clue on the documentation about how to do this. [![Toggle button][1]][1] I've tried to create a "radio button group", but i'm having issues with this method and still see the radio circles on my buttons. Is...
This is only required on HTC devices to support their "quickboot" feature <action android:name="android.intent.action.QUICKBOOT_POWERON" /> Here is the full code from official code https://android.googlesource.com/platform/packages/apps/StorageManager/+/refs/tags/android-7.1.2_r8/AndroidManifest.xml ...
PHP mysqli allowed memory size
{"Voters":[{"Id":15261315,"DisplayName":"Chris"},{"Id":1978251,"DisplayName":"engineersmnky"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}],"SiteSpecificCloseReasonIds":[13]}
{"Voters":[{"Id":2001654,"DisplayName":"musicamante"},{"Id":9484913,"DisplayName":"Parisa.H.R"},{"Id":4581301,"DisplayName":"user4581301"}],"SiteSpecificCloseReasonIds":[13]}
{"Voters":[{"Id":9597706,"DisplayName":"Richard Heap"},{"Id":2756409,"DisplayName":"TylerH"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}]}
How to create below design in css
It's because `do_x if x else do_y` is an expression. You are normally expected to capture the result of an expression. Note that using `print()` isn't important. Any function you call could return one or more values. Using the ternary operator in this situation is only something you should do if writing code for an "ob...
{"Voters":[{"Id":2422778,"DisplayName":"Mike Szyndel"},{"Id":466862,"DisplayName":"Mark Rotteveel"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}],"SiteSpecificCloseReasonIds":[13]}