instruction stringlengths 0 30k ⌀ |
|---|
so in an intro to AI course we where given a project to find the optimal route using search algorithms to a relevant hospital in a certain city, and we are asked to consider the map of the hospitals in this city, i have a problem of how to select the initial state it sure is the patient localization but how can i incor... |
Hospital route finding ai project |
|search|mapping|path-finding|a-star| |
null |
<!-- language-all: sh -->
[zett42](https://stackoverflow.com/users/7571258/zett42) has provided the crucial pointer:
From the [`ConvertFrom-StringData`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/convertfrom-stringdata) help topic (emphasis added), as of PowerShell 7.4.x:
... |
To display the legend outside of the plot in matplotlib, you can use the bbox_to_anchor papameter along with the loc parameter of the legend function, here's how you can modify your code to achieve that:
|
Bom dia pessoal, feliz Páscoa!! Estou fazendo um curso de JavaScript com o Gustavo Guanabara e estou tento problemas no resultado da function em um exercício. Alguém por favor poderia me ajudar a achar o erro? obs: Minha primeira vez aqui na plataforma.
```
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta ch... |
The relevant part of [the documentation](https://doc.rust-lang.org/std/fs/fn.rename.html) is this:
> On Unix, if […] `from` is not a directory, `to` must also be not a directory. In contrast, on Windows, `from` can be anything, but `to` must not be a directory.
I.e. `to` *may not be* a directory, but you've passed ... |
I stumbled on this class when browsing the internet this morning: [`CStrBufT`][1].
I understand that it is meant to be used instead of:
```cpp
CString::GetBuffer
CString::GetBufferSetLength
CString::ReleaseBuffer
```
But the documentation lacks a usage example, and my searches on the internet don't seem to sho... |
i have problem in Google Colab Deep Learning coding any one help me about this issue Chat GPT fail to solve my error |
Extracting the value of CSS Property directly from Stylesheet doesn't seem to be the right thing to do. I say this because the value of a property might change when multiple CSS files work together to bring the final value of any class's property.
Consider the case where StyleSheetA, and StyleSheetB both have `sampl... |
|python|pdf| |
I have created a custom SAML application in the Google Admin panel for my workspace account to allow users to login via SSO to an application using their Google Workspace credentials. Currently only users of my organisation can login to this application. I want to make it so that users of an external organisation can a... |
Allow external users to login using custom SAML app in Google Admin |
|single-sign-on|saml|google-workspace|google-admin-sdk| |
null |
{"Voters":[{"Id":18157,"DisplayName":"Jim Garrison"},{"Id":4405757,"DisplayName":"Thiyagu"},{"Id":642706,"DisplayName":"Basil Bourque"}]} |
```
const express = require('express');
const jwt = require('jsonwebtoken');
const passport = require('passport');
const localStrategy = require('passport-local').Strategy;
const router = express.Router();
passport.use(
new localStrategy(async (email , password , done)=>{
try{
const... |
I have a problem with GitLab it won't run my UI tests from an Xcode project.
I get an error: This job is stuck because of one of the following problems. There are no active runners online, no runners for the protected branch, or no runners that match all of the job's tags: saas-macos-medium-m1
My yml file is:
... |
There are no active runners online GitLab |
|xcode|gitlab|gitlab-ci|gitlab-ci-runner|gitlab-ci.yml| |
null |
I have this format, the result should be of Item data type,
**test 1:** `"<A \"Test\">"`
**test 2:** `r#"<A "Test">"#`
**Result:** `Item { item_type: TEXT, ascii_data: Some("Test") }`
**test 3:** `<A>`
**Result:** `Item { item_type: TEXT, ascii_data: None }`
For test 1 and test 2, following code parse... |
Parse this custom data format for data type with nested list |
|rust|nom| |
Instead of using a `ZStack`, try showing the yellow circle as an overlay over the `Image`. This way, the size and position of the circle will always correspond to the size and position of the image.
- If the `.scaleEffect` is applied after the green background and the overlay, these will be scaled too.
- The blue... |
I have a website for car and tow services for passenger cars and services which includes assistance and assistance for damaged cars in the North
Only the pages I create will not be indexed for long.
Please do a check.
I used the yoast plugin and registered my sitemap in Google Search Console, but it didn't change ... |
”ft.VideoMedia(
"https://user-images.githubusercontent.com/28951144/229373720-14d69157-1a56-4a78-a2f4-d7a134d7c3e9.mp4"
),”
When I read reference I found that is "http resource" only.
Can I use local resources for mp4 playback?
```
import random
import flet as ft
def main(page: ft.... |
Can I use local resources for mp4 playback? |
|python-3.x|video|flet| |
null |
You change `display` of `td` thus breaking its `display: table-cell`.
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;
widt... |
The state is not changing when the focus is changed, therefore the text color doesn't change.
You must listen to the `FocusNode` changes and `setState` after any changes. Update your widget like this:
```dart
FocusNode emailText = FocusNode();
Color _emailTextColor = Colors.black;
_onEmailFocusChange() {
... |
YES, Organization structured data is like a special tag we can add to our website to tell search engines more about our organization. It helps them understand who we are and what we do, which can make our website more visible to people searching online. So yeah, having Organization schema on every page is a good idea b... |
I am looking for an operation that creates a matrix from a colwise operation in Eigen.
I could not find an appropriate operation in [VectorwiseOp](https://eigen.tuxfamily.org/dox/classEigen_1_1VectorwiseOp.html) (sorry if I overlooked one).
It seems that it is supported for some operations. First output compiles ... |
{"Voters":[{"Id":9098759,"DisplayName":"Akash Singh"}]} |
When I execute a Selenium Script using Firefox, the Firefox opens up but it doesn't redirect to the URL. Below is the error which is displayed on the Eclipse Console:
```
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
cons... |
The default headers are explicitly added by Netty when a request is prepared for sending. The main point of interest is here:
```java
// io.netty.handler.codec.http.HttpHeaders
public interface HttpHeaders extends Iterable<Map.Entry<String, String>> {
HttpHeaders add(String name, Object value);
// ...
}... |
Creating a Google Login-In Extension for a personal project so I've set up funtionality that allows me to log in to the extension with my Google account and it works. I'm using an initial HTML file called "popup.html" to hold the logic of Google's Authentication by calling "popup.js" as the backend script, displaying ... |
|python|tensorflow| |
I'm using Premake to manage the build configuration of my project, which consists of two static libraries ("Engine" and "Game") and an executable ("Launcher"). But when I attempt to integrate/link GLFW into my Engine library, I'm encountering linking errors.
I should mention I'm trying to link GLFW statically. I'm ... |
Linking GLFW with a static library using Premake |
|c++|glfw|static-linking|premake| |
I'm trying to simulate the CSMA/CD protocol using ns3 software for a course project. However, after installing ns3, I've checked the official documentation and asked the teaching assistant, but I couldn't find specific implementation details.
I even saw some answers stating that ns3 does not support simulating coll... |
How to simulate CSMA/CD protocol in ns3? |
|c++|networking|ns-3| |
null |
{"Voters":[{"Id":17562044,"DisplayName":"Sunderam Dubey"},{"Id":476,"DisplayName":"deceze"}],"SiteSpecificCloseReasonIds":[19]} |
No, this is not possible. Quarto contains tools to generate PDF, but not to parse PDFs. The latter would be required to include PDFs the way you imagine, adjusted to the style of the document. The [pdfpages](https://www.ctan.org/pkg/pdfpages) package (of which you already mentioned the `\includepdf` command) is likely ... |
Bom dia pessoal, feliz Páscoa!! Estou fazendo um curso de JavaScript com o Gustavo Guanabara e estou tento problemas no resultado da function em um exercício. Alguém por favor poderia me ajudar a achar o erro? obs: Minha primeira vez aqui na plataforma.
```
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta ch... |
The problem is that it takes a long time to index web pages.؟ |
|google-maps|web|google-search-console| |
null |
Instances of classes that have private members cannot be appropriately proxied.
See
- https://lea.verou.me/blog/2023/04/private-fields-considered-harmful/
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy#no_private_property_forwarding |
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... |
Given this example...
{
"A-B": {
"x": {
"name": "x A-B"
},
"y": {
"level": 6
}
},
"B-C": {
"x": {
"name": "x B-C"
},
"y": {
"level": 9
}
},
"A-C": {
"x"... |
Switch to v3 :) v3 came up because v2 was relatively easy to hack with ia the method you mentioned, and generally weak. That's why it hasn't been, most likely, updated for new strategies of robots.
When you do the switch, you'll be able to set the minimum trustworthiness threshold in reCAPTCHA v3 admin console. |
null |
null |
null |
null |
First of all, your `useImage` hook is not doing anything except loading the image, then set a state. If this is only for demonstration purposes, that's fine, otherwise, you should look into what you are trying to achieve with that hook.
Regarding the test, if you are using `jest` and `jsdom` to test. Then `jsdom` [o... |
I've successfully installed Node.js and NPM on my machine, but I'm encountering an issue when trying to create a new React Native app. After entering the command in the terminal, nothing happens, despite having a stable internet connection. Can anyone provide guidance on how to troubleshoot and resolve this issue? Your... |
Are there any known issues with NPM or Node.js when creating a new app? |
|npm|expo|node-modules|npm-install| |
null |
I am plotting histograms showing distributions of an angle `tau`. I used a random normal distribution as shown:
import numpy as np
N = 100000
tau = np.arccos(np.random.normal(-1, 1, N))
I got the error `"RuntimeWarning: invalid value encountered in arccos tau = np.arccos(np.random.normal(-1, 1, N))"... |
Flutter CI CD Pipeline Using Github Actions.
When running
**xcodebuild -workspace Runner.xcworkspace -scheme Runner -configuration "Release-staging" DEVELOPMENT_TEAM=XXXXXXXX -sdk 'iphoneos' -destination 'generic/platform=iOS' -archivePath build-output/app.xcarchive clean archive CODE_SIGN_IDENTITY="Apple Devel... |
While Running Github Actions Pipeline: No Signing Certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID |
|ios|flutter|github-actions|cicd|firebase-app-distribution| |
null |
I permant use this javascript code for webrtc (aiortc) communication:
```
var port = 8080
var ip_address = "192.168.1.10"
var main_pc = {
"name":"",
"surname":"",
"pc":null,
"dc":null,
"uid":null,
"local_audio":null,
"local_video":null,
"remote_audio":null,
"remote_video":null
};
var peer_conn... |
WebRTC close navigator.getUserMedia correctly |
|javascript|webrtc|getusermedia| |
I am trying to download file on click of notification button but when application is in background then api call is not working.
Notification Code:
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -... |
I'm currently working on optimizing a kernel, and one of the most time-consuming loops, despite optimization efforts, still accounts for 80% of the benchmark's execution time. The loop's performance bottleneck stems from its memory-bound nature, primarily due to an indirect memory access pattern that hampers prefetchin... |
I'm working on a Symfony project where I need to generate PDF files from HTML templates that include a map element. However, I'm having trouble centering the map element on the PDF without using any specific PDF generation tools or libraries.
I have a Twig template called carte.html.twig that contains the map elemen... |
Centering a map element on a PDF generated from a Twig template in Symfony |
|pdf|twig| |
null |
I handle anchor problem by this way without jQuery:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
let aWithHref = document.querySelectorAll('a[href*="#"]');
aWithHref.forEach(function(el) {
el.addEventListener("click", function(e) {
e.prev... |
Suppose A is a symmetric matrix whose SVD is A= USV^T, and let B = U\sqrt{S}V^T, then B^2 should be equal to A.
But when I implemented it using tensorflow, B^2 and A does not match. Highly appreciated if you could give some advice! |
Matrix reconstruction by SVD in tensorflow |
|tensorflow|matrix|svd|symmetric|matrix-decomposition| |
null |
It is expected that your code throws an error. [As indicated in the "state" property of StateNotifier][1] it is `@protected` and `@visibleForTesting`, which implies that it can only be accessed from child classes and test.
As recommended by the Riverpod documentation, if you want to reactively get a provided value, ... |
I am busy with creating a REST API where you can load company details and then load products for each company each with their own enpoint
POST /company-details
POST /products
Company details have a request body
companyName
uniqueCode
description
contact
location
Products has... |
So I am using the Vuetify 2 VCalendar and I was wonder if it would be possible to exclude the events from show in previous and next months in the view, so this is what I am talking about:
[enter image description here][1]
Currently, I am viewing "March 2024", but I am seeing "April 2024" events as shown in the sc... |
Vuetify Calendar exclude events that are in the next and previous months from view |
|vuejs2|vuetify.js| |
### Summary
There is a difference between `any` in type parameter and `any` in regular function parameter. Your case is the former one for generics. So you need to instantiate `T` first when assigning it to the concrete variables
Ref. https://stackoverflow.com/questions/71628061/difference-between-any-interface-as-... |
I used a combination of `REDUCE` and `SEQUENCE` to iterate through each date column.
=LET(
data;L4#;
dateRow;DATE(YEAR(ParamStartDate);SEQUENCE(1;DATEDIF(ParamStartDate;ParamEndDate;"M")+1;MONTH(ParamStartDate);1);1);
headers;HSTACK("";dateRow);
date;dateRow;
res... |
I am plotting some lines with Seaborn:
```python
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
# dfs: dict[str, DataFrame]
fig, ax = plt.subplots()
for label, df in dfs.items():
sns.lineplot(
data=df,
x="Time step",
y="Loss",
error... |
{"OriginalQuestionIds":[12004603],"Voters":[{"Id":5389997,"DisplayName":"Shadow","BindingReason":{"GoldTagBadge":"mysql"}}]} |
Given the following C program (MSVC does not optimize away the "work" for me, for other compilers you may need to add an `asm` statement):
```c
#include <inttypes.h>
#include <stdlib.h>
#define SIZE 10000
typedef struct {
int32_t a, b, c;
} Struct;
void do_work(Struct* data) {
int32_t* a = malloc(siz... |
In your case the find command is replaced with `"./? ./*"`. So the loop iterates only once with `f="./? ./?"`. In `echo "$f"` `$f` is expanded (parameter expansion) and replaced with the value of variable `f`. Because of the double quotes the result is considered as a word and printed without further expansion. And you... |
```
mpg['grade'] = np.where(mpg['total'] >= 30, 'A', np.where(mpg['total'] >= 20, 'B', 'C'))
```
code 1)
```
count_grade = mpg['grade'].value_counts()
count_grade.plot.bar(rot=0)
plt.show()
```
code 2)
```
count_grade = mpg['grade'].value_counts().sort_index() # method chaining
count_grade.plot.bar(rot=... |
python pandas plot.bar something wrong |
|python|pandas|dataframe|data-science|bar-chart| |
null |