instruction
stringlengths
0
30k
|reactjs|node.js|docker|next.js|
To display the legend outside of the plot in matplotlib, you can use the bbox_to_anchor papameter along with the loc parameter of the legend function, here's how you can modify your code to achieve that: ``` df3.iloc[0:30].plot.area(alpha=0.4) plt.legend(loc='upper left', bbox_to_anchor=(1, 1)) plt.show() ```
You mean like this? var variableOfTypeByteArray []byte
I am trying to make a card animation where a card on the top of the deck would translate upwards when hovered. Unfortunately, it seems like my card flickers if I move my mouse horizontally over the bottom part of the card. I have made some tests and it seems to be related to the translate, as increasing the translate o...
This is my code in my +page.server.js: export const actions = { default: async ({ request }) => { const data = await request.formData(); const ln = data.get('lastname'); ..... } }; export function load( ) { if (!db) throw error(404); return { todos : db.getTodos() } } ...
Using `react-testing-library`: > To enable testing of workflows involving the clipboard, `userEvent.setup()` replaces `window.navigator.clipboard` with a stub. First, install `@testing-library/user-event` Secondly, import user event like so: `import userEvent from '@testing-library/user-event';` Then, for exa...
There is quite a bit of confusing non-valida JavaScript in your code, here are relevant parts corrected: ```js // I don't know what you wanted to do with createReducer here but it seems you wanted to declare an initial state? const initialState = { form: [], status: null, }; export const formSlice = crea...
I created a custom HTML element that creates a new element from the following template: <template id="track"> <div class="record">Nothing yet</div> </template> Here the JS code that defines the custom element: class Track extends HTMLElement { constructor() { super(); ...
I met same issue try ssl port https://192.168.1.227:54321 then allow exception or firefox setting -> certificate manager servers -> servers add exception site
I have two tables that look like this: Table `Person`: ``` id name --------- 1 Jason 2 Dave 3 Amy ... ``` Table `Points`: ``` id points ---------- 1 8 2 9 3 5 ... ``` I try to join the "name" column from the first table to the second one based on their ids. The expected outcome should...
Instead of using Typescripts classes with methods in it, you must use Javascript objects. This means: Instead of using this: const track1 = new Track("7empest", "TOOL", "Fear Inoculum", new Date(2024, 3, 2), 60 * 3); You must use: const track1 = { title: "7empest", artist: "TOOL"...
{"OriginalQuestionIds":[65621789],"Voters":[{"Id":1491895,"DisplayName":"Barmar","BindingReason":{"GoldTagBadge":"python"}}]}
You are doing it very bad. `php artisan serve` is a [server for local development, not for production][1]. I will asume that you have nginx installed, and that you already configured .env file, databases and all other things for production. If not, please follow [this tutorial][2] First of all, you need to copy ...
{"OriginalQuestionIds":[156767],"Voters":[{"Id":3001761,"DisplayName":"jonrsharpe"},{"Id":1048572,"DisplayName":"Bergi","BindingReason":{"GoldTagBadge":"javascript"}}]}
|postgresql|pgadmin-4|pgbouncer|
I am trying to setup an android emulator for pentesting and, I am using the system-image `system-images;android-34;google_apis_playstore;x86_64`. Anytime I try to run Bybit on the emulator, it simply crashes. Here are the logs from logcat ```bash 03-30 17:25:39.576 732 766 V WindowManagerShell: Transition reque...
How to prevent app from crashing on android emulator
|java|android|operating-system|emulation|android-virtual-device|
null
This is what I did it with Bootstrap 4. The span allows the tool tip to be clear, instead of using a button. <span data-toggle="tooltip" data-placement="top" title="The text of the tooltip goes here"> --- SVG element goes here --- </span> I had to activate all the tooltips...
{"Voters":[{"Id":22192445,"DisplayName":"taller"},{"Id":8422953,"DisplayName":"braX"},{"Id":8162520,"DisplayName":"Mayukh Bhattacharya"}]}
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 f...
MediaRecorder.stop() thorwing illegalException
I inherited an ESP-32 firmware project based on AmazonFreeRTOS. I know how to build it but I'm not extremely familiar with this kind of programming. The other developer never created a signing key intended for production, but there is a "developkey.pem" file in with the source code. Unfortunately the company has alr...
Amazon IoT OTA update Signature verification failed
|aws-iot|freertos|
I want to create a new Laravel project using Composer. I have installed Composer and successfully ran the command `composer global require laravel/installer`. However, when I tried to run `laravel new <project-name>`, I encountered an error: > A connection timeout was encountered. If you intend to run Composer > wi...
Laravel installation via Composer results in connection timeout error
Go to your app-routing.module.ts and ensure your routes matches the login component. you can use this as a guide ... ... imports const routes: Routes = [ { path: '', pathMatch: 'full', component: YourWelcomeComponent // Whatever component you want to load whe...
you should update AppServiceProvider.php use Illuminate\Support\Facades\Schema; public function boot(): void { Schema::defaultStringLength(191); }
{"Voters":[{"Id":5921826,"DisplayName":"IVNSTN"},{"Id":17562044,"DisplayName":"Sunderam Dubey"},{"Id":162698,"DisplayName":"Rob"}]}
Here's an example of how to use shadows in TextView: android:shadowColor="#636363" android:shadowDx="2" android:shadowDy="2" android:shadowRadius="10" android:background="@drawable/temp" - The shadowColor property allows you to change the color of the shadow. - The shadowDx property...
|javascript|hashmap|
|flutter|video-player|preloading|flutter-devtools|
Spigot does not include NMS with its maven packages. The legal way to do what you are after is to download [BuildTools][1] and run it via: java -jar BuildTools.jar --rev 1.14.4 Then, you can include your dependency as follows: <dependency> <groupId>org.spigotmc</groupId> <artifactId>spi...
**Requirement**: Based on the code provided below, implement the merge sort algorithm to rearrange an array with N elements. While running the algorithm, print array A after each merge of two subarrays. Input - The first line is a positive integer N (0 \< N \< 20) - The next line contains N integers Who are the ...
I am probably missing something simple but... I have a website created with WordPress that has a WooCommerce shop on it. I want to put an image behind the "Shop" text in the banner on the page. Can't seem to find a way to do it. Any help would be greatly appreciated. [Link to website page in question](https://ma...
***Android : react-native-maps show only absolute one block area in detail.*** Only one rectangular area is shown in detail. I try code.but Does not get better What's wrong with this? When I zoom in on the map, I can't see anything, does this mean it crashes? ios is working fine. <meta-data android:n...
Android : react-native-maps show only absolute one block area in detail
Good morning, I am having an issue with my SKLabel not showing on my Tutorial SKScene. My code is below, I can't seem to find where I went wrong. When trying to add the SKLabel manually, it works fine. When adding it via code, nothing happens. Where am I going wrong? GameviewController: import UIKit ...
Label not showing on Tutorial SKScene
|swift|sprite-kit|uikit|sklabelnode|
null
I'm developing a Python script using the requests library for HTTP requests. I need guidance on handling potential exceptions gracefully and ensuring that I receive a response from the server. Currently, I'm encountering issues with exceptions or no response in terminal. [Here's the current code snippet I'm using][1...
You can't do it if `billing_address_collection` or `shipping_address_collection` are enabled, as your Checkout Session will add fields for the customer to add their address, and you can't prefill them. If you already know your Customer's address, then [create a Customer][1] with their `address` and `shipping` inform...
Here's a breakdown of the key differences between Python lists and Java arrays, including explanations and examples: 1. Fixed Size vs. Dynamic Size Java arrays: Have a fixed size that must be declared when you create the array. You cannot add or remove elements beyond this size. Java int[] numbers = new...
Im new with Jasper and I'm struggling with simple grouping. My dto which is passed: @Getter public class OrderPrintPreviewInputData { private final List<OrderedTestInputData> tests; .... } OrderedTestInputData.class: @Getter public class OrderedTestInputData { private f...
Grouping by column in Jasper
|java|jasper-reports|grouping|report|
When I execute this code: import pandas as pd # Example DataFrame creation df = pd.DataFrame({'A': [1, 2, 3]}, index=[0, 1, 2]) # Assuming idx is a valid index in df, for example: idx = 1 # Store the list as a single value in the DataFrame df.loc[idx, 'SHAP'] = [1,...
Fix error when assigning a list of values to dataframe row
|python|pandas|
Try using Scala 2 syntax fastparse.parse("1234", implicit p => parseAll(MyParser.int(p))) https://scastie.scala-lang.org/DmytroMitin/MrFZ0EhiSPeFDHd1IyBhrA (I'll try to find SO question with Scala 3 syntax.) One of possible Scala 3 syntaxes is fastparse.parse("1234", p => {given P[_] = p; parseAl...
You can pass an `index` to the `DataFrame` constructor with the given name that you want. ``` import pandas as pd df = pd.DataFrame({"a":[1,2],"b":[3,4]}, index=pd.Index([], name='myIndex')) df ``` ``` a b myIndex 0 1 3 1 2 4 ```
The VCALENDAR object, as supplied, is not strictly valid: the EXDATE property must have one or more date-time or date values (see [3.8.5.1. Exception Date-Times](http://icalendar.org/iCalendar-RFC-5545/3-8-5-1-exception-date-times.html)). Despite that, *vobject* parses the data successfully, ending up with an empty ...
Can't understand kotlin logic. For sush code inline fun inlined( block: () -> Unit) { block() println("hi!") } fun foo() { inlined { println("5") return@inlined // OK: the lambda is inlined println("5") } ...
|java|android|kotlin|mediarecorder|
# **Replace `@` with `&#64;`** For example instead of this: ``` email@domain.com ``` You write this: ``` email&#64;domain.com ```
When I try to call the Telegram.WebApp.initDataUnsafe method in inline mode, the Telegram web app API returns an empty object - python & tg webapp
This is details Log Context from tomcat log folder 30-Mar-2024 10:26:42.230 SEVERE [main] org.apache.catalina.core.StandardContext.filterStart Exception starting filter [authenticationTokenFilterBean] javax.naming.NameNotFoundException: Name [userService] is not bound in this Context. Unable to find [userServ...
Getting error while deploying war in tomcat 9
|java|spring|spring-boot|spring-mvc|tomcat9|
{"OriginalQuestionIds":[58475427],"Voters":[{"Id":943435,"DisplayName":"Yogi"},{"Id":1048572,"DisplayName":"Bergi","BindingReason":{"GoldTagBadge":"javascript"}}]}
There is a part of mathematics called the theory of multiple zeta values (MZVs) introduced around 1992. In this theory, we study the properties of parametric nested infinite series (see, e.g., [here](https://www.usna.edu/Users/math/meh/mult.html) for the definition of one particular variant) whose numeric evaluation is...
Defining function in Python whose one argument is list
|python|definition|
null
Iam trying to deploy a contract on erc20, the code can be compiled without any problem and i deployed it on testnet as well without any problem but when i try and switch to mainnet iam getting this error. Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do yo...
Gas estimation failed | Returned error: gas required exceeds allowance (16966)
I am trying to approve my angular website for google Adsense . For this i used ads.txt file which i have placed under src folder inside our angular app like src/ads.txt .But still google Adsense website showing after few days that ads.txt is not found . What will be the the exact the reason can you please help me out w...
Google adsense ads.txt status becomes not found Why?
|angular|ads|adsense|http-status-code-304|app-ads.txt|
null
I have an android application containing both java and kotlin codes. I want to scan its possible vulnerabilites using coverity sast tool version 2023.12.0. I follow the following steps: 1-) ./cov-configure --java 2-) ./cov-configure --kotlin 3-) ./cov-build --dir <path of idir file> --fs-capture-search <path o...
making android analyze with coverity sast tool
|java|android|kotlin|coverity|sast|
null
It's not required to kill the app, when waiting until the user pressed the back button. @RequiresApi(api = Build.VERSION_CODES.R) public void gotoExternalStorageSettings() { Intent intent = new Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION); intent.setData(Uri.fromParts("pa...
The `DefaultJmsHeaderMapper` is used in the `JmsSendingMessageHandler` by default. It maps all the headers into `jmsMessage.setObjectProperty(propertyName, value);` if the values are in the supported types: private static final List<Class<?>> SUPPORTED_PROPERTY_TYPES = Arrays.asList(new Class<?>[] { ...
{"OriginalQuestionIds":[9357032],"Voters":[{"Id":14991864,"DisplayName":"Abdul Aziz Barkat","BindingReason":{"GoldTagBadge":"django"}}]}
It would be helpful to include some comments in code to explain what each section does. But from what I see you are adding the Headers from your original to a new workbook (and then reading/printing these header). <br> Then there is a loop looking for a cell with value "PP/ Charger 2"<br> There is no mention of thi...
Spigot does not include NMS with its maven packages. The legal way to do what you are after is to download [BuildTools][1] and run it via: java -jar BuildTools.jar --rev 1.14.4 This command will not only build Spigot but also install the resulting artifacts to your local maven repository. Then, you can incl...
I was implementing the disjoited-sets-forest structure using the cormens algorithms book. I found that after the implementation of Union-by-rank we make sure that the three heigth stays log n if we have n nodes. But since if two trees have different rank they just get merged (with Union and all that comes with ...
Disjointed-sets-forest Why is the heigth of a tree with n elements log n?
|data-structures|disjoint-sets|
null
Suppose you are limited to 7 bits for a floating-point representation: 1 sign bit, 3 exponent bits, and 3 fraction bits. First I convert `3/32` to the binary `0.00011`, then to the standard scientific notation of `1.1 * 2^(-4)`. At this point I realize my exponent field will be `-1`, which is not valid. I ...
I have a php script that scrapes a database on a daily basis and pushes a json feed to a downstream process. We have some logic in the middle that we are trying to create a list called types. ``` $sql = "SELECT id AS slug, name, CONCAT('[', IF (closed = 0, 'O', 'C'), IF (manda...
PHP script to json_encode returns escaped forward slash
|php|json|
null
I created a block with Link and put text and an svg image inside. How do I move it correctly to the lower right corner of the button? (photo) By the way, how do I change the background color of svg? It's NEXT.JS framework. [photo of the result](https://i.stack.imgur.com/JiJ4T.png) TSX: ``` <section classNam...
I have a google form embedded into my home site. How to I get users to redirected to a thank you page after having submitted? I have tried using the code below but it cannot load after i submit the form. ``` <iframe id="gform" src="google form link" width="640" height="422" frameborder="0" marginheight="0"...
How to redirect to thank you page after submitting a Google form embedded into a Google Site?
|html|redirect|google-forms|form-submit|google-sites|
null
This is an interesting and misleading error. I have multiple .NET Framework 4.8 projects and none of the proposed solutions worked for me. I am yet to find a solution to this issue.
{"Voters":[{"Id":874188,"DisplayName":"tripleee"},{"Id":1940850,"DisplayName":"karel"},{"Id":349130,"DisplayName":"Dr. Snoopy"}],"SiteSpecificCloseReasonIds":[18]}
I want to send message to syslog in plsql. I think it's possible via utl_tcp and ACL but have no idea how to do that. For example, in unix, the command should be: ``` logger -p local1.info "hello word" ``` Who know how to do same with plsql code? thank in advance
{"Voters":[{"Id":12421110,"DisplayName":"Jean-Joseph"}],"DeleteType":1}