i am using Next.js version 8.0.4. the problem i'm facing is that when i first build the app and start it is taking almost 150 Mb memory on server but it grows gradually over time and it becomes very big in just 3 or 4 days depending on how many users are visiting my website. i have searched a lot about memory leaks and i don't think that i have done anything in my code that can cause a memory leak. i also have noticed that this growth in using memory is happening whenever i refresh the page or when i load it for the first time, in fact when the page is rendering on the server side. with every
I am pretty new using typescript with reactjs. Currently, the project I am working on is using a react-leaflet/leaflet specifically their GeoJSON component. I am running into a typescript error when I pass my data to the props. I have been doing some research on this, even installed the geojson package and followed their examples, https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/geojson/geojson-tests.ts, tried everything that I know but no luck. If I try to pass data as const GeoJsonData: geojson.Feature<geojson.Polygon, geojson.GeoJsonProperties> = { geometry: { coordinate
I have two services to build a Spring Boot application. But I always get CORS problems like this: Access to XMLHttpRequest at '.../websocket-cr/info?t=1581585481804' from origin'http://localhost:8080' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials. Springboot service on 8082 public void registerStompEndpoints(StompEndpointRegistry registry) { registry.addEndpoi
type Test = 'a' | 'b' | 'c'; function foo<T extends Test>(arg: T) { if (arg === 'a') { console.log(arg); } } like this.. I expect arg inferred 'a' in if block. but ts infer as just T. why this situation? I think that extends keyword has something...
I am stumped on this error and need some insight/assistance in solving it. I had a wildcard SSL cert issued by GoDaddy that expired and I removed and replaced the renewed cert on all SharePoint servers - * in IIS; * in Cert:\LocalMachine\Sharepoint; * in SharePoint SPTrustedRootAuthority * STS ... but I still get the following error: Server Error in '/' Application. NotTimeValid: A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file. Description: An unhandled exception occurred during the execution of the cu
The below is a very simple query where my_data consists only of 1 row, and it's there only to help me explain my issue better. WITH my_data AS( SELECT TIMESTAMP("2020-02-11 13:15:00 UTC") AS my_timestamp ,50 AS my_customers) SELECT DATE(my_timestamp) AS my_date ,my_customers FROM my_data WHERE my_date = "2020-02-11" This won't run in Google Big Query's standard SQL, although I recall running something similar in the past. The reason it won't run is that it doesn't know what my_date is, and my guess is because it's getting created in the same query. My question is: Can I filter by a new generat
I am doing some classification task for CIFAR10 with Pytorch and for each iteration I have to do some preprocessing on each batch before I would be able to feed forward to the model. Below is the code for the preprocessing part on each batch: S = torch.zeros((batch_size, C, H, W)) for i in range(batch_size): img = batch[i, :, :, :] for c in range(C): U, _, V = torch.svd(img[c]) S[i, c] = U[:, 0].view(-1, 1).matmul(V[:, 0].view(1, -1)) However, this calculation is very slow. Is there any way that I could speed up this code?
I'm trying to install PHP 7.1 with Homebrew. According to the Homebrew site I should type brew install exolnet/deprecated/[email protected] and all I get is configure: error: Please reinstall the iconv library. Reinstall does not help. Current version libiconv is 1.16. How fix this error?
I am getting the following error when deploying to production environment (via gitlab): Mongo::Error::NoServerAvailable: No primary server is available in cluster: #<Cluster topology= ReplicaSetNoPrimary[url1:27017,url2:27017,url3:27017,url4:27017,url5:27017,name=mobile01] servers=[ #<Server address=url1:27017 UNKNOWN>, #<Server address=url2:27017 UNKNOWN>, #<Server address=url3:27017 UNKNOWN>, #<Server address=url4:27017 UNKNOWN>, #<Server address=url5:27017 UNKNOWN>]> with timeout=30, LT=0.015 I have been trying to reproduce the error locally in a rails console, here is the configuration I h
I have this yaml definition and it gives the following error: missed comma between flow collection entries This is how my yaml looks like: create_bucket_lifecycle_policy: action: aws_boto3.boto3action input: params: Bucket: <% $.bucket_full_name %> LifecycleConfiguration: { Rules: <-- this is where error coming - {'Expiration': {'Date': <%= format(Sys.time(), "%d %B, %Y") %>}} } on-success: - create_inline_policy on-error: - fail can someone please help me?
Good afternoon, I have been doing a small development in C #, for the request in HTTP POST. I have the following problem, when trying in c # the following have not worked for me using RestSharp; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Net; using System.IO; using Newtonsoft.Json.Linq; namespace App_Llamadas_API { public partial class Form1 : Form { public Form1() { InitializeComponent(); } [Obsolete] private vo
Me and my husband (Both Indonesian citizen) would like to visit India in March for Holiday. I don't have visa yet so I will be applying Tourist eVisa, but my husband already have a Business eVisa (multiple entry in 1 year - issued 3 months ago). Should my husband apply for a Tourist eVisa (So he will have 2 visa), or it should be good to use the Business eVisa for holiday? Thanks.
How would I go about making a principal component analysis with the gene data set I have? I have a table containing 15 columns. The first one is disease group, where 0 is control, 1 is Ulcerative Colitis and 2 stands for Crohn’s. The remaining 14 columns correspond to 14 different genes. I would like to plot a PC1 vs PC2 following PCA (via prcomp), to show whether any clustering or separation between the three groups occurs based on gene expression data ( with each axis showing the proportion of variance). However, I am struggling to know where to start, as I cannot convert my column 1 to row
When I tried to integrate zipkin. It threw this error Error Msg:Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'webMvcMetricsFilter' defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/web/servlet/WebMvcMetricsAutoConfiguration.class]: Unsatisfied dependency expressed through method 'webMvcMetricsFilter' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'prometheusMeterRegistry' defined in cl
I am using class-validator and nestjs to preform validation on my Http requests. I am running into an interesting edge case that I am not sure if it is a bug or my implementation is faulty. I have two endpoints: 1) to create data with a valid phone number and 2) to retrieve data by a phone number in the route param. It seems like the route param has more strict validation. I am using the 'US' intl code because my app doesn't support international numbers yet. Here is my implementation: Creating Data with Phone Number /* contact.dto.ts */ export class ContactDto { @IsPhoneNumber('US') public ph
my code is : a=99999999999999995 b=long(a/5) c=a//5 print(b,c) output is : 2e+16 19999999999999999 why different answer and how to get the same answer (in python3)
I'm trying to calculate the log 2 base of some double type numbers, but it seems that there isn't a standard method from a library for this. I tried the following approach, however it produces errors. double entropy=0; for(int i=0; i<26;i++){ entropy+=-possibilityCounter[i]*log2(possibilityCounter[i]); } Note: The possibilityCounter table contains double types, e.g 0.00133536. Any suggestions?
I'm currently trying to compile glibc-2.30 on a linux 3.10.0-1062.9.1.el7.x86_64 system as it is currently running 2.17. The compile environment consists of the following which have been loaded via spack: -binutils-2.33.1%[email protected][email protected] +piclibs binutils=binutils-2.33 [email protected] -libcap-2.25 -linux-headers-4.9.10 (dir referenced below as $kern_headers) -libgd-2.2.4 All required dependencies for the above were also loaded and installed with spack. I have cloned glibc to $HOME/lib/glibc and checked out glibc-2.30 repo. From $HOME/lib/glibc_build, I run the following configure to ensure prope
I currently have this graphic but to go to the information of the last weeks, I have to slide the scrollbar to the right. Then I keep it this way. but when I view it on the web, it returns to the left side. Will there be any way to always stay on the right side?
I am novice when it comes to Machine Learning, but I am very interested on this topic. I have a few questions so bear with me. This is a time-series analysis. I am using ElasticNet with GridSearchCV to figure out the best Hyperparameters for my model. I went through the steps with feature selection to reduce my features (I am using an f_regression at the basic <0.05 sig level). I am not using any test to figure out Multicollinearity, because I assume that elastic net would use the L1 ratio = 1 (Or close to it) to get around this issue. The parameter grids are listed below: l1_space = np.linspa
Of course I found many posts to the problem of "log_backup". But my question is now: what is the right / correct / professional way to handle this kind of problem? My database file is approx 20GB, the transaction log-file is 100 GB (4 times bigger). I'm sure that I do not need all this backup transactions. So what's the right way to shrink the log file to approx 20GB? Have I just to follow these answers and set recovery mode to simple, shrink and then to do a full backup? Or would you suggest another solution, like backup the log file and start a new one? (I'm not sure, if this is possible?!)
I have a problem with a script in Powershell. I want to transfer users from an OU (parent OU : "IT" for exemple) to a "child OU" => "Users". ("IT">"Users"). Here is the error: $name = "CN=Michael Allen,OU=IT,DC=Adatum,DC=com" Move-ADObject "CN=Michael Allen,OU=IT,DC=Adatum,DC=com" -TargetPath "OU=IT,OU=Users,DC=Adatum,DC=com" Move-ADObject : The operation could not be performed because the object's parent is either uninstantiated or deleted At line:5 char:1 + Move-ADObject "CN=Michael Allen,OU=IT,DC=Adatum,DC=com" -TargetPath "OU=IT,OU=Us ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I am trying to change the value of a single cell in power bi. When I go into the "data" view then right click and then go to "edit query" I have the option for "replace values". This works like a find and replace, the issue I am having is that if there are multiple cells with the same values they will all get changed. How can I just edit a single cell??
I want to retrieve publick IP Address, the address that we get for example from whatismyipaddress.com and I don't want to use any third party servcie https://www.ipify.org. Is there any way to fetch this IP address from inbuilt classes or library in Android. If not possible to get the required data from Android libraries, please suggest any logic to get the same in server level instead of fetching in client level. Note: Loadbalancer is present before routing to actual web-application
I found that INDEX() can replace ARRAYFORMULA() in some situations. I wonder this is a supported function of INDEX or just a bug since I cannot find any documentation of INDEX function working this way. For example, these two formulae give the same result. =INDEX(ArrayFormula(SPLIT (I2:I75," ")),,1) =INDEX(SPLIT (I2:I75," "),,1) However, without INDEX, SPLIT(I2:I75," ") gives only one result, not an array. In the same way, INDEX can be used instead of ARRAYFORMULA with VLOOKUP. The [G1] cell is calculated with a normal ARRAYFORMULA.
Hello everyone i want to convert this snippet of node.js code to python and i am not too particularly strong in python. For a little backstory I am performing a api get request to pull data, I specifically want to pull everything(fields and value ) that is in one table. so far from the node.js snippet I understand that I am reading a txt file using a for loop to iterate through all the fields that is in one table in an index but I do not know how to implement this in my python code. Any recommendations that may help? here is a tables.txt file {"Tables": [ { "Name": "Event", "EventType": "CSumm
I see there are discussions about removing trailing newlines: How can I delete a newline if it is the last character in a file? But, I don't find a discussion about removing starting newlines. What is the best way to delete starting newlines (one-liner preferred)?
I'm new to spring-boot and I'm testing spring-boot application using http API, but I got connection error. GET http://localhost:8080/api/helloworld org.apache.http.conn.HttpHostConnectException: Connect to localhost:8080 [localhost/127.0.0.1] failed: Connection refused: connect // HelloWorldController.java import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; @RestController public class HelloWorldController { @GetMap
I have problem with postgres, it's so different than mysql (type data string_numeric and numeric). I have a query for a type column of type varchar. Simple example Table A id(int) | kode(string) | name(string) --------+--------------+------------- 1 | 2 | yuan In mysql we can get data with select * from A where kode = 2; but in Postgres that is wrong SQL because type of data column kode is string, so must add ' to build query like select * from A where kode = '2'; How to set Postgres to use the SQL like mysql does (turn off strict mode)?
I need help creating a kick command for my discord bot. I am using discord.js and node.js . I do have the starting things like const Discord = require('discord.js'); const Client = new Discord.Client(); I don't really understand what else to do. I've tried looking for help on YouTube, but every time I try it seems to not work anymore. Can someone please guide me?