instruction
stringlengths
0
30k
null
Every 3rd or 4th time I attempt to debug my application (.NET 8, WPF, C#) the debug session freezes at startup. I see my splash screen and nothing further happens. The code is locked in a call to log4Net's `LogManager.GetLogger`. Even Debug >> Break does not work at this point. (I get an error message from Visual ...
Log4Net hangs my app every 3rd or 4th debugging session
|c#|.net|log4net|
My query ``` select custname, case when date < '11/26/2023' then -1 else datepart(wk,date) end 'week#', sum(amount) sales, count(salesid) orders from SalesTable inner join CustomerTable c on salestable.CustID=c.CustID where date < '1/27/2024' and c.CustID = 10285 or c.CustID = -2 group by c.custid,custname, [a...
Structure your NavigationLinks with a label and then change the width of the frame per below. This solved my issue of making the oval behind the image disappear. NavigationLink { FenderXperience() } label: { Image("Fender II") ...
|css|svg|clip-path|css-mask|
I am developing a Web Application with a Node/JS frontend and a Python backend. Development is done in two DevContainer environments with one DevContainer definition for each sub-project. So far, I open two instances of `vscode`, one for each sub-project. Each of the DevContainer setups mounts the overall project folde...
I have a complex model written in Fortran which is a self contained entity which reads an input file, allocates memory for all the data structures, initializes the model, provides guesses to the solution, uses a derivative-based solver to solve the nonlinear equations, and populates the output structures, deallocates m...
I am getting the following error when writing the `@Query` Decorator for `getAccountAssets` resolver method:- > Unable to resolve signature of method decorator when called as an expression. Argument of type 'TypedPropertyDescriptor<(userTokenPayload: UserTokenPayload, accountType: AccountType) => Promise<AllAccou...
I'm experiencing a bug that only occur in iPhone X/XS that runs iOS 16.2. I couldn't tap the push notification when the app is already active. I need to trigger a feature when the push notification is tapped. When the app is on the background, it worked. But when the app is already active / on the foreground, it didn't...
Push notification can't be activated in certain phone models and OS
|ios|push-notification|
I am new in Python and I am trying to follow this [tutorial](https://python.langchain.com/docs/get_started/quickstart#building-with-langchain). I am using `Python 3.12.2`. I followed until the end of [Retrieval Chain](https://python.langchain.com/docs/get_started/quickstart#retrieval-chain). I am running it us...
Python doesn't detect the library
|python-3.x|windows-subsystem-for-linux|langchain|ubuntu-22.04|ollama|
null
**Medallion Architecture** (or Milti hop architecture) in Data Lakehouse recommends multi-layered approach to building a single source of truth for enterprise data products. Below are the 3 layers describing the quality of the data in each of these layers. **BRONZE** layer contains raw data. This layer contains just...
I am trying to create embeddings for the chunk text which I have created, but when I try to use the method from_texts, i am getting the following error AttributeError: 'Pinecone' object has no attribute 'from_texts' This is my code. model_name = "sentence-transformers/all-mpnet-base-v2" model_kwargs...
AttributeError: 'Pinecone' object has no attribute 'from_texts'
|vector-database|pinecone|
null
null
null
null
`Code.exe` isn't designed to be invoked _directly_; Visual Studio Code's designated CLI entry point is the `code.cmd` _batch file_, located in the `bin` subdirectory of where `Code.exe` is located. `code.cmd` *automatically* suppresses the - asynchronously arriving - console messages you're seeing. Therefore, you...
I have the following code, the RepositoryException will be handled by a global ExceptionHandle. ``` ``` public Category update(Category entity) { try { em = emf.createEntityManager(); em.getTransaction().begin(); Category category = em.find(Category.class, entity.getId()); ...
Sub DeleteRowsonCriteria() Dim lastRow As Long, dataRow As Long Dim prodTran As String, prodTran2 As String, prodOIS As String, prodOIS2 As String lastRow = ActiveSheet.UsedRange.SpecialCells(xlCellTypeLastCell).Row For dataRow = lastRow To 3 Step -1 prodTran = Range...
So I'm not sure what the `az ad sp` command is really for, but I just found out that to make service principal client secrets you need to use `az ad app` az ad app credential reset --id ${CLIENT_ID} az ad app credential list --id ${CLIENT_ID} These are visible in **Azure Portal > Entra ID (Active Directo...
I am using go-gorm this is my model struct type Inventory struct { ID int `gorm:"primaryKey;notNull" json:"id"` Qty uint `json:"qty"` In *int `gorm:"-:all"` Out *int `gorm:"-:all"` } Notice `In` and `Out` Fields, I dont want *Gorm* to crea...
How to fill out ignored Field to store query calculation result
|go|go-gorm|
Clip/mask (remove) top-right image corner with SVG
This is purely for experimental purposes and/or a learning exercise. In essence, I'd like to see if I can reduce the footprint of the closure created when we use `Task.Run(()=>Func<>())` by creating a class that I initialize only once. One, the objective would be to avoid creating a 'new' instance of this every time we...
Reducing closure overhead in Task.Run/Factory.StartNew with predefined object
By using Lambda@Edge inside CloudFront I am not able to install packages thourgh `npm` as `CloudFront `does not allow layers: **According to AWS doc:** https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-at-edge-function-restrictions.html [enter image description here](https://i.stack.imgur...
null
What are you trying to do is called _pivoting_, so use [`DataFrame.pivot()`][1]: ```py import pandas as pd df = pd.read_csv("your_file.csv", header=None) out = ( df.pivot(index=1, columns=0, values=2) .rename_axis(index="ID", columns=None) .reset_index() ) print(out) ``` Prints: ```non...
I'm trying to set up Flink SQL with the Apache Iceberg catalog and Hive Metastore, but having no luck. Below are the steps I've taken on a clean Flink 1.18.1 installation, and the resulting error that I get. ## Set up components Run Hive MetaStore: ```bash docker run --rm --detach --name hms-standalone \ ...
Flink with Iceberg Catalog and Hive Metastore: org.apache.hadoop.fs.s3a.S3AFileSystem not found
|apache-flink|hive-metastore|apache-iceberg|
|vb.net|timer|scheduled-tasks|windows-task-scheduler|
I am trying to split the data and rearrange the data in a CSV file. My data looks something like this ```none 1:100011159-T-G,CDD3-597,G,G 1:10002775-GA,CDD3-597,G,G 1:100122796-C-T,CDD3-597,T,T 1:100152282-CAAA-T,CDD3-597,C,C 1:100011159-T-G,CDD3-598,G,G 1:100152282-CAAA-T,CDD3-598,C,C ``` and I want a t...
|python|tkinter|
{"Voters":[{"Id":23450026,"DisplayName":"Clayton Manda"}]}
I have the following code, the RepositoryException will be handled by a global ExceptionHandle. ``` public Category update(Category entity) { try { em = emf.createEntityManager(); em.getTransaction().begin(); Category category = em.find(Category.class, entity.getId()); ...
The goal is to populate a model using OnGet() and display the results of all records in a table and finally, be able to change only the state of the checkbox on multiple records and then submit the changes to OnPostAsync(). The .cshtml page loads with all data from the database as expected. Existing records reflect ...
CloudFront Lambda@Edge in NodeJS. Layer is not supported for cloudfront. How to use external libraries in edge lambda?
|aws-lambda|amazon-cloudfront|
null
>The third document will not be returned by the query I am using so mongoDB does not seem to search subarrays recursively. This is correct. --- Now let's understand why the behavior is as such, Mongo iterates over each item in the database array and evaluates them to see if they match the constraint. From t...
IntelliJ Idea 2021.3.2 (Ultimate Edition) I have such a service import org.springframework.boot.info.BuildProperties; @Service public class MyVeryBestService { private final BuildProperties buildProperties; @Autowired public MyVeryBestService(BuildProper...
I have created a new app with type academic research. With this I have completed the verification process for Verify your Identity, Verify your relationship with an academic institution and Complete researcher profile. However, the most basic flow to fetch data with @GET /v19 /me?fields=id,name API is not working an...
Unable to generate access token in facebook graph api explorer
|facebook|facebook-graph-api|
I'm working on a project in Reac Native Expo and using "expo-router" to navigate between pages. I need to send a nested object array from one screen to another. My object structure is something like this: item: { id: '123', name: 'name', nestedObjectArray: [{id: 1, name: 'name'}, {id: 2, name: 'name'...
Does this query determine if a SQL Server login can execute the CREATE DATABASE command? ```SQL select the_login.name as the_login_name, the_login.principal_id as the_login_principal_id, case sysadmin_role_assoc.role_principal_id when null then 0 else 1 end as user_has_sysadmin_role, case serveradmin_...
Why is my asp.net core razor pages model always empty in the OnPostAsync()
|c#|asp.net-core|razor|razor-pages|
null
I'm just building an GCC version from source. During the make step, I get the error message ``` "WARNING: `makeinfo' is missing on your system. You should only need it if you modified a `texi' or a `.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be t...
Local connections don't go through the listener, so they don't use a TNS string or connection string of any kind. They use the bequeath protocol whereby your client process becomes your database process (e.g. there is no separate shadow process like a listener-created connection makes). Because they don't go through th...
In this declaration int *p1 = arr; the array designator is implicitly converted to a pointer to its first element. It is equivalent to the following declatayion int *p1 = &arr[0]; An expression like that `arr[i]` where `i` is some integer is evaluated like `*( arr + i )`. That is the expession `a[...
|sql-server|visual-c++|sql-server-2019|sql-server-2022|
Keeping your original code as much the same as possible, this should do what you're looking for. To explain it a little, when sorting, you want to return which direction you want the object to move. 1/-1 shift is left or right, and 0 keeps the order the same. Taking the difference of the indices is not going to pro...
To make a copy of an array where every non-zero element is replaced by 1 and without using numpy, you just have to iterate over the array and apply a ternary operator, where you will define the condition and the output: import numpy as np a = np.array([2, 7, -2, 0, 0, 9]) b = [1 if i != 0 else 0 for i ...
I figured out the issue. I was using ' and I needed to use `
I need your help with this. I want to left click on a country, ex Italy. Print the name Italy and color Italy on the map. Should be usable with any country. Here is my code: found this: https://stackoverflow.com/questions/23399704/polygon-containment-test-in-matplotlib-artist ``` import matplotlib.pyplot as ...
null
How do I get a data variable from a Promise function using node js?
i just created a fresh installation of docusaurus 3.1 Now I want to enable mermaid. The docu says: ``` export default { markdown: { mermaid: true, }, themes: ['@docusaurus/theme-mermaid'], }; ``` But when I open the docusarus.config.js and add this lines, I get an error: Cause: ParseError: Only...
Docusaurus config - syntax unclear
|config|
null
I managed to do it this way: I found hierarchy of all contours and then found 4 contours with the same hierarchy number. Those 4 contours are the 4 squares in the picture. for cnt in zip(contours, hierarchy): approx = cv2.approxPolyDP(cnt[0], 0.01 * cv2.arcLength(cnt[0], True), True) if len(approx) == ...
Short version: Tailwind works by scanning your code and looking for things that it recognizes as classes. It then only outputs those classes into the css and everything works. This breaks down when dynamically generate a className. :/ Despite what some believe though, (and the editorial emphasis of their own docs)...
I'm just building an GCC version from source. During the make step, I get the error message ``` "WARNING: `makeinfo' is missing on your system. You should only need it if you modified a `texi' or a `.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be t...
{"OriginalQuestionIds":[24466615],"Voters":[{"Id":523612,"DisplayName":"Karl Knechtel"},{"Id":-1,"DisplayName":"Community","BindingReason":{"DuplicateApprovedByAsker":""}}]}
This is for [Kotlin DSL][1] (build.gradle.**kts**). ### Method 1 (no need for `application` or other plugins) ```kotlin tasks.jar { manifest.attributes["Main-Class"] = "com.example.MyMainClass" // OR another notation // manifest { // attributes["Main-Class"] = "com.example.MyMainClass" ...
I came with issues with my custom server built on Java Socket. Server works great and transmits data properly with exception of when after HTML form submission I want to redirect browser to success or failure notification address. I send 303 See Other in response to POST sent from mentioned form and page starts refre...
I'm just building an GCC version from source. During the make step, I get the error message ``` "WARNING: `makeinfo' is missing on your system. You should only need it if you modified a `texi' or a `.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be t...
Consider the slope plot below: ``` r library(tidyverse) df <- tibble( id = 1:100, x1 = sample(1:50, 100, replace = TRUE), x2 = x1 + sample(1:50, 100, replace = TRUE) ) %>% pivot_longer( 2:3, names_to = "var", values_to = "val" ) ggplot(df, aes(x = var, y = val, group = id)) + ...
Slope plot with marginal distributions using ggplot2
|r|ggplot2|
I know that `atomic<T>` will apply a lock on type "T" variable when multiple threads are reading and writing the variable, making sure only one of them is doing the R/W. But in a multi-CPU core computer, threads can run on different cores, and different cores would have different L1-cache, L2-cache, while share L3-c...
Does C++11 atomic automatically solve multi-core race on variable read-write?
|c++|multithreading|c++11|atomic|cpu-cores|
function new_date(){ var ss = SpreadsheetApp.getActive(); var rg = ss.getRange("A2:A10"); var vs = rg.getDisplayValues(); Logger.log(JSON.stringify(vs)); } DATA: ||A| |:---:|:---| |1|COL1| |2|1/1/2024| |3|1/2/2024| |4|1/3/2024| |5|1/4/2024| |6|1/5/2024| |7|1/6/2024| |...
When Socket connect is refused, you aways want to check the connect callback. def connect(params, socket, info) do # You are doing something here that makes the connect fail. end My guess is the token that is `undefined`, you are likely validating the token or some condition that fai...
I wrote below bash Shell script to check whether the input value is a character string or a number (using Mathematical function): #!/bin/bash uniq_value=$1 if `$(echo "$uniq_value / $uniq_value" | bc)` ; then echo "Given value is number" else echo "Given value is string" fi T...
{"OriginalQuestionIds":[9191803],"Voters":[{"Id":8620333,"DisplayName":"Temani Afif","BindingReason":{"GoldTagBadge":"css"}}]}
I used [git-filter-repo][1] to remove several large binary files from my git repo after migration from SVN. Now, I have to add few selected files back and was wondering what will happen to the git repo size if I add the identical 3.14MB binary file to 5 branches: Does git detect that the file has the identical hash? Do...
git repo size due to commit binary file to multiple branches
|git|hash|binaryfiles|filesize|git-filter-repo|
My problem is the following, I want to make a query where I bring all (*) of a table (ELEMENT) and another table (IMAGE) may have 3 different images, but I only want to bring the first element, unfortunately with my query brings me 3 times the same ELEMENT but with different IMAGE since I have 3. I want to bring 1 i...
You should uncomment the `test_sequence` and include only the tests you want, for example: scenario: test_sequence: - destroy - create - converge # - idempotence - lint - verify Read more: [Advanced testing](https://ansible.readthedocs.io/projects/m...
I'm just building an GCC version from source. During the make step, I get the error message ``` "WARNING: `makeinfo' is missing on your system. You should only need it if you modified a `texi' or a `.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be t...
|python|numpy|opencv|image-processing|integer-overflow|
```haskell import Network.Socket import Control.Monad import Network import System.Environment (getArgs) import System.IO import Control.Concurrent (forkIO) main :: IO () main = withSocketsDo $ do putStrLn ("up top\n") [portStr] <- getArgs sock' <- socket AF_INET Stream defaultProtocol let po...
You should install your custom module: go install project/lesson/students.go