instruction stringlengths 0 30k β |
|---|
https://github.com/testcontainers/testcontainers-java/pull/7049
Here's the pull request. Retry the rename for up to 60 seconds |
@bot.message_handler(func=lambda message: message.chat.id == chatId)
def store_text(message):
user_response = message.text
bot.reply_to(message, "What do you want to improve?")
# Send an improvement wish to yourself
bot.send_message(my_user_id, f"New improvement: {user_response}")
... |
Alternative to GetFromClipboard in Microsoft Word |
null |
If the application was compiled with line number information, it's possible.
However, most decompilers do not handle line number realignment natively, except https://github.com/java-decompiler/jd-gui. In Preferences menu, tick checkbox "Realign Line Numbers".
An Eclipse plugin introduced line number realignment a... |
I have tested the given sample code in `tf.keras==2.12.0` and found a possible bug in the API and it fails only on GPU. In your sample code, the mismatch occurred due to the `relu` activation. If we set anything else, i.e. `selu` or `elu` or even `leaky_relu`, they would work as expected.
```python
def ResBlock(i... |
ExcelJS incorrect column count returned |
|typescript|exceljs| |
Following Bisjob's comment, I modified my invoke to the following, and it works:
```
MethodInfo methodInfo = typeof(Queue<>).MakeGenericType(genericArgument).GetMethod("Enqueue");
methodInfo.Invoke(propertyInfo.GetValue(newObject), new object[] { queueObject });
``` |
If the common parent element is always a `label`, you can use `label:has(input[name="condition"]) select` as a selector:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-css -->
label:has(input[name="condition"]) select {
background-color: red;
}
<!-- l... |
Say I have the input:
```typescript
type UnionType = 'cat' | 'dog' | 'bird';
type MappedType = {
[Key in UnionType]: UnionType;
};
```
But this only gives:
```typescript
type MappedType = {
'cat': UnionType;
'dog': UnionType;
'bird': UnionType;
}
```
What I want to achieve is:
```types... |
The `if2` or `if3` function isn't needed because the switching argument `duration-5` is a constant value that is not a function of a Gekko variable. Just like the validation script, the two segments can be calculated separately and added together to get a total cost and patient count.
```python
from gekko import GE... |
null |
The `click()` function on the `ondragstart` event is not firing because there's already a `click()` method on the DOM element corresponding to `<p>`.
Change the name of the function to something else (e.g. `startDragging()`) to make it work.
Learn more here:
- [Why can't JavaScript function name be set as cli... |
`4294967296` bytes sounds like really a lot. You surely have a memory leak somewhere.
[You should read that][1] :
> People, changing the memory_limit by ini_set('memory_limit', '-1'); is NOT a solution at all.
>
> Please don't do that. Obviously php has a memory leak somewhere and you are telling the server to ... |
I was trying to automate the NMAP Port Scanning using Python. When I executed the script, all went good, excepting the version of the port.
**Here's the code:**
```
import nmap
nm = nmap.PortScanner()
targetip = 127.0.0.1
firstport = 1
lastport = 1000
for i in range(firstport, lastport + 1):
po... |
null |
Try refactoring your function to avoid using global variables to store intermediate results (`resstr` and `resarr`). Using global variables like this can cause issues in the context of running multiple tests in sequence since they would retain their values from previous calls across tests, leading to incorrect results.... |
I have implemented till Statements and State in Tree Walk Interpreter.
```
> print (4+4);
[line ] Error at 'print': Expect expression.
Exception in thread "main" com.piscan.Zealot.Parser$ParseError
at com.piscan.Zealot.Parser.error(Parser.java:201)
at com.piscan.Zealot.Parser.primary(Parser.java:130)
at... |
You can define your custom css as:
/deep/ .failed .mat-progress-bar-fill::after {
background-color: red;
}
/deep/ .success .mat-progress-bar-fill::after {
background-color: darkblue;
}
HTML would look like
<mat-progress-bar mode="determinate" value = "{{value}}" [ngCl... |
I'm trying to create a user with identity in .NET 8 with entityframework and I'm getting the following error, both in mysql and sqlserver |
|c#|.net|entity-framework| |
null |
If you don't set `$$` in a rule, bison will by default initialize it with the value of `$1`. If that is a different `%type` than `$$` is expecting, bad things will happen.
In the case you are describing, it will likely be the value associated with the `<` or `>` token. Since those tokens don't set `yylval` in the ... |
Using SOAP with WSDL in python with the suds-py3 library:
Why doesn't it show me anything when I use the following code?
What am I doing wrong?
```lang-python3
from suds.client import Client
url = "https://appweb.dane.gov.co/sipsaWS/SrvSipsaUpraBeanService?xsd=1"
results = Client(url)
print(results)
```
... |
You do not need python for simple cases just use the systems own tools.
The Unix Philosophy (DOS was too, but Windows CMD.exe is better). Is to write reusable blocks of commands to adapt to a specific case. You have to write any set of commands to suit your target thus only parts of the code need to be specific whil... |
Why is only the port version not printed in the output? |
|python|port|python-3.9|nmap| |
null |
null |
null |
null |
null |
null |
null |
I was trying to automate the NMAP Port Scanning using Python. When I executed the script, all went good, excepting the version of the port.
**Here's the code:**
```
import nmap
nm = nmap.PortScanner()
targetip = 127.0.0.1
firstport = 1
lastport = 1000
for i in range(firstport, lastport + 1):
po... |
|php|wordpress|function|plugins|fatal-error| |
null |
Seems like when using xsub xpub zmq does not make any guarantees for reliability and messages can be lost for many reasons.
Is that also the case when making the actual subscription? Can that message also be lost?
Any insight will be much appreciated. |
Can you lose any message when using xpub xsub with zmq? |
|c++|zeromq|pyzmq|jzmq|czmq| |
I have a PostgreSQL table of GPS points from multiple people with the information on the trip and place each of the points is assigned to. I want to find the occasion number at which each `point_id` is assigned to the `place_id` where `overnight = 'Yes'` across all `trip_id` of each `person_id`, based on the following ... |
I'm making an inventory script, and I change the tags of prefabs to check if my inventory already has them stored, but when I exit the game the tags stay as stored. this is a problem because then it doesnt add or instantiate the prefab. here's the code if it helps
```
public void AddObjInv(GameObject InvObj, int ... |
**Searching forward using `scasb`** requires setting the direction flag DF to 0. The `cld` instruction does that. What it further requires is that you load the AL register with the character to be found, and the RDI register with the address of the **first** character of the string.
**Searching backward using `scasb... |
I'm trying to migrate and upgrade my graph to the latest version of Neo4j and make use of new features and GDS algorithms. The old LPA community detection query was as follows:
```
CALL algo.labelPropagation.stream(
'MATCH (p:Publication) RETURN id(p) as id',
'MATCH (p1:Publication)-[r1:HAS_WORD]->(w)<-[r2:HAS_WO... |
|algorithm|charts|neo4j| |
The issue is in your PHP code. The `openssl_encrypt` function takes a `passpharse` argument:
> If the passphrase is shorter than expected, it is silently padded with NUL characters; if the passphrase is longer than expected, it is silently truncated.
For AES 256, this should be 32 characters. Your `$key` variabl... |
it showed indirect effect in the lower triangle and direct effect in the upper triangle.
[enter image description here](https://i.stack.imgur.com/WEueL.jpg)
It showed indirect effect in the lower triangle and direct effect in the upper triangle.
I just want it to show the reciprocal number in the upper triangle ... |
How can I make the reciprocal (1/value) number as risk ratio of lower triangle in upper triangle of my league table? |
|r| |
null |
I created simple project in C#.
File -> New -> Project -> C# ASP.net core web API.
New controller I can not see please help me.
[enter image description here](https://i.stack.imgur.com/iRpjh.png)
I want to see new controllers in swagger when add new controller. |
I have created "C# Core Web API" it is shows only default controller only (weather forecast) rest of the controller not found |
|c#|.net-core| |
null |
It is expected that your code throws an error. [As indicated in the "state" property of StateNotifier][1] it is `@protected` and `@visibleForTesting`, which implies that it can only be accessed from child classes and test.
As recommended by the Riverpod documentation, if you want to reactively get a provided value, ... |
WaitForMultipleObjects is failing. It returns -1 and the last error is ERROR_INVALID_PARAMETER.
Some of the threads managed to increment the count before all threads were created.
Once WaitForMultipleObjects fails, the program closes the mutex handle. A few threads manage to call WaitForSingleObject on the mutex... |
Using
`edges = set()`
makes your result unordered.
There is no direct way to use ordered set in python execpt using `ordered_set` package or you can try (not so clean way) to create an ordered set from a dictionary keys.
def get_edges_set(lines):
edges = {}
for line in lines[1:]:
edge =... |
I have been trying to write a working implementation for the backpropagation for around four months now and I just can't get it to work. Here is my code:
```
import numpy as np
class neural_network:
def __init__(self, layers, alpha = 0.01):
self.alpha = alpha
self.activate = (lambda x: ... |
Why doesn't this code work? - Backpropagation algorithm |
|python|numpy|backpropagation| |
null |
**AndroidX**
`AndroidX` will replace `support library` after `28.0.0`. You should migrate your project to use it. `AndroidX` uses [`Semantic Versioning`][1]. Using `AndroidX` will not be confused by version that is presented in library name and package name. Life becomes easier
[\[AndroidX and support compatibil... |
null |
My frontend is written in React using React Query, while I use Spring Webflux as my backend. I created a dashboard in React and I want the data that gets populated in the dashboard to come in real time so that the user doesn't have to refresh. Multiple users will be logged into this dashboard and will have access to th... |
How to build a reactive application using React Query and Spring Webflux |
|java|reactjs|spring|spring-webflux|react-query| |
null |
Using SOAP with WSDL in python with the suds-py3 library:
Why doesn't it show me anything when I use the following code?
What am I doing wrong?
```lang-python3
from suds.client import Client
url = "https://appweb.dane.gov.co/sipsaWS/SrvSipsaUpraBeanService?xsd=1"
results = Client(url)
print(results)
```
... |
When attempting to SSH into a remote host, if you encounter an issue where the connection fails with an error message, it's possible that the host's key has changed since the last connection. One solution to resolve this issue is to remove the entry associated with the remote host from the known_hosts file.
Here are... |
Here is the code, reference video [here](https://www.youtube.com/watch?v=Y-HFJkeJyc4&t=405s).
def getTickerPricePrecision(symbol):
resp = client.exchange_info()['symbols']
for elem in resp:
if elem['symbol'] == symbol:
return elem['pricePrecisio... |
I have a team of Python developers, and we want to have the same environment so we decided to use Docker and be able to create any file in host folder and Docker folder so it can be reflected in real time without re-running the docker, the first approach was to use Volumes to share files between the host and the Docke... |
There are two substantial advantages for a VM Scale Set as Azure DevOps pipeline agents, both deriving from the fact that they are VMs running in your Azure environment: (1) connectivity to resources using Private Endpoints and (2) the ability to use a User-Assigned Managed Identity assigned to the scale set as the aut... |
I am using `differential_evolution` from `scipy` to do optimization. `likehood` is vectorized to calculate all the populations at once. I have 36 parameters and `popsize=35`. `draws` is also a large matrix `(1000, 112, 7)` for each population, and it is random draws from some distributions.
By following the [pytorch... |
1. public $segment;
2. public $expiry;
Do not assign a default value for this two items, the select field should provide this information
|
I'm trying to use OpensearchVectorClient() function in llama-index but I've run into a problem while calling OpenSearch: "object tuple can't be used in 'await' expression".
Here my code:
import boto3
from opensearchpy import RequestsHttpConnection, AWSV4SignerAuth
from llama_index.vector_stores.opense... |
I have a nodejs project with `type="module"`. now i want to use opentelemetry instrumentation for distributed tracing. the issue i am facing is opentelmetry doesn't support ESM. in order to do this we need to use custom loader. i tried using custom loader provided in their exampleusing
> `--experimental-loader=@ope... |
Solution :Β YOU DO NOT NEED TO RUN THE APPLICATION DIRECTLY TO ARCHIVE IT!!
My problem is that I used "Start the active scheme" when I had to click on "Product > Archive", then the code executes and builds the project to put it directly in "App Store Connect"!
|
Use and installable trigger and edit sheet name. I assumed one header row
function onMyEdit(e) {
//e.source.toast('Entry');
const sh = e.range.getSheet();
if(sh.getName() == "Sheet Name" && e.range.columnStart > 1 && e.range.columnStart < 5 && e.range.rowStart > 1) {
//e.source.toa... |
I find myself running `:!./%` quite a lot when writing any kind of interpreted language.
This uses `:!` to run the following stuff in the shell. The command to run is `./%` which is `./` for the current directory and Vim will substitute `%` with the current buffer's file name.
There are three preconditions:
* ... |
I have a Next.js app with the following structure:
```
.
βββ next.config.js
βββ src /
βββ app/
βββ page.tsx
βββ getYoutubeTranscript/
βββ getYoutubeTranscript.tsx
```
`next.config.js` has the following policy defined:
```
// @ts-check
/** @type {import('next').Nex... |
This is due to the vercel server being in another time zone than your local machine. That's also the reason why you do not encounter the error locally because your local server is not in another time zone.
Since the date on the vercel server is not the same as on your client, the vercel server assigns a different va... |
On my Mac I got it working:
Add to file *[.bash_profile][1]*:
```shell
code() {
open -a Visual\ Studio\ Code.app $1
}
```
Save and in the terminal do `source .bash_profile`.
Then in the terminal, `code index.html` (or whatever) will open that file in Visual Studio Code.
[1]: https://en.wikipedia... |
null |
I have
> Map<String, dynamic> toMap() => {"languageCode": languageCode, "mIds": mIds};
but mIds is list of integer.
When I try to send the dto.toMap() in the body of the post
it says: Exception has occurred.
_TypeError (type 'List<int>' is not a subtype of type 'String' in type cast)
What is the correct... |
Dart serialize object with integer list |
|dart| |
**Ext.util.CSS.swapStyleSheet** ([v4.0][1], [v6.7][2]) function can be used to switch between the different themes, [this][3] forums post shows an example.
Also I implemented this at first in my app a while back, but I ultimately found that forcing a browser refresh was necessary instead of dynamically swapping th... |
null |
I am quite new to front-end design, and am struggling to code the following design in React (using Tailwind):
I am trying to augment a table to include a vertical line and a dot placed on it next to each datum. When you hover on this vertical scale, **either the bar or the circle**, additional text appears alongside... |
Try another notation for property `url`:
import org.gradle.api.initialization.resolve.RepositoriesMode
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
mavenCentral()
maven(url = 'https://jitpack.io')
}
}
Then it should find:
... |
{"Voters":[{"Id":3776927,"DisplayName":"derpirscher"},{"Id":2395282,"DisplayName":"vimuth"},{"Id":624463,"DisplayName":"cschneid"}],"SiteSpecificCloseReasonIds":[13]} |
I'm trying to add programmatically-rendered diagrams to my reStructuredText documentation, which I render to HTML with Sphinx.
Per https://lpn-doc-sphinx-primer-devel.readthedocs.io/extensions/blockdiag/blockdiag.html , I've added `sphinxcontrib-blockdiag` to conf.py:
```
# conf.py
...
extensions = [
'sphinxc... |
How to get blockdiag directives rendered to HTML? |
|python-sphinx|restructuredtext|blockdiag| |
I have two questions,
1. How can I upload/attach files like PDF in Google Gemini AI API? (Model Gemini 1.5 Pro or any that support file attachment). Also, if this doesn't support, is there any better alternative, maybe like Vertex AI or any Azure or any AWS AI etc.?
2. I want to know how I can track usage of API ... |
How can I upload/attach file like PDF in Google Gemini AI API ? (Model Gemini 1.5 Pro) |
null |
If I have a real world coordinate and the x16 tile images from tileserver-gl how can i get the exact pixel for that coordinate?
I mean, if i have the lat and the lon i can get a tile image but then how can i get the exact pixel from the image?
My images are 256x256 in x16.
Thanks :)
I have tried to modify t... |
CORS policy defined in next.config.js doesn't seem to be applied to API call |