I want to cache a variable during a query on Postgres 12: -- BEGIN PART 1 with cached_vars as ( select max(datetime) as datetime_threshold from locations where distance > 70 and user_id = 9087 ) -- END PART 1 -- BEGIN PART 2 select * from locations where user_id = 9087 and datetime > (select datetime_threshold from cached_vars) -- END PART 2 I expected runtime to equal part1 runtime + part2 runtime but it takes a lot longer. There is no performance issue when I run only the 2nd part with manual datetime_threshold. locations table columns: id | user_id | datetime | location | distance | ... How
I have an existing Kotlin project. I am running Java 11. Recently I updated it with mvn -U clean install, and this particular test stopped working. import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith import org.springframework.boot.test.context.SpringBootTest import org.springframework.test.context.junit.jupiter.SpringExtension @ExtendWith(SpringExtension::class) @SpringBootTest class QuickCheck { @Test fun loadContext() { } } I have many dependencies but the most relevant to this case, I think, are: spring-cloud-context: 2.2.6.RELEASE spring-cloud-kubernetes-co
I have merged a feature branch into develop and now need to revert this merge. In Azure devops when I did the pull request I couldn't see any option to squash commits (new to azure devops) and so the develop branch history looks like this.. So the point at which I merged the branch is 61575 but it includes all the commits on the branch. I need to revert all of the merged branch and all those commits so that the develop branch is showing as commit 0063d782. How would I do that please? Many thanks for any help
I try to use openapi-generator-maven-plugin together with Spring Boot 2.4.3 to generate code by the specifications made in an openapi.yaml according to some examples on the internet whereby no example provided the complete dependencies necessary to include. The plugin generates a class named OpenAPIDocumentationConfig which internally uses the imported class springfox.documentation.spring.web.paths.RelativePathProvider. AFAIK this class is deprecated in favour of class DefaultPathProvider but I can't find a repository with this new class. Here's my POM: <properties> <java.version>11</java.vers
By using Symfony Panther, I sent a request and I wanted to get the response. I was able to get the body and the status code but for the header I just got an empty array. $client = Client::createChromeClient(); $client->request('GET', 'https://google.com'); $client->getInternalResponse()->getHeaders(); // returned empty array!!!
I created Settings Activity where I want users to change the app language inside this activity. I created all the resources for these languages. When I go to Settings Activity and change the language let's say to Russian, the language inside this activity changes and when I go back to Main Activity the language is not changed yet. In order to change whole app language I have to go to About Activity to apply all these changes. About Activity has only a toolbar a few Text Views Also, My Main Activity contains tab layouts with view pager where I added two fragments. LocaleHelper class import andr
My machine learning model dataset is the Cleaveland database with 300 rows and 14 attributes, predicting whether a person has heart disease or not... But the aim is create a classification model on logistic regression... I preprocessed the data and ran the model with x_train, Y_train, X_test, Y_test, and received avg of 82% accuracy... So to improve the accuracy, I did remove features that are highly correlated to each other (as they would give the same information). And I did RFE (recursive feature elimination). It was followed by PCA (principal component analysis) for dimensionality reductio
I am relatively new in programming using the C-language. So to lay it all out, I am still kind of clueless of what is happening. Now, may I ask why I can't seem to create an exe file and run the code? Actually, the first time I tried executing it, it worked. However, to make sure that it is working, I repeated it and then it didn't work anymore. To make things clearer: I use Mac Mac OS Big Sur In this particular case, gcc is the compiler I also tried using Code::Blocks also prior to this; however, I have similar issues -- after I built and ran my first "hello world" program, it didn't run the
I'd like to generate unique traceId per request and pass it through all services. In Spring MVC it was fairly easy by using MDC context and putting traceId in header, but in reactive stack it isn't working at all because of ThreadLocal. In general I'd like to log each request and response on every service I have with single traceId which can identify specific action in whole system. I tried to create custom filter based on article: https://azizulhaq-ananto.medium.com/how-to-handle-logs-and-tracing-in-spring-webflux-and-microservices-a0b45adc4610 but it's seems to not working. My current soluti
I want to change the color of React-icons. Say, for example {AiFillHeart} icon. I want to change its fill color to red. How can I do this? I have tried <AiFillHeart style = {{color: 'red'}}/>. But it does not works.
I've got a problem with configure trunk on asterisk with PJSIP(IP:X.X.X.X) to SIP-server(IP:Y.Y.Y.Y). I want to configure trunk by IP not with user:pass. On SIP-server i have config in sip.conf file like below: [asterisk-pjsip] type=peer context=tests host=X.X.X.X deny=0.0.0.0/0.0.0.0 permit=X.X.X.X qualify=yes disallow=all allow=g729 allow=alaw allow=ulaw nat=yes canreinvite=no insecure=port,invite and on SIP-server peer with PJSIP are available: asterisk-pjsip X.X.X.X Yes Yes A 5060 OK (11 ms) On PJSIP-Server i use script to convert SIP.conf to PJSIP.conf and in SIP.conf i have: [asterisk_si
This is the message I am getting using a Leaflet.js heatmap, and I can't see my circle markers, and I believe this is most likely the issue. Because a cookie’s SameSite attribute was not set or is invalid, it defaults to SameSite=Lax, which prevents the cookie from being sent in a cross-site request. This behavior protects user data from accidentally leaking to third parties and cross-site request forgery. Resolve this issue by updating the attributes of the cookie: Specify SameSite=None and Secure if the cookie should be sent in cross-site requests. This enables third-party use. Specify SameS
I am trying to use the TEdgeBrowser component in RAD Studio 10.2. I want to apply that component by following the guide document below: Using TEdgeBrowser Component and Changes to the TWebBrowser Component The document uses the component after installing the package through Edge search in Getit Package Manager. RAD Studio 10.2 GetIt was unable to find TEdgeBrowser: I downloaded the package from the Nuget site, and try to install the package manually. So I downloaded the nupkg file from the Nuget download link: Microsoft.Web.WebView2 Download Link In the document, the description of the compone
There is a shell script that builds a Docker Image (calling a Dockerfile). In the Dockerfile there are several CURL commands like this: The Docker Container is using base OS as : Debian GNU/Linux 10 RUN curl -s -L \ https://repo1.maven.org/ ... RUN curl -s -L \ https://github.com/CodeNarc/ ... \ -o codenarc.jar RUN curl -s -L \ https://repo1.maven.org/ ... RUN curl -s -L \ https://repo1.maven.org/ ... The above Dockerfile is running fine when the host machine is either Mac or Linux based. But when we are trying to run this on Windows host machine the 2nd curl command i.e. to “github.com” is fa
We are using Java Spring framework. We have an endpoint for passing email object. @RequestMapping(method = RequestMethod.POST, path = "/api/messaging/v1/emailMessages/actions/send") String sendEmail(@RequestBody Email email); Here checkmarx says: The email may unintentionally allow setting the value of cc in LinkedList<>, in the object Email. Email Object is as follow: public class Email { private List<String> bcc = new LinkedList<>(); private List<String> cc = new LinkedList<>(); private String content; private ContentType contentType = ContentType.TXT; private String from; private String ret
I have a problem with mask-image: I want to use a png (or svg) as a clipping-mask on an image, so the image is shown in a certain shape. I found several examples online of how to do that, but refer now to this one: https://web.dev/css-masking/. When I use the png the author used in their example, it works. However, if I use my own png (or svg), it does not. I made sure the image is reduced to a white fill and a transparent part, just as the one in the example. I also just changed the URL, nothing else. However, the clipped image is not visible. I know that it is possible to use the SVG in HTML
I use controls in a story to see different states of a component. Some props only make sense if some other prop is enabled. For example, I have 3 props: isEmployee - boolean isActive - boolean canContactInTheWeekend - boolean Here, canContactInTheWeekend applies only if isActive is true. To make it more clear for a developer, I'd like to disable canContactInTheWeekend toggle when isActive is false. How can I achieve it with standard Storybook setup or via some plugins?
I deployed my app in heroku, it's a simple laravel vue.js blog I'm still learning The problem is in the contact page, when I send mail from the localhost everything work perfectly but when I try to send the email from the website "http://scifiblog.herokuapp.com/" it give me this error { Expected response code 250 but got code "550", with message "550 5.7.1 Relaying denied "} I don't know where is the problem and i didn't find a solution Here is my .env : MAIL_MAILER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=*********** MAIL_PASSWORD=*********** MAIL_ENCRYPTION=tls MAIL_FROM_
If you want to run a command as admin on PowerShell on Windows, you can write something like this: Start-Process foo -Verb RunAs -ArgumentList '...' But it is not possible on Linux. Powershell will return you the following error: Start-Process: The parameter '-Verb' is not supported for the cmdlet 'Start-Process' on this edition of PowerShell. Indeed, According to the Powershell online documentation, "the [-Verb] parameter does not apply for non-Windows systems", so it is not possible to run Powershell as admin like this on Linux. My question is simple: how to elevate Powershell privileges on
I am using ASP .NET core web API (3.1). Where I need to authorized the user in 2 ways. First by SQL identity (with user name and password) and second by Azure AD SSO single tenant (by clicking Microsoft login button). I used JWT for SQL authentication and send back a JWT bearer token. This part is working fine. I need a way to do same JWT bearer token sending feature with Azure AD in same application. Please suggest.
We use SQL Server 2012 and using version 44.17763.831.0 of Microsoft Edge. Edge, it would appear is supported for viewing reports but not for managing them. The screenshot below shows how in IE we are able to click on the drop down menu and edit a report, this does not work in Edge. Does anyone know of a way around this or if the latest version of Edge now supports this? Or perhaps upgrading SQL server would help?
I'm reverse engineering a old parser application and the ASCII code 00A0 ("NO-BREAK SPACE") from a text file, is being parsed into 00E1 ("LATIN SMALL LETTER A WITH ACUTE"). What kind of encoding or coercion is happening, and how can I reproduce this behavior in C# ?
I have created on my main branch with on: push: branches: [ test ] I have noticed, that while I can trigger it manually, and it will work, it will not actually trigger if I push to test. For that, I needed to create that same action file on test. Now, it seems like I don't even need to have the action on the main branch, is that correct? So why does even the option so specify the branch that it should trigger on exist? It only triggers on the branches the file exists anyway. That said, I found it frustrating that I have to merge my one file from main to my test branch, is there a way to trigge
I'm trying to connect SAP Web IDE Personal Edition" (local Web IDE) following this tutorial: https://help.sap.com/viewer/825270ffffe74d9f988a0f0066ad59f0/CF/en-US/2cf47f37e34c428c97a51057733c0394.html But no connection happens. I guess the problem is in the host URL and the port. How can I get the URL? I tried using S4HANA URL but it didn't work. Also tried Fiori URL didn't work either. How to get the Gateway URL and port?
In WooCommerce add to cart Urls are like: https://domainexample.com/?add-to-cart=651 Is there an equivalent of add to cart urls for wix, like we have in WooCommerce?
I need to restrict guest access to certain links like 'fixtures/1' and 'fixtures/2'. When a guest tries to access other ids, like 'fixtures/3' for example, they should get a message like "page not found". I tried like this: Route::get('/fixtures/{team}', function ($team) { // })->where($team, '1')->name('front.fixtures'); but it doesn't work. How I can add clause like this? Here is my route without any changes: Route::get('/fixture/{team}', 'FrontController@fixtures')->name('front.fixtures'); I tried to restrict access using if, but everytime I open page, it doesn't check the id. Here is my me
I am hosting my .Net Core / Angular application. When I visit the URL of my application the first page takes more than 90 seconds to load. I found that these files are very big (15MB): styles.js, scripts.js, main.js, vendor.js, polyfills.js. So I used this website to minify the JS code https://jscompress.com/. Now my application is faster, but I think that it can be even faster. Is there any way to make it faster? click here to see the image
I hope I'm asking this in the correct forum: I'm writing a UDF in VBA for MS-Excel; it basically builds a status message for the transaction on that row. It steps through a series of IF statements, evaluating cell values in different columns FOR THAT ROW. However, this UDF will reside in multiple rows. So it might be in C12, C13, C14, etc. How would the UDF know which row to use? I'm trying something like this, to no effect Tmp_Row = Application.Evaluate("Row()") which appears to return a null What am I missing here ? Thanking everyone in advance
I am trying to identify if an Email is NDR or not. Using Microsoft.Graph, I trying to copy some emails from an email address to an external database. Because it could be the possibility to have emails that told me a specific email couldn't be delivered because of some reason, I want to skip them. I already check the properties of Message object, but I couldn't find something to help me in order to identify if that email is NDR or not. I am expecting to have a special flag or something like that. This is how I retrieve all the emails from the email address: var email = _graphServiceClient.Me.Ma