instruction stringlengths 0 30k ⌀ |
|---|
|google-apps-script|google-slides| |
One option would be to pass a vector of colors to `hc_colors` where the of the colors is set according to the order of your categories:
``` r
library(highcharter)
colors <- df |>
dplyr::distinct(name, COLOR) |>
dplyr::arrange(name) |>
dplyr::pull(COLOR)
hchart(df,
"line",
hcaes(x = row_labels, ... |
null |
Solution to your problem:(MYSQL 8.0)
WITH CTE AS
(
SELECT dp1.DID,
dp1.Description,
dp1.uid as uid1,
dp2.uid as uid2,
COUNT(*) OVER(PARTITION BY dp1.DID,dp1.UID) as total_participants,
COUNT(CASE WHEN r.type in ('club member','family') or dp1.UID = dp2.UID THEN 1 EN... |
Toggle "conversation view" in Outlook with VBA |
|vba|outlook| |
The `causal_conv1d` implementation for Mamba comes from [this repo](https://github.com/Dao-AILab/causal-conv1d/tree/main), which implements the `causal_conv1d` operation using custom cuda kernels.
Cuda kernels can't run on Mac silicon. To run `causal_conv1d` on Mac silicon, you would need to rewrite the kernels in M... |
at the top
public TMP_Text savingIndicatorText;
start
private void Start()
{
// Initialize savingIndicatorText to be fully transparent initially
SetTextAlpha(savingIndicatorText, 0f);
// Start autosave with a small initial delay and repeat every 10 seconds
Inv... |
How to use invokerepeating and make ui text fade in/out over time? |
|c#|unity-game-engine| |
```
#include <msp430.h>
static int next = 0;
#pragma vector=USCI_A0_VECTOR
interrupt void bc_uart_irq(void) {
int transmit_flag = UCA0IFG & UCTXIFG;
if (transmit_flag && next == 0) {
next = 1;
UCA0TXBUF = 0x01; // should clear UCTXIFG
} else if (transmit_flag) {
ne... |
{"Voters":[{"Id":22180364,"DisplayName":"Jan"},{"Id":2530121,"DisplayName":"L Tyrone"},{"Id":16217248,"DisplayName":"CPlus"}]} |
{"Voters":[{"Id":22180364,"DisplayName":"Jan"},{"Id":354577,"DisplayName":"Chris"},{"Id":16217248,"DisplayName":"CPlus"}],"SiteSpecificCloseReasonIds":[13]} |
{"Voters":[{"Id":5514747,"DisplayName":"Harun24hr"}],"DeleteType":1} |
I'm developing the following `Modal` in a [Storybook](https://storybook.js.org/) story:
```
import React from 'react';
import type { Meta, StoryObj } from '@storybook/react';
import { Modal } from '@repo/ui/Modal';
import Title from '@repo/ui/Title';
import Field from '@repo/ui/Field';
import { DialogHeader } ... |
I'm working on developing a wake word model for my AI assistant. My model architecture includes an LSTM layer to process audio data, followed by a Linear Layer. However, I'm encountering an unexpected output shape from the Linear Layer, which is causing confusion.
After passing the LSTM output (shape: 4, 32, 32) to ... |
I have a dashboard in **Datadog** 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... |
'bun' is not recognized as an internal or external command |
|windows|tailwind-css|flowbite| |
I need to print the bounding box coordinates of a walking person in a video. Using YOLOv5 I detect the persons in the video. Each person is tracked. I need to print each person's bounding box coordinate with the frame number. Using Python how to do this.
The following is the code to detect, track persons and displa... |
```
data(murders)
murders_2 <- murders %>%
mutate(rate=total/population*100000) %>%
mutate(idx=case_when(rate < median(rate) ~ "low",
TRUE ~ "high")) %>%
select(state, region, rate, idx) %>%
group_by(idx)
# group_by(idx) is not applicable.
```
What's the problem?
I ho... |
{"Voters":[{"Id":23836145,"DisplayName":"Sonic"}],"DeleteType":1} |
I'm using magento 2.4.2-p1 and getting this error continously in my app as exceptions.
Report ID: webapi-6605b783361ad; Message: Notice: fil
e_get_contents(): file created in the system's temporary directory in /bitnami/magento/ven
dor/laminas/laminas-http/src/PhpEnvironment/Request.php on line 96
Why these er... |
file_get_contents(): file created in the system's temporary directory error in Magento |
|magento|laminas| |
null |
You have a typo in your code.
<br>It must be `classpath("com.google.gms:google-services:4.4.1"` instead of `classpath("com.google.gms.google-services:4.4.1"`.
<br>
Notice the symbol after `gms`. |
I've downloaded **SFML-2.6.1** and created Xcode project from template on my **M1 Mac**. Although project is building, it can not run, raising this error in the **Xcode** terminal:
```
dyld[7793]: Library not loaded: @rpath/sfml-system.framework/Versions/2.6.1/sfml-system
Referenced from: <1E3396AD-BA26-30F7-9... |
function Parent() {
return (
//...
<View>
onLayout={event=>{
const { width, height } = event.nativeEvent.layout
}}
<Child/>
</View>
//...
)
You can retrieve the actual component width and height by implementing onLayout prop on the wrapper ... |
EDIT.
This is a tcl tk bug in Windows. This can be seen by double clicking on the window title.
```
from tkinter import *
def window_clicked(event):
print("window_clicked", event.x, event.y)
root = Tk()
root.geometry("600x300")
root.bind("<Button-1>", window_clicked)
root.mainloop()
--------------... |
I've been struggling with this issue for two days and still haven't found a solution. I would be thrilled if you could help. I'm using PrelineUI in my project.
The input select looks like this:
<select multiple wire:model="category" id="category"
data-hs-select='{
"placeholder": "Sel... |
Laravel Livewire get data from blade |
I have a dgrid -> Cache store application to which I want to add sortable columns. The problem is that the REST provider cannot do the sorting, so I want any sort() request to trigger a fetch of the entire contents, and then further sorting and fetching to be done locally in memory.
In other words, before a sort is... |
Caching store that fetches all when a sort is requ |
|sorting|caching|dstore| |
I would like some help with a problem that has had stumped me for two days.
I have 'results' table like this:
```
result_id competition_id competitor_id competitor_ranking
1 1 1 0.1
2 1 2 0.4
3 1 3 0.2
4 1 4 0.3
5 2 1 0.4
6 2 2 0.1
7 2 3 0.2
8 2 5 0.3
9 3 3 0... |
MSP430F5529 on the MSPEXP430F5529LP: UART is not actually transmitting despite seemingly correct setup. What is wrong? |
|embedded|msp430| |
null |
When we call vectorized function for some vector, for some reason it is called twice for the first vector element.
What is the reason, and can we get rid of this strange effect (e.g. when this function needs to have some side effect, e.g. counts some sum etc)
Example:
```python
import numpy
@numpy.vectorize
d... |
Why numpy.vectorize calls vectorized function more times than elements in the vector? |
|python|numpy| |
I want to know is it possible to create anonymous Blade component (without controller) and that it has some variable and method which is called inside it and changes variable state.
For example: I have few links (like nav-bar) and on click, I want to change activeTab value.
I noticed it's always looking for cal... |
Function in anonymous Blade component |
|php|laravel|laravel-blade|anonymous-class| |
null |
### The problem
When I use **the portal protocol of yarn** to add my **local package** it just gets installed from the npm registry instead.
I want to develop said package so I need to be working with the latest code not the one published to the registry.
### What I tried
I tried using `yarn add vexflow-repl@po... |
How to use yarn's portal protocol? |
|npm|yarnpkg-v2| |
|python|if-statement| |
Correct - "I found that guest users are only to manage tenants".
B2C does not have a concept of guest users as "users". Guest users are simply admins. on the B2C portal.
To add custom claims, you can either add them in a user flow or use extension attributes in a custom flow.
Refer [here][1] for both options.
... |
'New messages' separator like WhatsApp |
|flutter|dart| |
The error in your comment says `save_frequency` is an unknown keyword for `ModelCheckpoint`. [In the docs][1] it shows that `ModelCheckpoint` expects `save_freq` as an argument. Also beware that if you set an integer for `save_freq`, it saves each x batches, not epochs. If you just want it to save every epoch, you can ... |
The code `char *line; line = strncpy(line, req, size);` has undefined behavior: `line` is an uninitialized pointer, so you cannot copy anything to it.
My recommendation is [**you should never use `strncpy`**][1]: it does not do what you think.
In your code, you should instead use `char *line = strndup(req, size);... |
This is the script to run typescript project:
node --require ts-node/register --loader=ts-node/esm --trace-warnings ./src/home-client.ts
With pm2, I tried:
pm2 start ./src/home-client.ts --node-args="--require ts-node/register --loader=ts-node/esm --trace-warnings"
Logs display an error: `0|home-c... |
running typescript with pm2, node and ts-node as argument |
So Leadership Team is how I want the end result
` atGroupsDefaultColors: {
LeadershipTeam: "rgba(255, 3, 3, 1)",
DeveloperTeam: "rgba(230, 83, 0, 0.5)",
ManagementTeam: "rgba(0, 255, 145, 0.5)",
SnrAdmin: "rgba(11, 175, 255, 0.5)",
Admin: "rgba(11, 175, 255, 0.5)",
... |
I want to add a space inbetween the group and team |
|javascript| |
null |
I'm working on developing a wake word model for my AI assistant. My model architecture includes an LSTM layer to process audio data, followed by a Linear Layer. However, I'm encountering an unexpected output shape from the Linear Layer, which is causing confusion.
After passing the LSTM output (shape: 4, 32, 32) to ... |
|sql|sqlite|group-by|ranking|group-concat| |
I've encountered an issue with my Node.js Telegram bot. The bot is responsible for sending approximately 1000 requests per second. Given Node.js's reputation for fast request handling, it seemed like the ideal choice for this task.
I've set up a cronjob to periodically check the getConnectionCount result every 2 sec... |
I am trying to do web scraping to download a file from MS webpage. I am using Selenium webdriver to achieve this using chrome. But whatever I do, the downloaded file automatically gets saved under the default Downloads folder. Below is the code I am using to achieve this, with Selenium v4.11.2
```
from selenium i... |
Default Download DirectoryNot changing with Selenium Webdriver |
|selenium-webdriver|selenium-chromedriver| |
I have a Yii2 app. And I try to add the patterns array in the urlManager of web.php. And I serached a lot and fount a lot of links with the correct soltuion. For example:
```
https://stackoverflow.com/questions/41873686/yii2-apply-custom-url-rule-class
https://www.yiiframework.com/doc/guide/2.0/en/runtime-routing
... |
Handling thousands of async POST requests in Express.js |
If you post the actual command stream, I can test it for you.
Or use a SW TPM to debug, e.g., https://github.com/kgoldman/ibmswtpm2.
On Windows, the MS Store has a command decoder that might help. |
I have this search box which is expanding when activated.
However, I would like to make the search box overflow other content on the page.
The search box is inside a Bootstrap column - how can I make it expand break out of it?
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: ... |
You can use [ZREMRANGEBYRANK][1] to remove the rest of the elements, that is,
`ZREMRANGEBYRANK key 0 -1501`
You can execute this command periodically / after each insertion / after each _k_ insertions. The most appropriate methods would depend on your use case.
[1]: https://redis.io/commands/zremrangebyrank/ |
Don't split the `CLOB` into a table of values; instead you can find a sub-string match for the terms within the `CLOB` (matching preceding and following delimiters to ensure you are matching complete terms):
```lang-sql
SELECT *
FROM Abc a
WHERE EXISTS(
SELECT 1
FROM clob_tab c
... |
Your example uses the shorthand version `container`. To use this syntax you must specify both a name and a type separated by a slash:
```container: container-name / container-type;```
If you just want to specify the type, use `container-type` instead.
The reason your example doesn't work as expected, is becaus... |
Due to incompatibility with some packages on a Vue project, `wavesurfer` needs to go down to `v6.6.4` from `v7.7.0`. And while trying to make player work again, I got stuck on progress bar.
Here's the problem: Progress bar is loaded with all its peaks from the start, it just expands as gets closer to finish:
[![... |
|node.js|typescript|pm2|ts-node| |
I opened the link you provided; it seems the file name is 'Underwate_test.py' but the file you are running is 'Underwater_test.py' so it does not exist. |
You change `display` of `td` thus breaking its table cell layout.
Just select a different way, for example, position the input absolutely or add a wrapper DIV:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-css -->
td{
border: 1px solid gray;
width:10... |
Cannot delete FOO.mdf from the data_files location as it says its currently in use. But the database using this mdf file has already been dropped. My guess is something corrupt went on during the dropping process.
How do I get this file deleted? I can't even copy the file to a different destination.
|
Cannot delete SQL datafile (.mdf) as its currently in use |
|sql|sql-server|database| |
The problem is because your UI **is not rebuild** when you focus the TextField.
You must call the `setState()` to update your UI.
### Method 1: Using your existing `FocusNode`
Since you have already creating the focus node and set color in the ternary operator, you just need to add the following code:
cla... |
One thing you can check is, if all of your beans are in the same package or sub package of the @SpringBootApplication. Spring automatically scans for the beans in the package&sub-packages where the springboot application is defined.
If the bean that you are trying to access is not within the @SpringBootApplication p... |
{"Voters":[{"Id":14732669,"DisplayName":"ray"},{"Id":22192445,"DisplayName":"taller"},{"Id":1115360,"DisplayName":"Andrew Morton"}],"SiteSpecificCloseReasonIds":[13]} |
I am trying to write a personal project in JavaScript.
So I started with an empty folder with two files:
card.js
constants.js
and in `card.js`, I used on the first line:
import { SUIT } from "./constants.js";
and run it using `node card.js`. It doesn't work, giving the error:
> (node:9157... |
|c#|github|github-actions| |
*There is very good post about trimming 1fr to 0: https://stackoverflow.com/questions/52861086/why-does-minmax0-1fr-work-for-long-elements-while-1fr-doesnt*
In general I would like to have a cell which expands as the content grows, but within the limits of its parent.
Currently I have a grid with cell with such ... |
How to clip grid cell and provide scroll as well? |
|css|scroll|css-grid| |
In stripe I have 2 products.
Monthly subscription ($50 for beginner).
Monthly subscription ($70 for advanced).
The user (a parent) can complete a form "Add student to courses". The result is creating tabs with content specific for each kid they sign up to classes.
If the user pays a subscription for each kid, in ... |
I'd like to add another reason for not using `apply` that was not mentioned in other answers. `apply` can cause nasty mutation bugs, i.e. `df.apply(func, axis=1)` applies the same object to the given function. Try this:
```
import pandas as pd
df = pd.DataFrame({"A": [9, 4, 2, 1], "B": [12, 7, 5, 4]})
print(df.... |
i was testing for an attendance website, logging attendance on different dates (manually changing the date on my device) i have a status column 1 for present and 0 for absent. when i log an attendance where some are absent, the status column on that date are reflected correctly but when I log an attendance where all ar... |
status table for all entries (even in different dates) in database changing value when all checkboxes are checked |
|php|mysql|checkbox|time-and-attendance| |
null |
I have such component which renders the `BBCode` image tag on my website on `React`:
**Code:**
**BBCodeComponent.tsx:**
import React from "react";
import ReactDOMServer from "react-dom/server";
import CustomTooltip from "./CustomTooltip";
const BBCodeComponent = ({content}) => {
... |
null |
This post will help you to get rid of the problem and it works for me. It is because of your PC timezone is not the same as your browser.
Check it out the down link:
https://enddesign.medium.com/a-problem-you-might-have-while-doing-the-chain-middleware-to-create-a-time-server-challenge-from-44027ca483b9 |
Okay so basically the date format is dd-mm-yyyy (it's the format here in Portugal) , and the hour is hh:mm, and my code is this:
```
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
struct DateTime {
int day, month, year, hour, minute;
};
// Function to convert date an... |
Is it allowed to apply `std::bit_cast` to an object of empty class, converting it to some not-empty class of the same size? And especially is it allowed to do in a constant expression?
I was surprised to find that the following simple program
```c++
#include <bit>
struct A {};
struct B { unsigned char b; };
... |