instruction stringlengths 0 30k ⌀ |
|---|
Harbor docker push first path segment in URL cannot contain colon |
|docker|harbor| |
I solved this issue by adding the following to my nginx config (the Host header is what made it work, the others are also needed).
```
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header... |
[enter image description here][1]I ran the deep learning for regression, it is a multimodal model with two loss functions. the mse and mae are acceptable, but the r2 is so horrible. any idea can explain it? what should I check? Thanks!!!!!
this is my code.
def r_squared(y_true, y_pred):
SS_res = K.sum(K.s... |
null |
null |
null |
null |
I too faced the same issue.
Then I checked my compileSDK version and target SDK version in build.gradle file in the Gradle Scripts Folder.
I changed
plugins {
id 'com.android.application'
}
android {
namespace 'com.example.classify'
compileSdk 33
d... |
When I use ./gradlew build -Dquarkus.package.type=uber-jar to create an executable package, an error will be reported and I cannot continue packaging.
```
class EncryptConfigInterceptor : ConfigSourceInterceptor {
override fun getValue(context: ConfigSourceInterceptorContext, name: String): ConfigValue? {
... |
When gradlew is packaged, System.getProperty cannot obtain the configuration |
|quarkus| |
null |
I am using R for deep learning with the MNIST dataset.
I have written this code to store the training and testing data, and define and fit the model:
```
library(keras)
#Obtain data
mnist <- dataset_mnist()
train_data <- mnist$train$x
train_labels <- mnist$train$y
test_data <- mnist$test$x
test_... |
Firstly, next time please provide the log of attempting task (by click to the task logs).
Next one, I think the problem is that is from the `sudo` which make you cannot type the password.
Moreover, I suggest that you should use the venv, rather than directly install the library. The setup file should be:
```yam... |
Based on my experience, I've outlined the Kubernetes request flow. Could someone please add or highlight any points I might have overlooked?
When a user deploys an Nginx pod using kubectl create -f nginx.yaml, the request is processed by the kube-apiserver, which validates and stores the pod's configuration in the e... |
Based on my experience, I've outlined the Kubernetes request flow. Could someone please add or highlight any points I might have overlooked? |
|kubernetes| |
null |
Use TraceSource logger, bur add switch with level verbose, then all your logging goes to the trace listener test.log :)
var builder = webApplication.CreateBuilder(args);
builder.Logging.AddTraceSource(new
SourceSwitch("trace", "Verbose"),
new TextWriterTraceListener... |
|javascript|firebase|express|firebase-authentication|google-cloud-functions| |
null |
I am looking to optimally solve a simple resource allocation problem that has a set of tasks and a set of men as its input. Can anyone please suggest some textbooks that would give me a clear idea and to refer from?
I am new to research and I am looking to learn about the resource allocation problem and the algorith... |
need help solving this resource allocation problem |
|resources|allocation| |
null |
I am new to firebase cloud functions and I'm using cloud functions with express.js. I need to retrieve an access token after registering a new user. i am using the below method for that.
const { admin, db } = require("../util/admin");
exports.registerUser = (req, res) => {
const newUser = {... |
Starting a new project in Next.js I have this folder structure
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/HhiJo.png
But when I navigate to localhost:3000 I get a 404 screen, so there is some issue with the routing, can't find any info on it online though. |
Next.js localhost:3000 is showing a 404 |
|typescript|next.js|frontend| |
I have a symmetrical dataframe with roughly 400 rows & columns. I would like to turn it into a 3-dimensional object (cube) by taking the sums of each pair between the three X,Y,Z indices.
For example, say the coordinates on the cube were A-B-C, I would take the sum of the following cells in the 2D dataframe/array: A... |
Creating 3D python data from index sums of 2D data |
|python|pandas|dataframe|numpy|3d| |
null |
This is now supported in hosted onboarding by enabling this toggle in the Stripe dashboard: https://dashboard.stripe.com/settings/connect/payouts/onboarding |
I have scaled my dataset using the MinMaxScaler form sklearn like this:
from sklearn.preprocessing import MinMaxScaler
# create a StandardScaler object
self.scaler = MinMaxScaler(feature_range=(0, 1))
# fit the scaler to the dataset
self.scaler.fit(self.X_org)
# transform dataset... |
Calling MinMaxScaler differs between same sets |
|scikit-learn| |
I have a requirement to upload over API a video and embed it to a WordPress page, which needs to be one-time viewable and then never accessible again. Also the video needs to have no buttons to stop/pause/rewind/rewatch; once you land on the page, it will start playing and you will not see the video ever again. The acc... |
Never mind, the loader ld-linux-x86-64.so.2 was the cause of the problem, for reasons which I do not know. The problem was fixed by removing the loader and letting spwn download the loader instead. |
The problem was the buffer size which was 30720 bytes.
const int BUFFER_SIZE = 500000000;
I just changed the size which is approximately 500MB and now select them from the heap.
char* buffer = new char[BUFFER_SIZE];
This is where the buffer is used, I simply take data from it and then pass it as... |
No gradients provided for any variable in R |
|r|machine-learning|deep-learning|mnist| |
null |
I would appreciate any guidance on correcting my mistakes. I'm attempting to implement the RCPSP model by Pritsker et al. (1969).
Link : [Here](https://www.google.com/books/edition/Scheduling_of_Resource_Constrained_Proje/CNncBwAAQBAJ?hl=fr&gbpv=1&dq=RCPSP*&pg=PA79&printsec=frontcover)
```
// Example data
range J... |
Resource-Constrained Project Scheduling Problem (RCPSP) Implementation in OPL for CPLEX |
{"OriginalQuestionIds":[77690729],"Voters":[{"Id":3358074,"DisplayName":"dmitryro"},{"Id":8770336,"DisplayName":"lucutzu33"},{"Id":14991864,"DisplayName":"Abdul Aziz Barkat","BindingReason":{"GoldTagBadge":"django"}}]} |
The Python 3.12 embedding documentation for embedding gives this example:
```
#define PY_SSIZE_T_CLEAN
#include <Python.h>
int
main(int argc, char *argv[])
{
wchar_t *program = Py_DecodeLocale(argv[0], NULL);
if (program == NULL) {
fprintf(stderr, "Fatal error: cannot decode argv[0]\n");
... |
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... |
I'm working on a Laravel project and trying to create an anonymous Blade component that doesn't rely on a controller. I want this component to have a variable and a method that can be called within it to change the variable's state.
For instance, I have several links (like a navigation bar) and want to change the `a... |
Function in anonymous Laravel Blade component |
Do not mix CSS/JQuery syntax (`#` for identifier) with native JS.
**Native JS solution:**
document.getElementById('_1234').checked = true;
To also trigger the associated event (e.g. if related controls need to be shown/hidden), call `click()`:
document.getElementById('_1234').click();
**JQuery so... |
You can scroll to a particular view in a `ScrollView` by using its id. This can either be done using a `ScrollViewReader` (as suggested in a comment) or by using a `.scrollPosition` modifier on the `ScrollView` (requires iOS 17).
Here is an example of how it can be done using `.scrollPosition`.
- The images used ... |
I need to separate texts into paragraphs and be able to work with each of them. How can I do that? Between every 2 paragraphs can be at least 1 empty line. Like this:
<!-- language: none -->
Hello world,
this is an example.
Let´s program something.
Creating new program. |
i have string ```"This auction will run from Friday 28 July - Monday 7 August. It will close from 7pm (GMT) on Monday 7 August 2023. Read here for information on how our auctions end."```
and im trying to get dates from this string
```
const regex = /(\d{1,2} \w+(?: \d{4})?)/g;
const dates = str.match(regex)
`... |
I'm taking an online course on website development and ran into issues setting up dependencies using npm. The course materials are a few years old, so many dependencies are outdated, causing headaches. Strangely, my package.json file in VS Code is filled with hundreds of dependencies when there should only be like 5-10... |
null |
{"OriginalQuestionIds":[4660142],"Voters":[{"Id":1070452,"DisplayName":"Ňɏssa Pøngjǣrdenlarp"},{"Id":5836671,"DisplayName":"VDWWD","BindingReason":{"GoldTagBadge":"c#"}}]} |
I'm deploying an application (on docker) that is totally dependent on `sf` but I'm having trouble loading it into docker :
FROM rocker/shiny
#Make a directory in the container
RUN mkdir /home/shiny-app
RUN R -e "install.packages('sf')"
RUN R -e "library('sf')"
COP... |
I can not load sf in docker |
|r|docker|gdal| |
After drop_na it shows 0 obs. of 68 variables:
[![(https://i.stack.imgur.com/elrGR.png)][1]][1]
[![(https://i.stack.imgur.com/txJEv.png)\]][2]][2]
After drop_na I don't see any results in the Table except dates. This was not the case when I tried it before, I could see the values in the table.
```
librar... |
Why are zero variables shown after using drop_na()? |
|r|tidyr| |
Dears, I'm calling who can defeat any SQL query performance issue
I'm in the process of generating an Inventory Report that handles locations for items in stock and I want to show for the user a flag say "Not available any more" that mean the location is not available because it's taken from another item.
That is... |
I’m deleting your post because it is written in a language other than English. While we understand that this may be frustrating, we don’t have the moderation capacity to allow posts to be written in any human language. We suggest using machine translation (such as Google Translate) to translate your post into English a... |
null |
You may want to call `mysql_secure_installation` command first to deal with the `root` password and allow the connection. |
|javascript|reactjs|jsx| |
I'm deleting your post because this seems like a programming-specific question, rather than a conversation starter. With more detail added, this may be better as a Question rather than a Discussions post.
Please see [this page](https://stackoverflow.com/help/how-to-ask) for help on asking a question on Stack Overflow... |
{"OriginalQuestionIds":[21291675],"Voters":[{"Id":285587,"DisplayName":"Your Common Sense","BindingReason":{"GoldTagBadge":"php"}}]} |
I recently encountered an issue while initializing a new project using Composer. Upon running Composer, I received an error indicating a PHP version mismatch between the required version by my dependencies and the version installed on my system.
The error message from Composer reads:
> Composer detected issues in... |
I'm encountering an error in my React Native application when trying to save user data and login details to Firebase using Redux. The error message I'm receiving is:
> [Error: Actions must be plain objects. Instead, the actual type was: 'undefined'. You may need to add middleware to your store setup to handle dispat... |
I have a transformation matrix with scaling (20, 20, 1) and rotation by 90 degrees:
```
0, -20, 0, 80
20, 0, 0, 20
0, 0, 1, 0
0, 0, 0, 1
```
I want to get scaling. I have the next example in JavaScript with the glMatrix library that extracts scaling from the transformation matrix above:
```html... |
How to get scaling from transformation matrix |
# **here is my Addtodo.jsx**
```
import { useEffect, useState ,useContext} from "react";
import Usercontext from "./context/usercontext";
export default function Addtodo(){
let [options,setoptions] = useState([]);
let id = 1;
let {setuser} = useContext(Usercontext);
return(
<>
... |
I have hundreds of dependencies on my package.json file which I didn't install (npm and using Warp) |
|npm|dependencies|warp-terminal| |
null |
If you have a list of the buttons then you can select a list entry at random. Always remember that the first entry in a list or an array has an index of 0.
If you put all the buttons in a Panel, it can be easier to keep them organised: for example, you can get VB.NET to select all the buttons within that panel. Then... |
i have string ```"This auction will run from Friday 28 July - Monday 7 August. It will close from 7pm (GMT) on Monday 7 August 2023. Read here for information on how our auctions end."```
and im trying to get dates from this string
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- langua... |
I am trying to use Context api for a To-do website in vite and somehow its not working out |
|web|vite| |
null |
To check a field for a particular value, there is no need to attach a persistent listener, you can only perform a [Query#get()][1] call.
So assuming that you have two EditText objects:
EditText previousPasswordEditText = findViewById(R.id.previous_password_edit_text);
EditText newPasswordEditText = findV... |
null |
null |
I opened a source code of `getScaling` and saw how scaling is calculated there: https://glmatrix.net/docs/mat4.js.html#line1197
```js
export function getScaling(out, mat) {
let m11 = mat[0];
let m12 = mat[1];
let m13 = mat[2];
let m21 = mat[4];
let m22 = mat[5];
let m23 = mat[6];
let m31 = mat[... |
null |
The problem seems to come from there:
```jsx
getCourses().map((course) => (
<Card key={course.id}
course={course}
likedCourses={likedCourses}
setLikedCourses={setLikedCourses}
/>
))
```
According to me, the call to `getCourses` returns `undefined`.
Since you either return `allCourses` o... |
I am trying to run Random Forest regression from `cuml.ensemble` on my dataset using GPU. My output will be 2 features and input is 7 features. But for some reason Random Forest regression using Rapids, doesn't take 2 column as output. It shows me error that 'EXpected one column but got 2." How can I resolve this issu... |
This should do the job
```
const dialogs = document.querySelectorAll("dialog");
const closeButton = document.querySelector("dialog button");
const imgButtons = document.querySelectorAll(".btn");
imgButtons.forEach((button,index) => {
console.log('hi')
button.addEventListener("click", () => {
const dial... |
I setup go run environment on a Debian 9 remote Linux machine and can run GO code without problem. Then I tried to connect to the remote machine using VS Code. It was successful but VS code complained it could not find GOROOT. I've setup the envs in the .bashrc. Where can I specify these Environment Variables in VS Cod... |
VS Code cannot find GOROOT when VS Code connects to a remote server |
|go|visual-studio-code| |
1. Utilize Parallel Processing:
s5cmd with -c flag: The s5cmd tool itself might offer parallel processing capabilities. Check if it supports the -c (concurrency) flag. You can specify a higher number of concurrent connections to list files simultaneously. Refer to s5cmd --help for details.
Python Scripting: Write a... |
I have a working postgres query that I am trying to setup in Mybatis but keep receiving syntax errors. The query that works in my PgAdmin that I would like to implement in Mybatis checks if there are any common items between 2 arrays. The working query in my pgAdmin goes like:
```
SELECT * FROM weather_schema.weath... |
Postgres && statement Error in Mybatis Mapper? |