instruction
stringlengths
0
30k
null
We are receiving events from event hub and used spark streaming as processing . For testing purpose I have sent 300 events in sequence , I have two streams as I mentioned below but I see some data is missing in both the streams some times first stream is working correctly and second stream is missing to process, first ...
Events processing missing in spark streaming
|apache-spark|pyspark|spark-streaming|azure-databricks|spark-structured-streaming|
You need to loop your array and nest another loop into the array to see whether you already found the element. ``` #include <iostream> int main() { bool found = false; int array[] = {1, 4, 5, 3, 7, 5, 2, 7}; int length = sizeof(array) / sizeof(array[0]); for (int i = 0; i < length; i++) { ...
The difference in behavior you're observing is likely due to the size of `long` and `unsigned long` on different platforms. On Windows, the size of long is typically 4 bytes (32 bits), while on many Linux systems, it is 8 bytes (64 bits). This difference in size affects the result of the expression `1L + 1U`. To ens...
|angular|ionic-framework|firebase-authentication|
null
null
Hi In response to your inquiry, here's a sample code from Refinitiv: ``` df = rdp.Search.search(     view = rdp.SearchViews.GovCorpInstruments, filter = f"ParentOAPermID eq '{org_id}'and IsActive eq true and not(AssetStatus in ('MAT'))", # Define the upper limit of rows within our result set.  This is a ...
To expand on correct [Answer by rahulmohan][1], I will add some example code. Define our `Item` & `User` classes. ```java record Item( String description ) { } ``` ```java final class User { private final String name; private final List < Item > items; User ( String name , List < Item > i...
Why not create your own simple Google SignIn button using a TextView and the Google logo came up with Google signing library: <TextView android:text="Sign In with Google" android:gravity="center" android:background="@drawable/<of your choice if required>" android:padding="16dp...
In your view you have unread_notifications = Notification.objects.filter(user=request.user, is_read=False).count() With count() at the end, if there is 1 unread notification, unread_notifications will be 1. It won't be the unread notification object, so it won't have an is_read property I suspect yo...
My linguistics rating experiment contains 36 stimuli in total for rating. There are 6 themes (e.g. doctor, farm, etc), and each theme has 3 conditions (good, bad, mixed), and each condition has 2 sentences. So there is a total of 3x2x6 = 36 sentences. I had 54 participants, each participant rates one sentence from each...
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! [code][1] [1]: https://i.stack.imgur.com/2aIvr.png
I have a python program that starts an OpenCV face detection function on startup. This code works fine and the camera is able to run and face detection works fine. On pressing the 'Q' key within the OpenCV frame, a pygame program (Pong) is started. However, once the game starts, the OpenCV capture hangs immediately...
Python OpenCV and PyGame threading issue
|python|opencv|pygame|
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. https://emdadrodbar.ir/ I used the yoast plugin and registered my sitemap in Google Search Conso...
The problem is that it takes a long time to index web pages in emdadrodbar.ir.؟
Is there any way to tell Notepad please remove the following [DOCUMENT](https://i.stack.imgur.com/Ukr0X.jpg) Remove all the empty characters after the last , sign. I know I can tell please replace , with empty but the problem is I have many , that hast to stay in the file. I just need notepad to remove EVERYTH...
Yes, you can use emmeans to compute the odds ratio for females at the ages of 47 and 33. (I've rounded the ages as 47.356 and 32.634 seem oddly specific for a person's age.) For clarity I refit the model without the `rms` bells and whistles. I'll also calculate the same contrast with both [`emmeans`](https://cran.r-...
We are using Orkes as a managed solution. What I have found in our organization is that the support and expertise of the Orkes team (paid for solution) is much more valuable to our software practice than hosting it or managing it ourselves. Orkes to Conductor, is to me like RedHat is to Linux. You can use the O...
- **azure-storage-blob**: - **12.19.1**: - **Windows 10**: - **3.10.6**: **Describe the bug** When attempting to retrieve the list of blob names from the Azure Blob Storage container, an "Incorrect padding" error is encountered. This issue seems to be causing a hindrance in fetching the blob names effectively...
Getting "Incorrect padding" error when trying to retrieve the list of blob names
|python|azure|azure-blob-storage|
You need to use https://www.npmjs.com/package/@emotion/is-prop-valid then try to use such a wrapper: <StyleSheetManager shouldForwardProp={shouldForwardProp}> <App /> </StyleSheetManager> And then – the shouldForwardProp realisation from previous answer or similar.
I found the solution def test_create_todo(client): with TestClient(app) as client: data = {"title": "Todo 1", "description": "Description Todo 1"} response = client.post("/todos", json=data) assert response.status_code == 201
I have issues replacing text with pre defined text when the user hovers over the original text. I have it working on some but not on others. Can someone explain to me what is that I am doing wrong? Any help will be grateful.
How to set text inside a div using JavaScript and CSS
|text|hover|
null
How users can logout/delete his account from google spread sheet database using javascript when the user click there delete buttton on account.html
I found you can set a negative value for `plugins.title.padding.bottom` to achieve this. The legend and title will overlap if the space is needed though. The settings I am using are: ``` plugins.legend.display = true plugins.legend.align = 'end' plugins.legend.position = 'top' plugins.title.display = true plu...
SET TRANSACTION ISOLATION LEVEL { READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SNAPSHOT | SERIALIZABLE } will change the isolation level for the duration of the connection or until changed by a subsequent set command. In my case I expect that lowering the isolation level to sna...
diff3 output in git conflict style, including mergeable hunks
|git|diff|git-diff|diff3|
> The thing is if my `updateCategoryDto` is null If the input (`updateCategoryDto`) is `null` then there's something wrong with the request. In that case, return `400 Bad Request`: if (updateCategoryDto is null) return new BadRequestResult(); Alternatively, you may wish to use one of the alternati...
You need to clone the `Carbon` object or change to immutable object. Carbon is a mutable object by default. Use `copy` method $booking_end = $booking_start->copy()->addMinute(45)->format("Y-m-d H:i:s"); ---------- Look this Stack Overflow post, same issue https://stackoverflow.com/a/49905830/11836673
I think you could change your code here: ``` tree.plot_tree(classifier.fit(Xtest, Ytest)) ``` into: ``` tree.plot_tree(decision_tree.named_steps['cls']) ``` as named_steps is an attribute of your fitted pipeline. See [this link](https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html) ...
I was following a tutorial on Web API and I saw the creator creating his service method as nullable `( Task<Comment?> Update(CommentUpdateDto comment) )` and he later used it like following which made sense: ``` [HttpPut("{id:int}")] public async Task<IActionResult> Update([FromRoute] int id, [FromBody] CommentUpd...
i need answer in simple c++ like the code im using it prints me the repeated nums ``` #include <iostream> using namespace std; int main() { int arr[5], arr2[5], i = 0, j = 0; cout << "enter elements of array:\n"; for (i = 0; i < 5; i++) { cin >> arr[i]; } ...
I started to write a discord bot using discord.js. I also followed the guid they provided until I was finished with "Event handling": https://discordjs.guide/creating-your-bot/event-handling.html#reading-event-files I wrote my first event where I want the bot to write a welcome message in a channel when somebody joi...
Sending welcome message in channel using discord.js
|javascript|discord.js|
I have a npc class which has a method called chase that is referenced inside the update function. when chase is called it says its not a function or it's not defined. I have another method being referenced in the same way that works. [enter image description here](https://i.stack.imgur.com/SvQ91.png) chase method...
Phaser 3, function doesn't exist/not defined
|phaser-framework|
null
I believe this will work in `2010`: B1: =IF(A1="Name","Group",IF(A2="Name","", INDEX($A$1:A1,LOOKUP(2,1/($A$1:A1="Name"),ROW($A$1:A1))-1))) and fill down. ***Algorithm*** - If the adjacent cell in Column A = "Name" then enter "Group" - If the next cell down in column A = "Name" then leave a blank - ...
I am trying to retrieve a table with the values of Cramer's correlation coefficients on a set of fields using the following SQL query: ```sql WITH var_pairs AS ( WITH vars AS (SELECT n FROM unnest(ARRAY['Performance Score', 'state', 'sex', 'maritaldesc', 'citizendesc', 'Hispanic/Latino', 'racedesc', 'Reason For ...
Likert scale study - ordinal regression model
|r|linguistics|ordinal|likert|brms|
null
I added these codes to settings.py for extra security ``` SECURE_BROWSER_XSS_FILTER = True SECURE_CONTENT_TYPE_NOSNIFF = True SECURE_SSL_REDIRECT = True SECURE_HSTS_SECONDS = 86400 SECURE_HSTS_PRELOAD = True SECURE_HSTS_INCLUDE_SUBDOMAINS = True SESSION_COOKIE_SECURE = True CSRF_COOKIE_SECURE = True ``` ...
Django's previous settings prevent connecting to localhost
|ssl|django-settings|
null
|html|css|css-shapes|
You can specify eager loading via chaining and also with multiple options together. So here we load via outer join from User to UserProjectRoleLink to Project. Then we after that query is loaded we lookup the roles via the role ids we fetched in the first query. So this should result in exactly 2 `SELECT` statemen...
I have upgraded the gitlab-runner version to the latest one, and could resolve the issue. However, it is not clear why the problem occurred with the lower gitlab-runner version.
I make a simple diagnostic for the car whit ELM327.And i can read a fault codes ,and compare values of received fault end post the result int the text box but how can i compare the received value and not tu use so many (IF) in the code..I try use a text file whit the list of fault codes but only i found the example whe...
C# Compare multiple string values
[enter image description here](https://i.stack.imgur.com/BltfN.png) I`m developing an googleOAuth2.0 for authorization at ASP.net Core Web Api v7.0. I created a web app in console.cloud.google.com and got the app credentials. I followed to this instructions: https://learn.microsoft.com/en-us/aspnet/core/security/authe...
ASP.NET with Google authentication throws error : The oauth state was missing or invalid
|c#|google-oauth|google-oauth-.net-client|
null
I have a series of athena tables that get compiled from millions of small s3 json files each week. The data is partitioned. However, after upgrading to Athena query engine 3, I am suddenly receiving the following error when I attempt to compile the data files: ``` HIVE_CURSOR_ERROR: com.amazonaws.services.s3.model....
Athena Query Engine 3: HIVE_CURSOR_ERROR
|sql|amazon-web-services|amazon-athena|
> Have you guys ever tried... Yes. I did it, sometime back in the 1980s. It was more of a proof of concept than anything else. I never used it in any real project. Everything I did back then would be called "undefined behavior" today, but back then, experimentation and reading library and OS source code was busin...
I need to improve *general heap sort* using C# multithreading. I don't have a clear idea about implementation of improvements. One of the suggestions I got is to separate arrays for *N* parts and heapsort each part in specific thread. And then merge each ordered part of array. In this case I think it will n...
Simply use indexing with dataframe object match_result. To get the decimals use: `match_result['prices'][i][0]['decimal']`. To get the type use: `match_result['type'][i]` import pandas as pd import requests as r api = 'https://content.toto.nl/content-service/api/v1/q/event-list?startTimeFrom=2024...
It appears to be the case from a simple test I made: ``` add_custom_target(B COMMAND echo B ) add_custom_command(TARGET B POST_BUILD COMMAND echo post build start COMMAND sleep 5 COMMAND echo post build end ) add_custom_target(A ALL COMMAND echo A DEPENDS B) ``` but I didn't ...
If target A depends on B, are B's POST_BUILD commands guaranteed to be executed before A starting to build?
|cmake|
Your expectation is wrong. A call of `next` starts the next middleware/request handler. It doesn't stop the current function. You can stop and leave a function with a `return` statement, e.g.: if (!username || !password || !email || !firstname || !lastname || !ph...
Setting `options(seededlda_threads = 1)` gives reproducible results: ``` r library(quanteda) library(seededlda) options(seededlda_threads = 1) corp <- data_corpus_moviereviews toks <- tokens(corp, remove_punct = TRUE, remove_symbols = TRUE, remove_numbers = TRUE, remove_url = TRUE) dfm...
|sql|sql-server|
{"Voters":[{"Id":354577,"DisplayName":"Chris"},{"Id":522444,"DisplayName":"Hovercraft Full Of Eels"},{"Id":874188,"DisplayName":"tripleee"}],"SiteSpecificCloseReasonIds":[18]}
Usually using a variable is an additional overhead, but in your case Chrome was able to provide the same performance. But if a variable is reused, that could actually boost performance. So the rule could be - don't create unnecessary variables. Also note that JS engine could optimize code while compiling so in reali...
{"OriginalQuestionIds":[30299093],"Voters":[{"Id":8620333,"DisplayName":"Temani Afif","BindingReason":{"GoldTagBadge":"css"}}]}
|c#|
null
I caught this exception when running the program: ``` Exception thrown at 0x0000000000000000 in OpenGL project.exe: 0xC0000005: Access violation executing location 0x0000000000000000. ``` This is my code below: ```c++ #include <iostream> #include <glad/glad.h> #include <GLFW/glfw3.h> int main() { gl...
How to fix "Access violation executing location" when using GLFW and GLAD
|c++|opengl|graphics|glfw|glad|
null
Android has no USSD APIs. There is no requirement for whatever dialer app it has to work with USSD at all (remember the dialer app is an app and may be changed). It is not recommended to use USSD at all in an Android app, as whether it works will depend on the apps the OEM installed, whether the customer has installe...
null
Maintaining a list in a particular order per user, in Java
I'm having problems setting up HTTPS in my Spring Boot application. The application is hosted on an AWS EC2 server with Ubuntu 20. When I try to access the application via Postman using HTTPS, I get a timeout in the server response. Spring Security configuration: ```java @EnableWebSecurity public class SecurityCo...
HTTPS configuration in Spring Boot, server returning timeout
|java|spring|security|https|
null
I have set up a Datastream service, in order to replicate data from Cloud SQL (MySQL) to BigQuery. Everything is set up correctly, connection works. But the weird thing is that only tables < 10mb size are replicated without issues. The larger tables (100+ MB) all fail. When checking the error status, it only say...
*There is very good post about trimming 1fr to 0: https://stackoverflow.com/questions/52861086/why-does-minmax0-1fr-work-for-long-elements-while-1fr-doesnt* In general I would like to have a cell which expands as the content grows, but within the limits of its parent. Currently I have a grid with cell with such ...
{"Voters":[{"Id":1255289,"DisplayName":"miken32"},{"Id":354577,"DisplayName":"Chris"},{"Id":874188,"DisplayName":"tripleee"}],"SiteSpecificCloseReasonIds":[11]}
I have the following code in Deneb Vega Lite. It produces a scatter plot that has a connected mean line between each group. I am trying to change the color of the points to all be light grey and the lines to be the same color as the legend. Currently it seems that the legend color replaces whatever I put in the point s...
How to change point color in Deneb while having lines be the same color as the legend