instruction stringlengths 0 30k ⌀ |
|---|
|c++|thread-safety| |
null |
You'd have to edit file `gradle/libs.versions.toml` and add in TOML format:
[versions]
androidx_media3 = '1.3.0'
androidx_compose_bom = '2024.03.00'
androidx_compose_uitest = '1.6.4'
# ...
[libraries]
androidx_media3_exoplayer = { module = "and... |
To achieve a single executable file without external DLL dependencies in Qt, you can use **static linking** instead of dynamic linking. **Static** linking includes all necessary libraries directly into the executable, so you won't need separate DLL files.
you need to add
```
CONFIG += static
```
in your .pr... |
{"Voters":[{"Id":4216641,"DisplayName":"Turing85"},{"Id":18157,"DisplayName":"Jim Garrison"},{"Id":839601,"DisplayName":"gnat"}]} |
```vba
Dim OutApp As Object
Dim OutMail As Object
Dim fname As String
fname = "C:\Users\urdearboy\Desktop\(VBA)\Mail Send\QR_Code.jpg"
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.SentOnBehalfOfName = "fakeemail@fake.com"
.to = Target
.S... |
<img src> tag not displaying images on Mac machines |
|vba|macos|email|outlook|html-email| |
null |
{"Voters":[{"Id":207421,"DisplayName":"user207421"},{"Id":224132,"DisplayName":"Peter Cordes"},{"Id":2410359,"DisplayName":"chux - Reinstate Monica"}]} |
I am adding my button and the click event from a class, When you click the button you need to go to a different content view and bring a variable with it.
```
protected override void OnPostExecute(Java.Lang.Object result)
{
base.OnPostExecute(result);
pd.Dismiss();
if((bool)result)
{
... |
As per [FastAPI's documentation][1]:
> When you declare a path operation function with normal `def` instead
> of `async def`, it is run in an external threadpool that is then
> `await`ed, **instead of being called directly** (as it **would block the
> server**).
also, as described [here][2]:
> If you are us... |
I've been learning kubernetes on GKE lately.
I'm testing CronJob, and I'm having trouble with the behavior there.
Below is overview of node-pool, cron job settings.
```
node-pool: 1 node (remaining allocable memory is 1Gi)
cronjob: Simple busybox cron for test
```
So, first of all, I requested the cronjob'... |
I have a Woocommerce website
Some bots are doing ATC on my products which I want to stop
I have GET links behind ADD TO CART buttons on `/product-category/*` and `/product-tag/*` pages and I removed them, changed to to POST so clicking ADD TO CART makes POST request to `/?wc-ajax=add_to_cart` instead
But someh... |
I tried many things but this was the only solution I found for my use case when using nested page with back buttons:
```
<a href="javascript:history.back()"</a>
``` |
It's better to create a scope whenever you need, to use dbContext with the lifetime configuration it is set up with
you can try this (for .net 8):
* in Program.cs
> builder.Services.AddDbContextFactory<ApplicationDbContext>(options =>
> options.UseSqlServer("name=ConnectionStrings:DevConnection"));
>... |
I have 2 columns with data in them. Below is the filtered minimum value for f_z1.
[![https://i.stack.imgur.com/mrFe2.png][1]][1]
Is there an SQL command that I can use to search for min(fz_1) and max(ry_1)? (starting with look for the min of fz_1 first, then go through the corresponding ry_1 values and search for... |
null |
|sql| |
You could write
myMap.getOrElse(myKey, Set.empty).contains(myVal)
Possibly even use a [map with the empty set as its default value](https://stackoverflow.com/q/3648870/1048572) straight away. |
There sometimes are AOT compilation errors when building for iOS that are related to the processor architecture.
When this happens, I usually delete the *bin* and *obj* folders, make sure to build against the correct processor architecture of the target machine and try again.
For example, I usually need to commen... |
I need to render two separate `input[type="range]` each one with a separate `output` value.
I have created a set of components which pass up and down their data in order to render in the correct way.
BUT I cannot split the rendering of the two components I need to declare which `state` is been affected, I want t... |
I would like to know if it's possible to create a docker image that installes a deployment from Wildfly server and then it uploads it to Nexus.
Is this possible? if so, what would be the recommended approach or are there any small exmaples online for this workaround task?
Any guidance or exmaples would be great... |
Retreiving a deployment from Wildfly using Docker and Uploading into Nexus |
|docker|wildfly| |
I have a Jenkins setup where I'm running Cypress tests within a Docker container. The Docker container is built on top of the Cypress Docker image and is executed as part of a pipeline job on Jenkins. This pipeline job is described using the declarative pipeline syntax. However, I'm encountering an issue during planned... |
Please, any help would be appreciated and googling doesn't seem to be producing any proper solutions here. What confuses me even more is that this error now appears even when trying to run apps with no firebase or even async functions, making doing anything else in flutter essentially impossible for me now.
I have bee... |
I am getting "binding has not yet been initialized" error when trying to connect firebase with flutter |
|android|ios|flutter|firebase|dart| |
null |
You can simplify your query and just use `STRING_AGG`, so you get rid of your subquery:
SELECT
p.post_id,
COALESCE(STRING_AGG(k.topic_id::varchar,','
ORDER BY k.topic_id),
'Vague!') AS topic
FROM Posts p
LEFT JOIN Keywords k
ON LOWER(content) L... |
I need help creating a Python program that retrieves a list of available microphones on my computer using Windows 10.
My code:
import pyaudio
import logging
import customtkinter as ctk
from pathlib import Path
def choisir_microphone():
"""
Choisissez un micro disp... |
I was trying to make a page that could in a single page (ie. a single .html file) display different contents depending on which buttons the user clicked. ie. if the user clicks "about" it shows them an about section. But it's not the kind of page that you scroll down to see all contents, but rather, contents that are n... |
I'm setting up a account validation page with the following approach. An apiGateway.ts where the request from POSTMAN or UI would hit. The backend is setup at localhost:3001 and here is the code of apiGateway.ts, you can ignore the login methods using fetch, my interest is register here.
```
import express from "expr... |
axios.post do not return anything when api call is made within backend |
|javascript|node.js|express| |
I've started to use Vite to craete React project for the first time. I followed a 2023 tutorial video on youtube. I'm using macos.
There were many projects in **Webapps** folder and I created a new folder for a Vite project where the directory structure was like this:
Webapps
|- project A
|- projec... |
null |
{"Voters":[{"Id":205233,"DisplayName":"Filburt"},{"Id":616443,"DisplayName":"j08691"},{"Id":839601,"DisplayName":"gnat"}],"SiteSpecificCloseReasonIds":[13]} |
Assuming the table name as Numbers;
WITH NUM AS (
SELECT A.* , ROW_NUMBER() OVER(PARTITION BY ID1, ID2 ORDER BY VALUE) AS RN
FROM NUMBERS A)
SELECT A.ID1, A.ID2, A.LOWER, A.VALUE,A.UPPER,
|
I have been learning the weird set-ups of Django! Its very good for web development!
I have the following view inside views.py:
def callerview(request,paramm):
text="this is what was sent : %s"%paramm
return HttpResponse(text)
the url for this this view at urls.py is as follows:
urlpa... |
Django parameter stops printing when it reaches the first question mark symbol |
|python|django|url-parameters| |
Maybe the ```package_data``` is missing in your setup initialization?!
This what I do to add my configuration files in the res folder to the wheel. The files are then accessible exactly by the same piece of code of yours.
```
setup(
name="daprep",
version=__version__,
author="",
author_ema... |
{"Voters":[{"Id":3001761,"DisplayName":"jonrsharpe"},{"Id":286934,"DisplayName":"Progman"},{"Id":839601,"DisplayName":"gnat"}]} |
Microsoft has changed its XSD which now states that there may be **multiple** font settings and **multiple** size settings in one run property. That's why `XMLBeans` now generates code for `List`s and/or `Array`s of those elements in `CTRPr`: `CTRPr.getRFontsList` now vs. `CTRPr.getRFonts` in past, `CTRPr.getSzList` n... |
I'm currently working on a project where users can create rooms using WebRTC technology. While I'm comfortable with the front-end implementation, I'm seeking guidance on how to integrate WebRTC SFU (Selective Forwarding Unit) functionality into my Spring Boot backend.
I've explored options like mediasoup and Kurento... |
How to use PrimeNG multiselect search to trigger an API call based on user search input and populate the multiselect with the retrieved data? |
|angular|typescript|frontend|primeng|ngrx| |
null |
I have two databases, the first for user names and their data, and the other database is for training, and I did not find a way to link the trainee from the training table and the users table in the first database for users. Two Contexts were used, but I did not find the solution.
1- CentralBase DbContext :
p... |
During your application's development, running Tailwind in "watch" mode is beneficial. This ensures that any changes are automatically reflected in the generated CSS output. This can be achieved by using the [Puma](https://puma.io/) plugin provided by this gem to integrate the "watch" feature with the `rails server`. T... |
I'm using python, librosa, np. The audio is stereo, 44.1k, about 2gb, 3hrs
First I convert the audio to mon, then in 60 second chunks I calculate the maximum power.
Next I use then highest max power as the global max power reference to generate the spectrograms.
I use the same f_high, and f_low
same db_high and ... |
When I create a series of spectrograms from a long audio file, the colour intesities vary noticably |
|python|numpy|librosa|spectrogram| |
I'm working on a Marching Cubes implementation in Unity. My code is based on Paul Bourke's [code][1] actually with a lot of modifications, but anyway, I'm checking if a block at a position is null, and if it is, a debug texture will be placed on it.
![Here is an image of the problem][2]
This is my MC script.
```... |
I have two databases, the first for user names and their data, and the other database is for training, and I did not find a way to link the trainee from the training table and the users table in the first database for users. Two Contexts were used, but I did not find the solution.
1- CentralBase DbContext :
p... |
I am having an "Introduction to AI" course and we were assigned to do a mini project about a simple expert system using AIMA library in python (from the book AI: Modern Approach). I am having some difficulties in writing FOL knowledge base rules in this library particularly, in class they didn't provide us with enough ... |
@brian61354270 already mentioned in the comments, that what you want is not really a [cartesian product]. Otherwise an obvious answer would be to use [`itertools::iproduct!`].
Going off of your main question:
> I wanted to attempt the same thing with an iterator.
Since we can assume `x: Vec`, and you want to p... |
I'm trying to create a regex, in RE2C's regex format ([1]), for matching binary literal numbers. They should look like:
- 0b1, 0b101, 0b1111, 0b11_11, 0b1_111, 0b1_1_1_1, etc
The underscore is used as a convenience separator, and it is otherwise ignored when extracting the resulting digits. However, the separator s... |
Regex to match binary literal number in re2c format |
|regex| |
ok so let me begin with the video in cause: <https://youtu.be/wReXqe8AFUM?si=%5C_Lm-5DwvffglCYLL>
**my setup**
- 1 Oracle VM running Kali Linux with normal settings except bridge adaptor for the network Settings
- IP Address: 192.168.0.24
- This VM runs my firewall.py with Visual Studio Code inside a venv
- 1 ... |
Dependent Props on React with Typescript |
You have to pass `_vercel_jwt` cookie in the headers of your `fetch` call. You can find it in the request headers of the `request` you are trying to hit directly from the browser.
example:
```javascript
const options = {
method: 'GET',
headers: {
Accept: 'application/json',
Cookie: '_vercel_jwt='+<cookie... |
null |
{"Voters":[{"Id":4267244,"DisplayName":"Dalija Prasnikar"}],"SiteSpecificCloseReasonIds":[18]} |
I am using Microsoft ASP.NET Core Identity, and since I need to add an additional property for my `IdentityUser`, I need a customer register method:
```
[AllowAnonymous]
[ApiController]
[Route("api/[controller]")]
public class UserController : ControllerBase
{
private readonly UserManager<AppUser> _userManag... |
ASP.NET Core Identity Custom Register Endpoint |
|c#|asp.net-core|asp.net-core-identity| |
|amazon-web-services|amazon-s3|aws-lambda| |
null |
This is my application.yml of Spring Authorization Server:
spring:
security:
user:
name: "victoria"
password: "password"
oauth2:
authorization-server:
client:
portfolio-client:
registration:
client-id: "portfolio-client"
... |
My code worked fine if I only connect msp430 to one sensor. However, when I connect msp430 to 4 sensors. I try to read to only one sensor but it just stop at stop condition.
I expected to read sensor values by passing the corresponding sensor address. But I'm sure what is wrong. I would appreciated any help or sugge... |
Get each element containing person's contact details in a list.
# driver_table contains details about all the drivers
driver_table = soup.find('table', attrs = {'class': 'standing-table__table'})
table_body = driver_table.find('tbody')
# Get all the rows of driver details. Ea... |
> My expectation would be that creating the instance `Base` with the specified type `str` it is used for `V` which should be compatible in the `test()` return value as it converts to `Test[str](t)`
Your `b = Base[str]()` line has no retroactive effect on the definition of `class Base(Generic[V]):` whatsoever - the ... |
I am trying to convert "regTemp" byte array to bmp file after `DBMerge(long dbHandle , byte[] temp1, byte[] temp2, byte[] temp3, byte[] regTemp, int[] regTempLen)` *(This function is used to combine registered fingerprint templates and returns the result in regTemp)* generates the final byte array.
**I found many an... |
null |
null |
null |
null |
Although your method worked, I still wouldn’t recommend doing it that way. In general, I would leave the explicit creation of threads for cases of extreme necessity, when it is impossible to do otherwise.
The same applies to all UI elements. You should create and work with them only in the main application thread.
... |
I want to add pdf file on firebase from admin panel and retrive it in user panel. In jetpack compose. But i am not able to do this.If anyone know about this..plzz answer me
I want code for it.If anyone know about this..please answer me |
How to add and retrive pdf file on firebase in jetpack compose |
|android|firebase|kotlin|android-jetpack-compose| |
null |
Using Malvin Lok's answer as a lead, I located `io.netty.handler.codec.http.HttpHeaders` and put a breakpoint for each `set*(..)` and `add*(..)` method. Here's what I found
Default headers are added one by one in different places of Netty code. It's hard-coded, there are no injected strategies or configs. There's ap... |
Java-based WebRTC SFU implementation for Spring Boot project |
|java|spring-boot|webrtc|sfu| |
null |
I have created a web api application using C# and dot net 6, when I changed `app.Run();` in **program.cs** file to this:
```
app.Run(async context =>
{
await context.Response.WriteAsync("I'm upgrading!\nTRY AGAIN LATER");
});
```
the application does not show me the message and does not open either!
doe... |
Just
`ps ww` or `ps -ww`
e.g., execute `pa auxww` or `ps aux -ww` rather than execute `ps aux`
Source:
```
OUTPUT FORMAT CONTROL
w Wide output. Use this option twice for unlimited width.
-w Wide output. Use this option twice for unlimited width.
``` |
my vite app is not loading and there is no error only a warning
[vite] Get yarn cache dir error: Command failed: yarn config get enableGlobalCache
VITE v5.2.5 ready in 1271 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
i want a solution of ... |
Get yarn cache dir error: Command failed: yarn config get enableGlobalCache |
|reactjs|vite|hadoop-yarn| |
null |
Using Conditional Formatting does not restrict the automation.<br>
Rather than colouring the cells in Pandas and writing to Excel you are just colouring the cells in Excel instead, using Openpyxl to apply Conditional Formatting.<br>
It shouldn't be any different unless you have a need to access the DataFrame with sty... |
I suggest using mzHash64, a very simple, fast function with a number of collisions very close to an ideal Universal Hash Function
public static long mzHash64(byte[] data, int start, int length, long seed) {
long hash = 0xD45E69F901E72147L ^ seed;
for(int i = 0; i < length; i++)
hash = 0... |
{"OriginalQuestionIds":[12573816,21140021],"Voters":[{"Id":20143744,"DisplayName":"Atmo"},{"Id":12002570,"DisplayName":"user12002570","BindingReason":{"GoldTagBadge":"c++"}}]} |
If you want to join android mobile developer, better to choose **Kotlin** because this language structure more clean than Java and easy to understand for beginner to try
You can try their course for free to learn it's language and structure provided by JetBrain
[Learn Kotlin With JetBrains Academy](https://www.j... |