instruction stringlengths 0 30k ⌀ |
|---|
{"Voters":[{"Id":2602877,"DisplayName":"Christoph Rackwitz"},{"Id":17562044,"DisplayName":"Sunderam Dubey"},{"Id":19846219,"DisplayName":"pigrammer"}],"SiteSpecificCloseReasonIds":[13]} |
Angular 16 sending null values to API |
|asp.net|angular|swashbuckle.aspnetcore| |
null |
[used BETWEEN optr with range 'a' and 'z'.][1]
i want to get all the name by using BETWEEN operator only
but as you can see BETWEEN optr only include lower_range(a) and not upper_range(z) , but i also want name starting from character 'z'. can we get it??
note:we can only use BETWEEN optr.
You can look into the... |
TypeError at /contact2/
Field 'id' expected a number but got datetime.datetime(2024, 3, 31, 9, 52, 52, 728466, tzinfo=datetime.timezone.utc).
Request Method: POST
Request URL: http://127.0.0.1:8000/contact2/
Django Version: 4.2.7
Exception Type: TypeError
Exception Value:
Field 'id' expected a number but got da... |
how can debugg field id error in the database schema? |
|django|sqlite| |
null |
{"Voters":[{"Id":550094,"DisplayName":"Thierry Lathuille"},{"Id":546871,"DisplayName":"AdrianHHH"},{"Id":839601,"DisplayName":"gnat"}],"SiteSpecificCloseReasonIds":[13]} |
Due to doc https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset
> date.getTimezoneOffset() returns the difference, in minutes, between date as evaluated in the UTC time zone and as evaluated in the local time zone — that is, the time zone of the host system in which... |
C++: Prevent method from expanding too early when passed as argument |
|c++|format|parameter-pack| |
I want to add page breaks in between long article content with header and footer, also after each new article. I am basically creating an e-book with selected articles. E-book is being generated but the header and footer doesn't appear on the page having long article content. Please help me solve the same.
... |
Dompdf add line break after the end of each article and also in between article pages i content is long? |
|laravel|dompdf| |
> [my home screen showing like this](https://i.stack.imgur.com/abwOE.jpg)
i have used react navigation and my status bar is coming inside background image but not the bottom button which comes on my android device
```
import { View, Text, StyleSheet, Image, Animated } from 'react-native';
import { useWindowDimen... |
Error Accessing completions Property of openai in Node.js Module |
|node.js|openai-api| |
There appears to be a mismatch with regard to the number of elements in the array and how the elements of the array are being accessed.
Rather than loading the array with numbers it's simpler to just use the index number of each element of the array to represent each number. Then store either a true or false value -... |
I am looking for a two-dimensional version of the smooth.spline function in R, but cannot find one.
Following a suggestion of Cosma Shalizi (https://www.stat.cmu.edu/%5C~cshalizi/TALR/TALR.pdf, page 368) I am trying to build an iterative weighted least square fit, but for a regression with two predictors (instead of... |
Function for two-dimensional smooth spline in R? |
|r|smoothing|spline| |
null |
{"Voters":[{"Id":22356960,"DisplayName":"pindakazen"}],"DeleteType":1} |
I have a function `def event(...)` in my `EventHandler` class which can be called at arbitrary intervals in my main code. It needs to put all the events that are coming in into a queue and process them one at a time. How do I do this? I've been trying to use the asyncio library to do this, but I have no clue how to do ... |
Why does my site freeze after closing the modal (html, js) |
|javascript|html| |
I'm trying to reproduce the result of the s5 model https://github.com/lindermanlab/S5. But I ran into a major issue with installing jax. The authors provided a requirements_gpu.txt:
```
flax
torch
torchtext
tensorflow-datasets==4.5.2
pydub==0.25.1
datasets
tqdm
--find-links https://storage.googleapis.com/jax-... |
I am doing a project for class using Astro, as I also need a database I tried to connect with Astro-DB but when I run "npm run dev" I get the error.
I use the most recent version of Astro and v18.20 of NodeJS
Here is the TypeScript of the tables
```
import { reference } from 'astro:content';
import { defineD... |
A problem with Astro, Astro-db, TypeScript and NodeJS |
|node.js|typescript|astro| |
null |
|powerbi|dax| |
There is a code like this:
```
using d2dArray = vector<vector<double>>; // Псевдоним
d2dArray calcNextArray(d2dArray array)
{
d2dArray nextArray;
int nextArrSize = array.size() - 1;
d2dArray detArray = { {0, 0}, {0, 0} };
for (int i = 0; i < nextArrSize; i++) // Идём по столбцу
{
... |
Import a package but disable importing the relative parent |
|setuptools|setup.py| |
I have a dashboard that uses a "status" variable to filter the log messages. This works fine for the majority of the entries.
There are some actual errors that do not have status=Error. They are logged as Info.
When I select "Error" from the variable dropdown I would like to get the entries with status=Error and any ... |
Dashboard with a template variable |
|datadog| |
null |
I'm trying to use a TextValidationBuilder to validate input on a Google Form. I'm doing some tests and I have no idea why the regex isn't working. When I test the regex [here](https://regex101.com/) it works fine.
I want to use regex to validate that an input is a time or a number and I am doing this by checking if ... |
Regex expression not working on Google Form |
|regex|google-apps-script|google-forms|google-forms-api| |
|http|web-services| |
|javascript|reactjs|solid-js| |
In C#, when calling `driver.SwitchTo().Alert()`, it sometimes blocks the execution of the code, with no reaction or errors, just a continuous blocking state.
I have tried replacing Selenium, but it didn't help. The browser I am using is Chrome. |
I suggest using [tag:numba] to speed up the computation:
```py
import numba
@numba.njit
def rolling_sum_with_reset_numba(series, window_size):
rolling_sums = np.empty_like(series)
current_sum = 0
for i, value in enumerate(series):
if i % window_size == 0:
current_sum = 0
... |
I created this algorithm to return the index of the first occurrence of a needle in a haystack, or -1 if the needle is not part of the haystack. It passed on LeetCode with a lower-bound of one and an upper-bound of ten to the power of four for both needle and haystack and people were saying that O(n * m) solutions were... |
What is the average and worst-case time complexity of my string searching algorithm? |
|python|algorithm|big-o| |
null |
I have tried and tried googled and googled but I just cannot seem to get anything working, please could someone help me out.
I am creating a basic c program for the raspberry pi pico w, I want it to basically log onto the internet and get the time, then using the time switch a relay either on or off.
I am using t... |
Cannot build a basic project with curl on Mac (M2) for Raspberry Pi Pico |
|c|macos|cmake|apple-silicon| |
the given code is not conerging to correct eigenvalues. Kindly highlight potential issues and make corrections. I seuspect there are issues in the Bisection function.
```
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import simps
xlower = 10**-15
xupper = 60
dr = 0.001
... |
how to cover the Image to whole screen as my system home gesture button is showing , want to cover it with background image using react native? |
|javascript|android|reactjs|typescript|react-native| |
null |
I was able to get the current time but it fetches the time in another timezone(GMT) and I want to display the timezone in CET. What should I change in my script?
```
pwsh: |
$date=$(Get-Date -format yyyyMMdd-Hmm)
Write-Host "##vso[task.setvariable variable=currentTimeStamp]$date"
displayName: 'Get... |
Get current Timestamp in CET format and concatenate with string in yml file |
|azure-devops|yaml|azure-pipelines|devops|azure-pipelines-yaml| |
null |
I have table a with records and
c1
| 1 1
| 2 1
| 3 1
| 4 1
Table b with records
c3
| 1 1
| 2 1
while running this code
select * from a
inner join b on a.c1=b.c3;
I'm getting output
c1 c3
| 1 1 1
|... |
I have many functions which share the same structure and base signature:
```python
async def get_stuff_from_external_api(*, client: Client | None, id: int) -> Ressource:
if not client:
client = make_client()
return Ressource(await client.get(id))
```
To DRY my code I extracted this logic into... |
{"Voters":[{"Id":10008173,"DisplayName":"David Maze"},{"Id":466862,"DisplayName":"Mark Rotteveel"},{"Id":354577,"DisplayName":"Chris"}],"SiteSpecificCloseReasonIds":[18]} |
While developing a `feat` branch based on the `develop` branch, the `develop` branch has been frozen, that is merged into the `staging` branch. So now I would like to rebase my `feat` branch onto `staging`.
Initial history:
```
D---E feat
/
A---B---C develop
\
F---G---H staging
```
Final histor... |
In EF terms it seems like it could just be:
var d = db.Users
.OrderByDescending(u => u.Xp)
.AsEnumerable()
.Select((u, i) => new { Rank=i+1, User = u)
.ToDictionary(at => at.Rank, at=>at.User)
You list all your users out of the DB in order of XP, and you use the overload of `Select... |
After some research, the results found that the vulnerable code is here:
```PHP
$a = preg_replace("/(\[x (.*)\])/e", "y(\"\\2\")", $a);
```
A possible remote code execution (RCE) could be achieved by executing something similar to this:
```Bash
./script.php path/to/malicious_file.txt
```
Being this th... |
My question is similar to the question found in https://stackoverflow.com/questions/75783581/define-typescript-interface-with-using-constant-names-as-keys but is a little bit different.
I start off with the same type of object whose keys are constants
```js
const KEYS = {
KEY1: 'hello',
KEY2: 'world'
} as c... |
Define TypeScript type of object whose keys are constants |
|typescript|object| |
I've extensively searched the depths of the internet, eager to seamlessly incorporate TTF font styling to user input. With a vast repository of over 12,000 TTF font files hosted on my website, the current functionality generates input text as PNG files. However, I'm now enthusiastic about enabling users to directly cop... |
|javascript|php|html|go|clipboard| |
{"Voters":[{"Id":368354,"DisplayName":"Lennart"},{"Id":8877,"DisplayName":"Ðаn"},{"Id":9214357,"DisplayName":"Zephyr"}],"SiteSpecificCloseReasonIds":[13]} |
Jax installation on gpu |
|python|cuda|development-environment|jax| |
*This question is meant to be used as reference for all frequently asked questions of this nature.*
Why do I get a mysterious crash or *'segmentation fault'* when I assign/copy/scan data to the address where an uninitialized pointer points to?
Examples:
```
int *ptr;
*ptr = 10; // Crash here!
```
```
char *... |
Three bugs that I can see, including some spotted in comments.
----
```
MOV AH, 09H
LEA AX, msg3
INT 21H
```
Looks like a typo for `LEA DX, msg3`. As it stands you will have a random value in AH (the high byte of the address of `msg3` and will be executing some random DOS function. That might b... |
I need to put an overlay Window **precisely** over a certain element of a third-party app, pixel by pixel or nearly so.
I'm aware of:
//.............
appOverlayLayoutParams.gravity = Gravity.TOP | Gravity.LEFT;
appOverlayLayoutParams.x = 100;
appOverlayLayoutParams.y = 100;
//............... |
How to create an overlay window over a certain element via AccessibilityService and scroll it too? |
|java|android|kotlin|accessibility|accessibilityservice| |
Asynchronously add to queue, synchronously process it |
|python|asynchronous|queue|python-asyncio| |
null |
I happens in the code example I provided also.
Does anyone on here know what I am referring to?
When I tap one of the buttons via mobile, there is a white flash, how do I disable or remove that?
That is all I am trying to do in the code.
https://jsfiddle.net/xmdq14a2/1/
I am not able to take a screenshot... |
I was trying to connect the BNO08x IMU Breakout board with Pico RP2040, I tried connecting it to both the I2C ports, but it didnt worked.
I am using the official Adafruit BNO08x lib.
Below is the part of Example code included in the lib which I was trying to run:
<!-- language: lang-c -->
#include <Adafruit... |
I have a Beaglebone Black (BBB), and I want to create a boot image for it using Buildroot. In Buildroot, I created a .config file using `make beaglebone_defconfig`. Then I run `make menuconfig`, since I want to add a driver to the build. I cannot find any place in the menu to add a driver. In particular, I want to a... |
Enable Driver Using Buildroot Menuconfig |
|buildroot| |
When uploading images on **NextJS** project, got this error:
> Unhandled Runtime Error Error: Element type is invalid: expected a
> string (for built-in components) or a class/function (for composite
> components) but got: undefined. You likely forgot to export your
> component from the file it's defined in, or... |
--headless print-to-pdf with Microsoft edge(chromium) won't work using ProcessStartInfo .Net |
|.net|microsoft-edge|google-chrome-headless| |
null |
When I define a molecule with qiskit's PyscfDriver, it has a certain number of (spatial) orbitals. In this example, I define a NaH molecule and get an object with 10 spatial orbitals. I would like to reduce this number by reducing some orbitals from the active space. I intend to the FreezeCoreTransformer as in
`F... |
Migth be in newer version, but you can now do the class default using the context, see [doc][1]
class CurrentUserDefault:
"""
May be applied as a `default=...` value on a serializer field.
Returns the current user.
"""
requires_context = True
def __call__(self, serializer_field):
... |
I tried to reconstruct this:
export FOO=$(curl https://jsonplaceholder.typicode.com/todos/1|jq -Rs)
This is what is stored from the looks in bash:
"{\n \"userId\": 1,\n \"id\": 1,\n \"title\": \"delectus aut autem\",\n \"completed\": false\n}"
Then in python shell:
>>> import json
>>> im... |
[This section][1] from prisma docs is relevant here:
> When you define two relations between the same two models, you need to add the `name` argument in the `@relation` attribute to disambiguate them. As an example for why that's needed, consider the following models:
>
>
> ```prisma
> // NOTE: This schema is ... |
If the columns with int8[] or text[] types are arrays, use the keyword ARRAY.
create table PUBLIC.abcs
(id bigint not null, createdBy varchar(255), createdDate timestamp,
lastModifiedBy varchar(255), lastModifiedDate timestamp,
columnName varchar(35) not null, types text ARRAY not null,
... |
Good day, dear specialists.
I set up the script, but one problem remains: when you click on the share button in Telegram or WhatsApp (the others open in a pop-up window), a transition occurs (in the PC browser version) to the service website and, accordingly, leaves the site. How can I make it open in a new window s... |