instruction
stringlengths
0
30k
null
Use this tag for questions about analytically integrating a function.
null
|windows|assembly|floating-point|x86-64|calling-convention|
In the DJL example, the AirPassengers is used to predict, but the code to train the model is not shown as it uses an already trained model. After some Googling, I found a Python solution for training that model: https://ts.gluon.ai/v0.11.x/index.html#simple-example, which is super simple code. DJL shows an examp...
Training model for AirPassengers dataset
|java|artificial-intelligence|djl|
You're using ```rust mut player_query: Query<(&mut Velocity, &mut Transform, &SpriteSize, &Player), With<PlayerId>>, wall_query: Query<(&Transform, &SpriteSize), With<Barrier>>, ``` All entities that have `Transform`, `Velocity`, `SpriteSize`, `Player`, `PlayerId`, and `Barrier` components are in both queries. Th...
The matrix you've posted is symmetric, and real-valued. (In other words, `A = A.T`, and it has no complex numbers.) This matters because all matrices which are symmetric and real-valued are [normal matrices](https://en.wikipedia.org/wiki/Normal_matrix). [Source](https://en.wikipedia.org/wiki/Symmetric_matrix#Symmetry_i...
I was able to keep using eclipse, but first, google app engine tools is no longer available. I have to use Maven to import most of my libraries: [Maven New Project][1] Set java8 to false and Use App Engine Api true: [Maven Properties][2] Then in the terminal, i suggest set the appengine-version to 2.0.24 ...
I have an excel spreadsheet with multiple sheets. I am reading the entire sheet and making into a dictionary where the the key is the sheet_name and the value is a dataframe of all the data. I am using the pydantic model below and cant seem get it update the dataframe value to the default. If I input enable/disable ...
I have this request, on my node.js application : ```js return new Promise((resolve, reject) => { const options = { hostname: 'py', <== docker container port: 8000, path: '/resume', method: 'POST', headers: { 'Content-Type': 'application/json', },...
I'm working on graphs each with 140 nodes and edges of positive integer weight. the sum of the weights is 420, so there are at most 420 edges on each graph. some of the graphs are not fully connected. the rule of cutting the graph is that each group must have 4 nodes, meaning 35 groups. the objective is to minimi...
several minimum cut on a graph with limited group size
|algorithm|graph-theory|
null
async function getData() { const apiEndpoint = process.env.NEXT_AUTH_URL; const res = await fetch(`${apiEndpoint}api/posts`, { cache: "no-store", }); if (!res.ok) { throw new Error("Failed to fetch data"); } return res.json(); } i...
pydantic validation does not add default value
|python|pandas|pydantic|
We manage to initially create a TLS connection from a server to the java client listening for incoming connections. We have created a socket using a serversocket and then wrap it into an SSLsocket. The below code is used: @Override boolean openSessionImpl() throws Exception { LOGGER.info("Creat...
Reversed TLS re-connection issue
|java|sockets|ssl|
In my active project with 3 devs, I got the same error during code merge. But the error pointing view id is inside the content view only, also `setContentView()` was called before `findViewById()`. This issue got fixed easily after I cleaned the project, rebuilt and installed it.
My Android app uses Fragments and includes Google signin authorization via Firebase. After signing in and starting a Fragment transaction, the following appears, overlaying the Fragment underneath it: [![enter image description here][1]][1] It's as if the gray screen was a Dialog window. When I touch the screen, ...
Type in terminal $ swift -v Output in terminal > Welcome to Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53).
I'm using `py setup.py bdist_msi` to generate windows single executable file for my python application. this works fine on my computer, but it does not work when it is executed in GitLab pipeline. does anyone know how to solve this issue? i'm using Python 3.11.8 on my local machine and on the pipeline. here is the erro...
Invalid command 'bdist_msi' when trying to create MSI installer with 'cx_Freeze' in Gitlab CI/CD Pipeline
Golang == Error: OCI runtime create failed: unable to start container process: exec: "./bin": stat ./bin: no such file or directory: unknown
|docker|go|kubernetes|google-kubernetes-engine|
I am attempting to implement Segment Analytics on my `Next.js` site. I am leveraging `NextAuth` for authentication through Google. All of this is working well, but I am now trying to call Segment's [`Identify`](https://segment.com/docs/connections/spec/identify/) method when the user logs in. However, it does not...
null
|react-native|tizen|samsung-smart-tv|tizen-web-app|
null
Here I am developing a movie ott application using react native web. Everything working fine in my application. Except I am unable to play local video in my landing screen. but In my landing screen I am playing a video which is in `.mp4` format, It's playing perfectly in tizen simulator but after installing the app...
This keymap will **duplicate the current line** if nothing is selected or **duplicate the selected words**. 1. Access: **File/Preferences/Keyboard shortcuts** 2. In the right top corner, click on **Open Keyboard Shortcuts (JSON)**. 3. Insert this keymap: ```json { "key": "shift+alt+d", ...
null
You can modify this line: `If Len(arrData(i, 12)) * Len(arrData(i, 13)) > 0 Then` to `If Len(arrData(i, 12)) * Len(arrData(i, 13)) > 0 And rngData.Cells(i, 12).EntireRow.Hidden = False Then`
I suggest using the official Vue 2 scaffolding tool, [vue/cli](https://cli.vuejs.org/). If you already have it installed and it's version number is >= 5.x (check with command `vue --version`), it will install webpack 5, so first uninstall it with `npm uninstall -g @vue/cli`. Reinstall using a version number that will...
Yes, vanilla SwaggerUI supports PKCE! I run SwaggerUI with PKCE with the following command: docker run --rm -p 80:8080 \ -v ~/Desktop/SWAGGER_UI:/foo \ -e SWAGGER_JSON=/foo/my-service-openapi.yml \ -e OAUTH_CLIENT_ID=my-service-client-id \ -e OAUTH_SCOPES="openid offline" \ -e OAUTH_U...
{"OriginalQuestionIds":[1101750,19104771],"Voters":[{"Id":8512262,"DisplayName":"JRiggles"},{"Id":4834,"DisplayName":"quamrana","BindingReason":{"GoldTagBadge":"python"}}]}
I have a dataframe which has columns as per the screen shot below. I want to add an additional column "all_data" which will hold all the data of the columns in it. [enter image description here](https://i.stack.imgur.com/PJPeO.png) here is what i tried ``` from pyspark.sql.functions import collect_list, udf...
I have this request, on my node.js application : ```js return new Promise((resolve, reject) => { const options = { hostname: 'py', <== docker container port: 8000, path: '/resume', method: 'POST', headers: { 'Content-Type': 'application/json', },...
I want to apply a blurred background effect during a call using the Vidyo SDK for Android. I downloaded their sample application and tried using the setCameraBackgroundEffect method. However, the end result is always the same. I get this error: VIDYO_CONNECTORCAMERAEFFECTERROR_LoadEffectFailed. Here's exactly what I...
|python|gitlab-ci|cx-freeze|gitlab-ci.yml|
Right now im using an x-csrf token, ctype password and cvalue (my actual username with cvalue and password), user id which is jsut some random letters, for captcha token i wrote in CAPTCHATOKENFROMFUNCAPTCHA, captcha provider as arkose labs and "captcha" as captchaid. Default stuff for headers, nothing roblox specific....
Why does the roblox api keep 403'ing me?
|javascript|api|roblox|
null
This error occurs due to dependency issues. To fix this: Step 1: Uninstall the following libraries using these commands: ``` pip uninstall opencv-contrib-python pip uninstall opencv-contrib-python-headless pip uninstall opencv-python ``` Step 2: Install opencv ``` pip install opencv-python ```
I've been trying everything but I can't generate the PDF properly; either I get a blank PDF or a text file with gibberish characters. `try { const response = await getFunc(getUrl, token, header); const url = window.URL.createObjectURL(new Blob([response])); // Crear un enlace para descargar ...
How can I let a Trading View strategy in Pinescript v5 go long at the open of the next day after entry conditions are met, but sell at the close(!) of just the day the exit conditions are met? It is no solution to use process_orders_on_close=true, because it prevents TV from buying at the open of the next candle. ...
How to sell at end of candle but buy at open on another in Trading View?
|pine-script-v5|tradingview-api|
null
I tried creating a registration page and connecting it to the localhost database. after I input the data, I get an error : flutter: FormatException: Unexpected end of input (at character 1) and the data is not saved into the database. I have checked whether the data entered is the same but the results still produce an ...
So I'm working on a speed typing game using React and I have this function that removes the word from the array after it's either skipped or entered correctly. I think there's a better way to do it by creating a new array/without directly removing it from my words array but I'm a bit stuck on implementation. What would...
best way to remove a word from an array in a react app
|reactjs|arrays|splice|
Emulator doesn't have an easy, built-in way to send custom `channelData`. There's a few different ways you can (kind of) do this, though: ### Debug Locally As @EricDahlvang mentioned (I forgot about this), you can [debug any channel locally](http://web.archive.org/web/20200722110139/https://blog.botframework.com/...
null
Laravel spatie permission many to through? query
|docker|nginx|scalability|
|python|machine-learning|data-preprocessing|feature-scaling|
TL;DR just adding id field to the returned user solved problem for me example import nextAuth from "next-auth/next"; import { AuthOptions } from "next-auth"; import CredentialsProvider from "next-auth/providers/credentials"; export const authOptions: AuthOptions = { providers: [...
This is the weirdest thing so far and cost me a few days of debugging. i think there is a bug in the T5 greedy search algorithm During training: The cross entropy loss becomes smaller and smaller, to the point where you do argmax(dim=2) on the logits, you get exactly the same result as the “labels”. This means that ...
First off: Are you sure that you are picking the right kind of model here? Training a regression model for each patient sounds like you want a linear mixed effects model here (LME), not a neural network. In general, the advantages of neural networks fly out the window if you train them on single individuals, especially...
It is normal to get a very-low use of the compute units and high use of the memory bandwidth because this task has a **very-low arithmetic intensity** (1 integer operation for 2 x 16-bit items, that is 0.25 not to mention the stores). GPU are optimized for a much higher arithmetic intensity like at least >10. You can b...
I have 3 devices (I call them device A,B, and C) and I want to connect them in a group. I can do one-to-one connection now and it works fine. However, while I am trying to connect the third device, the connection between the other two devices fails. For example, first I connect A and B. After negotiation, A b...
Blurred background using Vidyo SDK for android
|android|blur|vidyo|banuba|
The plugin GameplayCamera works well in blueprint, but when I try to work with it in c++, I still have a problem resolving dependencies Simple exemple: MyCamereManager.cpp #include "GameplayCamerasSubsystem.h" here I try to get my subsystem: UGameplayCamerasSubsystem* CamSubInstance = GetWorld...
Unreal Engine c++ GameplayCamerasSubsystem fatal error LNK1120: 1 unresolved externals
|c++|unreal-engine5|
For me the issue was my node version. Upgrading to node v18 from v15 solved the issue.
As the title says, if I change the number of hidden layers in my pytorch neural network to be anything different from the amount of input nodes it returns the error below. > RuntimeError: mat1 and mat2 shapes cannot be multiplied (380x10 and 2x10) I think that the architecture is incorrectly coded but I am relati...
Changing the number of hidden layers in my NN results in an error
|python|pytorch|neural-network|
I was surprised that there **isn't** a lightweight library that does that **cross-platform**. So I decided to create a library since I need the functionality anyway. Here's the library https://github.com/Neko-Box-Coder/System2 It works for **posix** and **windows** systems. (It doesn't use popen for windows so i...
I am trying to connect MongoDB with node.js but not working as i taught Mongosh Version 2.1.4 I have installed every libraries that want and i order the code via files. I made a folder config inside that `connection.js` file which contains: ``` const mongoClient = require('mongodb').MongoClient const state...
WebScraping doesnt work, even without error
|python|visual-studio-code|web-scraping|beautifulsoup|python-requests|
null
Far from perfect. This one: * wraps each word in a ``<span>`` * calculates by ``offsetHeight`` if a SPAN spans multiple lines * of so it found a hyphened word * it then **removes** each _last_ character from the ``<span>`` to find when the word wrapped to a new line ![](https://i.imgur.com/zvCwk1H.png) <...
A quick aside, we can cast to-and-fro from one table type to another, with restrictions: /** create a TYPE **/ CREATE TYPE tyNewNames AS ( a int, b int , c int ) ; SELECT /** note: order, type & # of columns must match exactly**/ ROW((rec).*)::tyNewNames ...
|android|wifi-direct|
null
You can use `regexpr` to capture the first occurrence of consecutive `1`s followed by values greater than `1`, for example ``` set.seed(0) my_df %>% mutate(event = regexpr("1{2}[^1]{2}", do.call(paste0, select(., -ID)))) %>% mutate(event = ifelse(event > 0, paste0("X", event), NA)) ``` gives ``` ID X...
Fairly new to Python. Making a battleship project from scratch. Just wanna know what would be a way to actually identify a SPECIFIC point on the map, and let you choose it, and then print out the chosen grid, with the "#" replaced with something else like a "X". Here's the code, thanks in advance. ``` turns = 10 ...
How to give the player the ability to choose a grid in Battleship?
|python|list|
null
I have written a script (I'm quite new to PHP) which will take a list of elements as an input and checks whether it’s only a username or it contains username+domain name (I mean email). If it’s only a username, then it will append '@test.com' into that username and combine all the strings together to send an email n...
I got error with flutter: FormatException: Unexpected end of input (at character 1)
|flutter|
null
So I was given this block of code and I had to give an output in the format `y:[result]; y: [result]; y:[result]; x:[result]; a:[result]` ``` public class Main { static int x = 2; public static void main(String[] args) { int[] a = {17, 43, 12}; foo(a[x]); foo(x); fo...
Call by reference confusion
|reference|pass-by-reference|call-by-value|
I have a React frontend application configured with a proxy in the package.json file pointing to my Flask backend running on http://localhost:2371. However, when making requests to fetch data from the backend using fetch("/members"), the frontend seems to be fetching data from localhost:5173 (the address on which the r...