instruction
stringlengths
0
30k
I am a college student doing federation learning with flower+pytorch, and I have made a demo of it. The server files and client files are already written and run separately from the console. Now there is a problem, the error message says AttributeError: 'Parameters' object has no attribute 'parameters' My code is sh...
I want to show some popups in a fluttter project to get location and disable battery optimazation whenever I open the app. I tried and showed this popup using ElevatedButton. But as I want to show this popup at the opening of the app, so this work using elevated button is not appropriate for me. So, is it possible ...
popup showing in a flutter project at the opening of any app
|android|ios|flutter|dart|popup|
null
{"Voters":[{"Id":17580381,"DisplayName":"SIGHUP"},{"Id":3689450,"DisplayName":"VLAZ"},{"Id":3929826,"DisplayName":"Klaus D."}]}
I have a 'problem' with a modal. Depending on a parameter, "edit" or "new", an empty form is loaded in the modal, or, when edit, I want have all the info of the object I select to edit. So far, so good. However, when I want to edit, I would have the <option selected> set on the value which correcsponds with the...
How to set "selected" on the correct value VUE
|python|vue.js|frontend|
We have Integration between applications where authentication is controlled by the applicaiton which is providing the service. The provider service would want to change the password at a predefined frequency for security purposes. Consuming applicaitons have to change the password at the same time when provider s...
I have a bot which is developed on google dialogflow cx and is deployed on whatsapp through twilio. Is there any way to setup no-input prompts directly from the interface or do i need to create some sort of handler to address this. If so then how? I have tried setting up No input and No matches through dialogflow cx...
How to set up "No Input Prompts" for whatsapp bot which is developed on Google Dialogflow CX and deployed through Twilio
|twilio|whatsapp|dialogflow-cx|
null
I am trying to create a graph via Boost graph library, that has custom indexing (stable ones when vertexes are deleted), I copied the sollution proposed here to create the graph which is working very well for me <https://stackoverflow.com/questions/71488845/how-to-configure-boostgraph-to-use-my-own-stable-index-for-...
I used the "create-next-app" to make my new Nextjs project. I selected tailwindcss in the installer, but when I try to run app with npm run dev, Ill get this error: Module parse failed: Unexpected character '@' (1:0) > @import 'tailwindcss/base'; | @import 'tailwindcss/components'; | @import 'tail...
Tailwind would not load in a new nextjs app... Unexpected character '@'
|javascript|html|css|next.js|tailwind-css|
I want to replace octal codes with the ascii character equivalents in a string. Input example: `\052.test.com` I've tried all sorts of different combinations, but why doesn't this work, and how do I fix it? > "\052.test.com" -replace '\\(0[1-7][0-7])', "`$1" 052.test.com > "\052.test.com" -...
How to use expression in regex -replace with capturing group in powershell
|regex|powershell|regex-group|
I'm building a small razor app which will be hosted on IIS with Windows Authentication. The Application will query Active Directory roles and map them to application specific roles which will be added as a claim. I have a written a customer authentication handler which has following code in it. \` ``` priv...
{"OriginalQuestionIds":[625799],"Voters":[{"Id":487892,"DisplayName":"drescherjm"},{"Id":18519921,"DisplayName":"wohlstad"},{"Id":5494370,"DisplayName":"Alan Birtles","BindingReason":{"GoldTagBadge":"c++"}}]}
First post here, so apologies if the format is not entirely correct! I am trying to set up a class that needs pandas and SARIMAX from the statsmodels module. I have installed pandas and statsmodels, but I can't get VS Code to import them. I have tried to run ``` `pip show pandas` ``` but it does not return m...
Can't get VS Code to import pandas or any other module
|pandas|statsmodels|
null
There is web page with exchange historical data: https://www.investing.com/indices/volatility-s-p-500-historical-data Page contains dates-filter (range) and apply button (need to click on dates-range): [<img1\>][1] If I change date field via html picker and press "Apply" button - historical data updates perfectl...
test both OSX 14.2.1 Sonoma and OSX 11.7.10 Big Sur. gstreamer version: 1.24.1 gstreamer is installed with official pkg. the following doesn't work anymore. ```sh gst-launch-1.0 audiotestsrc name=audio_source freq=215.0 ! tee name=t ! queue ! audioconvert ! audioresample ! autoaudiosink t. ! queue ! waves...
gstreamer using tee not working on mac osx
|gstreamer|
{"Voters":[{"Id":272109,"DisplayName":"David Makogon"},{"Id":14853083,"DisplayName":"Tangentially Perpendicular"},{"Id":68587,"DisplayName":"John Kugelman"}],"SiteSpecificCloseReasonIds":[18]}
I found what seems to me to be an easier or simpler way: ``` xx = Selection.Address ``` I know I'm registered, but I don't remember and do not have handy my password. So I used another email address.
In NestJs, using the @nestjs/common v10.0.0 (a new one on this date) they use this config on their **tsconfig.json** { "compilerOptions": { "module": "commonjs", "declaration": true, "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorat...
I would like to apply Python OpenCV and 4 Web-CAMs to my laptop and capture them simultaneously. So, to check whether capture was running with OpenCV, I wrote the coding below. Before starting, I checked whether the hardware was recognized by the laptop and completed the verification by running Windows Camera Web. ...
When I replace `google_service_account_iam_member` [here][a] with `google_project_iam_member` it still works. Which makes me think that `google_project_iam_*` provides more broad permissions: permissions that target any so to say target, be it a service account or whatever. And it seems like it's best to avoid it if th...
Difference between google_project_iam_* and other google_*_iam_* resources
|terraform|terraform-provider-gcp|google-iam|
I have an Angular app with some microapps in it using module federation. When I Log-In to it and try to access those microapps "SOMETIMES RANDOMLY" I get the inject() must be called from an injection context error and that route is not opened, I have not been able to find the root cause since it happens sometimes. I...
{"OriginalQuestionIds":[1585513],"Voters":[{"Id":733345,"DisplayName":"Joe"},{"Id":573032,"DisplayName":"Roman C","BindingReason":{"GoldTagBadge":"java"}}]}
I have made a Linux Docker container performing several tasks, and finally connecting to an SQL Server 15, and executing BULK INSERT to load a local (to the SQL Server) csv file. The connection is made using SQL Authentication. As I realized, this isn't possible, as opposed to Windows authentified users who have acc...
Receiving 400 bad request on post when customer auth handler is used
|asp.net|authentication|razor|
null
Imagine having a Struct `Div` containing objects like `Header` or `Paragraph` via a trait `Element` On Execution, I want handlebars to render the `Div` with its children recursively. Therefore, it should select the template according to the type of the `Element` ```rust use std::{cell::RefCell, error::Error, rc:...
Error Encountered: InvalidArgumentError: Graph execution error using Keras and Transformers
|python|tensorflow|keras|data-science|tf.keras|
null
I'm facing difficulties in training multiple models using Keras and Transformers. Below are the code snippets of the models and the errors encountered during training: Model 1: LSTM Model ``` (X_train, y_train), (X_test, y_test) = keras.datasets.imdb.load_data() X_train = X_train[:2500] y_train = y_train[:2500...
I have the following MySQL query implemented in PHP. I use statements to prevent SQL-injection. The query scans a database of articles and search for the word $derired_word. If the word is contained in the article's title it is weighted 1000, in the summary 100 and if is contained in the text only 10. Two JOINs retrie...
konichiwa I am doing some homework and prepare for final exam, but I got stuck in here many hours, pls help me A square matrix (nxn) Write down the Even elements into matrix.txt, then read from file and display it on screen ``` //this is function write down file matrix.txt, and it's work normally v...
write file and read file in C
|c|fopen|
null
How to Python Open CV Web Cam 4EA Real time Streaming
|python|camera|
null
|excel|vba|
I don't know how to get rid of this error, and I don't know why it talks about null. Shouldn't the `seo?.breadcrumbs || []` already cover the case where `breadcrumbs` is null? However in the Intro Propos, if I do `as SEOPostTypeBreadcrumbs[]`, then it fixes the issue, but I feel that it is not the solution. ED...
Typescript Maybe, error about null not being covered
|typescript|option-type|
Why do two windows pop up when I open a file in vscode? One of them is normally editable, and the other one can't do anything. [[enter image description here](https://i.stack.imgur.com/k4LPz.png)](https://i.stack.imgur.com/cqlDY.png) vscode version: 版本: 1.87.2 (system setup) 提交: 863d2581ecda6849923a2118d93a088b07...
Problems using vscode
Solved. AFTER build-finish but BEFORE build-export: mkdir -p "$BDIR/files/share/app-info/xmls" cat "$BDIR/files/share/metainfo/"* | sed 1d | gzip > "$BDIR/files/share/app-info/xmls/$FID.xml.gz" $BDIR -- build-dir, $FID -- flatpak application id, "sed 1d" -- removing "&lt;?xml ... ?&gt;" line
I debugged the code using `{{ dd($order->id) }}` and received the order id value of 100238. However, when I used the following: ```html <form action="{{ route('admin.pos.update_order', ['id' => $order->id]) }}" method="post"> ``` It did not work. When I replaced `$order->id` with the actual id value like this:...
I redirect to another component. this.router.navigate(["book/"+this.organizationKey+"/"+this.projectKey+"/"+this.books[bookIndex].key]) All fields have correct value. When I have the following routes: { path: 'book/:organizationKey/:projectKey/:bookKey', component: BookComponent}, { path: 'bo...
Routing redirects twice to component
|angular|typescript|
## Laravel Framework 11.0.8 ## As mentioned in the `sail` file: `./vendor/laravel/sail/bin/sail` ```sail # Open the site... #... #... if [[ -n "$APP_PORT" && "$APP_PORT" != "80" ]]; then FULL_URL="${APP_URL}:${APP_PORT}" else FULL_URL="$APP_URL" fi #... #.....
So you have the problem that the result has elements of type `String?` instead of `String` ? The problem is here inside the `v?.let` scope function. It does not change the 'v', it makes only the block parameter to a null safe string. So you need to use it as following: v?.let{ safeV -> index to safeV } or ...
I'm practicing creating packages and I've installed and uninstalled packages a lot, but I still see some deleted packages [![enter image description here][1]][1] Although in reality they no longer exist [![enter image description here][2]][2] How to make non-existent packages disappear from tooltips [1...
why do I see deleted packages tooltips in RStudio
|r|rstudio|r-package|
I have made a Linux Docker container performing several tasks, and finally connecting to an SQL Server 15, and executing BULK INSERT to load a local (to the SQL Server) csv file. The connection is made using SQL Authentication. As I realized, this isn't possible, as opposed to Windows authenticated users who have ac...
I have a NextJS app I'm working on developing. I'm currently trying out [Storybook][1] to develop the various components in isolation of each other. If I run the app via ```npm run dev``` then WebStorm will perfectly stop at my breakpoints, but if I run the app in Storybook via ```npm run storybook``` (a script for ...
Debugging a NextJS/React application in Storybook through WebStorm
|webstorm|storybook|javascript-debugger|
just for other people arrive there for visionOS: #elseif os(visionOS) #endif
sorry if too late response. Just in case someone else stumble upon similar problem. There is also an approach using `inline`, `static`, `const` keywords to make simultaneous declarations and definitions in header files without splitting to header and source files. You can choose `const`, `static`, `inline` keyword...
I have two postgres tables that have a relationship, but no cascading delete set. So i need to delete from the related table as well as the main table manually. I am using sqlalchemy core along with psycopg3 driver. I have the following code: ``` identifiers = ['id100', 'id200'] sql = """ d...
Boost graph custom indexes use Dijkstra
|c++|boost-graph|
I am working with millions of data where i wanted to filter 2 different columns having 2 different records for the same set of key combination, the table looks like, `SK NO NAME DOB TS EFF_DT SOURCE 123 1 Thomas ...
how to do a filter from a table where 2 different columns has 2 different records which has same set of key combinations in bigquery?
|google-bigquery|duplicates|
null
I dont know of any native browser API that tells you the end of a scroll event. In our project we found a workaround that fits for all our usecases: *You can listen for the scroll event and detect the end of the scrolling by a timeout timer.* <!-- begin snippet: js hide: false console: true babel: false --> <!...
|python|tensorflow|keras|tf.keras|
Go to File -> Preferences -> Keyboard Shortcuts and search for: "cursorWordPartLeft" and "cursorWordPartRight" and bind them to any key that you want. They should do what you want Mac example of swapping the word and word part behaviors: [![enter image description here][1]][1] [1]: https://i.stack.imgur.co...
|python|
The only solution I came up myself up to now is to introduce a `render` function at trait `Element` level, call this initially on the root `Div` and rendering it down recursively. Unfortunately, this requires me to create another data structure like for example a json or btree map which seems like a big overhead to...
By storing the remainder in the list, you are already reversing the list. No need to reverse it again. And again . . . You just need to store the remainder, *then* divide by two. Then print the answer outside the loop: ``` number = int(input('Enter your number:')) number_list = [] while number != 0: nu...
Semmless password reset management for web services
|authentication|restful-authentication|webservice-client|change-password|
null
After several tries to get information about the server certificate from JS build in methods like TLSSocket or libraries like puppeteer or the one mentioned above to grab that information I came to the current solution. It's not really a proper solution for me, but it works. After more than 3 years, it's still a proble...
The [`nn.MSELoss`][1] loss computes the L2 distance between the two inputs point-wise. Additionally, the reduction parameter dictates whether to average or sum the resulting tensor, in that case, it will apply the reduction *over all dimensions*. Here is a comparison: >>> x_t = torch.rand((32, 4, 100)) >>> ...
{"Voters":[{"Id":1145388,"DisplayName":"Stephen Ostermiller"}]}
First, create a custom `MatPaginatorIntl` that uses `Transloco` for translation. ```Typescript import { MatPaginatorIntl } from '@angular/material/paginator'; import { TranslocoService } from '@ngneat/transloco'; export class TranslocoPaginatorIntl extends MatPaginatorIntl { constructor(private _translocoSer...
postrgres/psycopg: cannot insert multiple commands into a prepared statement