instruction
stringlengths
0
30k
I have a project and when i try to run the main or the test directories i have no problems with the gradle build. But now when i try to run a an android test i get this error: Directory 'C:\Users\...' does not contain a Gradle build. i wrote a Compose Test that looks like this: `@RunWith(AndroidJUnit4::cla...
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:...
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...
I have data that looks similar to this: ``` df <- data.frame( LastName = c("Gamgee", "Gamgee", "Gamgey", "Baggins", "Baggins", NA, "The Gray"), FirstName = c("Sam", "Samwise", "Samuel", "Frodo the ring carrier", "Frodoh", "Smeagol", "Gandalf"), DOB = c("2012-08-24", NA, "2012-08-24", NA, "01-31-2004", "05-1...
Is it possible to create subqueries in SQFLite?
|flutter|sqlite|dart|
This is my code: const execBuffer = require('exec-buffer'); const gifsicle = import('gifsicle'); execBuffer({ input: encoder.out.getData(), bin: 'gifsicle', args: ['--output', execBuffer.output, '--lossy=100', '--optimize=03', execBuffer.input] }).then(data => { ...
Better create an extension function like `ParcelableExt.kt` ```kotlin inline fun <reified T : Parcelable> Intent.parcelable(key: String): T? = when { SDK_INT >= TIRAMISU -> getParcelableExtra(key, T::class.java) else -> @Suppress("DEPRECATION") getParcelableExtra(key) as? T } inline fun <reified T : Parc...
When I add the option `--oem 0` (OCR Engine mode for Tesseract only), the `--user-patterns` option is properly enforced ! See this [PR comment][1]. Following is my example. I slightly tweaked the image `in.png` from https://stackoverflow.com/questions/33429143/tesseract-user-pattern-is-not-applied to have ambigui...
I want to prevent celery from acknowledging task if it raised an exception setting acks_late didn't make any difference ``` @app.task(acks_late=True) def send_mail(data): raise Exception ``` I tried doing the following ``` class CeleryTask(celery.Task): def on_failure(self, exc, task_id, args...
felixolszewski@Felixs-MacBook-Pro-2 SMART TV % ares-install --device emulator "/Users/felixolszewski/Desktop/SMART TV/com.felixolszewski.app1_1.0.0_all.ipk" ares-install ERR! [syscall failure]: connect ECONNREFUSED 127.0.0.1:6622 ares-install ERR! [Tips]: Connection refused. Please check the devic...
packed ECONNREFUSED/unpackaged ERR_FILE_NOT_FOUND: failing to get app runing on lg web os simulator
|typescript|tsconfig|webos|lg|
I am trying to ground my vertex generative AI studio chatbot with a vertex data store. The field asks for a vertex data store path and specifies the path format projects/(project name)/...... I have already created a data store in vertex ai search. How do I identify it's path? The tutorial suggests that I click...
How do I find my vertex data store path for grounding a chatbot in the studio?
|google-cloud-platform|google-cloud-vertex-ai|
null
When I move my mouse outside the boundary I drew in tkintre it gives error ``` > Exception in Tkinter callback Traceback (most recent call last): File "c:\Users\My PC\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 1962, in __call__ return self.func(*args) ^^^^^^^^^^^^^^^^ ...
Is there a way to match individuals across rows in one dataframe?
|r|rstudio|
What you've written (`if(VAR_A OR VAR_B OR VAR_C)`) should work just fine. CMake supports [`NOT`, `OR`, and `AND` for logical operators](https://cmake.org/cmake/help/latest/command/if.html#logic-operators) in `if()` command condition expressions, and you can enclose sub-expressions in `()` to control evaluation prec...
Try setting the domain from which the request is coming in the corsOptions field for origin. ``` const corsOptions = { origin: 'https://example.com', credentials: true } ```
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...
Celery Redis how to prevent task acknowledge if raised an exception
|python|redis|celery|
|linux|bash|shell|
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 [Lambda Features](https://i.stack.imgur.com/EujxH.pn...
if i am correct you want to read data from firebase and based on that you want to pass values to you form like hints for various fields ? if so then tack a look at the following Future<void> _fetchDocument() async { DocumentSnapshot document = await _firestore.collection('yourCollection').doc('yourDocu...
I have this simple code: import pydantic from typing import ClassVar from pydantic import BaseModel, PrivateAttr class Parent(pydantic.BaseModel): _attribute: str = PrivateAttr('parent_private_attribute') class Child(Parent): _attribute: ClassVar[str] =...
i have this code to multi select PDF from device and i need the real path of each PDF, when i select one PDF i can get the real path using ``` String path = data.getData().getPath(); ``` but in case of multi select i can only get the URI of each selected PDF (for my knowledge), here is the code. ``` private v...
get the real path of multi selected PDF
|java|android|android-studio|path|uri|
When asking questions like this it's very helpful to provide example DDL and DML in an easy to understand and reproduce format: ```SQL DECLARE @Table TABLE (custname VARCHAR(20), week INT, sales DECIMAL(10,2), orders INT); INSERT INTO @Table (custname, week, sales, orders) VALUES ('CustAAA', -1 , 974697.41 , 6201...
pydantic v2: ClassVar attribute is taken from parent class instead of current class
|python-3.x|pydantic-v2|
I wrote a custom table widget which is derived from `QTableWidget`. The last two columns in this widget use a custom cell widget (one containing a `QCheckBox`, the other a `QLineEdit`, with some optional `QPushButtons`). Now, I added the option to color the table widget rows in a darker blue or orange color, dependi...
You can use `line_profiler` in jupyter notebook. 1. Install it: `pip install line_profiler` 2. Within your jupyter notebook, call: `%load_ext line_profiler` 3. Define your function `prof_function` as in your example. 4. Finally, profile as follows: `%lprun -f prof_function prof_function()` Which will prov...
as @robert suggested in the comments I started using https://ng-bootstrap.github.io/#/home for this functionality and this works.
I'm currently trying to deploy a Next.js app on GitHub Pages using GitHub Actions, but I get a page 404 error even after it successfully deploys. I've looked around a bunch of similarly named questions and am having trouble figuring this out. Here is my GitHub repo: https://github.com/Mctripp10/mctripp10.github.io ...
``` <!DOCTYPE html> <html> <body> <p id="Num"></p> <p id="musicTitle"></p> <button onclick="next()">pipi</button> <audio controls> <source id="songSrc" type="audio/mp3"> </audio> <script> Num = 1 const maxNum = 2 document.getElementById("Num").innerHTML = Num song = [ { title: "evil forest", sr...
The error is telling you that the [`<label>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label) claims to be associated with a particular form element, but that form element doesn't exist. If this label is associated with a form element, that element needs to exist. For example, it can be outside the...
I'm starting my React studies and trying to create a title component and a description component (paragraph), but I'm facing challenges. Here's the data that comes from the API: ![API Data](https://i.stack.imgur.com/9hBnb.png) ## Component Code ```javascript // use client import { PersonalitiesProps } from "...
How does a component in nextjs do so that its value comes from an api
|reactjs|typescript|api|next.js|
One reason this can happen is if you don't store the user's password with the task. Without a password, the user is unauthenticated, i.e., anonymous, and can't access the database. See if you have the box below checked and, if so, try unchecking it. This is found under Security options on the task's General tab. [![...
document.getElementById.innerHTML = variable not changing
|javascript|html|arrays|variables|
null
I create plotly bar chart using the next line ``` ` fig = px.bar(df_to_print, x="bin_dist", y=metric, color='net_id', barmode="group", text=metric, color_discrete_sequence=px.colors.qualitative.Vivid)` ``` and got this chart (using streamlit): [enter image description here](https://i.stack.imgur.com/D8...
Plotly bar chart - emphasise maximum value of each group
|plotly|bar-chart|streamlit|
null
$updatedRule = [ "id" => $ruleId, "paused" => false, "description" => "BlockBadIP", "action" => "block", "filter" => [ "id" => $filerID, "expression" => $newFilterExpression ], ]; $updateUrl = "https://api.cloudflare.com/c...
I have the a list of thumbnails that are rendered to the screen as follows: <div class="color" style="background:${rgbToHex(color.value.r, color.value.g, color.value.b )}" > <context-menu></context-menu> </div> When I hold on the color div, I want to show...
How to handle mousedown in lit
|typescript|lit|
You want your script to tell you if the input is a word or a number. Your first attempt tried to do this by dividing the input by itself, but this caused problems when the input wasn't a number. Here's an improved way to do it: #!/bin/bash # This stores your input into a variable. uniq_value=$...
|python|callback|plotly-dash|
This 'problem' is reproducible by the following git repository: https://github.com/tschmit/EFCLazyVsEagerWeird I have the following entities (lots of lines omitted): ```csharp class Folder { public virtual ICollection<File> Files { get; set; } public virtual ICollection<Log> Logs { get; set; } ...
I've created a ttkbootstrap tableview with several columns where one column title/heading is configured to be right justified. When data is loaded the column title/heading is no longer right justified. I've used Treeview before and when refreshing data column headings always kept their configuration. Using ttkboots...
How to force ttkbootstrap TableView column title to always stay right justified
|tableview|ttkbootstrap|
null
Based on [Process.MainWindowHandle Property](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.mainwindowhandle?view=net-8.0) documentation you should call `Process.Refresh` beforehand in order to guarantee that you will retrieve current value. > The main window is the window opened by the proc...
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...
public async Task<string> FetchUser(FetchUser postdata) { try { ServicePointManager.Expect100Continue = true; ServicePointManager.DefaultConnectionLimit = 9999; System.Net.ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12; HttpClient ...
The request was aborted: Could not create SSL/TLS secure channel (while debugging same code is working fine)
|c#|ssl|httpclient|tls1.2|
null
I need to install a self-signed SSL certificate to trusted root on the windows device from my uwp app code how can I achieve this?
``` <li class="drop-down-bike-1"> <a href="#">MODERN CLASSICS</a> <ul class="modern-list"> <li class="drop-down-bike-display"> <div class="mod-list" style="width:400px; height:600px; overflow-y: scroll;"> hello {% for bi in mod_bike %} <a href="#"> ...
Failed to notify project evaluation listener error on Android Studio
|android|kotlin|gradle|
If you want this to work with string enums, you need to use `Object.values(ENUM).includes(ENUM.value)` because string enums are not reverse mapped, according to https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-4.html#string-enums: enum Vehicle { Car = 'car', Bike = 'bik...
null
The given warning: Warning - Trying to access array offset on value of type null - PHP 7.4.0 #7776 results form this snippet `$key = $key[1];` and can be solved by using this instead: $key = isset($key[1]) ? $key[1] : null;
null
|sql-server|entity-framework-core|ef-core-3.1|ef-core-8.0|
I run an angular application and there is not compilation error. However, the browser sent the following error: Both the table and dtOptions cannot be empty I am using angular 17. The ts file contains the following code: ``` import { BankAccountsRefComponent } from './bankaccounts-ref.component'; import...
**EDITED FOLLOWING COMMENTS** If you use the default numpy.meshgrid call then the layout of your x and y values with respect to the dependent-variable array corresponds to the following: (print ```x_grid```, ```y_grid``` and ```z_values``` out if you want to see): x -------> y | [dependent-]...
how to search for content in Nuxt 3 with the @nuxt/content module using .json files?
|javascript|typescript|vue.js|nuxt.js|
null
I had the same issue but everything was working ok on my local env just remote won't work so Adding "custom-fields" to the support args did not fix my issue, I had to navigate to Settings -> Permalinks -> and select "Post name" and "save changes" for everything to work as my local env. I think the permalink structur...
I have a question about consuming webservices with JSON/Gson because my new webservice delivers other strings than my old webservice. My new webservice is generated by Strapi 4 and I have no possibility to change it. My Java application worked with JSON strings like this from my old webservice: ```json [ { ...
If you don't want to use an agent then you can add a template to your llm and that has a chat history field and then add that as a memory key in the ConversationBufferMemory(). Like this : template = """You are a chatbot having a conversation with a human. {chat_history} Human: {human_input} Chatbo...
![https://i.stack.imgur.com/pKAlh.png](https://i.stack.imgur.com/pKAlh.png) Right click on project you have in use, click on Properties, go on "Compiler compilance level", and select 1.8 ![https://i.stack.imgur.com/GWMvZ.jpg](https://i.stack.imgur.com/GWMvZ.jpg)
null
Right-click the project you have in use, click `Properties`, go to `Java Compiler`, and set `Compiler compilance level` to `1.8`. ![https://i.stack.imgur.com/pKAlh.png](https://i.stack.imgur.com/pKAlh.png) ![https://i.stack.imgur.com/GWMvZ.jpg](https://i.stack.imgur.com/GWMvZ.jpg)
I'm working on a Node.js project using Firebase Realtime Database, and I'm encountering an error when trying to match clients with therapists based on their responses. The error message I receive is `"db._checkNotDeleted is not a function"`. Here's the relevant part of my `match.js` file where the error occurs: `...
Firebase Realtime Database Error: "db._checkNotDeleted is not a function" in Node.js
|node.js|firebase|firebase-realtime-database|
null
I'm wondering if anyone can explain the difference in behaviour between GCC/Clang and MSVC for this code: ```cpp #include <iostream> class Base { public: Base(int* a) : ptr{a} { std::cout << "Base construct\n"; } ~Base() { std::cout << "Base destruct\n"; } int* ptr; }; class Derived : publ...
|django|django-views|django-templates|
Your algorithm is wrong. Look at this: for (i = 0; i < N; i += 8) for (j = 0; j < M; j += 4) { if (j == i || j == i + 4) { /* same block */ For 8x8 matrix both `N`and `M` is 8 so it's like: for (i = 0; i < 8; i += 8) for (j = 0; j < 8; j += 4) { if (j == i...
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 ...
You can try something like that: 1. Get the full URL: window.location 2. Get the only protocol: window.location.protocol 3. Get the host (without port): window.location.hostname 4. Get the host + port: window.location.ho...
Use SELECT `Order ID` FROM Returnedsss; or SELECT [Order ID] FROM Returnedsss; The issue is how single quotes are used to enclose a literal value character string in preference to enclosing a component name (column table etc).
Given an linear system Ax=b, x = [x1; x2], where A,b are given and x1 is also given. A is symmetric. I want to compute the gradient of x1 in terms of A,b, i.e. dx1/dA, dx1/db. It seems that torch.autograd.backward() can only compute the gradient by solving the whole linear system. But I want to make it more efficient b...