instruction
stringlengths
0
30k
|database|devops|keycloak|customization|keycloak-rest-api|
null
> Can a base-class (constructor) detect if a derived constructor threw an exception? No. The base class constructor is executed before the derived class constructor. By the time you throw the exception, the base class subobject is already constructed. Assuming you want to stay with inheritance you can turn t...
Add Proguard Rule > `-keep class io.grpc.internal.DnsNameResolverProvider { *; } -dontwarn io.grpc.internal.DnsNameResolverProvider -dontwarn io.grpc.internal.PickFirstLoadBalancerProvider`
Graham Lea's answer was great. Here I'll add a couple of improvements Jackson has made in recent years. - `ALLOW_TRAILING_DECIMAL_POINT_FOR_NUMBERS`*(Since 2.14)*: Numbers may have a trailing decimal point. - `ALLOW_LEADING_PLUS_SIGN_FOR_NUMBERS`*(Since 2.14)*: Numbers may begin with an explicit plus sign.
I use a IActionResult to get a List<Object>. If I have a list, the result is ok. If I use a List<User>, the elements of the result are empty. If I use a generic List, it works: ``` public IActionResult GetData() { var erg1 = _database.table.Select(x => new { x.Id, x.firstname, x.lastname }); return Ok(...
override public func tintColorDidChange() { super.tintColorDidChange() if traitCollection.userInterfaceStyle == .dark { ... } else { ... } }
I want to read a file (object) from S3 bucket in Mule 4. I have access to read/write file only to this bucket. Hence when I enter access key & secret in global config of AWS S3 connector and do 'Test connection', I am getting Access Denied error. The way we can access in WinSCP is using using remote directory opti...
Well the error is quite clear, you try to access `http://127.0.0.1:8000/`, but there is no `path` in your `urls.py` that matches this. You can visit <code>http://127.0.0.1:8000/<b>members/</b></code>, or <code>http://127.0.0.1:8000/<b>admin/</b></code> given these point to views and are not just includes, but you can n...
You don't have to read the entire file in at once as there is an argument with the `read_csv()` function. You would just need to modify your code to ``` df1 <- read_csv( "sample-data.csv", col_names=c("D","B"), col_select=c("D","B") ) ``` If the file does not in fact contain a header than you would call...
A return type changed from "const Bar& getBar()" to "const Bar getBar()". If i use: const auto& bar = getBar(); and the return type changes. I have a reference on a temporary object. If i use: const auto bar = getBar(); i always make a copy of Bar. What is The best practice for this problem? ...
Handling Type Changes with auto in C++
|c++|reference|return-type|auto|
null
Re: Postgres, it depends: `select 1::numeric(4,2); 1.0` vs `select 1::numeric; 1`. This is due to [Postgres Numeric](https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL): >(The SQL standard requires a default scale of 0, i.e., coercion to integer precision. We find t...
I've been trying to do something pretty simple, but with no success. I have a tensor (say ```X``` of shape ```(None, 128)``` containing some scores, in other words each batch has 128 scores. Now I apply ```Y = tf.math.top_k(X, k=a).indices``` here ```a``` indicates the top ```a``` scores. Let us consider for simplicity...
You are getting the errors because you have not indented after your if-statements, the engine expects to run everything **one indentation in** from the if-statement if it evaluates to `true`. Hence solving your errors for each if-statement would simply be i.e. ``` yaml - ${{ if contains(parameters.host, '_T1_')...
I'm using AWS S3 and MongoDB in a full-stack react application. When I add a new recept in front-end it works normally. But once in a while it changes the rndImageName which I create on back-end. Images uploads to S3 fine. Is there better way to do this? ``` multer.js const randomImageName = (bytes = 32) =...
Adding new object to mongoDB changes the previously added object
|javascript|reactjs|mongodb|amazon-web-services|amazon-s3|
null
I have a couple of DLL library projects created with Visual Studio. One of them is using C# and the other is using C++/CLI. The library written in C++/CLI provides a C interface to the C# library so it can be called from Dart through FFI. I would like to create a Flutter plugin using FFI to wrap these libraries into...
Dynamic Gradient in Vega Via Signals
I have a ligh Python app which should perform a very simple task, but keeps crashing due to OOM. ## What app should do 1. Loads data from `.parquet` in to dataframe 2. Calculate indicator using `stockstats` package 3. Merge freshly calculated data into original dataframe -> **here is crashes** 4. Store dataframe...
If the software that you use to open the content allows opening anything other than file then yes. It may be a named or unnamed pipe, shared memory, OLE IStream interface, etc. Otherwise it may be complicated but [still possible][1]. In the worst case you can use ordinary temporary files, but do not forget to use...
null
{"OriginalQuestionIds":[142132],"Voters":[{"Id":2756409,"DisplayName":"TylerH"},{"Id":1974224,"DisplayName":"Cristik"},{"Id":874188,"DisplayName":"tripleee"}]}
Nevermind, turns out I wasn't creating the S3 object ARN right. With: ```yaml Resource: !Sub - arn:aws:s3:::${OtaImageBucket}/* - OtaImageBucket: !ImportValue OTAFirmwareS3BucketArn ``` My target ARN had `arn:aws:s3:::` twice. Fixed that and it worked. P.S The reason...
I want to make a k- means segmentation with python. My code works on jpg images, but when I try it with geotiff, it only makes the image black and white. How can ı solve this problem? Here is my code below; ``` import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.image as mpimg from sklearn...
Segmentation with Geotiff image
|python|machine-learning|image-segmentation|
null
I've tried using $\partial$ in a ggplot title but unfortunately it did not render correctly. In fact, when I try this example (https://uliniemann.com/blog/2022-02-21-math-annotations-in-ggplot2-with-latex2exp/), a lot of symbols are wrong. What could be the reason for this? # Copied example from link libr...
We have setup Azure App insights(APIM) for the API logs tracking. In logs we are storing API url,API request payload,API response message,API response error code. Now I need to create one api which will read the error log messages in APIM and return API error message in response. From API we will hit a Qusto query w...
How to read the API error message from Azure APIM using the qusto query hit from c# code in Rest API
|c#|azure|.net-core|azure-api-management|
null
I use a IActionResult to get a List<Object>. If I have a list, the result is ok. If I use a List<User>, the elements of the result are empty. If I use a generic List, it works: ``` public IActionResult GetData() { var erg1 = _database.table.Select(x => new { x.Id, x.firstname, x.lastname }); return Ok(...
The error message indicates that the Azure Resource Provider for the AKS (Azure Kubernetes Service) service, specifically for the version '2022-01-02-preview', `is not registered` in your Azure subscription for the 'uksouth' location. Register az provider register --namespace Microsoft.ContainerService ![e...
null
I've connected my powerbi for direct flow of the data with pgadmin which directly get the data from the aws. But I can't view my tables which I selected in the table view section. It shows as "this table cannot be shown because it is not in import mode". I tried checking with the settings and it is all fine but don't k...
this table cannot be shown because it is not in import mode
|postgresql|powerbi|powerquery|pgadmin|
null
I think this solution can help you. 1. Create ```__init__.py``` file in the src module 2. modify your import instructions in the ```messaging.py``` like this: ``` from src.auth import auth ``` 3. use auth functionality
I set up mailtrain to send emails using AWS SES. However, the emails bounce with the following reason: " The security token included in the request is invalid." [Image 3](https://i.stack.imgur.com/QRJWn.png) Additionally, emails get sent successfully sometimes, but majority of time I get the error.
This helped me (node v 20, using Docker) RUN rm -rf server/node_modules/sharp && npm --prefix server install sharp
You can try, OpenPubkey to SSH Without SSH Keys. Following are the links for more information. - https://www.docker.com/blog/how-to-use-openpubkey-to-ssh-without-ssh-keys/ - https://www.bastionzero.com/blog/why-you-should-use-bastionzero-to-secure-access-to-your-k8s-clusters?utm_content=248533620&utm_medi...
> server doesn't seem to be responding Step 0: -------- One server-side SLOC, `stream = ZMQStream( socket )` calls a function, that is not MCVE-documented and must and does fail to execute to yield any result: `"ZMQStream" in dir()` confirms this with **`False`** **Remedy:** repair the MCVE and also `print( ...
I wrote Kotlin extension function for that: fun View.isViewFullyVisible(): Boolean { val localVisibleRect = Rect() getLocalVisibleRect(localVisibleRect) return localVisibleRect.top == 0 && localVisibleRect.bottom == height }
Build, rebuild, and clean operations were being skipped. Unloading and reloading didn't help, and neither did restarting Visual Studio. Once I removed the project from the solution and added it back, it is no longer skipped. To remove it, in Solution Explorer, right-click the project > Remove > OK. To add it back...
I'm trying to implement RAG with Mistral 7B LLM in google colab but when I try to query i get an error here's my code : ``` index=VectorStoreIndex.from_documents(documents,service_context=service_context) query_engine = index.as_query_engine() response=query_engine.query("my question") ``` the last line gi...
KeyError: 'query' when calling query from query_engine
|artificial-intelligence|large-language-model|llama-index|retrieval-augmented-generation|mistral-7b|
null
The problem is caused by spark version 3.4.2. Upgrading the spark version from 3.4.2 to 3.5.1 solved the problem spark upgrade procedure ----------------------- remove old spark version sudo rm -rf /opt/spark/ download [Apache Spark 3.5.1 tgz archive][1] into `Downloads/` unpack the archive ...
{"Voters":[{"Id":7658051,"DisplayName":"Tms91"}]}
I have this document structure: { "name": "ab", "grades": [ { "grade": "A", "score": 1 }, { "grade": "A", "score": 12 }, { "grade": "A", ...
You can do this in tidyverse without any additional packages if you are prepared to use a little maths: ``` r make_pie <- function(x, y, size, groups, n, rownum, aspect = 1) { angles <- c(0, 2*pi * cumsum(n)/sum(n)) do.call("rbind", Map(function(a1, a2, g) { xvals <- c(0, sin(seq(a1, a2, len = 30)) * size,...
null
I am trying to make a private youtube channel. When I follow instructions I've found like from tutorials like [this](https://castos.com/make-a-youtube-channel-private/), the channel dissapears completely. When I search the YouTube help center directly I don't even see a hit for how to make a channel pri...
Making a YouTube Channel Private
|youtube|
null
I have the problem, in the previuos code I was calling the availableOn as argument that's why it didn't work, here is the correct code: @script <script> $wire.on('appointment-modal', async (event) => { let data = await event.availableOn; console.log(data); con...
`response.json()` returns a promise, you should wait until it will be fulfilled. To do that you can use `Promise.all` with array of two elements: `statusCode` and `response.json()` call: return fetch(url) .then(response => { const statusCode = response.status; const data = response.json(...
{"OriginalQuestionIds":[819161],"Voters":[{"Id":10289265,"DisplayName":"Hao Wu"},{"Id":87015,"DisplayName":"Salman A"},{"Id":162698,"DisplayName":"Rob"}]}
The [handle class](https://www.mathworks.com/help/matlab/handle-classes.html) and its copy-by-reference behavior is the natural way to implement linkage in Matlab. It is, however, possible to implement a linked list in Matlab without OOP. And an abstract list which does *not* splice an existing array in the middle t...
I have a AspNetCore app in net6.0. The user is asked to login against Azure Ad (Entra). After this is done, the web app needs to make a call to an API. The endpoint it hits has a scope requirement. This is a scope the web app registration has permission for in Azure. How do I get a hold of a token containing th...
AcquireTokenForUser in ASP.NET Core Web app
|asp.net-core|authentication|.net-6.0|azure-ad-msal|msal|
null
Why I imagine happens: While you enter your notes you already type `n`, `o`, `t`, `e` or `s` => You think you are at the beginning of the sequence when the window is closed but you might not be. Thus when you type the first letter `n` (again) when starting the sequence instead it resets and ignores the rest as we...
The problem is that, whenever i tried to checkout if it's not login it goes to the link "http://localhost:3000/login?redirect=shipping" to login and then goes to shipping side where it has to put address etc. but it redirect to this http://localhost:3000/login/shipping but it has to to redirect to this http://l...
How to integrate Visual Studio solution build into flutter build system
|flutter|windows|visual-studio|cmake|msbuild|
null
I need help please. I have a Dialog screen on mfc. In this screen, it has an "Add" button wherein it displays its member (up to 8) when it is clicked. I wanted to implement a scrollbar after Member 6 is added. How can I possibly implement as such. The code is with C++ and using MFC. Kindly advise. Thank you. ![Di...
Look in Tools > Options > Font
The input shown is malformed so `read_xml` will give an error. Since the question indicates it works there must have been a transcription error in moving the XML to the question. We have added a close div tag before the 4th opening div tag in the Note at the end. Since the XML uses a namespace, first strip that ...
I'm using df.compare where I'm doing a diff between 2 csv's which have same index/row names, but when it does df.compare, it does the diff as expected but gives the row index numbers as 0,2,5,... where ever it find the diff between the csv's. What I'm looking out is instead of the row numbers where It finds the diff, ...
Understanding $not in combination with $elemMatch in MongoDB
|mongodb|mongodb-query|
Here is the complete content of my .pro file (I have specified to add the network module): ``` QT += quick virtualkeyboard network # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disab...
module "QtNetwork" is not installed
|qt5|c++14|qnetworkaccessmanager|
null
This can be done using `do.call` which allows for variable args to be passed through to a function. This also allows for the expansion into allowing multiple parameters to be passed through and parsed (e.g. `use_x` and `use_y`) ``` run_benchmarking <- function (parameter_combinations, run_names) { benchmark_list...
I'm running the following query in QuestDB: ```sql SELECT timestamp, first(price) AS open, last(price) AS close, min(price), max(price), sum(amount) AS volume FROM trades WHERE symbol = 'BTC-USD' AND timestamp > dateadd('d', -1, now()) SAMPLE BY 15m ALIGN TO CALENDAR; ``` How can...
I have a C# game emulator which uses TcpListener and originally had a TCP based client. A new client was introduced which is HTML5 (web socket) based. I wanted to support this without modifying too much of the existing server code, still allowing `TcpListener` and `TcpClient` to work with web socket clients connect...
For now, the best solution seems to be using macros: MyPage.html ``` {% import 'header.html' as header %} {% extends 'base.html' %} {% block header %} {{ header.header("test1", "My Page") }} {% endblock %} ``` base.html ``` <!DOCTYPE html> <html>     {% block header %}{% endblock %}     <body>      ...
I am creating application in react using router below is my code main.jsx ```jsx import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.jsx' import './index.css' import { Router } from 'react-router-dom' ReactDOM.createRoot(document.getElementById('root')).render( <Rea...
|javascript|reactjs|react-router-dom|
Suppose two different processes simultaneously call `os.makedirs(path, exist_ok=True)`. Is it possible that one will raise a spurious exception due to a race condition? My fear is the call might do something like this under the hood: ``` if not dir_exists(d): try_make_dir_and_raise_if_exists(d) ``` I ca...
Is os.makedirs(path, exist_ok=True) susceptible to race-conditions?
|python|
I made a simple Rest API in .NET 8 . It must connect to SQL Express. If I run it with https it works fine and connects to the DB. If I run it with Docker or Docker compose itworks but does not connect to the DB. Here it is my Dockerfile: ```FROM build AS publish ARG BUILD_CONFIGURATION=Release RUN dotnet publish "....
Not redirecting to the required link
|reactjs|react-hooks|react-router|react-navigation|
null