instruction
stringlengths
0
30k
What is the best way to load 2 million records from DataTable to CSV file in asp.net core c#?
null
your relation is incorrect. change it to on `TeacherDetailModel`: ```php public function ClassListModelHasMany(){ return $this->hasMany(ClassListModel::class,'teacher_id','id'); } ``` also can change query like this: ```php $detail = ClassListModel::where('id',$post['body']['ID']) ...
What EsLint rules enforces the following? ```typescript type Incorrect = Array< number >; type Correct = Array<number>; ``` Every @typescript-eslint / @stylistic rule I have tried dodges it.
Eslint rule to prevent space around a typescript generic
|eslint|typescript-eslint|
I'm starting to get pretty frustrated with Dart's `async` ... All I want is lazily load some value and assign it to a property in my class: ``` Future<String> getMeSomeBar() async => "bar"; class Foo { late String bar = await getMeSomeBar(); } ``` this doesn't work, of course. But what really drives me...
null
I am trying to run a pipeline in Azure DevOps that checks the code with Snyk and then validates the dependencies using Composer, builds the Docker image then pushes it to ACR, and finally I will implement either ArgoCD or FluxCD solution for a GitOps-based approach to fetch the new image from the Azure Repo when there'...
[Attched][1]I want to add an information column on the right side of the stack bar area (see the attached image). Like **Do at all** combines **Often** and **Occasionally**. I want to do this in R. # Create the data frame ``` library(tidyverse) data <- data.frame( event = c("Talking with family", "Donating ...
I replicated your issue with your code and found out you are trying to [`update` documents](https://cloud.google.com/firestore/docs/manage-data/add-data#update-data) even before they are created or exist. Hence, you are getting `Error: 5 NOT\_FOUND`. And you are unable to create `documents` or `collections` as you are...
`gcloud info` will give the project.
I recommend replacing token.objects.create with the following logic in your RegisterView: from django.urls import reverse from django.contrib.sites.shortcuts import get_current_site from rest_framework import generics, status from rest_framework.response import Response from rest_framework_si...
Blocking wait on future OUTSIDE of async functions
|flutter|dart|asynchronous|async-await|future|
Here is the java function that I use to create a span associated to a trace/span created in another microservice: import io.opentelemetry.api.trace.*; import io.opentelemetry.context.Context; import io.opentelemetry.context.Scope; private Span createSpanLinkedToParent(String traceId, String sp...
I updated the IDE (VS Code). Then the error is gone.` > sudo apt update > sudo apt upgrade code > code --version (to check the version) `
I believe it is connected with this question: https://stackoverflow.com/questions/43185605/how-do-i-read-an-image-from-a-path-with-unicode-characters Basically opencv have problems with reading special symbols, you need to rename your files or use other methods to read files, proposed in link below.
|reactjs|react-native|expo|socket.io-client|react-native-webrtc|
|python|numpy|
I have this perspective scrolling effect and I want to make three instances of it. Each of the instances ultimately will have different content. And each instance would be in a modal popup. The modal popup should be triggered by a link and they're closeable by an 'x' in the corner, and the key ESC. Ideally i would ...
Perspective Scrolling Effect (Three Instances)
|javascript|html|css|
What you describe "it runs as the owner of the stored procedure and thus the permissions assigned to that owner" is similar to the concept of "[Authorized Routines](https://cloud.google.com/bigquery/docs/authorized-routines)". As of September 2023, [authorized routines support stored procedures](https://cloud.google.co...
I updated the IDE (VS Code). Then the error is gone.` - sudo apt update - sudo apt upgrade code - code --version (to check the version) `
null
You would need to target your build to the latest version inside of the vite: So `esnext` would work best, or you can target `es2020`-`es2024` ```javascript export default defineConfig({ // ... build: { target: 'esnext', }, optimizeDeps: { esbuildOptions: { target: 'esnext', }, ...
Cannot update shortcut (folder name with space) in Powershell
|powershell|
Thank you, your comment helped me find the solution. I tried the 'fa-meh-blank' Remove. When I clicked it worked. And when I clicked again, my icon disappeared completely. My new JavaScript: icone.addEventListener('click', function(){ //console.log('icône cliqué'); icone.classList.toggle('h...
Suppose we have a system with radix 2^32 (x = a0 \* 2^0 + a1 \* 2^32 + a2 \* 2^64 +...) and we store the coefficients in a vector (a0 in position [0] , a1 in position [1] ...). This function allows you to calculate the square of x (for simplicity the non-zero coefficients of x occupy only half of the vector). ...
I ran the command: **sudo docker container prune** I had a stopped postgres sql container and the data was in the container only. Is there any way to recover this data? These are the docker events: 2024-03-28T16:13:33.986659248+05:30 container destroy 9df67ddcc79f895e4f4922187d32a2922520d6f2a94fb5b0bad60d...
sudo docker container prune recovery
|docker|docker-machine|
The answer, as I thought, was simple. Because I'm new to android development. I was creating my own instance of the AccessibilityService class while the application creates it itself as a service. Based on your class. And you need to learn to communicate with him.
Below I have a SubComponent and a MainComponent. This is meant to be a page that displays an image collection. In the Subcomponent using the ```onclick()``` event you can swap between pictures in that collection. **The MainComponent will also display links to other collections, but these are links to the same component...
Whenever I enter play mode, my patrolling enemy moves as expected but it's sprite is partially behind the tilemap. I can still interact with the game object. The Z position for my enemy is closer to the camera than the tilemap as well as the two points the enemy moves between. [This is the code I used](https://i.sta...
null
I am trying to pass additional Request Header in WebSocket connection in Angular for Authorization, but i am not able to find library to achieve that. Is there any way do that ? I tried using RxJs websocket and Websockets client API.
Passing Request Header in Websockets in Angular
|javascript|angular|websocket|
null
I am trying to deploy my ASP.NET Core Web API project that I created using Clean Architecture and my Azure Student portal account. The deployment is successful however when I navigate to the API's URL endpoint it doesn't show the JSON object that I was expecting. I also checked the application event logs in Azure but f...
After setting up the GitHub path in the Jenkins pipeline definition SCM (using GitHub webhook), can set the Jenkinsfile script path below to be in another repository on GitHub? [enter image description here][1] Thanks. For example: Webhook repository (https://github.example.com/example/test.git Jenkinsfi...
|reactjs|events|rendering|
Need to get a number using only one loop for and `charCodeAt()` We can't use native methods and concatenations, parseInt, parseFloat, Number, +str, 1 * str, 1 / str, 0 + str, etcc <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> const text = ""In this market I ...
Terraform tfstate file getting repeated locked even after Break Lease. Tfstate file stored in Azure Storage Account Container. How do I resolve the repeated tfstate file lock issue, The tfstate file is stored in Azure SA container.
Terraform tfstate file getting repeated locked even after Break Lease. Tfstate file stored in Azure Storage Account Container
|terraform|locking|tfstate|
In my work I use both STATA and R. Currently I want to perform a dose-response meta-analysis and use the "dosresmeta" package in R. The following syntax is used: ``` DRMeta <- dosresmeta( formula = logRR ~ dose, type = type, cases = n_cases, n = n, lb = RR_lo, ub = RR_hi, id = ID, data = DRMetaAnalysis ) ...
null
null
We need to try and simplify things -- and take them step-by-step. So, let's use a simple game scene, where we'll define a `rect` and add a `SKShapeNode` with a rectangle path, and a `SKShapeNode` with an oval path: import UIKit import GameplayKit class SimpleGameScene: SKScene { o...
I'm working on a VUE app. Part of the app is to show a table (team) with information from the backend (by axios / django rest_framework). This all works. When I click "nieuwe categorie" the modal opens with a form. Onsubmit, the function "submitHandler" is used. However, in that function I can't get the form data? ...
How to get the form data from the modal-component into the submithandler
|javascript|forms|vue.js|axios|modal-dialog|
[![Backend call failure][1]][1] Recently we started facing `Backend call failure` issue on the Nextjs app. (Failed to load resouce: the server responded with a status of 500) We have tried enabling App insights but not able to find anything in the logs. In Availability and Performance section we are able to ...
"Backend call failure" error in Nextjs App deployed on Azure static web app
|azure|next.js|backend|devops|azure-static-web-app|
My fix was timeout. If you want your task to stay running permanently, then there are check boxes you might want to try unticking. [] Stop the task if it runs longer than x [] If the running task does not end when requested, force it to stop
I'm on an AWS sagemaker instance, and I am trying to install nodejs so I can use CDK to deploy an app. I am using !curl -sL https://rpm.nodesource.com/setup_14.x | sudo -E bash - !sudo yum install -y nodejs But when I install I keep getting the error below (tried different versions 14, 16 and 20): Loade...
Deploying CDK python app from Amazon Sagemaker Notebook instance
|node.js|linux|amazon-sagemaker|amazon-linux|
[In this link ][1], the precision recall curve is calculated for each class. So, can we calculate precision recall auc like OvO auc roc? How can we combine class 0 and 1 just like the graph ([in this link][2]) and then get ovo precision recall auc? [![OvO auc][3]][3] [1]: https://stackoverflow.com/questions/5609...
How to plot OvO precision recall curve for a multi-class classifier?
|python|matplotlib|scikit-learn|precision|roc|
You can use a recursive CTE for this. I would warn you that this is likely to be very slow on 1.5m rows. It's a bit complicated to get attribute names, because it doesn't seem you can do `.nodes('@*')` to get all attributes. Instead you need to `CROSS APPLY` a union of the node name and its atttributes. ```tsql ...
null
In swift let rectInTableView = tableView.rectForRow(at: indexPath) let rectInSuperview = tableView.convert(rectInTableView, to: tableView.superview)
Thanks to [@wOxxOm][1] I was able to properly handle removing the old event handler. I currently experience this issue due to trying to handle another issue that stemmed from re-injecting scripts when the extension reloads see: https://stackoverflow.com/questions/10994324/chrome-extension-content-script-re-injection-af...
I am using PHP FFI to call a C++ DLL. I do not know how to pass PHP class objects to C++ DLL and convert the ptr sent back from C++ DLL to PHP objects. I wrote a demo to illustrate my problem. The C++ code: ``` typedef int(__stdcall* CALLBACKFUNC) (void* lpObj, int mtdId); class MyClass { private: ...
I have a table I'm trying to sort by column values in Stage It looks something like this: |CaseID|Stage|EventDate| |------|-----|---------| |1 |A |01/01/10 | |1 |B |01/03/10 | |1 |B |01/04/10 | |1 |C |01/05/10 | |2 |A |02/01/10 | |2 |B |02/02/10 | |2 |C |02/0...
[![My microsoft graph app permissions][1]][1] [1]: https://i.stack.imgur.com/74H87.png I am using microsoft graph api app to pull employee information and I am not Azure admin. Admin in my organization has authorized me attached permissions. Even with grated permissions am getting error, Code: Authorization_...
Microsoft graph api app throwing error Code: Authorization_RequestDenied Message: Insufficient privileges to complete the operation
|microsoft-graph-api|
I fixed my issue by adding `app:labelVisibilityMode="unlabeled"` to my bottomNavigationView tag. This completely removed the animation. Thank you for your assistance !
Rather than using some kind of counter, put the URL components into a list then you can just iterate over that. In this code the implementation of _get_rows() is a dummy. from collections.abc import Iterable parts = [ ("chile", "primera-division", "Chi-A"), ("algeria", "ligue-1", ...
|neo4j|cypher|jqassistant|
I have Ollama running in a Docker container that I spun up from the official image. I can successfully pull models in the container via interactive shell by typing commands at the command-line such as: `ollama pull nomic-embed-text` This command pulls in the model: nomic-embed-text. Now I try to do the same vi...
The value that you are trying to store is not numeric. See [TS.ADD][1]: > value is (double) numeric data value of the sample. The double number should follow RFC 7159 (JSON standard). In particular, the parser rejects overly large values that do not fit in binary64. It does not accept NaN or infinite values. ...
I found out that the way to do this is to grab the type of the object and mock the property of the type. The solution is therefore ``` def test_A(mocker): myObj = A() type(myObj).a2 = mocker.PropertyMock( side_effect=iter([[2, 3], [3, 4], [4, 5]]) ) myObj.run() ```
Im still new to the programming and I was wondering what is the problem in the code: ``` #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <limits.h> #define MAX_ROOMS 100 // Maximum number of room...
Weighted Graphs
|c|algorithm|weighted-graph|
null
You should check the execution plan for your query. You can see it by adding EXPLAIN clause at the beginning of the query text: ```sql EXPLAIN SELECT timestamp, first(price) AS open, last(price) AS close, min(price), max(price), sum(amount) AS volume FROM trades WHERE symbol = 'BTC-US...
{"OriginalQuestionIds":[16097955],"Voters":[{"Id":4108803,"DisplayName":"blackgreen"}]}
Nested columns with DataFrame in Streamlit data_editor?
I have a laravel 10 project that used livewire 3. When I was on development I used Google Chrome devtools. Today I deploy it on a local server and I turn the APP_ENV variable into production. It works fine but I can see that the livewire devtools is still running so anyone can access the components and its dat...
I don't 100% understand what you are after. ``<nobr>`` can keep content together: <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-css --> p { width: 140px; background: #eee; } <!-- language: lang-html --> <p>This is some text that in...
first question ) is ist possible to get metrics.search_rank_lost_impression_share > 0 for keywords ? um using for campaigns AdsApp.campaigns().withCondition("Status = ENABLED").withCondition("metrics.search_rank_lost_impression_share > 0").forDateRange("YESTERDAY").get(); second question) how can i make a...
adwords script get metrics.search_rank_lost_impression_share > 0 for keywords
|google-ads-api|
null
Git requires that you have checked our a branch before it makes a marge commit, the only exception is a fast forward. The easiest in your situation is making a new worktree from master, then inside that worktree merging the branch, before deleting the worktree ```sh git worktree add master cd master git merge ...
- **azure-storage-blob**: - **12.19.1**: - **Windows 10**: - **3.10.6**: **Describe the bug** When attempting to retrieve the list of blob names from the Azure Blob Storage container, an "Incorrect padding" error is encountered. This issue seems to be causing a hindrance in fetching the blob names effectively...
How do i fetch api data that is a link?
|reactjs|api|
null
I'm developing a Fortran parser using ANTLR4, adhering to the ISO Fortran Standard 2018 specifications. While implementing lexer rules, I encountered a conflict between the `NAME` and `LETTERSPEC` rules. Specifically, when the input consists of just a letter, it is always tokenized as `NAME` and never as `LETTERSPEC`. ...