instruction stringlengths 0 30k ⌀ |
|---|
I had a slightly different take on this
=IF(B1="","skipped",IF(B1=INDEX(A:A,COUNT(B$1:B1)),"match","difference"))
but I realise this will break after the blanks in column A and something more would be required like an mmult.
[![enter image description here][1]][1]
___
This was my thinking if the patt... |
I am using an api which works but I am having trouble with the location header.
The api document states - If a 201 response is returned it means successful and the location of the newly created data in the http response 'location' header.
So I get the 201 response but no data. I assume the data is in the location h... |
Status code 201 http response 'location' header with curl php |
|php|php-curl| |
Using `querySelectorAll` =>
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
const dialog = document.querySelector("dialog");
const showButton = document.querySelectorAll("dialog + button");
const closeButton = document.querySelectorAll("dialog button")... |
null |
je veux créer une class BottleOfWater () et une fonction def __init__(self, contenance, couleur, matiere, liquid) :
puis afficher le contenu de la bouteille : bouteille = BottleOfWater (30, "green", "glass", "water")
class BottleOfWater () :
def __init__(self, contenance, couleur, matiere, liquid) :
... |
class BottleofWater () : def __int__(self, contenance, couleur, matiere) : |
|python| |
null |
There is a task and there is no way to contact the customer.
the task is:
"You need to download the page https://nameOfTheSide through a browser or program (the site name was removed just in case) and in the saved copy change the part of this page under the logo, starting with the element with the “collection-title” ... |
I am building an app within an application called Rhino where it has a button to call this method.
```C#
public void AttachPopupToViewportWindow()
{
_originalBound = Rhino.RhinoDoc.ActiveDoc.Views.ActiveView.Bounds;
try
{
_formWindow = n... |
Try Catch exception is not catching the unhandled exception |
|c#|wpf|eto| |
I ran the deep learning for regression, it is a multimodal model with two loss functions. the mse and mae are acceptable, but the r2 is so horrible. any idea can explain it? what should I check? Thanks!!!!!
this is my code.
def r_squared(y_true, y_pred):
SS_res = K.sum(K.square(y_true - y_pred))
SS_t... |
`h2o.predict` returns an "H2OFrame". That is not expected as almost all predict methods return a data.frame. You transform the input data to a H2OFrame, but you also need to transform the output to a data.frame:
```
dnn_pred <- function(model, data, ...) {
predict(model, newdata=as.h2o(data), ...) |> as.data.... |
Assuming no date comes before Jan 1, 1970 (standard epoch time). This should suffice.
The code below basically counts up the number of seconds from 1/1/1970 at midnight accounting for leap years as it goes.
Below assumes a basic understanding that:
* Leap years have 366 days. Non leap-years have 365 days
* L... |
`<NuxtLink>` is just a router link. You will not be able to pass data through it for the next page.
But you can save, for example, in some `store` or `localStorage` this data after `@click` on `<NuxtLink>`, and process it on the next view. |
Inside your Canvas game object, create a Panel that will be the area in with the floating joystick can be spawn. Bellow the Panel add your Button. Now create a global `TouchInputManager` component/script which will detect which UI element has been touched by performing a raycast when the user touches the screen. You ca... |
# **This is my Schema-**
```
import mongoose from 'mongoose';
// Define the schema based on the ProductType interface
const productSchema = new mongoose.Schema({
name: {
type: String,
required: true,
},
category: {
type: String,
},
image: {
type: String,
},
sku: {
... |
CastError: Cast to ObjectId failed for value "{ _id: undefined } |
|node.js|api|next.js|backend|mern| |
null |
Watching a getter to a property of an object. Here is an example for object declaration with `reactive()` and `ref()`.
[vue playground](https://play.vuejs.org/#eNqtlG1r2zAQx7/KTQySQJqQZK9CEvbUsY3RjXWwF9Ogrn1x1NqSkWQnwfi77yTbeaBJW0bfGEn3/9/9JJ9UsndZNihyZFM2M6EWmQWDNs8WXIo0U9pCCRqXffoEoRUF9mEd2HAFFSy1SqFD3g6XXIZKGgupi... |
As you can see the mail.select() method is after connecting and before search, but keep getting this error(I'm using VS Code): `raise self.error("command %s illegal in state %s, "
imaplib.IMAP4.error: command SEARCH illegal in state AUTH, only allowed in states SELECTED`
This is my code:
```
import imaplib... |
How to fix "search in state AUTH" errror |
|python|email|imap| |
null |
I have a simple bean called meterUtil and it depends on PrometheusMeterRegistry which is created in actuator starter. so i defined the bean as follow:
@ConditionalOnBean(PrometheusMeterRegistry.class)
public MeterUtil meterUtil(PrometheusMeterRegistry meterRegistry) {
return new MeterUtil(meterRegi... |
conditionalOnBean not work on beans created via starters |
|spring-boot| |
Set to `aside > div { height: 100%; display: grid; grid-template-rows: repeat(3, 1fr); }`.
And for `img { width: 100%; height: 100%; object-fit: cover; }`.
Here is an example:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-css -->
* {
box-sizing: border-box... |
I'm encountering an error in my React Native application when trying to save user data and login details to Firebase using Redux. The error message I'm receiving is:
``` [Error: Actions must be plain objects. Instead, the actual type was: 'undefined'. You may need to add middleware to your store setup to handle dispat... |
{"OriginalQuestionIds":[13095792],"Voters":[{"Id":10035985,"DisplayName":"Andrej Kesely","BindingReason":{"GoldTagBadge":"python"}}]} |
Basically I have an authentication application, where I have an authentication page where my user is sent every time the system does not recognize that he is authenticated, authentication occurs when he has a valid token registered in his localstorage with "authorization", so through "requireAuth" I created a mechanism... |
Redux: Actions must be plain objects error - How to resolve? |
|javascript|firebase|react-native|redux|redux-toolkit| |
Use TraceSource logger, bur add switch with level verbose, then all your logging goes to the trace listener test.log :)
var builder = webApplication.CreateBuilder(args);
builder.Logging.AddTraceSource(new
SourceSwitch("trace", "Verbose"),
new TextWriterTraceListener... |
I have a ```1``` by ```T``` double vector ```X```, where ```T = length(X)``` is the number of timesteps. I would like to fit a symbolic time dependent function ```sym F(t)``` to this vector. What is the most efficient way to do this in MATLAB? |
I have a command:
```
s5cmd --endpoint-url http://192.168.1.40:9000 ls "s3://ccdata/minhash/20*/**" | awk '{print $NF}' > minhash_listings.txt
```
I have a local Minio deployment that has 16-17 million files in it so far. the folder structure of the minhash has 84 subfolders, with 5000 subfolders underneath that,... |
Optimizing an s5cmd command that uses awk to generate a text file |
|linux|file|amazon-s3|awk| |
null |
In Clean Architecture, you generally want to define interfaces in the Application layer. This is because all your business logic should live in and be dictated by the application/domain layer. It should define the interfaces it needs to send requests to and receive responses from the outside world. This allows you to b... |
Page in React only renders elements after refreshing |
|javascript|reactjs|typescript|react-hooks| |
null |
I am new to Rust but recently came across a problem I don't know how to solve. It's to work with nested (and multi-dimensional) value-key pair arrays in Rust that is dynamically generated based on string splitting.
The sample dataset looks something like the example below:
```lang-none
Species | Category
Dog ... |
I try to use [validator.js](https://github.com/validatorjs/validator.js) via JSInterop in Blazor but got an error `Unhandled exception rendering component: Failed to fetch dynamically imported module: https://localhost:7027/_content/.../dist/JSInteropModule.js` when try to import the library.
I installed [validato... |
my mse and mae are low, but my R2 is negative one, but super small, why? |
|keras|deep-learning|regression| |
null |
url :-> `https://www.greenblottmetal.com/scrap-metal-prices`
problem is :->
<iframe>---> #document(another url) ---> new <html> <table></table> </html>
After inspect data available into <iframe> tag and inside iframe there is #document is there this is subtype of iframe and holding... |
I am building the Mobile app with Expo and should implement the document scanner feature.
But I could not find the solution to implement for scanning documents.
I can see only the react-native-document-scanner npm library for React Native, not for Expo.
If anybody has a good solution, Please help me...
Thanks
|
I'm adding some extra information here because the previous answer isn't quite correct.
These are the issues:
=====================
- You *need* to be specifying the current string encoding to mb_string, otherwise this may be incorrectly gathered
- In 7-bit GSM encoding, the Basic Charset Extended characters ... |
null |
I have the following stopwatch implementation
import { useState, useEffect } from 'react';
import { Text, View, StyleSheet, Button } from 'react-native';
function TimerComponent() {
const [isActive, setIsActive] = useState(false);
const [time, setTime] = useState(0);
u... |
React Native stopwatch implementation slow on iOS |
|react-native|stopwatch| |
I compiled a python script using pyinstaller in a Kali Linux machine and the compilation was successful and the binary was built . However , when I try to execute this binary on a Ubuntu machine I get the following error :
[2664] Error loading Python lib '/tmp/_MEI5jZUdD/libpython3.11.so.1.0': dlopen: /lib/x86_64-li... |
You're getting this error because the `Route` facade isn't imported inside your code. You need to import it by using the following statement:
use Illuminate\Support\Facades\Route; |
null |
newbie here. Does anyone know how to prevent the image from zooming in when i resize the browser ?
I'm trying to create a carousel using tailwind and flowbite. Here's my CSS code :
```
<main>
<section
id="hero-section"
class="bg-blue-300"
style="height: calc(100vh - 65px)"
... |
How can i prevent the image from zooming in when i resize the browser? |
|css|responsive-design|frontend|tailwind-css|flowbite| |
null |
I would use a simple loop:
```
out = (np.array([mapping[l] for l in
map(tuple, input_array.reshape(-1, 2))])
.reshape(input_array.shape[:-1])
)
```
Or, if you expect many duplicated values, you could reduce the mapping step to the unique values, although the bottleneck being `np.u... |
I have a code setup whereby the timeline is suppose to play when a gameobject collides/triggers another gameobject. Unity recognises this trigger(prints out to the console) but the timeline does not play.
Here is the code I have
```
using UnityEngine;
using System.Collections.Generic;
using UnityEngine.Playables... |
Timeline doesn't start eventhough it recognises the trigger input |
|unity-game-engine|unity-timeline| |
|linux|file|awk| |
Have you seen the dataflow cookbook examples on GitHub?
- [Reading from pubsub subscription with python](https://github.com/GoogleCloudPlatform/dataflow-cookbook/blob/main/Python/pubsub/read_pubsub_subscription.py)
- [Writing to bigtable with python](https://github.com/GoogleCloudPlatform/dataflow-cookbook/blob/m... |
Failed to fetch dynamically imported module on Blazor JS Interop |
|c#|.net|blazor|javascript-interop| |
null |
{"Voters":[{"Id":600486,"DisplayName":"blurfus"},{"Id":14732669,"DisplayName":"ray"},{"Id":9267406,"DisplayName":"imhvost"}],"SiteSpecificCloseReasonIds":[13]} |
I'm trying to process multiple forms with fieldset inside
This is a test for 40 questions, each question with 4 answers.
I need to get each answer from radio button that the users picks and use it to count correct answers.
I have some comments along the code to help out, if anything is needed let me know.
Thanks ... |
Let's start by not bothering with rows vs. columns, because (and this is the nice thing about the game of life), it doesn't matter. The only thing that matters is what the eight values _around_ a cell are doing, so as long as we stick to one ordering, the code will simply do the right thing.
Which means we can get r... |
I have the following controller's action:
```C#
[HttpPost("api/v1/addProduct")]
[Consumes("multipart/form-data")]
public Task<ProductDto?> AddProduct([FromForm] ProductRequest request, CancellationToken cancellationToken)
{
return _productService.AddProduct(request, cancellationToken);
... |
This is well defined in the [`vectorize`](https://numpy.org/doc/stable/reference/generated/numpy.vectorize.html) documentation:
> If otypes is not specified, then a call to the function with the first argument will be used to determine the number of outputs.
If you don't want this, you can define `otypes`:
```
... |
I'm encountering difficulties while trying to post form data, including file uploads, to MongoDB using Multer and Express. Although the files are successfully uploaded to Firebase Storage, the form data is not being posted to MongoDB. Additionally, my MongoDB connection seems to be established without any issues. Could... |
LISTEN I EXPERIENCED A SIMILAR SITUATION BEFORE EVEN THOUGH I ALREADY SET MY IP: 0.0.0.0/0
just log in to Mongo Atlas then go to the network option on the left side it will be towards the bottom of the menu.
Just change your IP use choose my current IP option.
[![Image to navgate][1]][1]
[1]: https://i.... |
{"OriginalQuestionIds":[77794933],"Voters":[{"Id":12738750,"DisplayName":"lorem ipsum","BindingReason":{"GoldTagBadge":"swiftui"}}]} |
Can an RPC result be included in a Supabase select function in Flutter for Data Modeling? |
|flutter|supabase|supabase-flutter| |
The following code (at [Playground here](https://www.typescriptlang.org/play?#code/MYGwhgzhAEDKCuAHApgJwMLigKAN7ekOgDN4A7YACjFQHMAuaSgW2UYBcALASwgEpoAXgB80AG4B7bgBMB+Iguipk7eKjLQatAkQC+2fdlCQYAETTcxyaZhPRkAD3bIy0mAhQYsEPDsJiabjAAIxBkIWguXgA6UgpKSgERaFxdPgBuA2wjCTIIdmgJYIArRg80WygIsmQAd2hzVEtrSohE9KA)) gives an error `T... |
For example if the experimental input data like T=300 C, time= 60 min, Catalyst= Type A gives 70% biodiesel yield, I want the ANN model to predict what the input parameters to achieve 90 or even 95% biodiesel yield?
I have not found a way to solve it. |
How to predict input parameters from target parameter in a machine learning model? |
|python|tensorflow|machine-learning|keras| |
null |
The following:
```
interface IThing { virtual string A => "A"; }
```
Is the so called [default interface method][1] and virtual as far as I can see actually does nothing because:
> The `virtual` modifier may be used on a function member that would otherwise be implicitly `virtual`
I.e. it just an explicit... |
To pass data from child to parent component by using callback function in prop in parent component and then pass data from child component by calling these function.
// Child
const Button = ({ text, onButtonClick }) => {
return <button onClick={() => onButtonClick("hello")}>{text}</button>;
};... |
It would be helpful to include some comments in code to explain what each section does. <br>
From what I see working through the code, you are first adding the Headers from your original Sheet 'Session-2024' to a new Workbook Sheet `sheet_dcfc1` with name 'Sheet' (then reading back / printing these headers). <br>
... |
I am totally new to angular. I have angular UI where we upload a `.csv` file with 6 columns and their respective data, so before I invoke .net API, I need to change the data in the 1st column: if a value consists of 9 digits then we need to change it to 10 digits just by prefixing with ‘0’. For example, if the value is... |
|javascript|angular| |
You will need to first create a `JSON` file with the actions mentioned. Below is an example taken from [link][1]:
```
[{
"Type": "authenticate-cognito",
"AuthenticateCognitoConfig": {
"UserPoolArn": "arn:aws:cognito-idp:region-code:account-id:userpool/user-pool-id",
"UserPoolClientId": "... |
Error when trying to execute a binary compiled in a Kali Linux machine on an Ubuntu system |
|linux|ubuntu|security| |
null |
I have set up harbor behind an nginx reverse-proxy, and when I push docker images to it, I get this error
```
5bfe9e7b484e: Retrying in 1 second
b59ac5e5fd8f: Retrying in 1 second
3a69b46a1ce6: Retrying in 1 second
473959d9af57: Retrying in 1 second
fe56a5801ec1: Retrying in 1 second
1f34686be733: Waiting
691... |