instruction stringlengths 0 30k ⌀ |
|---|
null |
You can update my previous code to use two comparisons, you have to pay attention to use num_2 as columns. Also you need to change the output reference column to "label":
```
def find(g):
# get sub as 0,1,2…
sub = pd.factorize(g['sub'])[0]
# convert inputs to numpy
n1 = g['num_1'].to_numpy()
... |
why reCAPTCHA thing coming when we use firebase phone authentication react-native android? |
|android|firebase|react-native|firebase-authentication| |
I think your code for `geom_bar()` and `geom_errorbar()` should be working fine. However, the code for generating `cume_y` variable might be problematic. I replace `.by=cultivar` with `.by = c(Treatment, Light, cultivar)` as in the following
```
library(dplyr)
library(ggplot2)
df |>
mutate(.by = c(Treatment,... |
Quite simply, the C++ standard explicitly imposes no requirements on the accuracy of floating-point operations or the numeric library functions like `std::pow`. They are *implementation-specific.*
The various standard library implementations<sup>1</sup> (glibc, musl, etc.) can and do use different approximations of ... |
I don't believe this is currently possible, see [this thread][1] for further discussion.
[As pointed out in the comments](https://stackoverflow.com/questions/59651476/how-to-format-on-auto-save-using-vscode-currently-it-formats-when-i-use-cont/78214155#comment128149397_59651514), this is now possible with the use of... |
How do I add a loop into this macro to repeat 'x' amount of times |
|excel|vba|loops| |
null |
I have a set of Eclipse plugins, one of which uses aspects to modify the Eclipse compiler's behavior. Then, the product consisting of the aforementioned plugins plus some other official Eclipse plugins is built using Maven and Tycho. Everything was working perfectly fine on Eclipse version 2023-06 (and older versions) ... |
I think this works well enough.
```r
get_data <- function(database, table = NULL, query = NULL) {
if (is.null(query)) {
tbl(database, table)
} else {
tbl(database sql(query))
}
```
With this, you can do
```r
con <- DBI::dbConnect(...)
get_data(con, table = "MyTable") |>
head() |>
... |
null |
I am trying to integrate this policy to my policy:
https://github.com/azure-ad-b2c/samples/blob/master/policies/force-password-reset-after-90-days/readme.md
[extension_passwordResetOn custom user attribute](https://i.stack.imgur.com/sCR4R.png)
I created the required custom user attribute.
Next, I edited the ext... |
|azure-ad-b2c|azure-ad-b2c-custom-policy| |
**Over-punched** numeric (**Zoned-Decimal** in Cobol) comes from the old-punched cards where they over-punched the sign on the last digit in a number. The format is commonly used in Cobol.
[![Illustration showing overpunch on a punchcard from the IBM 29 Card Punch Reference Manual][1]][1]
As there are both **Asci... |
I make it a short as possile. I am an embedded software engineer.
I know C and learn modern C++ for embedded, making my own examples.
Also, I want to learn UML.
ChatGPT can't help me out, since it doesn't understand visual language. Maybe ChatGPT 12 in 2049 can do that ;o
My example: I have an NHD128x64 display, it... |
I find one way to do this . we have to import .css file in .jsx same as normal then top of the .css file add this
<!-- begin snippet: js hide: false console: false babel: true -->
<!-- language: lang-css -->
@tailwind base;
@tailwind components;
@tailwind utilities;
<!-- end snippet -->
the... |
I am using ModelMapper (3.2.0) to map JAXB Beans to my domain beans.
The schema which is used to generate the JAXB Beans contains `xs:IDREF` elements, which are represented as `List<JAXBElement<Object>>` in the JAXB Bean.
But ModelMapper doesn't understand how to map the source bean to my target bean - rather it... |
I'm experiencing an issue with my Flask application where the user's logged-in state is not persisting after the browser is closed and reopened. I've tried configuring the session management and cookie settings, but the user is still being logged out when they return to the application.
I've set the SESSION_PERMANEN... |
flask keep a user logged in across browser sessions |
|python|flask| |
I want to render by DXGI and need to get the SwapChain.
I want to swap the vtable from DXGI.
I don't want anyone to say that I can render in other method or just create the swap chain, but I know
and I cannot do with other method. That's the task I have problem with.
I reversed the DXGI.dll with IDA Pro and hav... |
Yes, in this other question you can find more information: https://stackoverflow.com/q/11133560/12508080
You could do something like this:
.conteiner {
width: 30vw;
}
.conteiner .image {
width: inherit;
}
|
Solution in [TXR](https://nongnu.org/txr), **almost** precisely matching the required output format. At the end of the answer, an attempt is shown to precisely match the format:
```
$ txr extract4.txr even-longer-data
AAA retrieveA
BBB retrieveB
CCC
retrieveD
EEE retrieveE
FFFFF retrieveF
GGGGGG g... |
data = [
{"name": "Tom", "age": 10},
{"name": "Mark", "age": 5},
{"name": "Pam", "age": 7}
]
target_name = "Pam"
for person in data:
if person["name"] == target_name:
print(person) # This will print the dictionary for Pam
break # Y... |
On our webshop we want to use certain user groups to have benefits and one of them is to have a 50% discount on the shipping method. So i made a shipping method which has 50% discount and used a PHP code that hides the regular shipping method for the user group "subscribers". The problem now is that i want to hide the ... |
You need to send the message to the `HWND` that `CreateWindow()` creates. You can get that from the return value of `CreateWindow()`, or from `GetDlgItem()` after `CreateWindow()` is finished.
The `LPARAM` needs to be a pointer to the 1st character of a null-terminated C-style string.
```
TCHAR myline[size];
//... |
I created simple project in C#.
File -> New -> Project -> C# ASP.NET Core Web API.
I can not see the new controller - please help me.
[enter image description here](https://i.stack.imgur.com/iRpjh.png)
I want to see new controllers in Swagger when I add a new controller. |
I have created C# ASP.NET Core Web API - it shows default controller only (weather forecast) rest of the controller is not found |
|c#|asp.net-core-webapi| |
In my pygame project using pygame and the library pygameGUI I can't load any pngs as the dll for doing it won't load.
```
Traceback (most recent call last):
File "C:\Users\tomto\PycharmProjects\CasinoPy\main.py", line 82, in <module>
test = pygame.image.load('Assets/Cards/2_of_Hearts.png')
^^^^^^... |
Does this help?
<https://learn.microsoft.com/en-us/visualstudio/help-viewer/overview?view=vs-2022>
Deals specifically with Visual Studio Help Viewer and how to download and use it. (The tool allows you to store and view help content locally.) The latest version seems to be 2.3. I wonder if you have a versioning p... |
This works. Slightly simpler than what you have:
```sh
ls mydir | jq -sR 'split("\n")[0:-1]'
```
|
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? |
Can you lose messages when using xpub xsub with zmq? |
Try the following configuration:
{
...
"editor.formatOnSave": true,
"files.autoSave": "onFocusChange"
...
}
Do not use `"files.autoSave": "afterDelay"` as that doesn't work with auto formatting.
Reference: https://github.com/microsoft/vscode/issues/45997. |
|html|css| |
Ok problem solved, i used a custom tika config yml file to set psm 0 and in thé rmeta i get the content of thé osd script. |
I've been developing a plugin of type activity (mod) for Moodle, but I'm quite new to the technologies used by Moodle and how it works.
I've created an icon for my plugin, and I understand that a 24x24 pixel .svg file needs to be placed inside the "pix" folder at the root of the project. I've done that, the icon loo... |
How do I set the color of the icon for my Moodle plugin of Activity type (mod) to match the color used by the theme? |
|svg|boost|icons|moodle|moodle-theme| |
null |
I have several thousand maps.goo.gl shareable links I need to get the coordinates (lat/long) and/or place id so i can then use google maps api and load an embedded map on my page. I cannot open in browser to expand the link manually to grab info from the link as that would be impractical.
So is there any way via go... |
google maps api - how to get location information /place_id from shareable links maps.goo.gl |
|google-maps|google-maps-api-3| |
My Loss is constant after training an LSTM Model for the yahoo dataset of GE. Can someone help me out?
This is the code that i implemented
```
import numpy as np
from keras.layers import LSTM, Input, Dropout, Dense, RepeatVector, TimeDistributed
import pandas as pd
import matplotlib.pyplot as plt
from sklea... |
CTkScrollableDropdown, how to change dynamically the values |
|python|dropdown|customtkinter| |
null |
|php|laravel|eventhandler|laravel-11| |
null |
It seems you have copied this part from somewhere. Before you come to this, there are a few things you need to do
1. Create an event called `NewUserEvent`
2. Dispatch the Event
----------
In `App\Events\NewUserEvent.php`, if not, create one
namespace App\Events;
use Illuminate\Foundati... |
null |
|azure-aks|gitops|fluxcd| |
**First step** : deconstruct your image
This web site does it well : https://www.aatbio.com/tools/online-image-channel-splitter-rgb
**Second step** : stack your images
With `position: absolute`, flexbox, grid layout, anything
**Third step** : make the magic
Set the css property `mix-blend-mode: lighten;`... |
In my python code this worked for me as I didn't need encryption for local dev:
conn_str = f'DRIVER=ODBC Driver 18 for SQL Server;SERVER={server};DATABASE={database};UID={username};PWD={password}; Encrypt=no'
`Encrypt=no` is the key. |
PHP doesn't populate form data in `PUT` requests (either in `PATCH`).
Just install https://pecl.php.net/package/apfd and `PATCH` and `PUT` request will have `$_POST` and `$_FILES` as if were `GET` or `POST` requests.
In Docker it will be:
RUN pecl install --force apfd && rm -rf /tmp/pear && docker-php-ext-... |
Please check the [`ansible.cfg`](https://docs.ansible.com/ansible/latest/reference_appendices/config.html) and the `[persistent_connection]` in particular.
It reads:
# Configures the persistent connection timeout value in seconds. This value is
# how long the persistent connection will remain idle befor... |
I'm having an issue with fetching data from supabase using `await supabase` in the client component.
Issue:
- very slow loading speed between pages, such as `http://localhost:3000/dashboard/call-logs`
- Occasionally it shows `async/await is not yet supported in Client Components, only Server Components. This e... |
async/await is not yet supported in Client Components when using await supabase |
|javascript|reactjs|async-await|supabase| |
[Per my top comment], building with `-Wall -O0 -g -fsanitize=address`, a few issues ...
1. With `-Wall`, arguments `col` and `row` are `char` and compiler complains about that (converted to `int`)
1. `row` and `col` are unitialized (in `main`) but the _values_ are never used by `computerMove` or `UserMove` (set to ... |
[5]
[4, 1]
[3, 2]
if (tower[1].isEmpty() == false && tower[1].peek() != 1){
if (tower[2].isEmpty() || tower[1].peek() < tower[2].peek()) {
int disk = tower[1].pop();
tower[2].push(disk);
movedSmallest = false;
showTowers()... |
I have made a Button React Component:
<br>`function Button({ text, Icon, iconProps, ...buttonProps }: ButtonProps)`<br>
The props must have this structure:
- Only a `text`
- Only an `Icon`
- An `Icon` with `iconProps` (the `iconProps` can only be passed if the `Icon` is also present)
- A `text`, an `Icon`
-... |
{"Voters":[{"Id":286934,"DisplayName":"Progman"},{"Id":3088349,"DisplayName":"Maytham Fahmi"},{"Id":13302,"DisplayName":"marc_s"}]} |
Try the following:
Essentially I assigned an index number to every columnID under each recordID and ordered it by random. Then I used qualify to filter the number of rows I wanted. If qualify isn't supported, I would use a where index<=100 filter instead. This should give you random results each time.
SELECT... |
My GUI application is not responsive, I want it to resize according to the window size.
Currently am using .`place(x,y)` for placing components.
Example:
label.place(x=100,y=50)
[Current components when windows maximized](https://i.stack.imgur.com/c0mvp.png)
Tried looking for a solution, and was ... |
A nordvpn subscription is not required to reproduce this problem.
Problem: Docker container does not find System Daemon of nordvpn after restart
Steps:
1 - Build (Dockerfile below) docker container with `docker build -t nordvpn .`
2 - Create and run container `docker run -it --name nordvpn nordvpn`
3 - Type `n... |
Docker container does not find System Daemon of nordvpn after reboot |
|docker|containers|vpn| |
null |
Well, you're trying to inflate a view via a **layout** instead of **id**.
If you're inflating, then your toolbar needs to be an object that exists inside another layout for it to be inflated. It needs to be an actual object that exists somewhere for it to be inflated dynamically.
For example, if you're using a dial... |
You should be able to resolve it by removing the quotes from around the values in your `.env` file.
In addition, worth logging the value of all ENV variables in your function to ensure they do *actually* have a value set that you expect and is accessible. |
I have thousands of alarms associated with an asset that I need to delete.
How can I do that?
I cannot delete the asset and create it again, I need to keep it. |
Bulk delete alarms of an entity in Thingsboard |
|thingsboard| |
So I was trying to run a simple script to test out ultralytics and see how its yolov8 model works. [I followed the steps from this video](https://www.youtube.com/watch?v=uMzOcCNKr5A&t=1s), but when I ran this script:
from ultralytics import YOLO
import cv2
model = YOLO('yolov8n.pt')
vi... |
I'm currently working on an Arduino "gameboy" style project where I'm trying to make a library that will work like a game engine. In the Arduino IDE there is no c++ STL when using an AVR board, so I'm trying to implement a bunch of stuff from the standard template library such as containers and type traits. I'm current... |
How to present this example concept in UML: Using 2 LCD displays in C/C++ |
|c++|c|embedded|uml|lcd| |
We're given this assignment to make a tic-tac-toe game with server-client architecture. My professor wants the server to be built using raw sockets (even lower than TCP/UDP) and client side to be browser. Is that even possible? [Assignment Spec](https://i.stack.imgur.com/8Fd6Q.png)
I know in the assignment spec it s... |
Answer to new question:
```python3
import numpy as np
from scipy import sparse, io
A = sparse.eye(3, format='csr') * np.pi
with open('matrix.txt', 'a') as f:
for row in A:
f.write(str(row.toarray()[0]))
f.write('\n')
# [3.14159265 0. 0. ]
# [0. 3.14159265 0. ]... |
Hate to say this but `withContext(Dispatchers.Main)` didn't worked for me. So I called the init method from `LaunchedEffect` from composable which works as expected.
class VideosViewModel : ViewModel() {
fun init() {
viewModelScope.launch {
setState { copy(isLoading = true)... |
I've installed the Copilot extension and am trying to use it but this error shows up in output:
>2024-03-29 14:20:07.471 [info] [auth] Invalid copilot token: missing token: 403<br>
>2024-03-29 14:20:07.529 [error] [auth] Extension activation failed: "No access to GitHub Copilot found. You are currently logged in a... |
Finally, I've found a solution to this problem without utilizing the redirect and refreshListenable properties of GoRouter.
The concept involves creating a custom redirection component. Essentially, authStateChanges are globbally listened, and upon any change in AuthenticationState, we navigate to our redirection co... |
Loss is not changing. Its remaining constant |
|tensorflow|deep-learning|neural-network|lstm|loss-function| |
null |
Typically, when I use the CLI and type CTRL+C, I get a prompt that says
> Terminate batch job (Y/N)?
I then type `y` and it terminates. In only one of my projects, it duplicates the prompt every single time. Why is it doing this? How can I remove this extra step and only do it once when I need it?
[![Image of... |
How to stop VS Code from prompting twice when terminating a batch job? |
I have this code that tries to retrieve all data from a sheet , including metadata:
$response = $this->spreadsheet_service->spreadsheets->get($this->spreadsheet_id, ['ranges' => $sheet_name ]);
$sheetData = $response->getSheets();
foreach ($sheetData as $sheet) {
echo "sheet:";
... |
Cannot access Google Spreadsheet metadata by API |
|php|permissions|google-sheets-api| |
This is now fix here [android-cache-fix-gradle-plugin][1]
Update your plugin dependency to the newest version
plugins {
id("org.gradle.android.cache-fix") version "3.0.1"
}
Using legacy plugin application:
buildscript {
repositories {
maven {
url = u... |
Install the "print" extension, then right-click and choose print.
The "printCode" extension is deprecated. |
{"Voters":[{"Id":1116230,"DisplayName":"Nico Haase"},{"Id":446594,"DisplayName":"DarkBee"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}],"SiteSpecificCloseReasonIds":[11]} |
I am trying to come up with a way to sum the hours by client for a horizontal table that will include multiple clients and employees.
The clients can change as a variable so ideally need to use the Hrs Worked criteria and the client to search through the table and add up the hours.
[enter image description here](... |
Hi everyone I've been working on some code that will extract some aggregated data from my google analytics 4 export.
Unfortunately I've been running into an error regarding my variable 'event_timestamp' in my cte 'SessionsPerUser'. I can't solve the error and have been trying to trace back what the problem is. The v... |
Event_date reference in cte |