instruction
stringlengths
0
30k
How Do Schema migration in mongoose & mongodb?
|node.js|mongodb|mongoose|migration|mongoose-schema|
null
{"Voters":[{"Id":205233,"DisplayName":"Filburt"},{"Id":1427563,"DisplayName":"jla"},{"Id":839601,"DisplayName":"gnat"}],"SiteSpecificCloseReasonIds":[13]}
The Compose documentation e.g. [here][1] mentions, that `Modifier.drawBehind` only affects the drawing phase, other phases are not re-executed when this modifer changes. But how does Jetpack Compose know that e.g. `Modifier.drawBedind` only affects the drawing phase? [1]: https://developer.android.com/develop/u...
How does Jetpack Compose know that a modiifer affects only e.g. the drawing phase?
|android|android-jetpack-compose|
Context: I have a dashboard which is a route group, and I have a multiple roles, i.e. `admin`, `company` and `student`. I have a sidebar in the Dashboard where the contents may change based on the type of `user` you are, consider to be RBAC. Problem: I want to render different sidebar contents based on the route I a...
Next.js: (App Router): How can I pass props from `page.tsx` to the `Layout.tsx` props?
|app-router|next.js14|
null
The problem is before adding a new container, after I added the max number of stock-details-container and I remove one of it then I changed the selected value of the other containers. When I add a new container, the new added container disabled the previously selected item in the other containers even if it is not thei...
I made a slight modification to the script to let the game get the same process ID as the script but the real problem was that the game and executable were nested in a subfolder. So the `export LD_LIBRARY_PATH="."` the path was wrong. I removed the unnecessary folder and lifted everything up one step and now it works ...
I have come across the same problem, and therefore I believe it is a bug. I've tried swapping out `createBackgroundSubtractorMOG2()` instead of `createBackgroundSubtractorKNN()` and that one does behave as expected.
You should try to reset your browsers CSS rules/set global css rules before applying new ones. This may fix the spacing problem as well as the sizing issue of your headlines. You can refer to this website: https://dev.to/hankchizljaw/a-modern-css-reset-6p3
I'm currently working with Apache Beam (Dataflow) to process and insert data into a Google BigQuery table. The table has a field with a JSON datatype (`struct_field.test_jsontype_field`), and I'm encountering issues during `BigQueryIO.Write.Method.STREAMING_INSERTS`. **Issue Description:** My pipeline reads JSON da...
Does Apache Beam's BigQuery IO Support JSON Datatype Fields for Streaming Inserts?
|java|google-bigquery|apache-beam|google-cloud-pubsub|
So, i am building this python project let's name this as XYZ for now. Now, regular behaviour of a python package is: 1. you install the package from pip 2. you import the package 3. you use the contents of the package But, what i want is that apart from above behaviour, i want to give argument directly to co...
|r|arcgis|census|
I want to set a keyboard shortcut for my shortcut action to Ctrl-Shift-Esc. Normally Esc key shifts focus to parent scope, but this happens when setting keyboard shortcut in System Preferences. Blatantly fails in Shortcuts app. Therefore, there is no way to have Esc key in keyboard shortcut. However, throught bug abuse...
How can I manually add a keyboard shortcut to a Shortcut Action Service directly via the system files, without going through the System Prefs GUI?
|macos|keyboard-shortcuts|sirishortcuts|macos-sonoma|system-preferences|
null
The reason why it doesn't work is because it throws an exception when calling the `prepare`/`start` methods therefore the initialization of the MediaRecorder fails. In particular, the issue is related to opening the output file (`open failed: ENOENT`). After a failed initialization it is normal that the call to `stop` ...
Why don't you just validate first and then try the update? public function update(UpdateUserRequest $request, string $id) { $validator = Validator::make($request->all(), [ 'username' => [ 'required', Rule::unique('users')->ignore($id), ], ...
I am trying to make a variable that changes as the loop goes on in R, so I used the paste() function in a loop, to make a variable that changes accordingly. Here is my code: ``` #dataframe df1 <- structure(list(lex_1 = c("лесбиянка", "лесбиянка", "лесбиянка", "лесбиянка", "лесбиянка", "лесбиянка"), lex_2 = c...
I have two tables one for Credit and the second for those who have paid their credits Table 1 credit_id customer_id total_amount_given disbursement_date 1 1 50000 2020-09-02 2 2 60000 2020-09-02 3 1 10000 2020-10-05 ...
How to extract that are yet to complete their rent with outstanding amount and Date
|python|mysql|database|
null
I have the following task in flink. it seems that A is getting back-pressured although there isn't busy task in his own dataflow but in parallel one, which joins later. Is it possible A is back-pressured because of B? it might be related to watermarks alignment maybe? [![][1]][1] [1]: https://i.stack.imgur....
Does parallel flink tasks affect each other if they are unioned at the end?
|apache-flink|
I'm encountering an issue with passing the "size" parameter from my JavaScript function to my Django backend. Here's the relevant code snippet from my Django view: ```python def get_product(request, slug): try: product = Product.objects.get(slug=slug) if request.GET.get('size'): ...
``` For some reason, I cannot get the Client Side Validation to work from my Razor Views. However when I created a Razor page by itself without using the Layout page it works. I'm not sure why. Appreciate any help I can get. Thanks. Here is the code from my Project Layout Page: @ViewData["Title"] - DotNetCore8Te...
Do you have to set up MS exchange to trust proofpoint if proofpoint redirects your email to MS? Don’t try anything yet. Waiting to see what happens now that it is redirected. Wondering if I need to do something with MS or if redirect was enough
Directing proofpoint to ms exchange
|exchange-server|
null
I do know that conditional operators has right associativity but cant understand how the flow of condition1 , condition2 , expression1 , expression2 , expression3 are all happening one after another. Also how the evaluation and flows are changes when we assume that associativity if left to right. (condition1) ? (exp...
explanation of the associativity of nested conditional operators
|conditional-operator|
null
If you want to show like that you have to use PrivacyComponent as page like `privacy`. after that you can import you `PrivacyComponent` in `privacy` page. <Link href="/PrivacyComponent"> PrivacyComponent </Link>
I have encountered the same error, it was likely due to a large amount of data being transferred. To resolve this issue, I had to increase the `http.postBuffer` size in the Git configuration. For me, this command had done the trick `git config --global http.postBuffer 524288000` By increasing the http.postBuf...
"/usr/bin/env" is appearing when you directly execute python file with vs code extentions . you can either use that or simply open terminal in program location and execute command - python programname.py / python3 programname.py
``` For some reason, I cannot get the Client Side Validation to work from my Razor Views. However when I created a Razor page by itself without using the Layout page it works. I'm not sure why. Appreciate any help I can get. Thanks. Here is the code from my Project Layout Page: @ViewData["Title"] - DotNetCore8Te...
Please consider the following case that would result in memory getting written after being deallocated. The reason being that in `class PoorlyOrderedMembers` the member `m_pData` is declared after the member `m_nc` which means that the `std::unique_ptr` d'tor will be called and the instance of `ClassWithData` will b...
We developed a CodeIgniter application using the `PHP ActiveRecord ORM` for the Query builder, and the application runs in a Docker container on an AWS server. We recently upgraded PHP from version 8.0 to version 8.2 and php-activerecord is no longer supported by PHP 8.2. The application crashes with a `Bad Gateway...
|php|codeigniter|phpactiverecord|
null
I noticed that http services that receive and return JSON are called 'Web Api/Web Service' in many articles/book/documentation etc. But isn't the Web (World Wide Web) about websites, html and web browsers? For example, a mobile application is not related to the web. So why are http services that receive and re...
Why do we call all http services 'Web Api/Web Service'?
I am trying to read in data from the Nonin Pulse Oximeter model 3231 using the USB connection. The data is coming out in this from (b'\x14\x00\x02B\x02\xc2b\x00N\x03\x02\n') when I am reading it in using the pyserial documentation. I am not sure how to turn this into the SpO2 and heart rate data that I am looking for. ...
Nonin Oximeter 3231
|serial-port|
null
Since I have finally fixed it, it took me a little bit, and i am not sure if i fixed it fully but here's what i did: 1. deleted the older AVD i have and made a new one. 2. in my project directory, i deleted the /.gradle and the /.idea (kept a back up of this one just in case). 3. navigated to /.gradle directory...
After establishing PACE PIN authentication, I am trying to implement secure messaging to be able to send secure APDU commands. I based my implementation on the ICAO 9303 part 11 manual, chapter 9.8, page 63 : https://www.icao.int/publications/Documents/9303_p11_cons_en.pdf, and on this Java code that I used : https:...
spring-cloud-stream-binder-kafka-streams consumer stops and goes into EMPTY state when exception occur on consumer. I want to test retry mechanism but it is not working as expected. (https://docs.spring.io/spring-cloud-stream/docs/current/reference/html/spring-cloud-stream-binder-kafka.html#_error_handling). No message...
{"Voters":[{"Id":3025856,"DisplayName":"Jeremy Caney"},{"Id":466862,"DisplayName":"Mark Rotteveel"},{"Id":7758804,"DisplayName":"Trenton McKinney"}],"SiteSpecificCloseReasonIds":[11]}
``` "use client" import { useKindeBrowserClient } from '@kinde-oss/kinde-auth-nextjs' import Image from 'next/image'; import React from 'react' function DashboardHeader() { const {user} = useKindeBrowserClient(); return ( <div> <Image src={user?.picture} alt='logo' width={40} height=...
This worked for me: ```import { Amplify } from "aws-amplify"; import amplifyconfig from "./amplifyconfiguration.json"; Amplify.configure(amplifyconfig); ```
Problem with merge documents with DOM and PHP I need to include a part of an html file from the server in an existing document in a specific position within the original file, for example using a line number within the original document or below a specific node using DOM, how can I do it? I tried various ways but...
|url|hyperlink|download|
I can't figure out why the below code reacts this way with solidjs. In the function handleFileChange, if I update the array by modifying its elements field directly, solidjs detects the change. But if I replace the element, nothing happens. This is really strange to me. I need to understand why it is like this or I'm g...
null
I can't figure out why the below code reacts this way with solidjs. In the function handleFileChange, if I update the array by modifying its elements field directly, solidjs detects the change. But if I replace the element, nothing happens. This is really strange to me. I need to understand why it is like this ``` fu...
You should join the *subject* collection with the *edcontentmaster* via `$lookup`. The `pipeline` in the `$lookup` stage should be your existing query. In the last stage, convert the `topicDetails` to an object by getting the first element. ``` db.subject.aggregate([ { $match: { stageid: "5", ...
This is the data table I am working with. [![][1]][1] This is the formula I need to apply in Excel. [![][2]][2] I want to clarify some notations. `k_p_x` means the probability that the individual aged `x` will survive for the next `k` years. `p_x` would simply assume `k=1`. And is the probability of sur...
|excel|excel-formula|iteration|
How would I apply a rather complex summation formula like this in Excel?
How to eliminate use of external browser when querying Spotify API
|java|android|spotify|
I'm encountering an issue with passing the "size" parameter from my JavaScript function to my Django backend. Here's the relevant code snippet from my Django view: ```python def get_product(request, slug): try: product = Product.objects.get(slug=slug) if request.GET.get('size'): ...
HTML ``` <div class="icon-menu"> <img src="../images/menu.png" id="navMenu" onclick="changeToCross()"> </div> ``` JS ``` function changeToCross() { let menu = document.getElementById('navMenu'); let src = '../images/menu.png'; if (menu.src === src) { menu.src = '../images/clos...
{"Voters":[{"Id":14732669,"DisplayName":"ray"},{"Id":17562044,"DisplayName":"Sunderam Dubey"},{"Id":839601,"DisplayName":"gnat"}],"SiteSpecificCloseReasonIds":[13]}
{"Voters":[{"Id":14732669,"DisplayName":"ray"},{"Id":238704,"DisplayName":"President James K. Polk"},{"Id":839601,"DisplayName":"gnat"}]}
{"Voters":[{"Id":1491895,"DisplayName":"Barmar"},{"Id":3807365,"DisplayName":"IT goldman"},{"Id":839601,"DisplayName":"gnat"}],"SiteSpecificCloseReasonIds":[11]}
{"Voters":[{"Id":62576,"DisplayName":"Ken White"},{"Id":10024425,"DisplayName":"user246821"},{"Id":839601,"DisplayName":"gnat"}]}
Since you have a list in your json response, you need to flatten it: ``` import pandas as pd import json json_response = [ '{"accountNumber":"2130005","billDayModelName":"","billDayModelScore":"0","defaultBadWriteOffModelName":"XYZ","defaultBadWriteOffModelScore":600.677286,"accountModelName":"","accountMo...
{"Voters":[{"Id":14853083,"DisplayName":"Tangentially Perpendicular"},{"Id":3745413,"DisplayName":"Ron Maupin"},{"Id":839601,"DisplayName":"gnat"}],"SiteSpecificCloseReasonIds":[18]}
{"Voters":[{"Id":23528,"DisplayName":"Daniel A. White"},{"Id":14732669,"DisplayName":"ray"},{"Id":839601,"DisplayName":"gnat"}]}
Your code only creates a decimal numbering format for the document and gets the appropriate `NumID`. That `NumID` then needs to be applied to paragraphs in the document which shall be numbered. The format is determined by the paragraphs. The format of the numbering itself is determined by the paragraph's run propert...
It's so important to me. do you know the three-parameter lognormal threshold formula? I need to Excel solver function. A probability distribution of outcomes that is symmetrical or forms a bell curve is called a normal distribution. A log-normal distribution can be formed from a normal distribution using logarit...
This is an extension of another stack overflow [question](https://stackoverflow.com/questions/76214166/scrape-websites-power-bi-dashboard-using-python-selenium/78241656#78241656). The problem I have is that I can't properly parse the data. The column headers are missing the first 10 columns. Only columns you have to sc...
Parse Dynamic Power BI table with selenium
|selenium-webdriver|web-scraping|powerbi|
null
The hitting table is loaded from different URL. You can use this example to load it: ```py import pandas as pd hitting_table_url = "https://www.covers.com/sport/baseball/mlb/matchup/279605/stats-analysis/hitting/overall" df = pd.read_html(hitting_table_url)[0] print(df) ``` Prints: ```none Tea...
django-allauth provides a seettings parameter SOCIALACCOUNT_ENABLED that is used in urls.py to add conditionally socialaccount urls: *allauth/urls.py*: ~~~ if app_settings.SOCIALACCOUNT_ENABLED: urlpatterns += [path("social/", include("allauth.socialaccount.urls"))] ~~~ in html templates there is the same...
``` For some reason, I cannot get the Client Side Validation to work from my Razor Views. However when I created a Razor page by itself without using the Layout page it works. I'm not sure why. Appreciate any help I can get. Thanks. Here is the code from my Project Layout Page: @ViewData["Title"] - DotNetCore8Te...
I have a C++ client to benchmark a gRPC server. 4 poller threads are running concurrently on the client. Each thread run concurrently 100 asynchronous request using its own channel and stub, and per-thread RPS is then aggregated. When using this code, I achieve 90K RPS, but when using [ghz](https://ghz.sh), I ...
gRPC client is slower in C++ than using `ghz` with the same count of threads
|c++|grpc|
``` For some reason, I cannot get the Client Side Validation to work from my Razor Views. However when I created a Razor page by itself without using the Layout page it works. I'm not sure why. Appreciate any help I can get. Thanks. Here is the code from my Project Layout Page: <!DOCTYPE html> <html lang="en"> ...
``` ` constructor(resource,action, @InjectModel(Role.name) public roleModel?: Model<Role> ) { this.resource = resource; this.action = action; }` ``` my nestjs code like this i got an erro if tri use a model Error: Role model is not injected yet at RolesGuard.canActivate (/home/si...
initlise with out constructor
I would suggest you separate system-provided interests and user-custom interests. Because what if different users choose the same name for their custom interests? You don't want to only store one row of user-custom interest in the table. Who knows what they might want to do in the future, like update the name or delete...