instruction stringlengths 0 30k ⌀ |
|---|
Why does my Web App run fine in debug but not when it is a Windows Service? |
|c#|windows-services|asp.net-core-webapi| |
I know `serialVersionUID` is used serialization and deserialization. I read https://stackoverflow.com/questions/285793/what-is-a-serialversionuid-and-why-should-i-use-it
So if we are using distributed cache like hazelcast or coherence or redis we need serialVersionUID. Example entity or VO classes needs that. My que... |
Has anyone experienced issues when running a command like this in SSMS?:
```
SELECT STRING_AGG(JSON_ARRAY(COL1, COL2, COL3 NULL ON NULL), ', ') FROM {schema}.{table}
```
In my case this closes the connection to SQL Server with error:
Msg 109, Level 20, State 0, Line 42
A transport-level error has occurred w... |
Combining STRING_AGG with JSON_ARRAY in T-SQL |
|json|sql-server| |
null |
I have:
* a Node.js app that uses the Box Content API, and...
* a Box app, just so I can register an Oauth2 client_id, client_secret and redirect_uri with my Box repo.
My current redirect_uri is "http:/localhost:3000". The app works fine if I run locally, It fails miserably if I deploy to Bluemix (e.g. "https:... |
> If I emit an event from an operator after holding it in state for certain duration will the downstream operator accept it if it is past the watermark?
That depends on the behavior of the downstream operator.
Some operators pay attention to timestamps and watermarks, and some don't. The operators that are affect... |
This is a common race conditions that happens when people double-clicking to submit a form.
The double click leads the browser to send two requests to the web server. And both requests are processed by two different server processes or threads at the same time. Both processes check if the user already exists at the... |
There are several issues in your code, e.g:
- `sk_pcd` contains the wrong private key;
- even if `sk_pcd` would contain the correct key, it is not imported anywhere, instead a random key is applied;
- `DeriveKeyFromHash()` does not determine the *raw* shared secret, but its hash;
- during processing, two shared sec... |
{"Voters":[{"Id":3924803,"DisplayName":"Hans Kilian"},{"Id":596285,"DisplayName":"BMitch"},{"Id":839601,"DisplayName":"gnat"}]} |
The following code will perform the search of the active sheet as described.
- Column A: Artist name
- Column B: Song title
- Column C: Release year
A text search of `Column A` finds all of the rows which match the artist.
The list of rows is filtered using `Column B` to match the song title and the valu... |
I noticed an issue after I installed breeze on my Laravel application.
When trying to register my user I was receiving the following error:
``` Call to a member function prepare() on null ```
Which pointed to the following :
```
$user = User::create([
"name" => $request->name,
... |
I'm using slash commands in pycord. Normally, to respond to a user's command, one can use the `ctx.respond` method, like so:
```python
@bot.slash_command(description="Say hello.")
async def say_hello(ctx: ApplicationContext) -> None:
ctx.respond("Hello!")
```
But what if I want to reply in another channel? ... |
How to respond to slash command in different channel? |
|python|pycord| |
In the Selenium application properties folder, we have given the environment two options to select from but after running a test and switching from one to the other the test is showing a bias for one particular env setting instead. One I didn't select.
Any ideas as to why this would occur? And how to fix it?
Are... |
The Selenium application properties folder holds two environment options. After running a test the environment setting changes to a previous setting |
|java|selenium-webdriver|caching|properties| |
null |
Although setting the pandas option to view all columns is one option, but the printed table isn't pretty. Hence, I'll recommend the use of tabulate pkg
Way1: Print all columns after enabling the pandas option.
import pandas as pd
pd.set_option('display.max_columns', None)
print(result)
Way2: Pr... |
KeyFeatures for Product implementation |
|django-models|django-rest-framework|django-views| |
null |
I'm following a CRUD tutorial using Flask and SQL Alchemy.
In the tutorial, when he runs this code, it's created a folder called 'instance' and inside it there's the .db file.
When I do the same, the folder is created but not the file. I checked over and over this code, and it matches with his, so I couldn't fi... |
SQL Alchemy not creating db |
|python|flask|flask-sqlalchemy| |
The wait is over.
Today, SAP published their Common Crypto Library version 8.5.54 also for Linux on ARM64 and for macOS on ARM64, paving the way for using SNC on these platforms now as well.
The SAP Common Crypto Library can be downloaded from SAP's Software Download Center. |
I'm experiencing an issue in my Flutter app where the theme momentarily flickers to dark mode before switching to the correct light mode upon hot restart and app launch. I'm utilizing [SharedPreferences ](https://pub.dev/packages/shared_preferences)to persist the theme preference and Bloc for state management.
**Cub... |
```shadcn``` is build above ```radix```
"Select" is not a normal html tag
it a "radix" component
```defaultValue={branch}``` instead of ```value={branch}```
and
```onValueChange={value=> setBranch(value)}``` instead of ```onChange={(e) => setBranch(e.target.value)}```
that simple
for more http... |
I have a class:
```
class ColorTheme: ObservableObject {
@Published var lightColor = Colors.light
}
```
and I can use it in all my views like that:
```
struct ContentView: View {
@EnvironmentObject private var colorTheme: ColorTheme
...
}
@main
struct MyApp: App {
var body: some Scene {
... |
{"Voters":[{"Id":-1,"DisplayName":"Community"}]} |
How can I populate items.add on Android Studio |
If the id is dynamic and you can't use it, you can use class to select the element.
Your html element has `collapsed focus-visible` class.
If you don't want to use it, and rather use __filterButton__, you should edit your html and add __filterButton__ to classes.
(currently on your html, 'filterButton' is not de... |
You are mixing normal and programmatic use of `dplyr`. Namely, ``` filter(`temp.name` == "yes") ``` is looking for a column named `"temp.name"`, not a column that is indirectly referenced in the local variable `temp.name`.
I think this may be what you want?
```r
library(dplyr)
library(tidyr)
tmp <- pivot_longe... |
null |
|typescript| |
In VS Code, when sending Python lines to terminal, why do I have to re-send lines that set a variable to an edited value before the lines that use it? |
I have an add form, which adds a record in a table and get back the newly createdId of that record.
On the same page, I have another form which has a select2 element and I would like to perform the search automatically using the new createdId without to ask from the user to search in the select2 element. The goal is... |
I work in VS Code in Python and use conda environments.
Previously, the environment, after selecting it as a python interpreter, was automatically activated in the terminal. Currently, auto-activation does not occur for locally created workspace environments. It is still activated when you run the python script, but t... |
Auto-activation of the conda environment in the terminal (ps, cmd, bash) in VS Code on Windows 11 does not work. How to solve this problem? |
|python|visual-studio-code|terminal|anaconda| |
null |
I'm student in practicing PintOS Project.
In Programming Project 3(Virtual Memory), I got ploblems about "preprocess in compiling" (C program).
I had tried all attempt that do my best, but I'm absolutely lost at this point on how to fix it.
Finally i come to here, had to ask you about this issue.
**error**
T... |
Is there are a way to determine process stages from inside a library |
The query looks like this:
**Datatype for month.ty is text**
```
month.ty LIKE '%2024%'
```
I am trying to make it **get year without having to change it when year ends**. Like get current year.
I have tryied with plus special character:
```
month.ty LIKE '%' + YEAR(current_timestamp) + '%'
```
This way it ... |
There is a feature request in the backlog:
https://github.com/microsoft/vscode-remote-release/issues/5906
|
Terraform loop over Map variable to provision multiple Databricks catalogs |
|terraform|terraform-provider-databricks| |
It looks like if your Gmail account has 2FA enabled,
you'll need to generate an App Password specifically for use with mail clients or applications: https://support.google.com/accounts/answer/185833?hl=en.
Due to security changes, Google SMTP no longer accepts "plain" authentication as of February 15, 2021.
Howev... |
The “culprit” is actually the Rosetta daemon, which is probably used to speed up Rosetta:
For Parallels, the daemon is `/media/psf/RosettaLinux/rosettad`
It creates cache entries in `/var/cache/prlrosettad`
Killing the daemon is enough to allow IDA to start. Not ideal, but it's a good workaround until Apple(?) ... |
Thank you very much Remy Lebeau, it works and I pasted the code above. |
I ended up doing a bunch of manual testing, and in the end the findings are as follows:
- The **original function does not work as it should** based on the requirement, because it sometimes produces duplicate results. (I did not investigate exactly in which cases, but it has to do with overlap between the different... |
Azure notification hubs introduced FCM V1 functionality recently.
Go to Firebase console, Select your project then project settings.
Then go to Service Accounts tab. Here you can find a button `Generate new private key`. This will give you a JSON file that you will need in next step.
In your notification hub i... |
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.14</version>
</dependency>
make sure add above dependency in your pom.xml and replace org.springframework.web.context.support.ServletContextPropertyPlaceholderConfigurer... |
null |
I'm using Microsoft Message Analyzer to trace network traffic. However, I cannot find an option to disable the resolution of IP addresses to their domain names. This function was called AutoIP (Auto IP Address Resolution).
I'm aware of Wireshark, but what's crucial for me is to display the process name alongside oth... |
Microsoft Message Analyzer disable resolving IP address to their domain names a.k.a turn off AutoIP feature |
|networking|wireshark|microsoft-message-analyzer| |
@MainActor + Combine inconsistent compiler error |
I've been trying to implement methods to add some shadow effects to some parts of the UI (i.e. the header and footer) and was told to import/install PySide (or PyQt) and QT-PyQt-PySide-Custom-Widgets (note I have PyQt5/6 and PySide6 installed) However, setGraphicsEffects doesn't seem to work. In other words, it acts li... |
Okay, so in true software engineer fashion I have found the solution just after asking the question.
Going to post an answer in-case anyone comes here in the future.
The issue was that the logs were not getting flushed and therefore not sent.
I added the following in the `OnStop()` method of my service as well... |
The feature you need to use is named "Transaction Services" and can be found in the [documentation][1] and forums using this name.
There are several parts for this feature to work:
1. Users/Security, Your user has to have the correct permissions to create and use the transaction (best to use Workstation and searc... |
I've successfully set up the Android emulator on macOS using command line tools, here are steps:
1. **Unzip Command-line Tools:**
Place the command-line tools in your SDK directory:
```
/Users/MYUSER/Library/Android/sdk/cmdline-tools/latest
```
Ensure that the `bin` directory is at:
... |
Add newly added record to select2 element |
|javascript|ajax|jquery-select2| |
|html|caching|cloudflare| |
Cloudflare (what you are using) has a server side cache as well, see https://support.cloudflare.com/hc/en-us/articles/202775670-Customizing-Cloudflare-s-cache. Clearing the client side cache in your browser has no affect on the server side cache used by cloudflare. Specially check https://support.cloudflare.com/hc/en-u... |
We are using MSBuild through command line for daily builds. The build fails now about 70% of the time but not always. The solution has multiple WCF projects that are being published.
When going through build logs we notice when MSBuild is trying to publish the first service and if it fails the build is trying to cop... |
MSBuild trying to copy different dll with similar name into project sporadically |
|c#|asp.net|.net|msbuild| |
null |
I am having a bit of an odd problem that I have never experienced before. I have checked the net and asked someone but could not find the answer. When I work on my website and publish it, the CSS will not update unless I put a ?vh=1 at the end of the CSS links. The [site][1]
<!DOCTYPE html>
<html lang="en">... |
|python|google-chrome| |
null |
I would say that the 10 values returned by `estimateEffect()` are the result of the b-spline basis function generated by the `s()` function on `Year` covariate.
My guess is that the spline transformation must split the `Year` values by deciles for fitting non-linear relations between topics and the covariate. But it... |
Mac M1, Docker version 25.0.3
I enjoy a good keyboard shortcut. The most useful of my shortcuts so far has actually turned out to be simply opening specific applications with one press: "hyperkey + V" opens VS Code, "hyperkey + t" opens terminal, etc. i have found this approach to be much more useful than using "cmd... |
{"Voters":[{"Id":1431750,"DisplayName":"aneroid"},{"Id":14732669,"DisplayName":"ray"},{"Id":272109,"DisplayName":"David Makogon"}]} |
I need to implement Firebase push notification, so I added the packages of latest version into my Maui .net8.0 project. Here are the packages added in csproj file for push notifications. I'm getting error when I upgraded to the latest version of these packages related to error- JAVA0000.
<ItemGroup Conditi... |
null |
For context, this is a standalone WebAssembly Blazor app.
I have a table from MudBlazor (shortened for readability):
```
<MudTable Items="@Items"
@bind-SelectedItem="_selectedItem"
CanCancelEdit="true"
OnCommitEditClick="@(() => ItemChangeCommitted())"
RowEditPreview="... |
The `CGSRegionRef` type is an undocumented/appkit internal CFType that seems to be able to decompose an arbitrary region into union of rectangles. However, while the underlying APIs have been reverse engineered for some time now, I'm having trouble actually understanding the debug output from NSLog'ing an region ref. ... |
CGSRegionRef: How is an arbitrary region represented as union of rects? |
|cocoa|geometry|reverse-engineering|appkit| |
I was very curious about .bson binary file produced by [mongodump][1].
At first, my guessing was BSON Array ```Bson::Array(array_of_documents)```
Then:
```toml
#Cargo.toml
[dependecies]
...
bson = "2.1.0"
```
```rust
//main.rs
fn main()
{
let mut path=std::env::current_dir().unwrap();
path.pus... |
Reading .bson file with Rust |
|mongodb|rust|binary|bson|raw| |
Then I thought.. what if it was a Document ```Bson::Document(bson_data)```?
```rust
//main.rs
fn main()
{
let mut path=std::env::current_dir().unwrap();
path.push("backup/transactions.bson");
if path.exists() {
match std::fs::File::open(&path)
{
Err(err)=>panic!("Fa... |
I have a program I created in Visual Studio that has a list of programs and checkboxes for each. You select which programs you want and then it silently installs without user interaction. I'm trying to add a progress bar to this, but can't seem to get it working properly.
My progress bar is setup during form_load
... |
Progress Bar increment while running |
|vb.net|progress-bar| |
Much has changed in the last 8 years. The syntax to do what is asked in this question is as follows:
```c#
await using var stream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 16384, FileOptions.Asynchronous);
using var reader = new StreamReader(resultStream);
string fileContent ... |
If the workers are taking too long to boot, or running into timeouts, you can also adjust the [Gunicorn](https://gunicorn.org/) configuration file `gunicorn.conf.py` to increase the number of workers or adjust the timeout settings:
```python
import multiprocessing
workers = multiprocessing.cpu_count() * 2 + 1 #... |
Flutter Theme Flickers Briefly Before Switching to Light Mode |
|flutter|dart|themes|sharedpreferences|bloc| |
null |
Verify CRAN Repositories
options(repos = c(CRAN = "https://cloud.r-project.org"))
Use an Alternative CRAN Repository
options(repos = c(CRAN = "https://cran.rstudio.com/"))
install.packages("tidyverse")
Check Your R Version: If your R version is outdated, some packages may not be compatible with it. |
I have a custom `get_posts()` query that loads Simple and Variable products, I am posting my code that works when I am filtering simple products but variable products use a different field which should be `variable_regular_price[$key]` however... If I just use it, it doesn't work, any idea of how to filter variable pro... |
Filtering WOO Variable Products using get_posts |