instruction
stringlengths
0
30k
Sorry, you can't ignore syntax errors (assuming you want to allow any template constructs at all). The parser can't do that. `TemplateExceptionHandler`-s only handle runtime errors, that is, errors during template execution (which is later than parsing). Also, if you could ignore syntax errors, that's certainly conf...
I've written this BASH script: ``` find ./build/html -name '*.html' \( -exec echo ../emojize_pngorsvg.py \"{}\" \> \"{}.emojized\" \&\& rm \"{}\" \&\& mv \"{}.emojized\" \"{}\" >> ../emojize_commands.sh \; \) cat ../emojize_commands.sh chmod +x ../emojize_commands.sh ../emojize_commands.sh ``` It loops over ...
|angular|google-cloud-platform|
I have already have a CNN algorithm and saved it in .h5 format but when I use this for prediction with the help of camera I am not able to predict , its just camera opens but there is no predictions and other content Here is my code , I am actually learning ML so could you please solve this problem ? H...
My frontend is a React app that I compiled using `npm run build`. Once the build folder is copied to the django project, I go in my Django virtualenv and run `python3 manage.py collectstatic` and `python3 manage.py runserver` When I run the server, I can read two errors in the console: Loading module from “ht...
im studying into a bootcamp and one of past challenge was create a Pokedex with pokeapi. i over the challenge and now im going to fix some thinks. I have a strange problem when im into details of the single pokemon. When into interpolation i put the varius propriety i dont get problm, into screen stamp it but console ...
Pokedex on angular 17
|angular|typescript|angular17|
null
|javascript|firebase-realtime-database|react-native-firebase|
null
For SpringBoot version 3 and above just add this dependency in pom.xml to run swagger <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId> <version>2.3.0</version> </dependency> But if you want to use SpringFox dependencies first you need to dow...
|ms-access|keyboard-shortcuts|
null
As of now you can't use multiple inputs through RouterChain in Python, but it's possible in NodeJs. I tried there output parsers and created mine also but in python it doesn't work the way it worked in NodeJs. You can do one thing, you can replace the strings and pass single input to the router chain, it will work ...
I just set up Docker for the first time and had the same question, that's how I came across your thread. I realized that in my case -- and this might not apply to you -- the images in question were generated by external sources, so the created dates are presumably based on their original creation date or a later modifi...
You can try this: ``` conda update conda conda update conda-build conda install -n base conda-libmamba-solver conda config --set solver libmamba ``` My answer is based on the issue raised [in Conda's issue tracker](https://github.com/conda/conda/issues/11919).
data(murders) murders_2 <- murders %>% mutate(rate = total / population * 100000) %>% mutate(idx = case_when(rate < median(rate) ~ "low", TRUE ~ "high")) %>% select(state, region, rate, idx) %>% group_by(idx) group_by(idx) is not applicable. What's the problem? I hope the results are sorted acc...
I typed all the codes well, but only the group_by function doesn't work
|r|group-by|rstudio|
null
Popovers created with the Popover API are in a separate “layer”, so they can’t be easily positioned relative to other elements in your document. [Read more][1] [1]: https://hidde.blog/positioning-anchored-popovers/
It looks like you are looking for a function wrapper, which takes the arguments as you really want them, and which has the function `F` as a local function inside of it, and calls it: ``` def zeta(S, n): # wrapper around F def F(d, n): if d == 0: return 1 return sum(F(d-1, k)/...
I have an assignment to complete using RTC-Tools. Failure to install it via pip. I need RTC-Tools for a homework assignment. Tried to follow this tutorial to get it: https://rtc-tools.readthedocs.io/en/stable/getting-started.html As it needed pip for installation, I installed pip: https://www.geeksforgeeks.org/h...
Trained ML model with the camera module is not giving predictions
|python|machine-learning|computer-vision|camera|
null
I am experiencing the following problem. When I setup an ADC with DMA for 5 channels, I get lower readings than the expected ones. We have PCBs of the same batch in 3 countries, but only the ones tested in China are failing. At all times the ADC readings read lower than the expected values for all the ADC channels, ...
Problem is that you have your **search** `ImageButton` defined inside `MainFragment` layout but you are trying to search it within activity contentView, so in this case `findViewById` returns null and code crashes on `NullPointerException`. You should move the definition of search ImageButton and the assignment of ...
I'm running selenium and when a ask to open Chrome it open and after 1 sec closes From my understanding that happens becasue chromedrive is not updated to my google version 123.0.6312.87 (oficial) (arm64) form MacOs Sonoma. How can I fix it?
Selenium ChromeDriver
|selenium-chromedriver|
null
I have installed Debian 12 on Google Cloud Compute Engine, and I used Mokutil to install a certificate, but I couldn't. mokutil --import certification.cer After rebooting, the Mokutil key management screen appears, but I cannot enter the key. Does anyone know how to solve this problem?
|google-cloud-platform|debian|google-compute-engine|
null
I have installed Debian 12 on Google Cloud Compute Engine, and I used Mokutil to install a certificate, but I couldn't. ``` mokutil --import certification.cer ``` After rebooting, the Mokutil key management screen appears, but I cannot enter the key. Does anyone know how to solve this problem?
If I have a vector A = [0, 0, 1, 1, 2, 3] and B = [11, 23, 45, 1, 4, 7] and C = [0, 2, 3] how can I fill vector D such that it has all elements from B that are the corresponding indices where the value of A matches the value in C at the same index meaning D = [11, 23, 4, 7]? I am using Thrust and I have a solution t...
How can I do a successful map when the number of elements to be mapped is not consistent in Thrust C++
|java|json|parsing|jsonparser|
Using PyCharm Community Edition 2023.3.2 with Micropython 1.4.3-2023.3 installed and enabled in PyCharm, I want to utilize the 2-core multithreading on a Raspberry Pi Pico W using the experimental "_thread" library. When I try to use a method from the module, PyCharm says there is no reference to the method, [even thou...
null
we were given a defined protocol for a project. We were asked to write server and client code using this protocol in Python. I have written server and client code, but I am encountering some errors. Can you help me correct the code? The protocols which is given to us is below. [[enter image description here](https...
I have a couple of queries (2-4) which are independent and results of which I need to concatenate once all are finished. Since I don't know about how postgresql works under the hood, I am wondering: 1. Do queries run in parallel automatically? 2. Can I force them to run in parallel if they dont do it automatical...
Concatenate result from several queries - parallelization
|postgresql|
The top rated answer does not work with the new Reflectation implementation in e.g. Java 21 that uses MethodHandles and ignores the flags value on the Field abstraction object. One solution is to use Unsafe, however with [this JEP](https://openjdk.org/jeps/8323072) Unsafe and the important `long objectFieldOffset(Fi...
With more pondering on the question, I have chosen to approach the question differently thanks to [Elliott][A]. The OP starts out this way and I quote: > Imagine two smart pointer templates, `smart_ptr` and `smart_ptr_with_abort` Forgive me for *my approach* but instead let’s imagine two `class`es that can take ...
How can Spring Boot's `PoolingHttpClientConnectionManager` be binded to Micrometer while maintaining as much of Spring Boot's auto-configuration as possible? Spring Boot auto-configures `PoolingHttpClientConnectionManager` as part of `RestTemplate` (and `RestClient`) when `httpclient5` is on the class path. As se...
How to bind Spring Boot's PoolingHttpClientConnectionManager to Micrometer's PoolingHttpClientConnectionManagerMetricsBinder
|java|spring|spring-boot|micrometer|
as I see it you have 3 options: 1. call `plt.show()` at the very end 2. use `plt.show(block=False)` 3. switch to interactive-mode (by calling `plt.ion()` at the very beginning of the script) to avoid blocking the terminal in general For interactive-mode, see: https://matplotlib.org/stable/api/_as_gen/matplotl...
Actually the issue was something to do with the classes I was using. So because I used the same class for the original row (the empty hidden one) and for the cloned rows that I filled with data, it was coming up in the search and not staying hidden. Also, in the #searchInp, I was just using tr to identify what to filte...
You have missed an argument in what you wrote. There is no method overloaded for requestLocationUpdates with just four arguments. There is, however, this [one][1]: public void requestLocationUpdates (String provider, long minTimeMs, float minDistanceM, ...
The code below uses a **background callback** (dash) to retrieve a value. [![enter image description here][1]][1] Every 3 seconds, `update_event(event, shared_value)` sets an `event` and define a `value`. In parallel, `listening_process(set_progress)` waits for the `event`. This seems to work nicely and the ...
It is a bit difficult to give you an exact solution because it strongly depends on your specific context like for instance: * how these test files are produced, * do they change frequently, * where these files are stored (cloud or other systems), * are the tests executed on CI or locally, * are the tests exec...
I have been trying do multi-level mixed effects model on the microbiome data I am working, but I keep getting the error below. What is frustrating is that, I don't encounter this error on my Windows OS which I use in the office, indicating that the problem may not be with the code. I am using a Mac OS. ``` Error i...
{"Voters":[{"Id":-1,"DisplayName":"Community"}]}
{"Voters":[{"Id":2554330,"DisplayName":"user2554330"},{"Id":22180364,"DisplayName":"Jan"},{"Id":1940850,"DisplayName":"karel"}]}
{"Voters":[{"Id":2554330,"DisplayName":"user2554330"},{"Id":22180364,"DisplayName":"Jan"},{"Id":1940850,"DisplayName":"karel"}],"SiteSpecificCloseReasonIds":[]}
I would like to ask if the tunctl command can be installed on starem9? I have been reading information related to namespace recently and want to learn more. I searched for information, but couldn't find it. I used yum -y install tunctl, but it didn't work.
Stream9,tunctl,yum -y install tunctl
|linux|
null
I had exactly the same requirement i.e. using some of the tkinter.filedialog functions from console apps or scripts rather than a GUI. All my searches for how to achieve it turned up answers involving the creation of a temporary tkinter root window and destroying it after using the dialog box. For years I used such a s...
To get the website source code via scraping: String targetPage = site; if(targetPage.contains("https://")) { } else { targetPage = "https://".concat(targetPage); } System.out.prin...
For this kind of task (multi-dimensional array), you will see a huge benefit in using `numpy`. Not only is it more efficient (when large amount of data), but also everything is more natural. With `numpy` you can get what you want in 1 line of code (`y = ...`): ``` import numpy as np x = np.array([ [0, 5, -3...
I have an error with php function chmod https://www.php.net/manual/en/function.chmod.php Any solutions? I'm running Linux Debian 13.05 with root access. Php Warning: chmod(): No such file or directory in file: index.php on line: 8 Php Warning: fopen(./access.log): Failed to open stream: Permission denied in file: in...
After this: >create directoy importDir as C:/dump you should have also ran grant read, write on directory importdir to import Otherwise, `import` user won't be able to access any file in that directory. If it (`import` user) won't *write* anything there, then `read` privilege is enough. (BTW, I w...
You can try this : ```lang-py fig.update_layout(legend_itemsizing="constant") ``` > [`itemsizing`][1] - Determines if the legend items symbols scale with their corresponding "trace" attributes or remain "constant" independent of the symbol size on the graph. In general, we set `itemsizing="constant"` if the ...
Error while creating docker image from env.yml file which has a python package that i created locally
|docker|dockerfile|miniconda|
null
There are a couple of ways to accomplish what you're asking here. One involves parsing `procfs` which doesn't require "root" privileges and the other is using the [_Taskstats_](https://www.kernel.org/doc/Documentation/accounting/taskstats.txt) (a _Netlink_ interface) which does. If you can get root privileges using...
{"Voters":[{"Id":920069,"DisplayName":"Retired Ninja"},{"Id":207421,"DisplayName":"user207421"},{"Id":12002570,"DisplayName":"user12002570"}],"SiteSpecificCloseReasonIds":[13]}
I am developing a custom DatePicker using the moment.js library in React. However, I have noticed that the value of my TextField is not updated when I select a new hour and minute in the DatePicker. ``` import clsx from "clsx"; import moment from "moment"; import React, { useCallback, useMemo } from "react"; imp...
DateTimePicker not working, textField not updating with selected hours and minutes
|javascript|reactjs|next.js|timer|momentjs|
null
I'm writing a landing page to handle redirects from AWS Marketplace, show a signup form, and if the user signs up associate a marketplace customer ID as a custom attribute in Cognito. My app uses the amplify `<Authenticator>` component to render a sign-up/login form, but it doesn't have an obvious prop where I can e...
You can use the `delete_after` parameter which specifies after how much seconds the message will be deleted after sending. ```py await ctx.send("Loading...", delete_after=3) #deleting after 3 seconds ```
It is confusing how opencv works in python. I understand that `cv2.imread()` assumes that the image is in BGR. However, when i convert the image from BGR to RGB using `cv2.cvtColor(image, cv2.COLOR_BGR2RGB)`, and the try to save the image and then read it using `PIL`, the colors are inverted. **Context:** I am build...
Python cv2 imwrite() - RGB or BGR
|python-3.x|opencv|python-imaging-library|ros|robotics|
null
I'm pretty new to Blazor myself, but this was one of the first questions that occurred to me and I think I have a better solution. The `IServiceProvider` automagically knows how to provide the [`IHostApplicationLifetime`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.hosting.ihostapplicationlifet...
|c++|cuda|thrust|
null
I'm trying to run two PSQL scripts inside a docker container, the idea is that I want to use docker healthcheck feature to wait for the database to be ready to run the scripts, the first on creates a custom DB and the second is run on that custom DB **What could be causing that the first script is run (database is c...
Only the first SQL script gets executed inside Docker Postgres container
|postgresql|docker|docker-compose|
You can use [`Array#reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce) to make a counter lookup table based on the `id` key, then use [`Array#filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) to remove any items t...
I am experiencing the following problem. When I setup an ADC with DMA for 5 channels, I get lower readings than the expected ones. We have PCBs of the same batch in 3 countries, but only the ones tested in China are failing. At all times the ADC readings read lower than the expected values for all the ADC channels, ...
I have this program: #include <stdio.h> int main(int argc, char *argv[]) { int i; for (i=0; i < argc;i++) { printf("argv[%d] = %s\n", i, argv[i]); } } I am wondering about the argument `char *argv[]`. My first thought was that this was ...
I am experiencing the following problem. When I setup an ADC with DMA for 5 channels, I get lower readings than the expected ones. We have PCBs of the same batch in 3 countries, but only the ones tested in China are failing. At all times the ADC readings read lower than the expected values for all the ADC channels, ...
I am trying to build this **Dockerfile** for **Go Application** and then deploy this to **GKE** but I'm seen this error upon pod creation. Upon describing this pod, I observed the same error.: > Error: failed to create containerd task: failed to create shim task: > OCI runtime create failed: runc create failed: un...
``` self.MapView.isMyLocationEnabled = true ``` gives the following error - how do i fix it ? import GoogleMaps class ViewController: UIViewController,CLLocationManagerDelegate { //Outlets @IBOutlet var MapView: GMSMapView! //Variables var locationManager = CLLocationMan...
Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value - MapView.isMyLocationEnabled
|swift|
null