instruction stringlengths 0 30k β |
|---|
My mnemonic for your reference:
`strptime` = str points to time = str -> time.
`strftime` = str from time = str <- time. |
ok, heres whats wrong with your code
1. after assigning the srcObject of a video element you have to call play
notes:
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
you could do... |
Since all of you `search_in` functions are the same except for `pee` parameter there is no reason to even use a switch case statement and instead you can just rely on overload resolution to call the correct function for you like:
```
template <typename T>
void analyze(vegetable& place, const std::vector<std::uin... |
How can i edit the "wake-word-detection notebook" on coursera so it fit my own word? |
|machine-learning|deep-learning|google-colaboratory|recurrent-neural-network|keyword-spotting| |
null |
I removed this extension called "stylelint-plus" from vs code and this solved my issue.
If this helped you solving the issue vote up.. :)
[1]: https://i.stack.imgur.com/yPqPZ.png |
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... |
Use : href='../../project/css/style.css' |
{"Voters":[{"Id":19369453,"DisplayName":"Piranavan R"}],"DeleteType":1} |
<html>
<title>
test
</title>
<head>
<style>
.header {
position: absolute;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
color:bisque;
... |
CSS :hover effect is not working in my code |
This does not provide any information on why my first attempt was not working, but I randomly tried some things, one of them being doing both the bundle upload and the release creation in one edit, and that worked Β―\_(γ)_/Β―. Here is the adjusted code for anyone encountering the same issue:
```
import os
from googl... |
{"Voters":[{"Id":1745001,"DisplayName":"Ed Morton"}]} |
You'd need to type-erase the deferred async operations. Or write out the entire composed operation so the internal type discrepancies don't leak out to `co_composed`.
Both aren't without overhead, so perhaps you might flip the visitation inside out so the composed operation is never variant to begin with:
tem... |
I doubt your program is "crashing" at that particular line of code, because you have exception handling there, which would catch any error thrown in that method.
The only notable difference between the old and the new variant, is that the new one is asynchronous. And somewhere in the callstack that leads to this pa... |
null |
I'm attempting to display a list of movies on a website using Jinja2 (a template engine for Python) and Bootstrap (a front-end framework). However, I'm having difficulty getting the movie cards to display correctly.When trying to display the movie cards using Jinja2 and Bootstrap, the cards aren't being displayed as ex... |
Instead of an array you can use a collection type like **List<BClass>**. This way, you can dynamically add BClass instances at runtime without worrying about the initial size of the array. This is how to do it:
```
using System.Collections.Generic;
public class ClassName
{
public int titleNum { get; se... |
Can someone explain me why I get this error
> INSERT statement conflicted with the FOREIGN KEY constraint "FK_ArticleTag_Tags_ArticleId". The conflict occurred in database "Blog", table "dbo.Tags", column 'TagId'"
```
public class Article
{
public Article()
{
Comments = new HashSet<Commen... |
Hello Stack Overflow community,
I am encountering a peculiar issue with my PyTorch model where the presence of an initialized but unused FeedForward Network (FFN) affects the model's accuracy. Specifically, when the FFN is initialized in my CRS_A class but not used in the forward pass, my model's accuracy is higher ... |
There are two ways to filter documents that match a kNN query [pre-filters and post-filters][1]: You can choose the one that suits your use case.
1. pre-filtering β filter is applied during the approximate kNN search to ensure that `k` matching documents are returned.
2. post-filtering β filter is applied after the... |
The easiest change is to simply listen for the `input` (or `change` if you prefer) event, and then toggle a class on the `<body>` element based on the checked/unchecked state of the `<input>` as below, with explanatory comments in the code:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- ... |
I would like to set one culling mask per eye using the XRCamera3D (or alternative) in Godot. |
How do you set a seperate culling mask per eye using XRCamera3D in Godot |
|godot|virtual-reality|openxr| |
Not much to add to the title :
I have a time serie with values every 5 min. I want to upsample it to have values every 10 seconds (the last known value is repeated) so that I can combine these values with values from an other time serie providing values every 10s.
How do I do that please ? is that even possible ?... |
How to upsample a time serie using Flux (or InfluxQL if easier)? |
|prometheus|influxdb|promql|influxql|flux-influxdb| |
Ive been using dynamic imports with ssr set to false as a workaround for several shadcn components. I also think modals should be dynamic in general.
Eg:
const Modal = dynamic(()=>import("./pathToFile/Modal"), {ssr: false, loading: ()=> <AnyPlaceHolder />}) |
[enter image description here](https://i.stack.imgur.com/rWmbM.png)Why after installing node.js, an error like that occurs after I run the code of various javascript commands, it seems it's not because the code is an error but because node.js doesn't want to connect to the server.
[enter image description here](ht... |
ReferenceError: document is not defined(javascript) |
|javascript|node.js|installation|localhost|visual-studio-code-server| |
null |
|java|javabeans|method-reference|propertychangelistener| |
I am having issues with my SQL statement below. The NOT LIKE and OR statement is producing FALSE statements, in that it is producing the output when it should not, since I am using a NOT LIKE. When I put the statement as a stand-alone (without the OR condition), it works as intended.
For example, I am still seeing ... |
SQL in Snowflake - using NOT LIKE and OR statement together producing FALSE output |
|sql|snowflake-cloud-data-platform| |
Entity Framework Core 8 dbcontext - can't some rows in many to many relationship |
|entity-framework-core| |
I have a HTTP server and now want to handle POST requests with multiple content types and unknown values. Specifically I want to be able to get the values from the POST request body, both if it's a raw JSON (`application/json`) and also if it is sent from a form (`application/x-www-form-urlencoded` or even `multipart/f... |
Handling both JSON and form values in POST request body with unknown values in Golang |
|json|go|http|request|http-post| |
I have a MERN stack application which I deployed to Render (server side as web service and front end as static).
In my application, I have a profile where users can upload avatar image. I store an image as a URL string in my MongoDB [Atlas_][1] in User model.
Images are saved on the server in uploads folder. The im... |
I'm trying to set `AccessKeys` in `appsettings.Development.json` to point to my OneDrive folder. Since some team members have their OneDrive at different folders, I was trying to use Windows environment variables like this:
"AppSettings": {
"AccessKeys": "%OneDrive%\\project123\\keys\\",
}
Howev... |
Unfortunately, without using hacks or installing external fonts, the options are limited. Windows 10's native font rendering system may not fully support color fonts like Noto Color Emoji, leading to rendering issues.
One potential workaround could be to use Unicode characters for the flags instead of relying on spe... |
i found a way, using:
- integer pixel coordinates which is much more intuitive and convenient at least for what i'm doing here
- and considering the "pixel size"
|
For my future self who lands here, a better solution is to use parse_obj of pydantic v2. You can use MyModel.parse_obj(my_dict) to generate a model from a dictionary. ([documentation][1])
**Example**:
from pydantic import BaseModel, parse_obj_as
from typing import List
class TimeSlot(BaseModel... |
I'm trying to implement the AndroidPDFViewer in a JeckPack Compouse Android app. I get this error "Received status code 401 from server: Unauthorized". I already added to the settings.gradle.kts file " maven { url = uri("https://jitpack.io") }" and in the build.gradle.kts file is the implementation " implementation("co... |
android-pdf-viewer Received status code 401 from server: Unauthorized |
|android|android-jetpack-compose|pdf-viewer| |
null |
## `NavigableSet`
The [`NavigableSet`][1], and its predecessor, `SortedSet`, define a contract for a distinct (no duplicates allowed) collection of objects maintained in a certain order.
The [`TreeSet`][2] class bundled with Java implements this interface. For concurrency, use [`ConcurrentSkipListSet`][3].
Yo... |
|javascript|html|css| |
null |
Setting `options(seededlda_threads = 1)` gives reproducible results:
(It is unclear in the documentation how one can set a seed for each of the sub-processes when multi-threading so, as r2evans suggests in the comments, it may be worth raising this as a [Github issue](https://github.com/koheiw/seededlda/issues).)
... |
I have to use Xcode 12.4 with macOS 10.15 Catalina for a while still for development.
**Is it possible to use `notarytool` instead of `altool`?**
I have copied `notarytool` from Xcode 13.4 Developer Tools to my `usr/local/bin` folder.
When I run in shell:
xcrun notarytool submit myApp.zip
I get this... |
I have the code below and I expect to first have `hi` in my console then the `error` and at the end `why`, but the result is: `hi`, then `why` and the last one is `error`, so I'm wondering, why is this happening?
code:
const test = new Promise((resolve, reject) => {
console.log("hi");
throw new Erro... |
why promise has a weird precedence for errors in js? |
|javascript|promise|throw| |
null |
{"Voters":[{"Id":19369453,"DisplayName":"Piranavan R"}]} |
Use : href='../../css/style.css' |
Required to access the view from different source database.
I am using the Azure data studio with SQL Database project. First i've exported Source database into dacpac and in new project created the Database reference point to source dacpac.
```
CREATE VIEW [dbo].[v_activitypointer] AS
SELECT * FROM [$(dvdbnam... |
I don't really know what you mean with
> I have found out that it's possible to do this without using ajax, using jquery with node...
but I think you're misunderstanding AJAX requests.
An AJAX request (Asynchronous Javascript and XML) is an asynchronous request from the browser (client) to the server. 99% usage fo... |
My Next.js app is structured as follows:
```
app
βββ (auth)
β βββ layout.tsx
β βββ login
β β βββ page.tsx
β βββ signup
β βββ page.tsx
βββ (dashboard)
β βββ dashboard
β β βββ page.tsx
β βββ layout.tsx
βββ (home)
β βββ about
β β βββ page.tsx
β βββ layout.tsx
β βββ page... |
Configuring AWS Amplify in Next.js 14 App Router with no main layout.tsx |
|amazon-web-services|next.js|aws-amplify|next.js13|app-router| |
I am plotting some centered signal distribution and I observe peaks that I would like to automatically detect as well as the range.
Here is a snippet of my data with the plot result.
```
x <- c(-505, -492.278481012658, -479.556962025316, -466.835443037975,
-454.113924050633, -441.392405063291, -428.67... |
Find peak positions & plot vline in ggplot |
|r|ggplot2| |
Not having compiled the code with -g option may explain this. (locally VSCode take care of this but you have to configure your build process with the java debug flag or equivalent configuration). |
I have these tokens defined in my `lex` file:
(?xi:
ADC|AND|ASL|BIT|BRK|CLC|CLD|CLI|CLV|CMP|CPX|
DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|
NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|
SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|
TYA|CPY|DEC|DEX
) {
yylval.str = strd... |
{"OriginalQuestionIds":[69396320,32936215],"Voters":[{"Id":15358800,"DisplayName":"Bhargav - Retarded Skills"},{"Id":11985743,"DisplayName":"Xiddoc"},{"Id":1431720,"DisplayName":"Robert"}]} |
Run the following command in your project directory: `ng build --prod.` This will create folder called "dist" in your project directory containing the production-ready files, which you then can upload to your webserver.
more details: [https://angular.io/guide/deployment][1]
[1]: https://angular.io/guide/depl... |
I am not sure what is wrong. I have a basic understanding of git, but I am not an expert.
In my remote branch, I have a file that has a bunch of changes, etc in it.
In my local branch, this file is completely empty.
When I open up github, and the file, I notice it has something like this, so I believe something ... |
|git|github|pentaho| |
I have a weather app that refreshes asynchronously. While I've never seen it crash myself, I do see about a crash per day in Apple's reports, and not from a specific device. The app does have a good amount of users and it refreshes every few minutes, but I have no idea what kind of percentage send reports to Apple, so ... |
You code contains a lot of useless declarations. We should not try to force things to work by adding a lot of height/min-height/max-height, etc.
<!-- begin snippet: js hide: false console: false babel: false -->
<!-- language: lang-css -->
body {
margin: 0;
}
.page {
height: 100... |
I need to create multiple queries with various weightages and properties.
The simplified version of couple of queries is this
```
SELECT
Emp_Id,
(30 * ISNULL(BMI,0) +
(20 * ISNULL(Height, 0) +
(10 * ISNULL(Eyesight, 0))
FROM
MyTable1
WHERE
Category = 'Fighter'
SELECT
... |
here's my code:
```
#include <iostream>
template <typename T>
struct Foo
{
public:
T DataMember;
};
template<>
struct Foo<int>
{
public:
void bar()
{
std::cout << DataMember;
}
};
```
when i try to compile it it gives an error C2065 'DataMember': undeclared identifier
what i want to do... |
Why can't i use templates members in its specialization or did i do something wrong? |
|c++|c++14|template-specialization|c++-templates| |
null |
{"Voters":[{"Id":14732669,"DisplayName":"ray"},{"Id":17562044,"DisplayName":"Sunderam Dubey"},{"Id":272109,"DisplayName":"David Makogon"}]} |
For me it worked via setting the diacritical mark between brackets and double quotes:
First the declaration of index properties seems still necessary, otherwise the diacritical mark will simply appear as a subscript. E.g. if I want to have A' instead of A:
```
declare_index_properties (A, [postsuperscript])$
A["'"... |
I am using Polars (`{ version = "0.38.3", features = ["lazy", "streaming", "parquet", "fmt", "polars-io", "json"] }`) with Rust (`v1.77.0`) to process a large dataset (larger than available memory) inside a Docker container. The Docker container's memory is intentionally limited to 6GB using `--memory=20gb` and `--shm... |
null |
I am very new with power BI and I need dynamically calculate with DAX the distinct count of client that have spend in the analyzed period more than zero.
In the example below if in the report I have the store I expect zero client for store A and 1 for store B. I am not able to have the total spend in the table because... |
Measure in powerbi to distinct count number client with a total spend withing the context > zero |
|powerbi|dax|measure| |
Using `aggregate` with [function for geometric mean](https://stackoverflow.com/a/25555105/6574038). We can get the year of `substr`ing from 1st to 4th character.
> gm_mean <- function(x, na.rm=TRUE) {
+ exp(sum(log(x[x > 0]), na.rm=na.rm)/length(x))
+ }
> aggregate(. ~ cbind(year=substr(dat$Quar... |
you can use PrimeVue config options
import PrimeVue, { PrimeVueConfiguration } from 'primevue/config';
app.use(PrimeVue, {
locale:{ matchAll: "Ψ¬Ω
ΩΨΉ Ψ§ΩΨ΄Ψ±ΩΨ·" }
} as PrimeVueConfiguration);
alternatively you may modify only a portion of it like this:
import PrimeVue, { PrimeVueConfi... |
Having:
- a csv file with lots of columns.
- PERMISSIVE mode and column name for corrupt records set.
Is there any way to find out **which specific cell causes a row to be marked as corrupt**?
With default approach I can only see (in corrupt column) input row without any hint which cell was problematic withi... |
Which cell makes input row a corrupt row when reading csv file with Apache Spark |
|csv|apache-spark|schema| |
The parent widget contains a Scaffold and a `bottomNavigationBar`. The widget accepts a body, according to the navigation.
I tried the implementation of flutter itself: Overlay Portal (1 screen);
I tried packages from pub.dev:
flutter_portal (2 screen);
dropdown_button 2 (3 screen)
Who has encounte... |
Need dynamic query creation in SQL Server with Array like implementation |
I have been working on a project that uses a **`database`**. It makes the user choose from the commands in the program. The program makes you add your **password, E-mail, user id, and birthday**, and every user has his own **user id**. He can make a **new user**, **delete password**, **delete user**, **change password... |
Why if condition work but else if condition doesn't work? |