instruction
stringlengths
0
30k
βŒ€
***I have a dashboard in **Datadog** that uses a "status" variable to filter the log messages. This works fine for the majority of the entries. There are some actual errors that do not have status=Error. They are logged as Info. When I select "Error" from the variable dropdown I would like to get the entries with sta...
Datadog Dashboard with a template variable
I'm currently in the process of developing a wake word model for my AI Assistant, and I'm facing a dilemma regarding which output I should feed into my Linear Layer. Could someone clarify the difference between the two available outputs, and provide insight into why one should consider a specific recommendation for mak...
Question 1: In the forward(self, x) method of the SpecAugment class, there's a property named self._forward that seems to behave like a function. However, it also receives an 'x' variable as if it were a function. How does this interaction work? Question 2: After passing the 'x' value to the self._forward property...
Can std::bit_cast be applied to an empty object?
|c++|language-lawyer|c++20|constexpr|bit-cast|
\-- Product class--- ``` @Id @GeneratedValue(strategy = GenerationType.SEQUENCE ) @Column (name ="id") private Long id; @Column(name ="sku") private String sku; @Column(name ="name") private String name; @Column(name ="description") private String description; @Column(name ="unit_price") private ...
I have created a spring boot application with spring data JPA, Rest ,oracle and i am getting this ORA-00933: SQL command not properly ended
|spring-boot|
null
Entity Framework Core 8 dbcontext - can't add some rows in many-to-many relationship
Testing your code it seems to work apart from to things. The first is a minor detail but `Courier` is not a color scale in Plotly. Change that to a valid color scale and that is solved. The second point is that you are adding a complete figure to another figure: [Plotly documentation][1]. There are two approaches movin...
I'm using magento 2.4.2-p1 and getting this error continously in my app as exceptions. Report ID: webapi-6605b783362ae; Message: Notice: fil e_get_contents(): file created in the system's temporary directory in /bitnami/magento/ven dor/laminas/laminas-http/src/PhpEnvironment/Request.php on line 96 Why these er...
I need to print the bounding box coordinates of a walking person in a video. Using YOLOv5 I detect the persons in the video. Each person is tracked. I need to print each person's bounding box coordinate with the frame number. Using Python how to do this. The following is the code to detect, track persons and displa...
Some HTTP request requires authentication, some requests are no, but if usage of `{ credentials: "include" }` is not the vulnerability, why not always keep `"include"`value?
Is it fine from the viewpoint of the security to set always `{ credentials: "include", }` in Fetch API of JavaScript?
|javascript|fetch-api|
|django|windows|
I attempt one javascript assignment and there is four task which I mentioned in my code. but somehow I am getting problem in my 2nd task.where I have to make function but I didn't get idea what is going wrong. ``` > Passed Test 1: successfully logged consoleStyler() variables > Failed Test 2: Not logging celebrat...
Had the same problem and this solve it. Also, I would like to mention that the build time was pretty much the same. flutter build web --web-renderer canvaskit
This is not an _actual_ answer to OP's question. That can be found in the comments and in @thisisayush's post. But here is a one-liner, demonstrating that it can be done without redefining a string variable in a loop. As strings are immutable they are not the first choice when it comes to accumulating values step by ...
There is no closed formula for this problem. You can't do much better than trying many sizes until you find the best square size, but you can do this in O(log n) time where *n* is the larger dimension in pixels of your rectangle using binary search: ```c int maximumSquareSize = (int)sqrt(rectangleWidth * rectangleH...
You can use the `getByText` matcher, or the async `findByText` matcher if the toast is shown asynchronously and you need to wait for it to appear. ```typescript test('...', async () => { //... expect(await screen.findByText('invalid answer')).toBeInTheDocument(); });
{"OriginalQuestionIds":[64263271],"Voters":[{"Id":2887218,"DisplayName":"jcalz","BindingReason":{"GoldTagBadge":"javascript"}}]}
{"OriginalQuestionIds":[18739166],"Voters":[{"Id":2943403,"DisplayName":"mickmackusa","BindingReason":{"GoldTagBadge":"php"}}]}
I'm currently following this [tutorial][1], and I'm stuck on running the program. I have a conda environment set up, with all of the necessary packages downloaded, but when I run the program, I receive the following error. ``` ModuleNotFoundError: No module named 'passlib' ``` I've run ```conda list | grep pass...
Cannot find module after importing
|python|jwt|conda|fastapi|passlib|
It doesn't look like a correct syntax. Try: ``` {{ humanize 0.123456 }} ``` Doc: https://grafana.com/docs/grafana/v9.5/alerting/fundamentals/annotation-label/variables-label-annotation/
**Promise resolution** The technical explanation is that pairs of `resolve`/`reject` functions are "one shots" in that once you call one of them, further calls to either function of the pair are ignored without error. If you resolve a promise with a promise or thenable object, Promise code internally creates a ne...
The first link requires the user to upload their objects to your server (running Node.js) and then your server uploads the objects to Google Cloud Storage. This common method ensures security as the objects can be scanned before uploading to Cloud Storage. Signed URLs are usually recommended because the client uploa...
null
I'm programming a simple 'game' that is just a block that can jump around. I placed a wall, but now the character phases through when moving to the right, but the collision works when going to the right. Every other part of this is fine. the willImpactMovingLeft function works just fine and should be a mirror of willI...
I was going through the coursera program on machine / deep learning and came through to same problem - my hp laptop with GPU would crash when running model training notebook. Running on WSL with cuda on Windows 11 Preview, and spent some time looking to find the root cause / solution to the problem. However, s...
I'm encountering an issue when attempting to append a JSON array or object into another JSON array within a PostgreSQL function. It seems that the array_append function is inserting the JSON as a string, resulting in an unexpected format in the output. Currently, I'm getting output like this: > {"{\"category_id\"...
When using the Microsoft Telnet Client, the first message isn't echoed locally, but subsequent messages are. Why is that the case? Is this documented somewhere? Are there other quirks of the Microsoft implementation? Are they documented somewhere? (This question is about "a specific programming problem", beca...
Echo behaviour of Microsoft Windows Telnet Client
|windows|client|telnet|behavior|
By default, select inputs will use the `id` attribute of the model as the `value` attribute of the `<option>` tags, and it ties various methods on the object for the contents of the option tag such as `to_label`, `name`, and `to_s`. You can change both with the `:member_value` and `:member_label` options respectivel...
I'm running a Django-powered site, and I'm seeing errors like these in my Django application's error logs: django.core.exceptions.DisallowedHost: Invalid HTTP_HOST header: 'badhost.com'. You may need to add 'badhost.com' to ALLOWED_HOSTS. I was under the impression that my nginx configuration, shown below (an...
|django|nginx|
I want to get live weather data with web scraping. I was thinking about using BeautifulSoup for this. ```html <span class="Column--precip--3JCDO"> <span class="Accessibility--visuallyHidden--H7O4p">Chance of Rain</span> 3% </span> ``` I want to get the 3% out of this container. I already managed to get d...
In the below code: package main import ( "errors" "fmt" "math" ) func area(r float64, shapeConstant float64, result *float64) error { if r <= 0 { return errors.New("r must be positive") } *result = shapeConstant * r * r return nil }...
const declaration - How to evaluate expressions at compile time?
|go|constants|
I am unable to build a apllication. Here is my docker file FROM docker.io/node:16-alpine AS builder WORKDIR /usr/app COPY ./ /usr/app RUN npm install RUN npm run build Error message npm ERR! path /usr/app npm ERR! command failed npm ERR! signal SIGKILL npm ERR! command sh -c -- ng build
Docker File issue with node js application
|docker|pipeline|
null
You can use the following if you want the action to happen for a certain range (10...20): <!-- begin snippet:js console:true --> <!-- language:lang-html --> <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script> <input type="range" id="range-slider" min="0" max="50" value="5" step="1" /> <span class...
I'm unfamiliar with the intricacies of LWJGL (or even your program) but I think the crux of the algorithm is something like: ```glsl #extension GL_EXT_gpu_shader4 : enable void rebuildLightmap() { int[] storage = new int[2]; for(int z=0; z<SIZE; z++) { for(int x=0;x<SIZE;x++) { in...
Issue with BBCode image tag on React
|reactjs|typescript|bbcode|
I am trying to setup a reverse proxy along with the parameter for my backend server. Here is my proxy config: location /vid { proxy_pass https://10.0.0.10:8443/video.html; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For...
Nginx reverse proxy with query parameters not working
|nginx|reverse-proxy|
Since [Firebase Hosting's configuration](https://firebase.google.com/docs/hosting/full-config) does not automatically differentiate between files and directories in the way traditional servers might, you could try and manually specify redirect rules for your known directory paths. But: - each directory would n...
Had the same problem and this solve it. Also, I would like to mention that the build time was pretty much the same. ``` flutter build web --web-renderer canvaskit ```
My system has two user providers. One is an AdminUser and the other is a regular User. I can't use roles to check access.Access should be determined by the user's instance. I defined two different firewalls and settings. This helps to demarcate the entrance. But now an ordinary authorized user can open the main pa...
How to protect routes from one provider, but allow another in Symfony 6?
|php|symfony6|symfony-security|
null
local Backpack = game:GetService("ReplicatedStorage"):Waitforchild("Backpack") local Player = game:GetService("Players").localplayer Player.Character.Respawned:Connect(function(Character) local clone = Backpack:clone(Character:Waitforchild("Torso")) end
I learned that Python class attributes are like static data members in C++. However, I got confused after trying the following code: >>> class Foo: ... a=1 ... >>> f1=Foo(); >>> f2=Foo() >>> f1.a 1 >>> f1.a=5 >>> f1.a 5 >>> f2.a 1 Shouldn't f2.a also e...
Class and instance attributes
Scraping information in a span located under nested span
|python|web-scraping|beautifulsoup|
I'm getting this error when trying to read an Env Variable from the .env file. Things to know: my .env is in the root directory, the variable is prefixed by **VITE_**, and I'm trying to import it doing ```const apiKey = import.meta.env.VITE_YOUTUBE_API_KEY;``` I've scoured the web, but most of the answers were e...
|python|django|pip|pipenv|
It works for me with this modification of `dnn_pred`: ``` dnn_pred <- function(model, data, ...) { predict(model, newdata=as.h2o(data), ...) |> as.data.frame() } p <- predict(logo, model=dl_model, fun=dnn_pred) plot(p) ``` [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/9...
I'm interested in using UUIDs as primary keys in an intermediate table. I'm aware that adding `use Illuminate\Database\Eloquent\Concerns\HasUuids;` and `use HasUuids;` to a model can achieve this. However, since I don't have or need a model for my intermediate table, I'm uncertain if it's possible to automatically crea...
Implementing UUID as primary key in Laravel intermediate table
Just set the major unit to 1 so the axis counts 1 - 8 by 1s. Add to the x-axis setting ``` chart.set_x_axis({'name': 'X Axis'}) ``` ``` chart.set_x_axis({ 'name': 'X Axis', 'major_unit': 1, # set major unit to 1 }) ``` [![Chart with major unit set to 1][1]][1] <br> You could also add a l...
You may try- =TOROW(INDEX(SPLIT(INDEX(FILTER($A$2:$A$7;BYROW($B$2:$M$7;LAMBDA(rw;INDEX(OR(rw=H13)))))&"|"& FILTER($B$1:$M$1;BYCOL($B$2:$M$7;LAMBDA(col;INDEX(OR(col=H13))))));"|"));3) [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/8GTJn.png
{"Voters":[{"Id":5514747,"DisplayName":"Harun24hr"}]}
Invoking Local API from a Laravel controller within the same Laravel application
Ruby newbtard here... I have an csv file (logevents.csv) that has a "message" column. The "message" column contains rows of json data. Using Ruby, I'd like to convert the json data's name:value pairs to columnname:rowvalue in a 2nd csv file. Here's the 1st row of the csv file: message "{""version"":""0"",""id...
You should join the *subject* collection with the *edcontentmaster* via `$lookup`. The `pipeline` in the `$lookup` stage should be your existing query. In the last stage, convert the `topicDetails` to an object by getting the first element. ``` db.subject.aggregate([ { $match: { stageid: "5", ...
I am trying to build a simple command line tool and package it with `setup.py`. Here's my directory structure. ``` β”œβ”€β”€ s3_md5 β”‚ β”œβ”€β”€ __init__.py β”‚ β”œβ”€β”€ cmd.py β”‚ └── src β”‚ β”œβ”€β”€ __init__.py β”‚ β”œβ”€β”€ cli.py β”‚ β”œβ”€β”€ logger.py β”‚ β”œβ”€β”€ s3_file.py β”‚ └── s3_md5.py β”œβ”€β”€ setup.py └── test ...
Python ModuleNotFoundError for command line tools built with setup.py
|python|python-3.x|python-import|python-module|
I am writing to seek guidance regarding the conversion of my Kivymd main.py file to an APK file. Although I am new to Kivymd, I have managed to create a testing mobile app with the help of online resources. However, when attempting to convert the main.py file to an APK file using Google Colab notebook, I encountered an...
i'm currently using JPA buddy in my spring boot application to generate JPA Entities from my sakila database. But when i use this feature JPA buddy alway listed all of database tables and views including system tables and views[enter image description here](https://i.stack.imgur.com/mmAQq.png) How can i make JPA buddy...
JPA buddy error when generating JPA Entities from DB
|spring-boot|jpa-buddy|
null
I have a grid of images in my app which will open a scroll view of the images if one is clicked. But no matter what image I click, the scroll view will always open on image 1 with 2,3,4,5,6,7,8,9 below it. I want to make it so if a user clicks on image 6 it will open the scroll view on image 6 with images 1,2,3,4,5 abo...
How to make a scroll view of 9 images in a forEach loop open on image 6 if image 6 is clicked on from a grid?
|swift|swiftui|
In "@angular/material": "16.2.12", you need to use mdc format. .mat-checkbox-inner-container does not appear to be used anymore. Use this instead .mdc-checkbox { margin: 0px 8px auto !important; }
i'm currently using JPA buddy in my spring boot application to generate JPA Entities from my sakila database. But when i use this feature JPA buddy alway listed all of database tables and views including system tables and views ([here is what on my JPA buddy reverse engineering show])(https://i.stack.imgur.com/mmAQq.p...
The previous solutions here didn't work properly for me. The footnotes did not automatically number themselves with Yannis's answer. The solution was to add a new FootnotReferenceMark to the footnote in order to have automatically numbered references in both the text and the footnote. // Create and append footno...
|php|laravel|eloquent|uuid|
Here is the specification for insert: https://en.cppreference.com/w/cpp/container/map/insert. Particularly, you need to provide a pair representing the key and value (for an `std::map`, value_type is `std::pair<const Key, T>`). Your example of `my_map.insert("TEST", make_pair<string,int>("ONE",2));` don't work sinc...
I write code for the ESP32 microcontroller. I set up a class named "dmhWebServer". This is the call to initiate my classes: An object of the dmhFS class is created and I give it to the constructor of the dmhWebServer class by reference. For my error see the last code block that I posted. The other code block c...
convert csv file with json data inside to a column, rows table in 2nd csv file
|json|ruby|csv|
null
I'm encountering an issue with Zustand where updated values are not retrieved when I try to access them. Specifically, I'm setting the totalPrice value as an initial value in Zustand, and after updating it, when I try to retrieve the value again, the initial value is displayed first, followed by the updated value. This...
Zustand doesn't retrieve updated values, displays initial values instead