instruction
stringlengths
0
30k
Unable to import Snowflake Connector python library after install in Azure Devops YAML Pipeline
|python-3.x|azure-devops|azure-pipelines|snowflake-cloud-data-platform|azure-pipelines-yaml|
null
We have to compute percentiles for 100 columns in an R dataframe. In the example below, the column names that need percentiles are `pctile_columns`. The criteria for receiving percentiles is (1) the column is not NA, and (1) the `min_pg` column is >= 12. We are struggling to obtain the correct set of percentiles: **...
from pyspark.sql.functions import lit,sum,max from pyspark.sql.window import Window window_spec = Window.orderBy("timestamp").rowsBetween(-4, 0) dataframe_2 = dataframe_2.withColumn("counter_1", lit(0)).withColumn("max_1", lit(0)) union_df = dataframe_1.union(dataframe_2) # Calcul...
I'm dealing with an older application that we recently updated from Java 8 to Java 11. In one part of the application, I have several XML files (XSDs) that are converted into Java classes using the Jaxb2 Maven plugin. It worked fine with Java 8, but after switching to Java 11, I encountered an error: 'code too large'. ...
'Code too large' XML to Java using Jaxb2 and Castor maven plugins
|java|jaxb|maven-jaxb2-plugin|castor|
null
You can let htmx send csrf token value with every request by attaching it to the body element with [hx-headers][1] attribute: <body hx-headers='{"X-CSRF-TOKEN": "{{ csrf_token() }}"}'> This approach is explained [here in more details][2] (django-htmx docs). It should work same way with laravel, by using the a...
**You try this code and it will be solved** <a href="{% url 'download_wav' filename='your_wav_filename.wav' %}">Download .wav File</a>
**I have 2 Questions**: [![enter image description here][1]][1] For EMI we have: Excel Formula: `=PMT(rate, number_of_periods, present_value)` Maths Fromula: `= P*r*(1+r)^n/((1+r)^n-1)` **QUESTION 1:** Keeping the principal amount & interest tenure as same, **I want to calculate the interest rate...
I have two xaml files: - one (present in solution1) I can see in the design view. - the other one (present in solution2) I can't see in the design view. There's nothing wrong with the second xaml: I can see it when I run the application. But I would like to see it in design view (if ever I need to perform a modifi...
In the following program: ``` #include <stdio.h> int main() { int c; c = getchar(); putchar(c); } ``` Even if If write many characters in the input and press `enter`, it only prints the first character. However in the following program: ``` #include <stdio.h> int main() { int ...
I had problems with **auth.global.ts** been render on server side. So I put a **client side validation** and a trick (**{ external: true }**) on navigateTo redirect (because redirect to page with diferent layout cause style bugs): ``` lang-js export default defineNuxtRouteMiddleware((to, from) => { if (proc...
Classic mul [1 qbyte * 1 qbyte] it's 1 ops; [2 qbyte * 2 qbyte] it's 4 ops; [4 qbyte * 4 qbyte] it's 20 ops; Imul imul probably 1 ops mul probably 11 ops then use long arithmetic, 2nd is optimal, else 1st variant;
I want to do a post api call, but it never reaches the do catch block because guard let exits me out of the function. I've debugged it and I have values inside the postCompleteCall, but stil returns me out of the function. I will pass the code below: ``` @MainActor func completeChangeEmail(id: String, email: ...
In R, compute ranks/percentiles for many columns in dataframe, while filtering each column for criteria
|r|dataframe|ranking|
As **smr** already commented, you can use `Layout.preferredWidth` in order to achieve a static width for the button. The shared documentation also mentions that `implicitWidth` can also be used which I commented out in the snippet below. > If the preferred width is -1 it will be ignored, and the layout will > use i...
I've got a wordpress backup to restore a website in a new hosting. I have zero experience in wordpress and I only know is a php application that uses myqsl database. My questions are.. can I restore the database if it has different database data (database name, user and password) than the original one? or do I need to ...
wordpress restore in new hosting
|wordpress|restore|
cucumber.api.cli.Main run WARNING: You are using deprecated Main class. Please use io.cucumber.core.cli.Main 0 Scenarios 0 Steps 0m0.014s I'm not getting snippets for my steps. Exception in thread "main" io.cucumber.core.exception.CompositeCucumbe ...
Math's & Excel formula to calculate the interest rate from the EMI and principal amount?
|excel|math|excel-formula|google-sheets-formula|
Pretty much what it says on the tin. I have a JS script that isn't staying within the div element it is designated to on my page, it "sits" in the footer section instead. [Page design with the JS script result "sitting" in the footer](https://i.stack.imgur.com/0Dpil.png) ``` <header> <div>icon</div> <di...
You asked: >i dont understand it so if it could be provided with proper explanation ## Arrays As shown in [The Java Tutorials][1] by Oracle Corp, a `for` loop has three parts: ```java for ( initialization ; termination ; increment ) { statement(s) } ``` Take for example an array `{ "alpha" , "b...
I had a problem, then I authenticated my account using Microsoft. I want to upload files. But I can not do that. Here is my source code (my English sorry is not good, please help me if you have a solution); I have tried all options, but had no success. Thank you. ``` var folderName = "YourFolderName"; var fi...
How to upload file to Onedrive using ASP.NET MVC?
Guard let returns me out of the function
|swift|swiftui|
Alternative, as a run-length encoding problem: ```r df |> mutate(grp = consecutive_id(Class)) |> mutate(.by = grp, Class = c(Class[1], rep("", n() - 1))) |> select(-grp) # # A tibble: 10 × 3 # ID Class Score # <dbl> <chr> <dbl> # 1 1 "A" 45 # 2 2 "" 67 # 3 3 "" ...
null
I have implemented notification system in SpringBoot using WebFlux, below is my sse endpoint @GetMapping(path = "/backoffice/sse/notifications") public Flux<ServerSentEvent<NotificationData>> sse() { return this.sseNotificationService.subscribe(); } And here is the implementation of SS...
Hello I am new in stackoverflow. I am currently finding a solution to solve the data importing issue. When I imported the records over 2000 with excel file, the web going down. Then I searched error log in the server found out the following. Web servers using nginx and database is mysql. The web is with python. Could a...
I'm currently working on a school project where I need to apply multiple border images to an element using border-image-source. However, I'm encountering issues where only one of the border images is displayed, while the other is not being applied. It would show up as a grey border instead if both of the borders are ap...
Having trouble applying border images
|html|css|image|calendar|border|
null
def word_find(word, string): # Using str.find() method # It returns -1 if the word is not found, else returns the index of the first occurrence if string.find(word) != -1: return 'success' else: return 'word not found in string' print(wo...
Dart's anonymous functions are defined with parentheses and curly braces: `(s) { print(s); }`, but if it consists of a single statement, you can use right arrow (`(s) => print(s);`, and then you **must** omit the curly braces or things will break, or worse, be interpreted as a Set. D'oh. Removing them (or the arrow...
|asp.net-mvc|
I want to ask that when calculating MSE loss about time-sequence data shaped like (minibatch, feature, sequence length) in pytorch by using `nn.MSELoss()` with `reduction="mean"`, average just targets on minibatch? or also implicitly about time sequence? To confirm the calculation result to check what I have questi...
Ask nn.MSELoss() calculation mechnism in pytorch framework
|pytorch|recurrent-neural-network|
null
Ошибка Required Param value not set Сам код: SELECT id_vst, CASE WHEN id_sys = 155 THEN CAST('Вид' AS varchar(80)) ELSE CAST(' ' AS varchar(80)) END AS result FROM DOC_ACC_CNT Пробовал видоизменять код, используемые функции и т.д., но так как только начал работать в...
Работая в FastReport пишу SQL код и выдаёт ошибку Required Param value not set
|sql|parameters|fastreport|
null
I am running a SPARK job and for the most it goes fast but at the last task it gets stuck in one of the stages. I can see there is a lot more shuffle read / rows happening for that task, and tried a bunch of re-partitioning strategies to make sure an even distribution. But still can't get through it. Could you please h...
Last SPARK Task taking forever to complete
|scala|apache-spark|databricks|apache-spark-sql-repartition|
null
```` def newValue(value): if value == "": return 1 if value is None: return 1 return value + 1 out_df['# of Days'] = newValue(out_df['# of Days']) ````
I am using `spring cloud stream kafka binding` and `resilience4j circuit breaker`. In cloud stream when `enableDlq: true` all messages with exception in processing goes to the `dlq` topic. Now, lets suppose we have an `exponential backoff retry` configured to retry messages 5 times. But there is still a chance that ...
Handle kafka messages due to transient error in DLQ
|apache-kafka|spring-cloud-stream|dlq|
I want to ask that when calculating MSE loss about time-sequence data shaped like (minibatch, feature, sequence length) in pytorch by using `nn.MSELoss()` with `reduction="mean"`, average just targets on minibatch? or also implicitly about time sequence? To confirm the calculation result to check what I have questi...
Use `text-shadow` to make it look bolder. <!-- language: lang-css --> .really-bold { text-shadow: -1px 0, 0 1px, 1px 0, 0 -1px, -1px -1px, 1px 1px, -1px 1px, 1px -1px; } <!-- begin snippet: js hide: false console: false babel: false --> <!-- language: lang-css --> body { font-f...
What you want is called the "Windows SDK", which contains everything you need to build applications on Windows, except the IDE (Visual Studio). It comes with all necessary libraries, header files, a compiler, nmake et cetera, and a handy shortcut for a preconfigured `cmd.exe` that puts all of these tools in your `PA...
My advice is - build it as if there wasn't any NestJS at play. Think of it as of a standalone SDK. As agnostic as possible. It'll get supereasy to implement it into NestJS (or any other) architecture later on. --- Breaking code into logical parts is always an implementation decision. Sometimes it's pointless ...
"I'm considering pursuing a career path in software development, particularly in areas like ServiceNow and OutSystems development. However, I'm curious about how these roles might evolve in comparison to more traditional coding jobs, especially with the advancements in artificial intelligence (AI). Specifically, I'd...
Notification system using SpringBoot/WebFlux with React.js
|reactjs|spring-boot|spring-webflux|sse|server-sent-events|
I have a dataframe which has columns as per the screen shot below. I want to add an additional column "all_data" which will hold all the data of the columns in it. [enter image description here](https://i.stack.imgur.com/PJPeO.png) here is what i tried ``` from pyspark.sql.functions import collect_list, udf...
null
null
Reading bytes from a stream does not guarantee that it will read _all_ the bytes you request. try `readNBytes()` instead.
> Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named '<name>.storyboard' in bundle NSBundle <path> - check/recheck that storyboard file is in `Target Membership`[<sup>\[About\]</sup>][1] - recheck(remove/add) storyboard UIViewController `Custom Class...
null
**By using net module (not WebSockets), I want to create a real-time chat application with a simple TCP server. So far, I have been able to implement the text-based chatting system with net module. However, for instance, I cannot write a code that sends image in real-time. By using net module, I want to write a TCP ser...
What is the future of serviceNow developer and outSystems developer jobs as compared to actual coding jobs considering AI?
|servicenow|outsystems|xenocode|
null
|azure|powershell|charts|azure-active-directory|
I'd re-ask this as a question as I don't think there's much value in this being a PHP discussion. If you do ask it as a question you will also need to provide more details like e.g. which .dll you downloaded and if it's listed as compatible with your php version, where you placed the .dll etc
null
null
{"Voters":[{"Id":3558960,"DisplayName":"Robby Cornelissen"},{"Id":635608,"DisplayName":"Mat"},{"Id":243373,"DisplayName":"TT."}],"SiteSpecificCloseReasonIds":[19]}
In my case the error was `exception emyxerror in module mysqlquerybrowser.exe at 00103cd2 error while loading stored connections.error number 11.` I have searched how to uncheck "Beta: Use Unicode UTF-8 for worldwide language support" as the user @alexandr-denschikov suggested. -Windows will ask you to restart yo...
This happened to me and after much research, i solved it by enabling Early Access Preview and downloading the latest kotlin version, go to file -> Settings -> then search eap or early access, Move out of stable and download the eap build
I Have a "For **Loop**" In ASP.NET Core Like This : `<button type="submit" Form="FormActive" name="id" value="@item.I"></button>` <!--It Will Create SomeThing Like This:--> <button type="submit" Form="FormActive" name="id" value="1"></button> <button type="submit" Form="FormActive" name="id" valu...
|html|jquery|forms|asp.net-core|post|
I'm trying to created an ASP.NET Core 8 Web API using only CLI and have the `program.cs` as shown below. When I run this from VS 2022, no compiler or runtime errors are appearing. But when this is run from a "docker-compose up" I dot get specific error: > 2024-03-28 17:54:11 Unhandled exception. System.Invalid...
I'm automating my login process to my servers using an inline bash script, I'm using expect to automate this, but upon logging into server I also want to print a message, I didn't had any luck with echo because I read in a stackoverflow post that it's not reliable cause I want to use color coding, now I'm using printf ...
How can I pass commands to SSH when using expect while it doesn't support using doube quotes?
|bash|ssh|formatting|expect|curly-braces|
null
With anything that involves sending messages, always try looking at the actual messages: for IP networking, tcpdump; for D-Bus, use `busctl monitor` or `dbus-monitor`. For basic types, sd_bus_set_property() doesn't want pointers to the value &ndash; it wants the value directly, so your pointer-to-bool is always inte...
{"Voters":[{"Id":49849,"DisplayName":"user1686"}],"DeleteType":1}
Try to go from the opposite, using Python, create a test.csv next to your file. If you manage to create a file, read test.csv This is how you check if the path is available for the user you are working under.
If you have your csv data imported into database table or you can have it as a dataset like: ~~~sql /* FID A_DATE ORIGINAL_AIRPORT AIRLINE_NAME AIRCRAFT_TYPE IS_HEAVY --- ---------- ------------------ -------------- -------------- --------- 1 2024-02-25 101 Ryanair A-320 no ...
Node.js Broadcasting Image In Real-time
|javascript|node.js|tcp|chat|real-time|
null
I've asked a few questions here in the past and everyone has been very gracious about answering me. I am about as 'beginner' as it gets. Thank you in advance. So I am using the premium version of the Rank Math SEO plugin for wordpress. Regarding the SCHEMA creation feature: The issue is that the plugin pulls the aut...
Beginner | Hardcode an image URL path in php | Modify Rank Math Wordpress Plugin