instruction stringlengths 0 30k ⌀ |
|---|
I am building a memory game and i have some code that works if i click the image it shows the name of the image in the console.
I tried to research it but can't find any answer.
How do i select image name value for my ImageURL variable?
This is what i have now in my code:
<!-- begin snippet: js hide: false co... |
I am using Opentelemetry
- api 1.13.0
- annotations 2.2.0
- kafka-clients-2.6 2.2.0-alpha
on spring boots to trace the sending of messages to kafka. The message interceptor is configured as defined in the documentation:
```java
configProps.put(ProducerConfig.INTERCEPTOR_CLASSES_CONFIG, TracingProducerInterc... |
Opentelemetry Surpresses Kafka Produce Message Java |
|java|spring-boot|apache-kafka|open-telemetry|open-telemetry-java| |
Boolean sortAsc = Objects.nonNull(chooseRequest) ? chooseRequest.getSortAsc() : false;
This code will throw NPE exception, why?
`chooseRequest` is a DTO and `chooseRequest.getSortAsc()` will return null
but this one is ok
Boolean sortAsc = Objects.nonNull(chooseRequest) ? null : false;
I cannot u... |
The problem is not what matplotlib does, but rather what you ask it to do.
When importing the data, you treat the date strings as string, which makes them categorical entries. There is nothing matplotlib can do to keep the plot readable.
What you probably want to do is to plot the data on a time axis. To do that,... |
Azure Synapse Link for Dataverse - Tables from F&O - only available via Spark pool for Delta Lake? |
|azure-synapse|dataverse|azure-synapse-analytics| |
I have written a code that opens a specific folder and what I need it to do is check the owner of each file stored within the folder and check to see if the owner is myself (currentUser) or not. I have written all the logic up until getting the variable 'owner' without automatically declaring the variable myself which ... |
i have developed a console app that has the following:
- MyProject
- Program.cs
- log4net.config
- AssemblyInfo.cs
- MyProject.csproj
- MyProject.sln
In Program.cs:
using log4net;
using log4net.Config;
namespace MyProject
{
class MyClass
{
... |
null |
Windows 11
Visual Studio 2015
I create a New Projet Windows Form Application with .NET Framework 2.0.
Now I would like to add a new MS Access 2003 Database db.mdb to this project.
Now I click on Add Db origin and Select a data origin type windows appears
I choose Database and in the next windows I choose Datas... |
Problem with Adding a new Database origin in Visual Studio 2015 |
|machine.config| |
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-css -->
.line {
overflow: hidden;
white-space: nowrap;
animation: typing 2s steps(40, end) 1s forwards;
}
@keyframes typing {
from {
width: 0;
}
to {
... |
I used this but the app freezes.
player.addListener(new Player.Listener() {
@Override
public void onPlaybackStateChanged(int playbackState) {
switch (playbackState) {
case Player.STATE_IDLE:
prg.setVisibility(View.GONE... |
This whole idea the give permissions is so time wasting, why is it done and what does it give me in AWS for benefits?
Can´t just every service of my account access anything by default and if I wanted a weird permission system for my account, I would need to use a checkbox.
|
Why does each service need permissions to access something? |
|amazon-web-services|permissions| |
Cannot test cryptographic performance using crypto_aesni_mb |
you can also try
const { exec } = require('node:child_process');
exec("notepad.exe"); |
Say I have the following dataframe covering hundreds of different names:
df = pd.DataFrame({"NAME":["A", "A", "A" ,"A",
"B", "B", "B",
"C", "C", "C", "C",
"D", "D",],
"CLASS":["LI","BO","EQ","AI",
... |
I'm trying to calculate throughput of http endpoint. Firstly, we need the number of http requests count for an endpoint. Do I need to store the calculated count when the server gets restarted as well?
How can I formulate the logic for calculation of throughput and the best way to go ahead?
|
How to calculate the throughput of an endpoint in Spring Boot? |
The problem was that in each flutter web app there's
<base href="/nexus-vote/">
that needed to be with the same name of the static js file :
app.use("/nexus-vote",express.static(path.resolve(__dirname + "/web")));
and i had 2 apps that was pointing to web that's why it was behaving in a strange way..
|
Sometimes after executing `git checkout branch` or `git reset another-branch` (while Xcode is open) I find out that the `Package.resolved` file gets mysteriously deleted. I can easily restore it from git or just recreate it from Xcode, but it gets annoying. It seems like Xcode itself deletes it. Any idea _why_ it happe... |
Package.resolved gets deleted on branch switching |
|xcode|swift-package-manager| |
I'm using visx to build a streamgraph for my application, but am very new to visx/d3. I'm able to generate the graph using a simple 2-d number array like in [this][1] example, but run into issues when modifying the input structure. In the example below, the goal is to generate a streamgraph that runs vertically downwar... |
|python|python-3.x|oop|methods|scope| |
The script created by me extract all device information (including all IMEI numbers) and it theoretically works on all devices.
It is here: https://github.com/micro5k/microg-unofficial-installer/blob/main/utils/device-info.sh
If it doesn't work on a device that you have you can create a ticket at the same reposit... |
(Date today) ddmmyyyy.
ddmmyyyy
"Answer the receiver rendered in French format mm/dd/yyyy.
Note that the name here is slightly misleading -- the month and day numbers show leading zeros,
so that for example February 1 1996 is 01/02/96"
^ self printFormat: #(1 2 3 $/ 1 1 2) |
I would like to modify some HTML stuffs in a function called **pagination()** in this Wordpress core file:
**wp-admin/includes/class-wp-list-table.php**
I have been searching for relevant hook which can be used to update HTML in the above function, but I have not found one.
Here are HTML (in bold) I would like... |
Jupyter Hub not fiinding my workspace and killing it (version 4.1.13) |
There are three problems with your code.
## Problem 1: Incorrect method name
The correct method name depends on the OpenAI Node.js SDK version you're using.
If you're using the OpenAI Node.js SDK >=`v4`, the following is the correct method name:
openai.chat.completions.create
If you're using the Open... |
C# ERROR Failed to find configuration section 'log4net' in the application's |
|c#| |
The latest torch I found that works is torch==1.13.1+rocm5.2.0
With the HSA override of course.
Update: there is a 2.1.0+rocm5.2 version that sould work. But I haven't tried it yet |
{"Voters":[{"Id":1116230,"DisplayName":"Nico Haase"},{"Id":205233,"DisplayName":"Filburt"},{"Id":466862,"DisplayName":"Mark Rotteveel"}]} |
I have a question regarding the usage of SQLite with Unreal Engine 5.0.3 c++ for deployment on Microsoft HoloLens 2 as Universal Windows Platform (UWP) application.
## Initial situation
I have an own written library integrated in my Unreal Project as Module, which is dependent on SQLite (https://www.sqlite.org/), w... |
Postgres (like SQL) is strictly typed. Functions cannot change their return type on the fly - including number, names and types of columns for a function returning a row type.
There are a limited workarounds, but you have to pass the required information with the function call one or the other way.
### [Polymorph... |
I want to demonstrate to a client how you can embed a report in a custom web application using Power BI Embedded with row-level security (RLS). The client wants to share a report with users outside their organisation, and the report content must be filtered to the user viewing the report. Ideally they **do not want the... |
Hello friends, I want the EventListener method that works with this player = new SimpleExoPlayer.Builder(this).build(); |
|java|android|exoplayer|exoplayer2.x|exoplayer-media-item| |
null |
I'm trying to iterate over a vector and add several asynchronous tasks to a Tokyo schedule, but it's throwing the error
`inferred to be a FnMut closure`
I have tried cloning the data variable, saving it in an ARC and many other things but nothing has worked for me.
I'm starting out in rust and I still don't un... |
inferred to be a `FnMut` closure |
|rust|async-await|closures|rust-futures| |
I have a program adding and removing elements on the screen with + and - buttons, the problem is the fact that these buttons don't change position automatically after this change of display like I would expect when using pin function :
1- Initial situation (everything is fine)
[![Initial situation][1]][1]
2... |
Kotlin is now official language of android, So, I specialed part of my Kotlin code.
In my video player project, I've caught the EventListener on Exoplayer like this:
```
private val exoPlayer by lazy {
ExoPlayer.Builder(context).build().also {
it.addListener(object : Player.Listener {
... |
i have 2 dynamic lists & 2 maps
**2 List**
List<dynamic> superDeepList1 = [
[
{
'name': 'Alice',
'age': 30,
'height': 5.8,
'isStudent': false,
'friends': ['Bob', 'Carol', 'David'],
'address':... |
How to chick if 2 list or 2 maps equals exactly to eatch others in length and content |
|dart| |
{"Voters":[{"Id":4177926,"DisplayName":"user_na"}]} |
When trying to docker compose in my dev environment I get the following error:
Error response from daemon: Mounts denied:
The path /com.docker.devenvironments.code/.postgresql/data is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> ... |
Mount denied dev environment on Docker macOS |
|macos|docker-compose| |
null |
I am experimenting with Rust and ran into something very unexpected.
If I wrap state in a RwLock, then I cannot combine two statements using this state into a single one. If I remove the RwLock and use state directly, this works.
```rust
use parking_lot::{RwLock};
pub struct State {
pub current: u8,
... |
If using `MS365` then could try one of the following formulas as well:
[![enter image description here][1]][1]
----------
• Formula used in cell <kbd>F2</kbd>
=LET(
_Merged, TOCOL(B3:B6&"|"&TOROW(D3:D6)),
TEXTSPLIT(TEXTAFTER("|"&_Merged,"|",{1,2}),"|"))
----------
Or, another w... |
Cluster Analysis after a process |
ok, heres whats wrong with your code
1. after assigning the srcObject of a video element you have to call play
2. in the setInterval function you get the image data in your let statement but you havent drawn anything to the canvas yet, although it would be available in the second iteration
3. when you actua... |
APNs Auth Key `.p8` **CAN ONLY BE DOWNLOADED ONCE** from Apple's developer portal, so only download it when you are ready to use and store securely!
If you need the `p.8` file and you have lost it, you have to revoke the existing one and create a new one.
Since Apple allows only two such files to exist at any ti... |
Solution in Python3:
class Graph:
def __init__(self):
self.nodes = dict()
self.h = 0
def addEdges(self, s, d):
if s in self.nodes:
self.nodes[s].append(d)
else:
self.nodes[s] = [d]
... |
{"Voters":[{"Id":10952503,"DisplayName":"Elikill58"},{"Id":1145388,"DisplayName":"Stephen Ostermiller"}]} |
Why is this not working?
In create `GET`, I am receiving an optional `idEnt` parameter.
If I call in browser `MyController/Create/5`, it shows view ok, and even client validation works ok, but on form submit, the `POST` action method in controller is not being hit... why?
(it does not throw any exception eith... |
ASP.NET Core 6 MVC - POST method not being hit when GET action method receives parameter |
|asp.net-core-mvc|.net-6.0| |
Update -
@Frank van Puffelen
Here are the screenshots on the data I am expecting from firestore from my webpage -
**Screenshot 1**
This is the data I am expecting from
```.where('qS', 'array-contains-any', [1,2])```
[![enter image description here][1]][1]
**ScreenShot 2**
This is the data I am expecti... |
I have a django app running in VS Code 1.86.2 on a Debian 12 machine using Python 3.11.2. I'm working on a test deployment to Apache 2.4.57 and mod_wsgi 4.9.4. I've been working through docs from Apache and Django.
At this point I am able to load html documents from the deployed site, but the Django template tags ... |
Issue with Django --> Apache WSGI deployment |
|django|apache|wsgi| |
[`scipy.integrate.trapezoid`][1] is for 1D integrals. If you have a 2D integral, you'd need to integrate over each axis of your array separately.
I've changed your function by squaring the integrand just to get a nonzero result. This will help us confirm that the code is working as expected by comparing against the ... |
I developed a small stand alone webserver in Delphi. The procedure is as below:
function sum(a,b:string):string;stdcall;
begin
result:=a+b;
end;
How can I call it in Vue JS?
The web service URL is
http://127.0.0.1:8080/soap/iservice1
the WSDL document:
<definitions xml... |
null |
When setting up a very basic dockerized python project using podman, connecting to the remote debugger fails. It is impossible to debug, but just running it works fine.
It appears to be having trouble using the random port to host.docker.internal.
PyCharm: PyCharm 2023.3 EAP
Podman: version 4.7.0
MacOS: 14.1.2... |
The comment by @Christian Stieber identifies the immediate problem:
> When you do the recursive call to `count_end`, you wanted to assign the return value to `ctr`.
```lang-cpp
//start = count_end(a, start + 1, ctr); // Wrong!
ctr = count_end(a, start + 1, ctr); // Right.
```
With this fix, the two ... |
I am trying to dynamically add button controls to an application. The application I'm working on has up to 6 different pre-defined button positions which can be any one of several different operations. For example, if the user presses the "New" button, I want to dynamically show a "Save", "Clear" and "Cancel" buttons a... |
How to Dynamically Add Controls to Delphi Form |
|delphi| |
# Update
My original solution had serious bugs in it.
The `N` adds the next line to the pattern space without testing it first, which includes *empty* lines, and consumes the line so that the test for empty lines gets bypassed.
It also *exits* if it fails to successfully read, so it only successfully printed on... |
null |
null |
You should build `a` tag in your render, the symbol in your map should be the href string
const stocksArray = store.stocks.map((stock, index) => {
return {
id: index+1,
symbol: `/symbol/${stock.symbol}`,
volAvg: stock.volAvg,
mktCap: st... |
null |
Power BI Embedded with Row-Level Security |
|powerbi|powerbi-embedded|row-level-security| |
So i have the problem that i need to save out the drawing to a .png file with the same size of the canvas, but after converting the canvas into postscript with (width, height) params it gives back a 751x752 sized .png file. I read somewhere that the postscript automatically strips the canvas.
I need the original size.... |
Python canvas save drawing problem with postscript sizes |
|python|python-imaging-library|png|tkinter-canvas|postscript| |
null |
I'm using old dependencies which can't be downloaded any more. But I have dependance package in ./gradle/caches/modules-2/files-2.1.
But on grade build, gradle try to downloaded it in throws exception Could not find com.google.android:flexbox:1.1.1
How to run gradle with caches files? |
How to run gradle with caches files |
|gradle|caching| |
1. Sure you did not update accidentaly to 4.27.**3** or later? I got exactly your problem, after I installed the 4.28.0 Version - see below...
2. You need Hyper-V enabled for this: is it working correctly on your machine? If you are using Windows Home Edition there is no chance: upgrade your Windows to Professional ... |
Your output:
```lang-none
this is thread 1
this is thread 2
main exists
thread 2 exists
thread 1 exists
thread 1 exists
```
Before I see that *"it prints "thread 1 exists" twice."*, I see that it prints after "main exists": This behavior can lead to unpredictable results.
--
First, you should array y... |
|java|kubernetes|networking|hazelcast|device-discovery| |
I have configured exactly once Jdbc oracle sink in my Flink Streaming application. I followed flink doumentation and coded accordingly. But getting below exception.
```
FlinkRuntimeException:unable to recover , error -3: resource manager error has occurred. [null]
at org.apache.connector.jdbc.xa.XaFacadeImpl.wr... |
I would like to modify some HTML stuffs in a function called pagination() in this Wordpress core file:
wp-admin/includes/class-wp-list-table.php
I have been searching for relevant hook which can be used to update HTML in the above function, but I have not found one.
Here are HTML I would like to change the las... |