instruction stringlengths 0 30k ⌀ |
|---|
I am new to iOS development and I have shifted my project form my m1 mac to intel mac. After that its preview start crashing and Xcode is showing this error to me. Here are the details of the error that Xcode is showing to me.
> LinkDylibError: Failed to build ContentView.swift
>
> Linking failed: linker command... |
Preview Crash issue in swiftUi Xcode 15 |
|swift|xcode|swiftui| |
null |
I'm currently in the process of transitioning from using Terraform for managing my GitLab CI/CD pipelines to using OpenTofu. In this migration, I also need to integrate OIDC (OpenID Connect) authentication into my GitLab pipelines.
Previously, my .gitlab-ci.yml file looked something like this with Terraform:
`You s... |
An easy way to do what you are asking is with [`QtConcurrent::run`][1] and an object.
The way it goes is:
1. Start a function in a separate thread using `QtConcurrent::run`. What you get from that is a [`QFuture`][2] that you can inquire to get the execution status.<br/>As you will see in the documentation, you ... |
You are using a modal and the outer `setState` doesn't affect the modal after it's created.
One solution is to make the modal stateful, you can wrap your widget with a `StatefulBuilder` like this:
```dart
showModalBottomSheet(
context = context,
builder = (BuildContext context) {
return StatefulBuild... |
{"Voters":[{"Id":2670892,"DisplayName":"greg-449"},{"Id":22180364,"DisplayName":"Jan"},{"Id":16217248,"DisplayName":"CPlus"}],"SiteSpecificCloseReasonIds":[18]} |
I calculate SMA(10) using last 9 bars Close + current Close. I have done it in Google Sheet and this is the correct values I also get in my trading platform.
Date Time Open High Low Close Volume SMA_Close10 SMA_Close20
2022-01-02 18:01:00 17535.75 17601 17535.75 17564.25 1024 #REF! #REF!
2022-01-02... |
Calculate SMA_Close10 and SMA_Close20 of minute data |
|sql|sqlite| |
In aosp 11, there are two mode to execute java function in art.
In the interpreter mode, the execution always passes through ExecuteSwitchImplCpp, whereas in the assembly mode, it always passes through ExecuteMterpImpl.
But I can not find ExecuteMterpImpl in aosp android 13.
How does Android 13 handle the assembly... |
Where is the ExecuteMterpImpl function in aosp 13? |
|android|android-source| |
I'm working on a CLI tool. I'm using macOS. I was using `node index.js <command>` when running it locally. I decided to publish it as an npm package, but the command I've defined in the `bin` section of my `package.json` won't work.
In my `package.json`, i've defined `bin` as follows:
```JSON
"bin": {
"scaf... |
NPM Command Line Tool - Command not working |
|node.js|npm|command-line|command-line-interface| |
null |
I using VScode create a new SpringBoot project,and just add spring Web this dependent.The most changes are just add `server.address=8088` in application.properties.But I using Vscode start SpringBoot project get error.
```
2024-03-31T10:05:42.222+08:00 INFO 11840 --- [demo] [ main] com.example.demo.DemoA... |
Created the new project about SpringBoot can't start |
|spring-boot| |
null |
{"Voters":[{"Id":4541695,"DisplayName":"DVT"},{"Id":22180364,"DisplayName":"Jan"},{"Id":16217248,"DisplayName":"CPlus"}]} |
When using google colab with python language. How exacly to copy specific amount of data like 100 file (from 900 file) from downloaded directory to another directory? since i use this command it copying all file din directory
`!cp /content/dataset/train/rottenapples/*.png /content/fresh_rotten/rotten_pic`
is it... |
Or, as a one-liner:
<!-- begin snippet:js console:true -->
<!-- language:lang-js -->
const count=(n1,n2)=>Array(n2+1).fill(0).map((_,i)=>i).slice(n1).join(",");
console.log(count(0,8));
console.log(count(2,5));
console.log(count(5,2));
<!-- end s... |
I need to print the bounding box coordinates of a walking person in a video. Using YOLOv5 I detect the persons in the video. Each person is tracked. I need to print each person's bounding box coordinate with the frame number. Using Python how to do this.
The following is the code to detect, track persons and displa... |
I have written a sql query to find prev year sales one using lag and with `nested cte` and another just without `nested cte` .I am seeing difference in output in MS SQL environment .Query are as below.
**Without Nested CTE(Correct output):**
with cte as(select * from (select category,product_id,DATEPART... |
Writing query in CTE giving wrong output |
|sql|sql-server| |
I am getting such kind of response for my submission.
```
> Passed Test 1: successfully logged consoleStyler() variables
> Failed Test 2: Not logging celebrateStyler() variables
> Failed Test 3: Not calling consoleStyler() and celebrateStyler()
> Passed Test 4: successfully called styleAndCelebrate()
```
Her... |
I'm newbie in Go. I try to create simple database with sqlite3. I know that sqlite3 doesn't support arrays.
Database must send unique feed object for each unique user with array row of authors.
When user auth in system, it creates new record in table user:
```
id: 0 <- unique user id
phone: "+0 000"
feed: 0... |
How add array of authors for unique user in database in Goland IDE? |
|sqlite|go|goland| |
null |
I have a null object reference but object exist.
My model
```
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getPlayerName() {
return playerName;
}
public void setPlayerName(String playerName) {
... |
null object reference with intent,parcelable and getting data sqlite. Everythink is coded in onCreate in the different layout |
This is more a hint than a question:
The goal is to parse a command line **AND** create a useful *usage* message
code:
for arg ; do
case "$arg" in
--edit) # edit file
cd "$(dirname $0)" && vim $0
;;
--noN) # do NOT create 'NHI1/../tags'
... |
I am using linux (Ubuntu 22.04) and wanted to run the gitlab-runner with the following yaml file locally:
```yaml
image: ubuntu:latest
test:
script:
- echo "Hello Gitlab-Runner"
```
When I execute `gitlab-runner exec docker test`, I get the following error:
```
Running with gitlab-runner 11.2.0 (... |
KeyboardAvoidingView makes a messy the flexbox |
|javascript|css|react-native|mobile|expo| |
You could use [`top_k`](https://docs.pola.rs/py-polars/html/reference/dataframe/api/polars.DataFrame.top_k.html) and slice the last row:
```
import polars as pl
np.random.seed(0)
df = pl.DataFrame({'col': np.random.choice(5, size=5, replace=False)})
out = df.top_k(2, by='col')[-1]
```
You could also [`filter... |
I'm trying to follow a tutorial on DirectX, and the tutorial is working with DX9. I do not have the older SDK (June 2010) installed, and would prefer to keep it that way. All the blurb I can find says 'everything's now in the Windows SDK'.
I've got a basic app running, showing a triangle on the screen - by supplyin... |
I want to do marquee animation in tailwind and next.js and some of it I have done. Only issue I am having is that it is not showing one after the other with first. Second time it will show after some time. I want it to be like this [](https://i.stack.imgur.com/5A... |
I want to do marquee animation in tailwind and next.js |
|css|next.js|tailwind-css| |
null |
I want to create custom text input component using this guide https://docs.expo.dev/modules/native-view-tutorial/ however I found that to provide ability to use styling and all another basic things from React Native TextInput I should extend it somehow.
My current implementation relay on UITextField. How can I exten... |
I developed a Windows Form application and I used "Windows Application Packaging Project" in Visual Studio 2022 (17.9.4) to generate the appxbundle and the appinstaller file to sideload the app, published on my website (accessible using HTTPS).
Appxbundle is generated correctly and I'm able to install the app by doubl... |
I want to create a new puppeteer browser when a Laravel Worker gets created.
Right now, my Horizon config allows for a minimum of 2 and a maximum of 10 workers running. As demand increases and workers are created, I'd like to create a new browser for Puppeteer. When a worker is removed, it can close that browser.
... |
I used part of above as a basis then below to get the values from id = 2
select *
from
(
select id,json_parse(super_field::text) super_field
from test.array_test
) arr,
arr.super_field t1
I am only using insert to show example I am using redshift copy command to import... |
`pipewire` is a higher lever tool than **ALSA**. When **ALSA** provides direct access right to the sound devices, **Pipewire** manages the connections between them and provides a higher level entry points to the same set of devices.
As the name says, pipewire wires the PIPES, which in the case of sound contain audio... |
I'm having trouble building v8 and libv8 to use with v8js php library. I'm running `gm x64.release` on the depot_tools git repo after running `fetch v8; cd v8` and the v8 file and g8 file gets created but the problem is that i cannot find the libv8/libnode required to compile v8js using pecl (https://github.com/phpv8/v... |
Unable to run gitlab-runner with docker |
|linux|docker|api|gitlab-ci-runner| |
The answer above is old. `http.request` now accepts a timeout option in:
http.request(options[, callback])
http.request(url[, options][, callback])
From the [doc][1]:
> timeout <number>: A number specifying the socket timeout in
> milliseconds. This will set the timeout before the socket is
> connec... |
A service pod is running with Istio sidecar container and is MTLS enabled. How do we define a service monitor to scrape metrics from this service ? Do we need to update the Prometheus server for the same ? |
How do we configure prometheus server to scrape metrics from a pod with Istio sidecar proxy? |
|kubernetes|prometheus|istio-sidecar|istio-prometheus| |
I’m making an in app purchase for my game on Steam. On my server I use python 3. I’m trying to make an https request as follows:
conn = http.client.HTTPSConnection("partner.steam-api.com")
orderid = uuid.uuid4().int & (1<<64)-1
print("orderid = ", orderid)
key = "xxxxxxxxxxxxxxxxxxx" # omitted for... |
null |
I am learning how to create Extent Reports from Youtube. I am trying to write the code for the same. But when I am trying to attach sparkeReports to extentreports, I am facing the mentioned error.
Below is my code:
```java
public class ExtentReports {
ExtentSparkReporter sparkReports;
ExtentReports reports;
E... |
DirectX 9 With No SDK Installed - How To Translate a D3DMATRIX? |
|windows|matrix|sdk|translation|directx-9| |
def swap(lst):
l=len(lst)
l2=list(lst)
l3=[]
l6=[]
if l<4:
for i in range(len(l2)):
if i+2<len(l2):
l3.append(l2[i+2])
l3.append(l2[i])
elif l>4:
l4=lst[:4]#1st 4
l5=lst[4:]
for i in range(len(l4)):
... |
Some problems with pm2.
have latest version of pm2.
After any commands pm2 think about 30-40 seconds.
in processes I see nodejs process that consume CPU and memory by exponent. After reach limit - crush.
win PC. nvm installed.
What is happenned with pm2?
I tried uninstall-install pm2. problem not solved |
pm2 problems: slow and crush |
|node.js|pm2| |
null |
This should only be used in testing.
[Here is some documentation in golang's wiki][1]
If you've generated some mock code such as with mockgen and it imports your package code, and then your testing package **also** imports your package code, you get a circular dependency (Something golang chooses to let the user ... |
null |
You cannot set the StatusBar background color in iOS. However, there’s a work-around, i.e, you have to define the background color of the header in the Stack Navigator of @react-navigation/stack
import React, {useState, useEffect} from 'react';
import {NavigationContainer} from '@react-navigation/native';
... |
"Error in parsing the app package" with AppInstaller with online Uri |
|.net|msix|appinstaller| |
null |
You can use [ZREMRANGEBYRANK][1] to remove the rest of the elements, that is,
`ZREMRANGEBYRANK key 0 -1501`
You can execute this command periodically / after each insertion / after each _k_ insertions.
[1]: https://redis.io/commands/zremrangebyrank/ |
No, you can't do that in JavaScript or TypeScript. But depending on *why* you're trying to do it, destructuring can help.
The closest you can get is to use the deprecated `with` statement *(I **don't** recommend it)*, which adds an object to the top of the scope chain, so any freestanding identifier references are c... |
Here is example code using .map with simplified data:
import pandas as pd
df = pd.DataFrame({'x1': [65, 66, 67],
'x2': [68, 69, 70],
'x3': [71, 72, 73],
'y': [10, 11, 12]
})
x_list = ['x1', 'x2', 'x3... |
Here Is my error for the my javascript code |
|javascript| |
null |
Apache Cassandra Node Driver Connection |
I have the following code:
```
- var a = 5;
- var b = 3;
script
if (a === 5)
if (b === 2)
.
var x = true;
include script.js
```
I want to include the script.js file when `a == 5` and if `b === 2`, I want to insert a new line `var x = true` above, inside the <script> tag.
However, w... |
Is this a pug template bug or my misunderstanding of the grammar? |
|pug| |
I have a `@Retryable` placed at the class level.
```
@Import({GrpcClientRetryConfig.class})
@Retryable(interceptor = "grpcClientRetryInterceptor")
@Component
public class Profile {
public void method1() {
System.out.println("Method1");
method2();
}
public void method2() {
System.out.println("Me... |
How does spring-retry determine which methods to retry when @Retryable is placed at the class level? |
|java|spring|spring-boot|spring-retry| |
I have two tables `keywords` and `posts` in my PieCloudDB Database.
Each topic can be expressed by one or more keywords. If a keyword of a certain topic exists in the content of a post (**case insensitive**) then the post has this topic.
For example:
| topic_id | keyword |
| -------- | ---------- |
| 1 ... |
How to install V8Js for PHP on Linux Ubuntu 22.04? |
|php|build|v8|pecl|v8js| |
I would like some help with a problem that has had stumped me for two days.
I have 'results' table like this:
```
result_id competition_id competitor_id competitor_ranking
1 1 1 0.1
2 1 2 0.4
3 1 3 0.2
4 1 4 0.3
5 2 1 0.4
6 2 2 0.1
7 2 3 0.2
8 2 5 0.3
9 3 3 0... |
(SQLite) Help me with GROUP BY and GROUP_CONCAT for calculating competitions ranking |
|sqlite|group-by|ranking|group-concat| |
null |
I was searching to see if anyone else ran into our problem with `&&`, and our solution was to use `;` in its place. `&&` worked fine in RHEL 7, but the server was upgraded to RHEL 8 over the weekend and the task file started failing.
So try replacing `&&` with `;`. |
I have a large program that's generating object files that are much larger than I expect. My suspicion is that somewhere in the program, someone is using inefficient template metaprogramming that's generating O(n**2) template types. Is there a command-line tool that I can use to list all of the template types that ex... |
I would like to lazy load some components but later after the components immediately visible have been loaded. How to do ? |
use suspense and lazy loading but with more delay between each |
|reactjs|lazy-loading| |
I am new in Selenium, here is the error that i showed up
**My code:**
```python
def job_search(self):
"""This function goes to the 'Jobs' section and looks for all the jobs that match the keywords and location"""
# Go to the LinkedIn job search page
self.driver.get("https:/... |