instruction
stringlengths
0
30k
|css|opacity|shadow|css-mask|opacitymask|
null
In a comment you wrote: > i want the button to form in a square sort of list and they are all the same size, I was going to attempt to make it so when the button reaches the last visible grid in the rows, it would switch to the next column and then when the square is formed it would start going down a row again I...
null
```html <!DOCTYPE html> <html lang="ru"> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="styles.css"> </head> <body> <div class="root"> <div class="conteiner"> <img src="https://b2b.ostrovok.ru/wp-content/uploads/2022/01/1-2.jpg" class...
why <div> container does not limit the size of the element within it?
|html|css|
null
My code bellow is supposed to take take the average of all numbers entered in a user defined array. Everything is working fine except I need to delete nums at the end of the program. When I run the program it crashes/aborts with "heap corruption detected." If I comment out the delete statement it works and this does no...
Deleting dynamic array causing an abort error
|c++|arrays|
null
I've completed the assignment as mentioned in the solutions. Here's the repo I'm trying to test on my local machine: https://github.com/xdp-project/xdp-tutorial/blob/master/packet01-parsing/README.org Here's my C code: ```c /* SPDX-License-Identifier: GPL-2.0 */ #include <stddef.h> #include <linux/bpf.h> #i...
I am using ModelMapper to map JAXB Beans to my domain beans. The schema which is used to generate the JAXB Beans contains `xs:IDREF` elements, which are represented as `List<JAXBElement<Object>>` in the JAXB Bean. But ModelMapper doesn't understand how to map the source bean to my target bean - rather it maps th...
The advantage of approach 1 over approach 3 is readability and less mental anguish. If you were to ask "Hey, where is the code for Broadcast Message handled?" The answer for approach 1 would be: "It's in the `BroadcastMessageCommand` class."; approach 3 is: "It's somewhere in this massive single function called `Han...
The error message is coming from this line: writeResult.set({timestamp: timestamp}); It's saying that the value of `timestamp` is `undefined`, which is not valid in Firestore. In fact, `timestamp` is always going to be undefined since you're not accessing document fields correctly. To get an object ...
What is Win32 x86-64 CONTEXT::VectorRegister for?
|winapi|x86-64|
You could `paste` strings out of the diseases, e.g. `'121'` for patient 2. Then `grepl` in a temporary `.k` column for patterns `12|132` and `subset`. Use `ave` to do group by `ID`. > df |> + transform(.k=ave(Disease, ID, FUN=\(x) grepl('12|132', paste(x, collapse='')))) |> + subset(.k == 1, sele...
null
null
null
null
I've deployed my first Flask app on pythonanywhere.com. It's the perfect environment for me. My first few attempts weren't too successful so the error logs are full of helpful hints. Now that my app is up, though, I'd like to clear the logs so that I won't have to sift through irrelevant information the next time erros...
How to clear logs on pythonanywhere?
|pythonanywhere|
The objective of my code is to plot soil pressure from data extracted from another software. The output of this other software gives me the value of this pressure for each of the joints of a shell that must be interpolated to present the pressure throughout this shell. As each shell can have different shapes and the se...
No. There is nothing similar to `DeepCollectionEquality` in the platform libraries. That's why it's in `package:collection`, which is intended to have functionality that is not in `dart:collection`, and which doesn't *need* to be in the platform libraries. You can write your own code. It's easiest if you assume th...
The following is a typical string response from a CAN vehicle for Pid 0x0C rpm "7E804410C0AF4". This response shows that the command 410C has been sent to the Ecu of the vehicle and the Ecu has responded with the above string. The last two bytes contain the info required for the calculation of rpm. They are 0A F...
|swift|firebase|google-cloud-firestore|
null
To fix this error, you should update `AppServiceProvider.php`. use Illuminate\Support\Facades\Schema; public function boot(): void { Schema::defaultStringLength(191); }
when I execute this code, no question prompted as a result of the input command. putting the code in a file then typing in Visual Studio Code python filename.py no output from the code, just getting a new line on the console def main(): x = int(input("what is x? ")) if is_even(x): print (...
Python code not executing when nesting functions
|python|
null
{"Voters":[{"Id":12217182,"DisplayName":"TheLaughingMan"}],"DeleteType":1}
I prepared GORM methods in Database.go and I want to keep them generic. The reason I do this is to avoid duplicate codes. I have prepared frequently used operations as below. package database import ( "context" "fmt" "go-microservice/internal/constants" "gorm.io/driver/postgres...
It turns out that derivatives from the request on the server side shouldn't be in a try/catch statement. Example: This was my original code. ```ts export const GET = async (request: Request) => { try { const authHeader = request.headers.get("Authorization"); if (!authHeader) throw new Error("Inva...
|redux-toolkit|rtk-query|
> Even though there will be a port but how UDP module can send it to the > client who originally sent the request because it would have closed > the socket bound to that port? Or it will not? `recvfrom()` requires a bound socket, a socket that has an address and port associated with it, it will return any data add...
I'm using RevenueCat for purchases. After making a payment with Sandbox, the Pro version within my mobile application gets canceled a few minutes later. What could be the reason for this? Settings -> AppStore -> Sandbox Account -> Manage -> Allow purchases and renewals (active) -> Renewal Rate set to 3 minutes. As see...
I have a lwc component(Salesforce) where we are showing a table and approx 300 rows, the data from backend comes quickly at once.. I have added pagination,when doing next and previous , the rows are taking too much time to load, Now how do i even put spinner , since the data is already loaded and assignment of new set ...
UI Component(Table Rows) Taking Too Much too in LWC
|salesforce|salesforce-lightning|lwc|
null
|assembly|x86-64|cpu-registers|
Apologies in advance, this is probably a trivial question, but I don't even know what to search for an answer. I want to read files that might or might not be zip compressed. Depending on the file extension, I need to either create a `Reader` from a simple `io::File` or from a `BGZFReader<File>`. `Reader` will be happy...
How can I assign a value to a variable where the type of a generic trait is not known until runtime?
|rust|traits|
> Parse error: syntax error, unexpected variable "$servername" in C:\xampp\htdocs\crud\connection.php on line 3 I met this line when I run my PHP code. Any help please? I was creating a form to link with a database using PHP. The connection was supposed to be successful per the video I followed but this was my en...
|php|xampp|
null
You're correct that `subcategory` on the `Product` model is nullable, but `subcategoryId` (the field right above it) is not. As far as Prisma is concerned, you **need** to specify the `subcategoryId` field to create a new `Product`. Just make `subcategoryId` nullable and you should be good to go! ``` subcategoryId ...
I am trying to plot a scatterplot for the data frame(posted below). I want to represent the scatterplot with the different stages being shown as different markers(circle,square etc) and different products being shown as different colors(red,blue etc). so far i have done that but i have a hard time showing a legend that...
I've been wondering whether there might be a **correlation** between the "**distance**" among neural network weights and their **performance**. To elaborate, consider the following scenario: We have three models, M1, M2, and M3, all with identical structures, each trained on its respective dataset, D1, D2, and D...
Have you tested this request on postman/insomnia? With the request body you provided here I was able to create the ticket. My guess is there is some issue on the JS code and the email variable is null/blank/undefined when making the request.
Your `Money` and `number` types are completely equivalent. A [type alias](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-aliases) doesn't create a new type, it just gives another name to an existing type. That lets *you* use `Money` wherever you want. But TypeScript isn't obligated to use that...
Automatic renewal subscription automatically cancels itself after a few minutes. RevenueCat
|swiftui|app-store-connect|revenuecat|
I am using [a package](https://github.com/kylekatarnls/business-day) to deal with business days in Laravel. The documentation asks to register the holidays in some global bootstrap place of the app. I have chosen the `AppServiceProvider` `boot` method to do it. I have additional dates in the database that I want to add...
Cache::remember() failure in AppServiceProvider during package discovery
Another way you can try using is a label that essentially works as a break; command but for do-while loops. ` bool isExit = false; do { Console.Write("Enter the username(Type 'exit' to go back to menu): "); string username = Console.ReadLine(); if (username.ToLower() == "exit") {...
when inserting this code's executable: ``` section .data .section .text .globl _start _start: movl $1,%eax mov $27,%ebx int $0x80 ``` To ```gdb``` and running it - it outputs: ```[Inferior 1 (process 13321) exited with code 033]``` But that's of course not the right status code, but ```27```......
When I try and open the pickle file, this error appears: ``` TypeError: 'str' object cannot be interpreted as an integer with open('rlog.pkl', 'rb') as handle: ^^^^^^^^^^^^^^^^^^^^^^ ``` Here is the code: ``` def coinsv_thread(g): #try: if True: import pickle import we...
I want to deploy my portfolio on Vercel, but I'm getting this error: ~~~none Running build in Washington, D.C., USA (East) – iad1 Skipping build cache, deployment was triggered without cache. Cloning completed: 909.067ms Running "vercel build" Vercel CLI 33.6.2 Error: Unable to find any supported Pytho...
I've been trying to fix the error in code cs0103, where the 'faceRect' does not exist in the current context, however when checking my code I don't know where I'm wrong, I'm new to both dlibdotnet and emgu.cv Here are the 3 functions working together: FrameGrabber: ``` void FrameGrabber(object sender, Event...
|objective-c|substring|nsstring|
Well, you're trying to inflate a view via a **layout** instead of **id**. If you're inflating, then your toolbar needs to be an object that exists inside another layout for it to be inflated. It needs to be an actual object that exists somewhere for it to be inflated dynamically. For example, if you're using a dial...
I am making an app, and I need hyperlinks in it, such as some text saying "Tap me", and when you tap it it takes you to a pre-specified link. Sounded simple, so I looked online and everyone says to use the `url_launcher` package, however this doesn't work for me. I tried all I could and it still doesn't work. Here ...
Why is URL_Launcher for Flutter not working?
|flutter|dart|
|excel|vba|azure|
How to deny direct access to wp-cron.php to avoid attacks?
|wordpress|security|
null
when I execute this code, no question prompted as a result of the input command. putting the code in a file then typing in Visual Studio Code python `filename.py` no output from the code, just getting a new line on the console ``` def main(): x = int(input("what is x? ")) if is_even(x): pr...
I am new to Pandas and I am trying to better understand the use of the numeric_only parameter. As you can see in the screenshot below, the goal is to pull the median number of video shares by the author's ban status. Why do I need to specify "numeric_only = True" within the median function. Why do the results pull ...
Understanding numeric_only boolean parameter in Pandas
|python|pandas|numpy|data-analysis|
null
In your situation, how about the following formula? ### Sample formula: ``` =IMPORTXML("https://www.tankathon.com/mock_draft","//a[contains(@href,'players')]") ``` In this modification, `//a[@href/contains("players")]` is modified to `//a[contains(@href,'players')]`. ### Testing: When this formula is u...
[I do **not** desire the review of any of the code in this question. Code present is purely for illustration purposes to demonstrate what I have come up with on my own. I am looking for a **performance optimization** pertaining to one **specific aspect** of an **algorithm**. Since potential improvements will be small, ...
I noticed that http services that receive and return JSON are called 'Web Api/Web Service' in many articles/book/documentation etc. But isn't the Web (World Wide Web) about websites, html and web browsers? To simply define, browsers retrieve HTML files from a server, renders and present them to end users. For ex...
I am working on an expect program to ssh into a server and run a few commands. I have a rule which goes ``` -re ".*└─.*" { send "echo Done backing up!\n" send "echo Thanks! \n" send "exit \n" exp_continue } ``` (the ascii box characters are to match the ZSH prompt, u...
Expect: Any way to match a specific rule only once?
|automation|zsh|expect|
null
I have console application in .NET Core. I have created profiles in `launchSettings.json` as shown here: ``` { "profiles": { "Console.Dev": { "commandName": "Project", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "DEV" } }, "Console.UAT": { "commandName"...
null
Coding a two-dimensional, dynamically allocated array of `int` is a non-trivial task. If you use a _double pointer_, there are significant memory allocation details. In particular, you need to check every allocation attempt, and, if any one fails, back out of the ones that didn't fail, without leaking memory. And, fina...
Solution in [TXR](https://nongnu.org/txr), 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 ``` Code: ``` @(collect) @/.*(publ...
I added some layers to pretrained MobileNet model and trained it. Then **saved** model with ``` model.save('model.keras') ``` Also tried this just in case: ``` keras.saving.save_model(model, 'model.keras') ``` But when i **load** the model I get the **error**: ``` keras.models.load_model('model.keras') ...
change interaction.reply to message.reply and see if it still create an error
For more details on the implementation specifics of this mechanism, you can check out the "Redis Ack Emulation" part of the [redis kombu transport](https://github.com/celery/kombu/blob/main/kombu/transport/redis.py#L347-L381). From this code, we can see that celery implements ack emulation in Redis by adding the me...
So this is apparently a [well-known issue](https://www.reddit.com/r/rust/comments/16reqd6/hot_take_phantomdata_should_not_be_necessary/), but the explanations have been above my understanding. So just to be concrete, here is the code that I wish would work: ``` trait Data<T> { fn get(&self) -> T; } struct...
Why is phantom data for non-reference types not auto inferred?
|rust|
null
I have successfully built Android 8.1 from the [sources provided for the Orange Pi 4 LTS][1]. According to the Orange Pi 4 LTS User Manual (downloaded from the previous link)--on the final page 399--"…update.img is the Android firmware that can be burned and run". But when I follow the instructions in the [Orange Pi 4 ...