instruction stringlengths 0 30k ⌀ |
|---|
null |
Contrary to what romainl writes in [his answer](https://stackoverflow.com/a/78250848/796259), Vim's own [`:help :!`](https://vimhelp.org/various.txt.html#%3A%21) suggests the following:
>On Unix the command normally runs in a non-interactive
>shell. If you want an interactive shell to be used
>(to use aliases) se... |
I have the following situation. I had a function that ran on Windows App Service Plan. That function processed blobs. The function had default `LogsAndContainerScan` trigger. Now after some time I decided to rewrite this function and also migrate it from Windows to Linux. To accomplish this I createad another Function ... |
New Azure function app processes blobs that were already processed by another function app |
|azure|azure-functions|azure-blob-storage|azure-blob-trigger| |
I wrote an embedded function inside my feature file and on a conditional basis, I want to call the function only if the first object of the data array doesn't match dataNotFound
definition.
Aprreciate your help.
Scenario: xxxxxx
#Getting data array from DB
* def deleteTokens =
"""
function(lenArr... |
In 2024 the following syntax seems to work.
db.Debug().Where("stock IN ?", values).Find(&paintings)
Debug() will show you the raw query which will be in the correct SQL syntax "WHERE stock IN (?,?)".
P.S. Remove debug in production. |
If I have a table with a column named `json_stuff`, and I have two rows with
`{ "things": "stuff" }` and `{ "more_things": "more_stuff" }`
in their `json_stuff` column, what query can I make across the table to receive `[ things, more_things ]` as a result?
How can I get all keys from a JSON column in PostgreS... |
so I am having a code here with FPGrowth library in Pyspark
[![][1]][1]
What Im trying to do here is to create the freqItemsets and assocationRules manually to understand better about the PCY(Park-Chen-Yu) algorithm, can someone help ?
Please note we can only use Pyspark and anything relate to Data Mining, tha... |
null |
I created a new Chatbot via Teams toolkit according to the tutorial. When I tried to use the 'Debug in Teams' option on the company's intranet which made my pc must use proxy to access the Internet, I received an error message “(×) Error: Unable to execute dev tunnel operation 'create'. Tunnel service returned status c... |
How to setup proxy for Chatbot? |
|proxy|teams-toolkit| |
null |
How to delete added UiElement |
I would be inclined to only populate the `character` list with active players, rather than empty ones. That way you can append new players directly to the list when they're created.
Nevertheless, this should give you what you're after:
```
# create a new player. NOTE: "No" is updated when appending to character ... |
Here's a solution that implements the same semantics as MySQL's `JSON_KEYS()`, which...:
- is `NULL` safe (i.e. when the array is empty, it produces `[]`, not `NULL`, or an empty result set)
- produces a JSON array, which is what I would have expected from how the question was phrased.
```sql
SELECT
o,
(
... |
Waf fails to configure C compiler on github actions |
|c|github-actions|waf| |
Since the faddeeva is a convolution of a gaussian and a lorenztian i would expect them to look vaguely similar, however when I add a non-resonant contribution, the scipy.wofz does not gain the expected shape.
Don't worry about the amplitudes, I am just wondering about the overall line-shape
```
import numpy as n... |
Why does the Faddeeva function not look similar to the convolution of a Lorentzian and a Gaussian? |
|python|scipy| |
null |
|linux|gdb|coredump| |
I have HTML table with following structure:
```
<table>
<thead>..</thead>
<tbody><tbody>
<tr class="certain">
<td><div class="that-one"></div>some</td>
<td>content</td>
<td>etc</td>
</tr>
several other rows..
</table>
```
And I am trying to figure out what to do with the `<div class="that-one">` (or ... |
You can try something like this:
```
PopScope(
canPop: canPop,
onPopInvoked: (bool value) {
setState(() {
canPop= !value;
});
if (canPop) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text("Click once... |
It's not about php but you can also do it with php too by making a Router. You can search in google for it.
But also you can do it with .htaccess file and path redirects and rewrite rules. Here is code i prepared for your example write it into .htaccess in your server.
<IfModule mod_rewrite.c>
RewriteEng... |
I'm trying to initialize an array of hashes of a specific length in a short way.
$array=@(@{"status"=1})*3
This does not work as I expect it to, when I change a value in the hash for one element in the array, all elements are updated
$a1=@(@{"status"=1},@{"status"=1},@{"status"=1})
$a2=@(@{"status"=1})*3
... |
Short for creating an array of hashes in powershell malfunction? |
|powershell|multidimensional-array|hash|pass-by-reference| |
null |
(https://i.stack.imgur.com/1YpBw.png)
I am encountering an issue with generating report using Pandas Profiling library.
I have uninstalled and installed the library again in a newly created environment , still not able to generate any report.
Only now the table is displayed as shown in ss. Please help me fix it... |
You can convert a string to an ObjectID within the find query (or aggregation pipeline) with [`$toObjectId`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/toObjectId/):
```js
db.collection.find({
$expr: {
$eq: ["$_id", { $toObjectId: "65fee1b40839f1f886ee94a9" }]
}
})
```
[Mon... |
|javascript|session|next.js| |
The [official documentation][1] for the `StructLayoutAttribute` states:
> For blittable types, LayoutKind.Sequential controls both the layout
> in managed memory and the layout in unmanaged memory. For
> **non-blittable types**, it controls the layout when the class or
> structure is marshaled to unmanaged code,... |
Are "blittable types" really unmanaged types for StructLayout Sequential |
|c#|.net|struct| |
### Simple regex without index support
Without index support (only sensible for trivial cardinalities!) this is fastest in Postgres, while doing **exactly** what you ask for:
~~~pgsql
SELECT post_id, COALESCE(string_agg(topic_id::text, ',' ), 'Vague!') AS topic
FROM (
SELECT p.post_id, k.topic_id
FROM ... |
As on 2024, you can create subdomain programmatically using `/execute/SubDomain/addsubdomain`. Check this [cPanel documentation][1] for more information.
function create_subdomain($subDomain,$cPanelUser,$cPanelPass,$rootDomain) {
$subdomainRequest = "/execute/SubDomain/addsubdomain?domain=" . $subDomain . ... |
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... |
I'm generating multiple figures in a for loop and then I want to save these figures in 1 pdf file. Therefore I use this code:
from matplotlib.backends.backend_pdf import PdfPages
save_image(filename_results)
plt.close('all')
def save_image(filename):
#save image in pdf format, one page per plot
p = ... |
Save Matplotlib plots to PDF with PdfPages changes my plots |
|python|matplotlib|savefig|pdfpages| |
null |
I have a problem with Chrome addon.
How to find this element and get value 12752. I can't do that by class becouse it's reapeatible and I can't change HTML code.
```
<span class="tip_trigger" data-original-title="Some text" onclick="copyTextToClipboard('12752')">12752</span>
```
then I need to change onclick... |
How to find this element and change html Google Chrome extension |
|google-chrome-extension| |
null |
Suppose I have the following dataset:
|Personalnumber|Category|Year|Month|Index_ID|Previous_Index_ID|
|----|----|----|----|----|----|
|1|100|2022|8|42100| |
|1|100|2022|9|9534|42100|
|1|9400|2023|9|4| |
|1|9400|2023|10|485|4 |
|2|100|2022|1|214|102 |
|2|100|2022|2|194231|214 |
|3|200|2022|2|2111| |
|3|200|2... |
In your above code Set `ignoreMargins: true` read more about [FullPage][1] and [ignoreMargins][2]
buildBackground: (_) => pw.FullPage(
ignoreMargins: true,
child: pw.Container(color: PdfColors.white),
),
[1]: https://pub.dev/documentation/pdf/3.10.8/widgets/FullPage-class.html
... |
A version without Python-level looping and with reversing the whole string once instead of each word separately.
```python
def reverseEachWord(s):
return " ".join(s[::-1].split()[::-1])
print(reverseEachWord("the dog ran"))
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vwYKlpSVpuhY3... |
I tried many things but this was the only solution I found for my use case when using nested pages with back buttons:
```
<a href="javascript:history.back()"</a>
``` |
The continuity correction implementation in SciPy was *not* correct, as discussed in [`scipy/scipy#2118`](https://github.com/scipy/scipy/issues/2118). What *should* happen is for the correction to nudge the test statistic toward the mean of the asymptotic distribution, slightly increasing the p-value to compensate for ... |
> 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 ... |
You can create subdomain programmatically using `/execute/SubDomain/addsubdomain`. Check this [cPanel documentation][1] for more information.
function create_subdomain($subDomain,$cPanelUser,$cPanelPass,$rootDomain) {
$subdomainRequest = "/execute/SubDomain/addsubdomain?domain=" . $subDomain . "&rootdomain... |
The [handle class](https://www.mathworks.com/help/matlab/handle-classes.html) and its copy-by-reference behavior is the natural way to implement linkage.
It is, however, possible to implement a linked list in Matlab without OOP. And an abstract list which does *not* splice an existing array in the middle to insert ... |
Processing Baseline 04.00 S2 L1C products (2022-01-25) contain an Offset in the metadata.Before storage inside L1C (in a 16 bits integer format), a quantization gain and an offset are applied to the computed TOA reflectance . The transformation of reflectances in 16 bit integers is performed according to the following ... |
I am getting an error like this while creating private routing in Typescript can anyone Help?
> Type '{ exact: true; render: (routerProps: RouterProps) => Element; }'
> is not assignable to type 'IntrinsicAttributes & RouteProps'.
> Property 'exact' does not exist on type 'IntrinsicAttributes &
> RouteProps'.
... |
null |
### *I am using socket io in my react native chat app .. When I open the screen for first time it works perfectly but when I navigate back to other screens all the apicalls getting slower and my chat screen also getting slow (This is the problem 1),next,*
### *`Message received from socket is received instantly but ... |
You need to run `updateSelectizeInput` if one of the `SelectizeInput` receives a selection. Therefore you could include the code below: The first `lapply` attaches an `observeEvent` to all `SelectizeInput` and the `lapply` inside contains the updates, excluding the just changed input and all which already have a select... |
I've searched through loads of forum posts from the ROBLOX Developer Forum for any answer(s) to this, and I have had no luck finding an answer so I'm hoping you can help.
Basically I want to have a ServerScript (located ServerScriptService) wait for a LocalScript (located in a GUI Button) to fire a RemoteEvent (usin... |
A macro to the rescue:
```rust
macro_rules! generate_prop_changed {
( $( $method:ident => $prop:ident; )* ) => {
$(
pub fn $method(&self) -> bool {
self.original
.as_ref()
.map_or(true, |val| val.$prop == self.current.$prop)
... |
Need to calculate Matrix exponential with Tailor series with MPI matrix is small 3 x 3 for example
Meanwhile
```
vector<vector<double>> matrixExp(const vector<vector<double>>& A) {
int n = A.size();
vector<vector<double>> E(n, vector<double>(n, 0));
vector<vector<double>> T(n, vector<double>(n, 0))... |
{"Voters":[{"Id":213269,"DisplayName":"Jonas"},{"Id":18157,"DisplayName":"Jim Garrison"},{"Id":1974224,"DisplayName":"Cristik"}],"SiteSpecificCloseReasonIds":[18]} |
im trying to run my frontend and server side app but im getting this error when i try to update my dog profile
PUT http://localhost:8080/dog-profile/dogprofile 404 (Not Found)
dispatchXhrRequest @ xhr.js:272
xhr @ xhr.js:63
dispatchRequest @ dispatchRequest.js:61
_request @ Axios.js:179
... |
getting a 404 error AxiosError {message: 'Request failed with status code 404' |
|reactjs|mongodb|axios|serverside-javascript| |
My issue with this message was literally a permission gap.
To solve the problem you can visit the `service-usage-access-control-reference` [page][1].
Based on permissions there, you can use for example the `roles/serviceusage.serviceUsageAdmin` permission in your service account.
In my case i did the following:
... |
The oauth2 process is running normally, but http://authorize-server.com/...authorize (302) Bring a set cookie. Expected behavior: No set cookie should be included in any situation.
If the jsessionid for this process is required, should I manually end the session at/API/oauth2/endpoint? Because I want to use jwt for au... |
Even if SessionCreationPolicy.STATELESS is set, http://authorize-server.com/...authorize(302) comes with set-cookies and JSESSIONID |
|spring-security|spring-security-oauth2| |
null |
> I've got a separate class for the tree itself, ...
Presumably, this class maintains a pointer to the tree:
```lang-cpp
template <class T>
class BTree
{
Node<T>* root;
// ...
}
```
After function `remove` deletes a root node, it must set the `root` pointer to `nullptr`.
What's happening now is... |
Using POS product of Odoo 17
I am trying to add one more item in burger icon menubar in navbar.
I am successfully added the item "Admin Panel" and now I wan too just call the function when user click on the that "Admin Panel".
But it continuously giving error
I want when user click on the "Admin Panel" then si... |
# A confusion of getting to the bottom of a jq parse.
I'm learning, apreciate your help.
Two arrays here, both with same type ouput result, just integer values (spaced), same for string values.
Ex: 1 2 3 4 5
A multi-nested weather dump:
I trying to understand to return just an index ([0...]) value or/and a... |
The items in my Combo Box are being fetched from my data source. But how do I allow the user to manually enter an option in my Combo Box?
This option should then be saved in my data source.
[![enter image description here][1]][1]
I've tried different approaches with no luck.
[1]: https://i.stack.imgur.c... |
How to manually add a value to data source with combo box in Power Apps |
|combobox|powerapps|powerapps-canvas|powerapps-collection| |
null |
from datetime import datetime, timedelta
import base64
import hashlib
import hmac
from urllib.parse import urlsplit, parse_qs, urlencode
def sign_url(base_url: str, path: str, key_name: str, base64_key: str, expiration_time: datetime) -> str:
"""Generates a signed URL for... |
в боте на aiogram-dialog есть визард для создания заявки, где есть поле "описание". Если тип контента описания text, document, video, audio, photo, то все отрабатывает корректно. Но если тип описания voice (голосовое), то при нажатии любой кнопки в превью-окне бот падает в ошибку, которая в заголовке.
Ссылка на гит... |
Aiogram error iogram.exceptions.TelegramBadRequest: Telegram server says - Bad Request: there is no text in the message to edit |
|python|aiogram| |
null |
I am writing a console application in C#, VS2022.
Where I receive a json string from Orchestrator (Uipath), try to deserialize it to an IEnumerable.
I've spent all day reading everything about this error but I can't figure out what I'm doing wrong so now I'd really like someone to help me or at least point me in th... |
I dont understand what to do with: System.Text.Json.JsonException: 'The JSON value could not be converted to System.Collections.Generic.IEnumerable`1 |
|json|ienumerable|json-deserialization|system.text.json|jsonconverter| |
null |
Please provide the source code next time. But I want to answer on why we use `break` in general.
- The `break` statement is used to exit a loop prematurely if a certain
condition is met.
- In this context, once we find a duplicate element, there's no need to
continue searching for more duplicates.
- By ... |
The OP's problem qualifies perfectly for a solution of mainly 2 combined techniques ...
1) the [`map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) based creation of a list of [async function/s (expressions)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... |
|python|matplotlib|seaborn| |
In trying to understand how to work with classes, objects, and methods, Please explain why `print(list.sort())` does not work like `list.sort()` followed by `print(list)`.
```python
list = [5, 1, 2]
print(list.sort())
```
#output is `None`
VS.
```python
list.sort()
print(list)
```
#output is `[... |
|python|list|methods|printing| |
I have replicated some part of code to illustrate you what mistake your are doing and how you can correct it.
context.jsx
import {createContext, useState} from 'react';
export const ShopContext = createContext();
const ShopProvider = ({ children }) => {
const [data, setData] = useStat... |
Problem while using react native socket io client |
|javascript|reactjs|react-native|websocket|socket.io| |
null |
I am not sure if you were able to solve this. But have you tried updating the wsgi path in .ebextensions
For Python Flask I had to make it as -
option_settings:
"aws:elasticbeanstalk:container:python":
WSGIPath: application:application
Also, you can check the configuration in AWS EB con... |
Posting from https://learn.microsoft.com/en-us/answers/questions/1615486/container-instane-exec-api
The API <https://management.azure.com/subscriptions/$subscriptionId/resourceGroups/$resourceGroup/providers/Microsoft.ContainerInstance/containerGroups/$groupName/containers/$containerName/exec?api-version=2023-05-01>... |