instruction
stringlengths
0
30k
I'm trying to run the following command in my buildspec.yaml (on AWS Codebuild) to insert my React App's source version into MySQL during the build. ``` - echo "Saving value to MySQL RDS" - mysql -h $DB_HOST -u $DB_USER -p $DB_PASSWORD -D $DB_NAME -e "INSERT INTO versionReact (version) VALUES ('$REACT_APP_VERSION'...
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 ...
null
null
{"Voters":[{"Id":22823912,"DisplayName":"getrithekd"}],"DeleteType":1}
If you don't know how to build the `*.jar`, maybe just load it from Maven Central: implementation "org.springframework.cloud:spring-cloud-netflix-eureka-server:4.1.1"
use the node_border parameter in the netgraph.draw() function. import networkx as nx import matplotlib.pyplot as plt import netgraph # Create a sample graph G = nx.Graph() G.add_edges_from([(1, 2), (2, 3), (3, 4)]) # Draw the graph with modified node border width ...
{"Voters":[{"Id":22823912,"DisplayName":"getrithekd"}]}
I created a test project, it worked fine. So I started to try to narrow down the difference. I update the test project to same version of the Compose BOM, kotlin, and build tools. The same, still works fine. Put the same compose dependencies in my project that the test was using. Mine still crashes. Test st...
Inspecting the [code][1] of `vegan::rrarefy` reveals that it is taking an independent (by row) sample from a multivariate hypergeometric distribution. The `rmvhyper` implementation from `extraDistr` is much faster (possibly multiple orders of magnitude, depending on the value of `min_sample`). Performing the samples...
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? Home Controller: def set_stories # Fetch...
UPDATED: This post will ANSWER the question and provide a HELPER FUNCTION for toFixed() since toFixed() is still broken 7 years later in all major browsers. The problem is verified to be the number 5. toFixed() doesn't round up when it sees the number 5 in the folowing position you want to round. This HELPER FUNC...
null
The company I work for uses excel sheets to find the cheapest available fuel in their desired fueling location. I have managed to make the formulas of the sheet they had already in place work properly except for 1 very specific case where more than 1 location offers fuel at the same price. Image Example ![](https...
I am fairly new to Java, currently learning about lambda expressions. so I wanted to use generic with the Consumer function to make it accept any type of parameter passed to it and just print it out The consumer accepts the first generic as the type that must be passed to it as the first param I specified it to be...
You should specify the table where your list of languages is: ```go var languages []Language err := db.Table("TableOfLanguages").Find(&languages).Error ```
null
I am trying to help my niece with her Mercedes Sprinter W903 2000 model. The car is facing a well known "Start Error" fault, which is caused by a fault in the immobilizer unit. I have found a immobilizer emulator which works with the CR2 ECU in the car, but in order to get this to work, I need to overwrite some dat...
Try refactoring your function to avoid using global variables to store intermediate results (`resstr` and `resarr`). Using global variables like this can cause issues in the context of running multiple tests in sequence since they would retain their values from previous calls across tests, leading to incorrect results....
finding sum of prefilled fields with jquery
|jquery|sum|
null
I have a pop for a user to enter a username and then what group to be added to in AD. I can't think of another way to exit my loop other than doing two separate if-statements. Is there a different way to exit the loop other than this? or I am overthinking this? ``` bool isExit = false; do { Console.Write("E...
`fieldnames` can potentially be `None` if the CSV file is empty. You can solve your problem by providing a default value. ``` headings: list[str] = reader.fieldnames or ["", "", ""] ```
I have a Yii2 app. And I try to add the patterns array in the urlManager of web.php. And I serached a lot and fount a lot of links with the correct soltuion. For example: ``` https://stackoverflow.com/questions/41873686/yii2-apply-custom-url-rule-class https://www.yiiframework.com/doc/guide/2.0/en/runtime-routing ...
How to resolve the error "Setting unknown property: yii\web\UrlRule::POST"?
|php|yii2|yii2-urlmanager|
When I try and open the pickle file, this error appears: Exception in thread Thread-1 (coinsv_thread): Exception in thread Thread-2 (coinsv_thread): Traceback (most recent call last): Traceback (most recent call last): File "C:\Users\Gregory\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, i...
I have a horizontal scroll with a map and other text, but when using the website on phone (finished media queries) this page, and all the other pages seem to add extra height, or not show the full height of the page due to the search bar still showing. For this specific horizontal scrolling page, I have the height to u...
Horizontal Scrolling with Media Queries
|javascript|html|css|horizontal-scrolling|
I've found a possible solution let fuse = useRef( new Fuse(data, { includeScore: true, keys: keys, threshold: 0.3, // Adjust the strictness of the search distance: 100, // Adjust how far the algorithm looks for a match }), ) use a reference ...
I am building an HTML/CSS/JS app that displays embedded TikTok posts. It's a pretty simple operation - I make an API call that returns a list of post id's, and then dynamically display the posts using the embed code provided by TikTok. I am NOT using the TikTok embed API here, I am just populating `iframe` elements in ...
I'm using tensorflow `2.16.1` on Ubuntu 22.04, tensorrt `10.0.0b6`, but when I import tensorflow I get the error: ```sh W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT ``` I already exported the path to my path inside bashrc, and sourced it, as follows: ```sh ## CUD...
Tensorflow can't find TensoRT
|tensorflow|ubuntu|tensorrt|tensorrt-python|
Interesting challenge. You might consider creating a sequence object, then call a function to return the value before you insert the record to handle the autoId column. CREATE SEQUENCE dbo.CustomerInvoice START WITH 1 INCREMENT BY 1; GO CREATE FUNCTION usf_GetAutoIdValue ( @foreignKeyI...
(thanks for setting up the sample data - I did have to slightly modify the SQL to be able to ingest that sample JSON) For a JSON object like this, if you want to extract all the data without specifying the name of each column - you will probably need to extract it into rows instead of into columns. This because it's...
Unable to install mysql on Amazon Linux 2023
|amazon-web-services|amazon-ec2|aws-codebuild|
I'm encountering an issue when trying to run a Vite React application. The development server fails to load the \`main.jsx\` file, which is the entry point of my React applicatio he is the main.jsx code : ``` import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.jsx' import ...
Vite failing to load main.jsx file in React project
|node.js|vite|
null
I'm trying to add `flow_limiter_calculator` to `face_landmark_front_cpu.binarypb` as I realized python model doesn't have `flow_limiter_calculator` in its original `face_landmark_front_cpu.pbtxt` What I did was simply adding below to `mediapipe\graphs\face_mesh` ``` mediapipe_binary_graph( name = "face_mes...
NameError in Home#index
|ruby-on-rails|
This works for me: ```yaml name: $(Build.DefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) trigger: none pool: Default stages: - stage: set_stage displayName: Set variable jobs: - job: set_job displayName: Set Pipeline Variable steps: - pwsh: | ...
When using Poetry to create a new project with `poetry create`, 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 using Pyt...
How to change default Python version for poetry?
I am trying to stub out the @current_user that gets set in my concern for use in controllers. I am using a concern for authenticating a JWT and setting the @current_user in the concern. The JWTs get signed and verified from a third party so I am bypassing that step for testing purposes but need a way to setup @current_...
Pros: * better resource management (like cpu memory) * Isolation of deployment (less restart , memory leaked, history cache hit) Cons: * more work to maintain
|ios|swift|charts|ios-charts|swiftui-charts|
I am trying to get the width of a child's component in my parent one in react: import { FC, PropsWithChildren, useRef } from "react"; const MyParent: FC<PropsWithChildren> = (props) => { const myref = useRef(null); return (<MyChild ref={myref}/>) } const MyChild: FC<Props...
cannot use ref in function-component
|reactjs|typescript|
You should read the contents of the input file first, then should use subprocess.run() to execute XFOIL by providing the input content directly, like below: import subprocess with open(r'input_file.txt', 'rb') as f: input_content = f.read() xfoil_process = subprocess.run(['c:\\xfoi...
{"Voters":[{"Id":721855,"DisplayName":"aled"},{"Id":10952503,"DisplayName":"Elikill58"},{"Id":22180364,"DisplayName":"Jan"}]}
In your `MainScreenButton2()` method, the line self.popupMethod = self.method_2() is executing the method `self.method_2()`. If you want to reference the method without executing it, change that line to: self.popupMethod = self.method_2 without the `()`.
Hi everyone who can help me. I have made RAR file with password on 200 and after so long time i forgot password, i tryed many combinations, try letters and numbers i think i can be in password, nothing, with special sowfware nothing to, can someone help me to get somehow recover this password? Tryed brute-force wit...
Forgotten RAR password recovery
|passwords|recovery|rar|
null
Clustering with fitToSuppliedMarkers does not show all markers
I am following this [guide][1] and I am confused. The activity that I created to collect username and/or password gets called without it being called the way shown here: private inner class OnTokenAcquired : AccountManagerCallback<Bundle> { override fun run(result: AccountManagerFuture<Bundle>) { ...
Embedded TikTok posts / thumbnail styling issue
|javascript|html|jquery|css|tiktok|
I used my iOS phone WeChat to scan the code correctly, but when I scanned the code on QQ, a second pop-up window popped up before I could wait for the first one to confirm? But on Android, WeChat and QQ are both executed normally! At first, I thought there was an issue with the QQ browser kernel, but after simulating ...
Simulate WeChat scanning short connection redirection, but the QQ display result is different from WeChat?
How to build custom mediapipe python model i.e. adding flow_limiter_calculator to face_landmark_front_cpu.binarypb
|build|bazel|mediapipe|face-mesh|
null
Since 2017-03-13 `std::is_callable` is gone from [cppreference.com][1]. The last available description of it is from 2016-11-21 on [WaybackMachine][2]. The main difference between `std::is_callable` and `std::is_invocable`, that replaced it, is that * the former used a single template parameter `template <class FnA...
What was the problem with std::is_callable?
|c++|c++17|language-lawyer|type-traits|
you should try to reset your browsers CSS rules/set global css rules before applying new ones. This may fix the spacing problem as well as the sizing issue of your headlines. You can refer to this website: https://dev.to/hankchizljaw/a-modern-css-reset-6p3 Have luck!
I have a git repository with the following structure: ```txt .\.gitignore .\Dir1 .\Dir2 .\Hello world.txt .\Dir1\Hi.txt .\Dir2\Hey!.txt ``` And I want Git to track only the `.\Dir1\Hi.txt`, so I excluded all the files with a `*`, and tried to add an exception for the one file I care. But I tried all the fo...
How to ignore all files in a repository except a small list of given files?
|git|gitignore|
How to stub out current_user in JWT model for Rspec?
|ruby-on-rails|rspec|rspec-rails|
null
I'm calling a C# API that's returning the following types to my Angular application. export interface Auction { reservePrice: number currentHighBid: number auctionEnd: string id: string } I created an AuctionListComponent that will `ngF...
Convert String UTC Date to number for ngx-countdown leftTime config value
|javascript|angular|typescript|
Vite has a documentation [section](https://vitejs.dev/guide/features.html#css-code-splitting) on how to avoid FOUC: > Vite automatically extracts the CSS used by modules in an async chunk > and generates a separate file for it. The CSS file is automatically > loaded via a `<link>` tag when the associated async chu...
Thanks to the help of [iso.org][1] and [localeplanet.com][2] plus some good old googling and a lot of elbow grease, I came up with this list below. It might not be perfect, but it will do the job for me... I hope it can be of help to others! <?php $defaultLocales = [ 'af' => 'af-ZA', 'am' =...
null
Vim also sports a `:terminal` command. Looking at [`:help :terminal`](https://vimhelp.org/terminal.txt.html#%3Aterminal) will reveal the following information: ```none :[range]ter[minal] [options] [command] Open a new terminal window. If [command] is provided run it as a job and connect the input and ...
|functional-programming|google-sheets-formula|
This is for sure a great learning, here's what I did and found and resolved this issue: 1. It boils down to the issue that my newly launched GPU instance cannot join the ECS cluster (both are launched by the above yaml CloudFormation template); 2. Do some first checks: vpc, subnet, security groups to see if anyth...
# Error occurred prerendering page "/en/500". I bought this error wirth `reportToErrorTracking(error);` ``` Error occurred prerendering page "/500". Read more: https://nextjs.org/docs/messages/prerender-error Error at /home/serokdilo/DEV/lavenus/node_modules/next-intl/dist/production/react-client/index.js:1:17...
next.js prerendering error with next-intl
|javascript|reactjs|next.js|next-intl|
null
I'm trying to use OpensearchVectorClient() function in llama-index but I've run into a problem while calling OpenSearch: "object tuple can't be used in 'await' expression". Here my code: `import boto3 from opensearchpy import RequestsHttpConnection, AWSV4SignerAuth from opensearchpy import RequestsHttpConnectio...
"object tuple can't be used in 'await' expression" while using OpensearchVectorClient for llama-index
|opensearch|llama-index|vectorstore|
null
I have a web app deployed on Azure. During testing, I found one of my endpoints is not working... sometimes. More specifically, this `POST` endpoint always works in my dev environment, and it randomly works in Prod. When it fails, my controller endpoint is not hit (discovered by adding logs), and a "successful" 200...