instruction stringlengths 0 30k ⌀ |
|---|
I'm evaluating Svelte for a project, and I'm stuck on importing `ActionData`; here's the error:
> Module '"./$types"' has no exported member 'ActionData'.
Here's how I'm trying to import it, in a _+page.svelte_:
```
import type { ActionData } from './$types';
export let form: ActionData;
```
Here's m... |
Ultralytics doesn't find source |
|python|object-detection|yolo|yolov8|ultralytics| |
null |
In Keycloak logs, we used to found often this exception:
> Caused by: java.lang.RuntimeException: action URI not set at
> org.keycloak.forms.login.freemarker.model.UrlBean.getLoginAction(UrlBean.java:48)
> ... 110 more
Here is how we corrected it.
In a custom theme the ‘base’ had been changed in such a way t... |
Disclaimer this is not a full answer.
I used the [quickstart][1] to start my project, then :
In MyApp.h :
RefPtr<Overlay> inspector_overlay_;
In MyApp.cpp :
MyApp::MyApp()
{
app_ = App::Create();
window_ = Window::Create(app_->main_monitor(), WINDOW_WIDTH, WINDOW_HEIGHT... |
Azure VM RDP doesn't require 'Virtual Machine Admin/User Login' roles despite what documentation says |
|azure|virtual-machine|rdp| |
My application is java and onboared to elastic. I can write python script with app ame, after testing connection to elastic server. I am in need to get last 1hr tracing details through devtool/API/python.
es.Elastcsearch("https://localhost:9200")
And then query: { "match": { "name": "1NN_java"}}
If I want to get l... |
Elastic python to extract last 1hr tracing |
|python|elasticsearch|search|kibana| |
null |
Having an issue with updating nested attributes for a polymorphic association, specifically, when attempting to update nested records through a join model.
The nested records can be one of a dozen different models and are known simply to the join model as "component". My error messages correctly indicate the attribu... |
### Security Considerations:
1. **Cookie Security**:
- Use secure httponly cookies with the `Secure` flag and proper SameSite settings.
2. **Token Validation**:
- Validate JWTs server-side using Cognito's public keys.
3. **CORS**:
- Implement restrictive CORS settings to prevent CSRF attacks.
... |
I am currently working on an android application where i have to register new users into sqlite db and users enter their details into editText and we need to fectch entered data and store it in db
the thing is when i try it with hard coded data it works fine.
DBHelper.java
```
package com.example.db;
impor... |
how to insert data from edit text to sqlite db in android application |
|android|android-sqlite|sqliteopenhelper| |
null |
The Swift equivalent of Objective-C's `@selector()` expression, is `#selector()`. In Xcode, the Objective-C, `@selector()` expression will offer autocompletions for all available selectors and the selector expression is constructed with *just* the selector; e.g., `@selector(valueForKey:)`.
In Swift, Xcode only somet... |
In what context can we use an unqualified #selector expression in Swift? |
|swift|objective-c|cocoa|selector| |
null |
{"Voters":[{"Id":215552,"DisplayName":"Heretic Monkey"},{"Id":5394572,"DisplayName":"madreflection"},{"Id":529282,"DisplayName":"Martheen"}]} |
null |
null |
null |
null |
|arrays|loops|shell| |
Iterate over items in one array and groups of items in second array |
Progaurd and R8 shrink ofuscate the code and unable to make a build |
Selenium cannot load a page |
|selenium-webdriver|web-crawler| |
null |
I have self-hosted tooljet on AWS EC2 by using tooljet official AMI from marketplace.
tooljet is up and running fine and i'm able to connect to the databases aswell.
FYI, i have given 8vcpu and 16gm memory to my ec2 server, For RDS it is 2vCPU and 4gb RAM. And there's no issue in both server and rds load, all ... |
Tooljet issue: Tooljet interface is becoming unresponsive when i try to visualise the query results |
|issue-tracking| |
null |
Resize the image using `BitmapFactory` `inSampleSize` option and the image doesn't lose quality at all. Code:
BitmapFactory.Options bmpFactoryOptions = new BitmapFactory.Options();
bmpFactoryOptions.inJustDecodeBounds = true;
Bitmap bm = BitmapFactory.decodeFile(te... |
I have a table like:
| concatenated_dates | mat_emp |rest |
|:---------------- | :----: |----: |
| EX 2018/2019 | AO-26 |27.5 |
| EX2019/2020 | AO-26 | 30 |
| EX2020/2021 | AO-26 | 30 |
| EX2021/2022 | AO-26 | 30 |
| EX2022/2023 | AO-26 ... |
I am trying to set up a class that needs pandas and SARIMAX from the statsmodels module.
I have installed pandas and statsmodels, but I can't get VS Code to import them. I have tried to run `pip show pandas` but it does not return me a location to see if the environment is in the same place as the pandas module.
... |
For context :
- I launch Bluestacks
- Open command prompt
- Run "cd %LocalAppData%\Android\sdk\platform-tools"
- Run "adb connect localhost:5555"
- cd to my project root folder
- run "npx react-native start"
Then I open another command prompt once fully started and do the following :
- cd to the project root ... |
Gradle Build Failing due to missing method Implementation() |
|gradle|android-gradle-plugin|build.gradle|gradle-plugin|gradlew| |
null |
The reason that it only works for only one subdomain is that `next auth` by default sets the cookies on the domain that the signIn has performed on. To change the default behavior and give it a custom domain (e.g. domain with empty subdomain which means all subdomains `.my-site.com`) while using next auth version 4 we ... |
I am using an API to send SMS I want to pass variables like phone number and message in a URL.
When I am sending variable dynamically then it's not retrieving value of a variable.
Below is my code:
router.post('/testSms',(req,res) => {
const phone = req.body.phone;
const msg = req.body.m... |
The issue is what you're passing to `against`. [Boolean full text search has a specific syntax](https://dev.mysql.com/doc/refman/8.0/en/fulltext-boolean.html), and you're passing it things with syntax errors. The error depends on the values you pass in, so it seems "random". MySQL is not being helpful with its no-conte... |
How can I import ActionData? |
|svelte|sveltekit| |
According to the Java code, the file format is as follows:
- 0x01030307 (that is 16974599 in decimal representation)
- 32-byte file count, little endian
- File 1 32-byte length, little endian
- File 1 name followed by 0x00
- File 1 bytes
- ...
- File N 32-byte length, little endian
- File N name followed by 0... |
From the [docs](https://developer.ebay.com/devzone/xml/docs/Reference/eBay/AddItem.html#Request.Item.ProductListingDetails.BrandMPN):
>"Both Brand and MPN should be specified if the BrandMPN container is used, or an error may occur."
In other words, the product must have both the brand and MPN. This should fix you... |
In your Vue component within Laravel, you can import the image from the public folder and use it as the source for your image tag. Here's how you can do it:
```javascript
<template>
<div>
<img :src="imageSrc" alt="message placeholder image" class="w-full object-cover">
</div>
</template>
<script setu... |
That code will decompress a zlib stream, not a zip file. [Two different things][1]. Wherever you found that code, the function is very poorly named. It does not do what it the name claims: `unzipFile`.
You can look at libraries like [libarchive][2] to unzip file, or you can write your own using the [zip file format ... |
I need version 9.3.0 or an older version (> 5.0) of mingw-w64, either i686 or x86_64 for MSYS2. Where can I find this package? |
How to obtain mingw-w64 version 9.3.0 or older for MSYS2? |
|windows|gcc|mingw|mingw-w64|msys2| |
|android|android-jetpack-compose|android-jetpack-compose-pager| |
Unluckily I really don't see any possibility to speed up the random distributions, except for rewriting them yourself in numba compatible python code.
But one easy possibility to speed up the bottleneck of your code, is to replace the two calls to the stats functions to one call with:
p1, p2 = (
stat... |
{"Voters":[{"Id":18836744,"DisplayName":"Rakesh Govindula"},{"Id":18229928,"DisplayName":"Rukmini"},{"Id":17623802,"DisplayName":"RithwikBojja"}]} |
The `map` option is a clean way. Another option would be to do a merge, or a replace. You could also use `case_when`, which at the moment works only on series. You have to pass a list of tuples, where the first entry in the tuple is the condition, while the second entry in the tuple is the replacement.
```py
caseli... |
I recently did a new install of Visual Studio Community 2022 after uninstalling a previous install. I selected 2 workloads: ASPNet & Web Development and .Net Desktop Development. But when launching Visual Studio I get no new project template when selecting "Create a New Project". The install is on Windows 11 machine.
... |
Another option would be to drop the `List` and use a `ScrollView` in conjunction with `ForEach`:
```
struct ContentView: View {
var body: some View {
ScrollView {
ForEach(0...20, id: \.self) { idx in
SomeCellView()
}
}
}
```
Now when handling the expansion of the conte... |
{"Voters":[{"Id":18836744,"DisplayName":"Rakesh Govindula"},{"Id":18229928,"DisplayName":"Rukmini"},{"Id":17623802,"DisplayName":"RithwikBojja"}]} |
I have a german macintosh keyboard layout on my macbook pro late 2013 which now runs ubuntu. I want to type "@" just like the way it is done in macos: pressing left alt and l. In the default setting this can only be done via right alt and l.
Swapping is not an option, because i type {} with the left alt+8,9
kinto... |
{"Voters":[{"Id":136598,"DisplayName":"minou"},{"Id":10952503,"DisplayName":"Elikill58"},{"Id":2422778,"DisplayName":"Mike Szyndel"}],"SiteSpecificCloseReasonIds":[18]} |
For anyone reading this post to find why his Barcode font is working in SSRS, but not in PDF or with printing: You need to install the same Barcode font on the SSRS server, and make sure you install it for **All Users**, right click the font and select: "Install for all users"
[![Print Barcode in SSRS report][1]][1... |
null |
`PasswordBox` doesn't have that functionality built in. The original design pre-dates when that option became popular on websites etc.
A simple solution is to build a `UserControl` that switches between a plain `TextBox` or `PasswordBox`.
**EnhancedPasswordBox.xaml**
<UserControl x:Class="SOExamples.Enha... |
I am unsure if you have a solution already, but I can share one that works for me now within the shadow dom.
First, use the `?inline` option to generate a styles export within the following CSS file.
import styles from "./App.css?inline"
function App() {
// ... other code
return (
... |
I was designing a website and would like to host it using ngrok, which I want my clients to scan a QR code to enter it, however the browser warning might give the user a bad experience and might leak my IP address.
I looked up in some other pages in stackoverflow, but they only said to add the header `ngrok-skip-bro... |
I got a similar issue , and I finally resolved the issue after contacting the Firebase support team. We realized that it was a device integrity issue .
Request was refused from a device that has only the **MEETS_BASIC_INTEGRITY** integrity verdict, while my Play Integrity API was only accepting **MEETS_DEVICE_INTEGR... |
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
fr... |
collect all the data into a column with respective row using pyspark dataframe |
|python|pyspark|databricks|azure-databricks| |
null |
I have n number of circle with diameter and I want to find out diameter of minimum enclosing circle which can fit these n number of circle.
Currently I have used circle packing for same but it not calculating correctly, can someone please suggest any other algorithm to calculate the same?
I am looking for the alg... |
I'm working with SpringBoot 3 and I have my library a jar and a running application in spring.
The application autowired component in the library, like Entity as example. I achieve this adding this:
@EntityScan(basePackages = {"com.acme.library.entity"})
in the main application class of my running applicatio... |
Hi I am trying to develop a semi circular interactive progress bar using swift UI but am not able to get the expected output I am trying to achieve something similar to this
[![enter image description here][1]][1]
Here is my code
import SwiftUI
struct SemiCircularProgressBar: View {
... |
SwiftUI semicircular interactive progress bar |
|swiftui| |
> Use a normal thread executor (non virtual) within virtual thread
virtualThreadContext {
cpuBoundExecutor.submit(yourCpuBoundTask).get();
}
Or use non blocking version call for cpuBoundExecutor if you do not need to block |
I am experiencing an issue with NGINX configuration.
I have developed a project using Next.js and Strapi. This project runs on a single Ubuntu server on different ports. Below is the NGINX code that I did not write, but it is not functioning correctly.
localhost:3000 = Nextjs
localhost:1337 = Strapi
`server {
... |
Unable to set device connection state as INPUT device type is none |
|android|audio| |
null |
I stumbled upon exactly same situation and nearly identical code :-)
```
let (tx, rx) = tokio::sync::mpsc::channel::<Pos2>(5);
```
solution was to instantiate channel within async runtime
```
[tokio::main] // <---------------------------
async fn main() -> Result<(), Box<dyn Error>> {
...
let (t... |
This project only has one single module-level [`build.gradle`](https://github.com/brunodev85/winlator/blob/main/app/build.gradle), while the root-project `build.gradle`, which loads the plugins onto the class-path, is absent. Just take such one from another project and drop it into the directory above - or configure th... |
So I am working on this little script that will take a directory listing of just folder names within directory, and INSERT them in to a table on sql database. I am REALLY close, but my variable of my string that I formatted the results to be multiple entries to the sql command, for some reason are only taking the Last ... |
null |
Errors:
```none
Missing class com.amazon.device.messaging.ADM (referenced from: com.amazon.device.messaging.ADM com.amazon.A3L.messaging.ADM.ADMMessagingHelper.admInstance and 7 other contexts)
Missing class java.lang.management.ManagementFactory (referenced from: long org.junit.internal.runners.statements.FailOnT... |
remap keyboard in Linux like macos (left alt + l = @) |
|ubuntu|keyboard-shortcuts| |
null |
|arrays|linux|bash|loops|shell| |
Try this and let me know if it is working as you expected .upvote if it is working
%dw 2.0
output application/json
var currentDate = now()
var currentYear = currentDate.year
var currentMonth = currentDate.month
var inputDate = "03/01/2024" as String {format: "MM/dd/yyyy"}
var inpu... |
{"Voters":[{"Id":18836744,"DisplayName":"Rakesh Govindula"},{"Id":18229928,"DisplayName":"Rukmini"},{"Id":17623802,"DisplayName":"RithwikBojja"}]} |
|javascript|node.js|promise|node-fetch| |
I am trying to integrate admob in my android application and I faced the problem that frequency capping is not working. After that I tried to add ad interspector to check what's going on, but for some reason Ad units are empty and I do not have any ideas what to do.
Here is how I added ad interspector in MainActivit... |
Ad units is empty in AdInspector |
|android|android-jetpack-compose|admob| |