Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
You can either:specify afixed IP for a serviceproxy to theservice DNS name | I have created a service using this manual:https://kubernetes.io/docs/tutorials/stateless-application/expose-external-ip-address-service/The service has IP in this example (10.32.0.16, bykubectl describe services example-servicecommand) and we can create proxy_pass rule:proxy_pass http://10.32.0.16:8080;in external (ou... | Kubernetes: how to connect to service from outside the cluster? |
To my knowledge this is not possible. AWS Lambda polls the stream and invokes your Lambda function when it detects any type of stream record update. Your Lambda will have to ignore the records that you are not interested in. You can use the eventName property of the stream record (can have values INSERT | MODIFY | RE... |
I currently have an AWS DynamoDB stream triggers a Lambda function.
The Lambda function is triggered by both insert and update events in the DynamoDB. Is there a way to change the configuration so that the Lambda function would only be triggered by 'insert'?
| Configure DynamoDB stream trigger with insert only |
Check git version (latest) and try this formatgit clone https://[email protected]/org/project.git | Im triyng to clone the repository project into my desktop git hub window and it failed
I got these errors inside the log file:Log File Errors2016-07-20 09:04:11.4932|INFO|thread:14|DashboardViewModel|Selected repository 'techla/webroshhayin'
2016-07-20 09:04:11.5922|INFO|thread:14|DashboardViewModel|Took 0ms to Create ... | Can't do: git clone |
An OutOfMemoryException is pretty common when you use the Bitmap class. Bitmaps can require a lot of memory. One standard way to get in trouble is being sloppy about calling its Dispose() method. Not using Dispose() in your code is something you'll get away easily in .NET, finalizers will clean up after you. But t... |
I have an application that saves User Information with Image into a data base. Admin can access the information those are already saved through a different form view. Clicking on the List Box item will display the details with Image retrieved from the database.
UserViewDetails.cs:
private void lbEmp_SelectedIndexChang... | Why does my form throw an OutOfMemory exception while trying to load image? |
As I can format here better now as an answer:If might be that cron simply picks the wrong interpreter in your case. A simple solution is to provide the full path to it, you can find it with:md@gw1:~$ type python2.7
python2.7 is /usr/bin/python2.7
md@gw1:~$Now use inside your crontab:0 12 * * * /usr/bin/python2.7 your_s... | I have a Python script using requests module. It works on my desktop (Windows), and works when I run it manually on my VM (Ubuntu 14.04 / python 2.7.14).
However, when the exact same command is scheduled as a CRON job on the same VM, it's failing.The offending line seems to be:index_response = requests.get(my_https_URL... | Python SSLError on Ubuntu, but only when run from a CRON |
The traditional High-Availability design is:
Data stored in Amazon RDS, preferably configured as Multi-AZ in case of failure
Objects stored in Amazon S3
At least two Amazon EC2 instances for the application, spread across more than one Availability Zone — preferably created with Auto Scaling
A Load Balancer in front ... |
I have an aws ec2 instance called primary. I have another ec2 instance called secondary. The primary instance IP is linked to domain, and contains all the hosted code and services. I want to be able to copy all the data (files/deamons/services etc) from primary to secondary on real time.
Can this be done via some ser... | Copy files and services in real time from one aws instance to another |
Neither WebView or GridView need to be embedded in a scrollview.
The WebView can scroll by itself when the content size over the screen size, and the GridView too.
In the normal way, the GridView just create so many child views as are visible. Once a view goes out of screen, it will be reused. So if you embed a GridVie... | I have a layout memory issue. When I have a large webview it doesn't shows anything and the logcat shows "View too large to fit into drawing cache".The layout is:<ScrollView
android:id="@+id/scrollNoticia"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@draw... | WebView and GridView into ScrollView, View too large to fit into drawing cache |
As you can see int/t3406-rebase-message.shorgit-rebase.sh, the second message (Current branch master is up to date.) occurs during a rebase.Check if we are already based on$ontowith linear historyIt is possible your second repo is configure to always rebase on pull.git config pull.rebase trueThe first message (Already ... | Why does git give different responses togit pull?(dev) go|c:\srv\lib\django-cms> git pull
Already up-to-date.
(dev) go|c:\srv\lib\dk> git pull
Current branch master is up to date.Both repos come from github, and I'm on the master branch in both repos:(dev) go|c:\srv\lib\django-cms> git status
On branch master
Your bra... | What is the difference between "Already up-to-date." and "Current branch master is up to date." |
In your nginx config you have:listen 9000;
server_name test.dev;So your domain should be resolved with:http://test.dev:9000But you should also addtest.devto your Windowshostsfile%windir%\system32\drivers\etc\hosts127.0.0.1 test.dev | I am new to WSL2 but so far it works really nice.
I have a simple HTML Page i want to serve with Nginx, but i want it to access with a web browser on the host. The default nginx webpage works(!), so i started to mimic the default nginx html page (/var/www/html/index.html).I have created:/var/www/test.dev/index.html/etc... | Nginx running in WSL2 (Ubuntu 20.04) does not serve HTML page to Windows 10 host on another port than port 80 |
If I understood correctly your frontend web application depends on API server, so that it sends requests to it. In such case, your API service should be available from outside of the cluster. It means it should be exposed as theNodePortorLoadBalancerservice type.P.S. you can refer to service usingClusterIPonly inside o... | Let me start this by saying I am fairly new to k8s. I'm using kops on aws.I currently have 3 deployments on a cluster.FrontEnd nginx image serving an angular web app. One pod. External service.socket.io server. Internal service. (this is a chat application, and we decided to separate this server from our api. Was this ... | Kubernetes front end deployment timing out when requesting api deployment |
Nevertheless the answer from DavidPi is already accepted, I don’t think it will work.
For more info you can check that question -Analyze Kubernetes pod OOMKilled, but I will add some info here.
Unfortunately you cannot handle OOM event somewhere inside Kubernetes or your app.
Kubernetes doesn’t manage memory limits its... | I noticed sometimes my containers are OOMKilled, but I'd like to print some logs before exiting. Is there a way that I can intercept the signal in my entrypoint script? | Kubernetes: print log before being OOMKilled |
I think you got one too many*'s there. And yes you can set the PATH variable in cron. A couple of ways. But your problem is the extra*. | I have made a simple cron job by typing the following commandscrontab -ethen in the vi file opened I types* * * * * * echo 'leon trozky' >> /Users/whitetiger/Desktop/foo.txt 2>&1the filefoo.txtindeed gets created, but its content is/bin/sh: Applications: command not foundI'm guessing this has to do with the PATH value ... | /bin/sh: Applications: command not found [duplicate] |
In your program, you are trying to allocatennumber of objects.Your OS allocates some space to your JVM to work with and that space is calledheap space. You getOutOfMemoryErrorwhen all of your heap space is filled and no more space is left to allocate for new objects.So what you should do is increase your heap space wit... | Although I know usage of Java Vectors is discouraged as its deprecated, I am stuck with a legacy code where in I don't have the luxury to modify it.I am getting an OutOfMemoryError while trying to addElement to the Vector. Following below is my code snippet. Please let me know if I can improve the below code./*objOut i... | java.lang.OutOfMemoryError with Java Vector.addElement(Object o) method |
Your test code references some files (containing the typeMyService) that have not been copied to the image.
This happens because yourCOPY . .instruction is executed after theWORKDIR /tests/Testsinstruction, therefore you are copying everything inside the/tests/Testsfolder, and not the referenced code which, according ... | So I have an ASP.NET project in a folder (src) and a test project in a folder right next to the other folder (tests). What I am trying to achieve is to be able to run my tests and deploy the application using docker, however I am really stuck.Right now there is a Dockerfile in thesrcfolder, which builds the application... | How to run tests in Dockerfile using xunit |
There are many differences.
In A you are writing to gzip which compresses the data before writing to disk. B writes plain sql files which can be 5-10 times bigger (results from my database). If your performance is disk bound this could be the solution
-c = "full inserts" is not specified in A
-q is not specified in A... |
I use two different ways to backup my mysql database. mysqldump with --all-databases is much faster and has a far better performance than a loop with to dump every database in a single file. Why? And how to speed up performance for the looped version
/usr/bin/mysqldump --single-transaction --all-databases | gzip >... | mysqldump with single tables much slower than with --all-databases |
Actually I just tested this and you can actually use xml2js straight out of the box because...
https://github.com/aws/aws-sdk-js/blob/master/lib/xml/node_parser.js
That's what the AWS JS SDK uses. Sample Lambda code use to test this, completely using the Lambda online editor and running test data against it:
'use stri... |
Is it possible to do XML parsing in an AWS Node.js Lambda function without using a 3rd party module like xml2js? I'm wondering if AWS has any built-in functionality for this like in the AWS SDK for Node.js.
| XML parsing in AWS Lambda function |
You can use a .htaccess to deny access to it. Or you can just move it out of thehtdocsorpublic_htmldirectory.<Files "cron.php">
Order deny,allow
Allow from name.of.this.machine
Allow from another.authorized.name.net
Allow from 127.0.0.1
Deny from all
</Files>So it can only be requested from the server. | Closed.This question isoff-topic. It is not currently accepting answers.Want to improve this question?Update the questionso it'son-topicfor Stack Overflow.Closed12 years ago.Improve this questionI've have a cron file, monthly.php and I want to prevent direct access using web browser. It should be accessible only throug... | Securing cron file [closed] |
The COPY instruction in theDockerfilecopies the files insrcto thedestfolder. Looks like you are either missing thefile1,file2andfile3or trying to build theDockerfilefrom the wrong folder.Refer Dockerfile DocAlso the command for building theDockerfileshould be something like.cd into/the/folder/
docker build -t sometagna... | I have a Dockerfile set up in my root (~) folder. The first three lines of my file look like this:COPY file1 /root/folder/
COPY file2 /root/folder/
COPY file3 /root/folder/but it returns the following error for each line:No such file or directoryThe files are in the same directory as my Dockerfile and I am running the ... | COPYing a file in a Dockerfile, no such file or directory? |
fast Tokenizers are not thread-safe apparently.AutoTokenizers seems like a wrapper that uses fast or slow internally. their default is set to fast (not thread-safe) .. you'll have to switch that to slow (safe) .. that's why add theuse_fast=FalseflagI was able to solve this by:tokenizer = AutoTokenizer.from_pretrained(m... | I'm using Flask with Gunicorn to implement an AI server. The server takes in HTTP requests and calls the algorithm (built with pytorch). The computation is run on the nvidia GPU.I need some input as to how can I achieve concurrency/parallelism in this case. The machine has 8 vCPUs, 20 GB memory and 1 GPU, 12 GB memory.... | Gunicorn worker, threads for GPU tasks to increase concurrency/parallelism |
Accept onlyfunc(). If you need to call a function with arguments, wrap that function call in an anonymous function.Definition:type BizFunc func()
func DoAndMonitor(bizFunc BizFunc) {
// monitor begin
defer func() {
// monitor end
}()
bizFunc()
}Usage:// with no-argument function
var myFunc func()
// ... | This question already has answers here:Function Wrapper in Go(2 answers)Closed1 year ago.I am a Go rookie. I want to use the Prometheus monitoring function level and try to be as generic as possible, like spring transactional. Using aspect oriented programming. I tried the following:type BizFunc func()
func DoAndMonit... | How to use aspect-oriented programming (AOP) in Go? [duplicate] |
The URL you are currently using is pointing to the GitHub information page about the file. Changing it to the direct link to the file should solve your error:https://raw.github.com/desandro/masonry/master/jquery.masonry.min.jsShareFollowansweredFeb 27, 2013 at 0:47user142162user1421622GREAT!! Thanks... The answer was ... | I am trying to see if I can include JQuery plugin Masonry on a gadget on Google Sites... created from Google App script by using HtmlService to render HTML from a HTML file with:<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="https://github.com/desandro/masonry/blob/master/jquery.masonry... | google app script not loading JQuery Masonry from Github |
All performance related questions have a single answer: Measure.Guesswork is always wrong when it comes to performance (usually since the performance is baddespitethe design of the system which means that youthinkit shouldn't be slow but itis).ShareFollowansweredMay 18, 2009 at 14:45Aaron DigullaAaron Digulla325k109109... | We have a system that makes calls to a web service across a proxy. This is coded in C#, using HttpWebRequest. We've had problems with the speed of these calls for a long time, and I'd been trying to track it down. An unrelated conversation led to one of the operations guys to mention that the port we had been going ove... | HTTP version performance over firewalls |
The oldest supported version SonarQube version is 7.9.3. This version provides a feature to do it OOTB. Steps:open projectclickIssuestabcheck checkbox next to theBulk Changebuttonuncheck issues which you don't want to mark asFalse Positiveclick theBulk Changebuttonin popup go toTransitionand clickResolve as false posit... | Is there a way to mark violations asFalse Positivein bulk in SonarQube?
I know the older versions have switch off violations plugin through which it is achieved. Please let me know how it can be achieved. | Is there a way to mark violations as `False Positive` in bulk? |
While I'm not sure about using one of the backup files, it is possible to export an application schema to a deluge file from one account and create an equivalent application on a different account by uploading the deluge file to the new account.
Settings->Application IDE->Export
Note, the data won't be included in th... |
Good day all,
For the purposes of Business Continuity I have investigated whether I can download a backup file from one Zoho instance / profile, to another brand new Zoho Creator instance / profile.
The idea is to mitigate risk if my main profile is somehow ransomed or hijacked.
But from what I can see, there is no op... | How can I restore a downloaded Zoho Creator backup file on a separate Zoho profile? |
Velocity was a codename while the product was in development, I don't think there was ever an intention from Microsoft to release a standalone product called Velocity. (Apart from anything else, there's already a Java product calledVelocity).AppFabric is the output of two development projects, Velocity and Dublin (whic... | I heard about Velocity several years ago when MS made a splash going head to head with MemCached.Recently I needed to try out which solution would work best in my project: MemCached or .NET Velocity. It took me a while to find Velocity again. It seems like MS merged Velocity with some WCF tools and it is now called... | Why did Microsoft get rid of Velocity Distributed Cache as standalone product? |
This is happening because of the netcat version included in Busybox.ShareFollowansweredApr 18, 2019 at 8:23Esteban GarciaEsteban Garcia2,2331717 silver badges2424 bronze badges1yup. the-koption doesn't exist for the version in the container. that option is what allows reconnects–Captain_ObviousApr 18, 2019 at 8:25Add a... | If I start a docker container like thisdocker container run -it -p 9001:9001 alpine nc -p 9001 -l -kI can then send this little dockerized netcat server some plain text from a terminal on the host usingnc localhost 9001But, once I^Cthe netcat in my host terminal, I can't make a new connection to the docker container. R... | docker container port closes after first connection |
.sdfis the file format for SQL ServerCompact Editionand that's quite a different beast from "real" SQL Server..bakis the database backup format for a full-blown SQL Server.The way to get from.sdfto.bakwould be:create a temporary database in a "full" SQL Server (Express, Standard, Enterprise) with the name of the.sdffil... | I'm trying to publish a webproject MVC3 .NET with binero.se. The problem is that my database file is .sdf. And binero wants a .bak file.Does anyone know how to solve this problem? | Convert .sdf to .bak |
I find that sometimes if in the leaks instrument you click the button that looks something like this:
{= and drag your app delegate file onto the screen, it will lead you in the right direction by highlighting the code that allocated that leaked block.
Every time it goes into a function call drag the source file wit... |
If ObjectAlloc cannot deduce type information for the block, it uses 'GeneralBlock'. Any strategies to get leaks from this block that may eliminate the need of my 'trial and error' methods that I use? The Extended Detail thing doesn't really do it for me as I just keep guessing.
| Finding leaks under GeneralBlock-16? |
The standard Unix approach iscron, so you could for example edit/etc/crontaband add a line like*/5 * * * * root sphynx [whatever other options you need]which means'every five minutes' (for the */5 part)of every hour (the * in position 2)of every day of the month (the * in position 3)of every month (the * in pos... | I'm running a slice of ubuntu hardy.
I've installed sphinx, and I would like to run the sphinx indexer everyxminutes.
What is the best way to go about doing this? | best way to reindex sphinx in ubuntu hardy |
Got the answerhttp://social.msdn.microsoft.com/forums/en-US/sqlce/thread/79d2f8a2-1366-4d14-8c61-220f47183368/(...)assign the OpenFileDialog.RestoreDirectory flag to true and then after it closes the original directory will be restored prior to the open dialog....that way you don't need the Directory.SetCurrentDirector... | My application needs to backup and restore .sdf files. There is a single dataSet the the whole application and some bindngSource and table adapters on forms using this same dataset.Just for a sake of test I tryied to copy the .sdf in runtime for a backup folder and back to restore it and I got my application not findin... | Backup and Restore a SQLCE .sdf database |
This seems to be possible using the create-deployment command.http://docs.aws.amazon.com/cli/latest/reference/opsworks/create-deployment.htmlNote: Haven't done this myself, currently working on it though!ShareFollowansweredJan 5, 2016 at 7:17dcbaokdcbaok8111 bronze badge11Not sure why this was downvoted, it is the corr... | Is there a way toupdate custom cookbooksfrom the command line on an opsworks instance?I don't see a way to do it with theAWS OpsWorks Agent CLIor with theAWS Command Line Interface.The only way I am able to do it is through the console.Thanks! | opsworks: 'update custom cookbooks' from command line |
Yes, you can useread_only:in the compose filehttps://docs.docker.com/compose/compose-file/#read_only | I try to apply the docker CIS (https://github.com/docker/docker-bench-security)The test 5.13 is:Mount container's root filesystem as read onlyThere is an option for docker run to mount the root FS read only:--read-only=trueBut I can't find the possibility to achieve the same with docker-compose.Is there a possibility t... | mount root FS read only with docker-compose |
So there is a difference betweendocker psanddocker ps -adocker ps: shows the running container on your hostdocker ps -a: this shows running and exited containers on the host.So in your case your container is exited, means not running on the host thats why this shows indocker ps -aShareFollowansweredFeb 12, 2020 at 12:3... | Hi i am new user on ubuntu during my practice i install docker bysudo apt install docker.ioCheck the version and all thing properly i started working
after it i pull the ubuntu image bysudo docker pull ubuntuafter it i check the image bysudo docker imagesimage is shown by all details
after that i make the container bys... | Docker ps not showing my container it shows in ps-a |
It turned out that the problem is that we were using the portal for test, and that takes into account user access not AFD access.
So, if you apply this by using an arm template it should work, because the afd has the right access to it. | I'm trying to add a custom certificate on the Azure Front Door from a key vault.When the AKV has a network firewall enabled the AFD can't access the certificate even if theAllow trusted Microsoft services to bypass this firewallis enabled and I have a valid AFD access policy to the key vault.When I disable the network ... | Front door can't access the KV certificate |
yes definitely you can use the cert-manager with k8s and let's encrypt will be also nice to manage the certificate.ACME have different api URL to register domain. from there also you can get wildcard * SSl for doamin.in simple term install cert manager and use ingress controller of nginx and you will be done with it. y... | I'm trying to apply SSL to my kubernetes clusters (production & staging environment), but for now only on staging. I successfully installed the cert-manager, and since I have a 5 subdomains, I want to use wildcards, so I want to configure it with dns01. The problem is, we us GoDaddy for DNS management, but it's current... | Kubernetes cert-manager GoDaddy |
You have to have 2 SSL certificates, just like how you have set them up, one inus-east-1for CloudFront and one ineu-west-1for the load balancer.This is not an issue and should not cause any errors like the 502 error you are seeing. I'm not sure what you mean about the ELB "offloading" the certificate "sent" by the CDN.... | I used Amazon Certificate Manager (ACM) to generate a SSL certificate for my domain (ex. mydomain.com). In order to use this certificate in my Cloudfront CDN, the certificate was generated in N. Virginia.My CDN is mapped to an ELB sitting in Ireland (eu-west-1).The issue is that when I want to use the generated certifi... | Is it possible to use the same ACM generated certificate with CloudFront and an ELB based in Ireland (eu-west-1) |
Dockerfile for running docker-cli inside alpineFROM alpine:3.10
RUN apk add --update docker openrc
RUN rc-update add docker bootBuild docker imagedocker build -t docker-alpine .Run container (host and the alipne container will share the same docker engine)docker run -it -v "/var/run/docker.sock:/var/run/docker.sock:rw"... | How can I install Docker inside analpinecontainer and run docker images?
I could install, but could not start docker and while running get "docker command not found error". | How can I install Docker inside an alpine container? |
Yes this is possible at least for the tensorflow backend. You just have to also import tensorflow and put your code into the followingwith:with tf.device('/cpu:0'):
your code
with tf.device('/gpu:0'):
your codeI am unsure if this also works for theano backend. However, switching from one backend to the other... | In the context of deep neural networks training, the training works faster when it uses the GPU as the processing unit.
This is done by configuring CudNN optimizations and changing the processing unit in the environment variables with the following line (Python 2.7 and Keras on Windows):os.environ["THEANO_FLAGS"] = "fl... | How to change the processing unit during run time (from GPU to CPU)? |
On Linux it is possible to collect such information via OProfile. Each CPU has performance event counters. See here for the list of the AMD K15 family events: http://oprofile.sourceforge.net/docs/amd-family15h-events.php
OProfile regularly samples the event counter(s) and together with the program counter. After a pro... |
I'm writing a program in Java
In this program I'm reading and changing an array of data. This is an example of the code:
public double computation() {
char c = 0;
char target = 'a';
int x = 0, y = 1;
for (int i = 0; i < data.length; i++) {
// Read Data
c = data[index[i]];
if (... | How to collect AMD CPU Cache Hit Ratio with Java? |
this does not require any code in a view:{% with cache_timeout=user.is_staff|yesno:"0,300" %}
{% cache cache_timeout cacheidentifier user.is_staff %}
your content here
{% endcache %}
{% endwith %}ShareFollowansweredJul 1, 2014 at 20:46panosmmpanosmm18311 silver badge88 bronze badgesAdd a comment| | How would I go about caching pages for anonymous users but rendering them for authorized users in Django 1.6? There used to be a CACHE_MIDDLEWARE_ANONYMOUS_ONLY flag that sounded perfect, but that has gotten removed.I'm asking because every page has a menu bar that displays the logged in user's name and a link to his/h... | Caching for anonymous users in django |
Whenever you want to merge something into master, the best approach is to create a branch where you create the end state you want on master, and merge/PR that branch.
So when a developer wants to merge something from their project branch to master, they would create a new branch, merge master into it (if necessary), f... |
I'm working on a project which has different branches with different developers. Each project has submodules and .gitmodules differs in every branches, so this cause a merge conflict when the main branch holder try to merge. I tryed different way to resolve it but with no results, imagine that I have no access on the ... | git submodules in different branches |
Right click on the instance in the AWS console. Under "Instance Lifecycle", select "Stop". Wait for the instance to stop by refreshing the console or waiting for it to refresh. Once it's in "stopped" state, right click on the instance again, and click "Start". Note: this isnotan operating system reboot. You're actually... | I am usingAWS t1 micro instanceto run some webservices of my application (LAMP server). And also one admin panel is there running with SQLite DB.Now I had overtaken my free tier limit. I have given a scheduled event as system maintenance, my instance is ebs backed, I want to do it manually before schedule. It is shown ... | how to do system maintenance scheduled event in ec2 manually? |
To skip builds on a per-commit basis you can add[ci skip]to the commit message, as described in theDocs, for example:Before:Add blerb.After:Add blerb
[ci skip]To skipallnon-PR builds, you can early-exit if theTRAVIS_PULL_REQUESTenvironnment variable is set to"false"fron your.travis.yml:before_install: # Earliest build... | I am developing a library on github that has travis checks attached to it. I'd like to have a WIP pull request open to discuss ideas easily. There is a lot of tests set up for the project on travis, so I'd like to not trigger the tests every time I push a commit (to prevent server for being overloaded), as the code is ... | How to prevent travis jobs after each commit? |
In your NGinx container you only need the statics and in your PHP-FPM container you only need the PHP files. If you are capable of splitting the files, you don't need any file in both sites.Why isn't it enough to add it just only to my webserver? A web server
is a place that holds the files and handles the request...NG... | I am pretty new with all of this docker stuff and I have thisdocker-compose.ymlfile:fpm:
build:
context: "./php-fpm"
dockerfile: "my-fpm-dockerfile"
restart: "always"
ports:
- "9002:9000"
volumes:
- ./src:/var/www/src
depends_on:
- "db"
n... | Why do we need to map the project files in both PHP-FPM and web server container? |
Sorry, metrics are not stored at that level. | I am exporting the Java data from Sonar via the Web Service /api/resources as described inhttp://docs.sonarqube.org/pages/viewpage.action?pageId=2752802.Can I obtain the metrics at the method level?For example, the complexity is also available as "function_complexity", but this is the average per class of the complexit... | Metric values at method level |
As awkward as it seems to be, I fixed it by adding$key = nullbefore foreach loop! | I have this code which works perfectly fine:if ($array) {
foreach ($array as $key => $value) :
doSomething($key, $value)
endforeach
}But when deployed, SonarQube gives me this "bug":Review the data-flow - use of uninitialized value.with$keyunderlined.Any suggestion? | SonarQube - PHP - Review the data-flow - use of uninitialized value |
- Creating the backend Service object:he key to connecting a frontend to a backend is the backend Service.
A Service creates a persistent IP address and DNS name entry so that the backend microservice can always be reached.apiVersion: v1
kind: Service
metadata:
name: hello
spec:
selector:
app: hello
tier: b... | In my front end (deployed as an AWS ECS service), I have a fetch request to an AWS Route 53 host name which is directed to a backend ECS service. Now I would like to deploy this infrastructure locally in a Kubernetes Minikube cluster. If the front-end pod and the back-end pod are connected together using a Kubernetes ... | Fetch Request to a Docker container |
In my opinion the best eclipse plugin to find memory leaks is Memory Analyzer (MAT)
|
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to ... | Java - Count class instances runtime [closed] |
For user sites likehttps://maikklein.github.io/, use the master branch for your code.You currently have your site in the gh-pages branch. | I recently wanted to switch away from Jekyll to Hugo but I run into some troublesI have two repositories, which are basically the same but with different nameshttps://github.com/MaikKlein/maikklein.github.iohttps://github.com/MaikKlein/blogThe first one should be reachable fromhttps://maikklein.github.io/and the second... | Did Github remove support for domain names like 'username.github.io'? |
Quite a complex question but here are my thoughts on the matter:Before actually answering the questions, I must say that my experience setting up Kubernetes load balancer outside of public clouds is a hassle so I wouldn't recommend the approach but, assuming that it is not an issue for you, the main difference is how t... | For microservices architecturenot in the cloud:What is the difference between the load balancer of Kubernetes and the load balancer of spring cloud?what are the advantages of implementing Eureka and spring boot load balancer when using Kubernetes for deployment rather than using Kubernetes load balancer and kubernetes ... | Why do we need Eureka and Spring boot load balancer when using Kubernetes not in the cloud? |
After more research I found in the RFC 1035 :4.2.2. TCP usageMessages sent over TCP connections use server port 53 (decimal). The
message is prefixed with a two byte length field which gives the
message length, excluding the two byte length field. This length field
allows the low-level processing to assemble a co... | I use scapy and python to build my DNS request. No problem for UDP request but when I want to use TCP (with exactly the same request that I use with UDP), Wireshark say that my DNS request are malformed.Here my python code:from scapy.all import *
ip=IP(dst="130.104.254.1")
dns = DNS(rd=1, qd=DNSQR(qname = "google.be", ... | Scapy DNS request malformed only with TCP |
You can map your google cloud storage to Google Cloud LoadBalancer. The steps are really easy as mentioned here:https://cloud.google.com/load-balancing/docs/https/ext-load-balancer-backend-bucketsYou also can skip GoDaddy SSL certificate and let Google manage SSL certificate for you free of cost. As mentioned here:http... | I have a static website hosted on google cloud storage and I also bought godaddy's domain. Now my website is working fine with domain but it is not secured so I bought godaddy's SSL certificate. How to add SSL certificate to Google Cloud Storage static website?I have tried to find multiple solutions but they are using ... | How to add godaddy's SSL certificate to goolge cloud storage hosted static website with godaddy domain |
The option to add multipleproject foldershas been added to the Atom editor in April 2015.Seethis blog postfor more information.To use this feature, you have the following options:Provide multiple folders on the Atom command line:atom ./folder1 ./folder2Use theApplication: Add Project Foldercommand from the command pale... | Is it able to add multiple projects on same window in Github Atom editor as in sublime text?
Any options ? | Multiple projects on single window in Github Atom editor |
The iterator will iterate from oldest to youngest for LinekdHashMap. You if you want to shrink the LinkedHashMap to a size you can use the following.Map<K,V> lhm =
int desiredSize =
for(Iterator iter = lhm.keySet().iterator();iter.hasNext()) {
if(lhm.size() <= desiredSize) break;
iter.next(); //required else... | How can you shrink aLinkedHashMap? I overrode theremoveEldestEntrymethod, but this method is only called once when a new value is inserted. So there is no change of making the map smaller this way.TheLinkedHashMaponly gives my a normalIteratorand doesn't have anyremoveLastorlistIteratormethod, so how can you find the l... | Shrink LinkedHashMap in Java |
Simple answer is that you can't do that. You could configure a lambda subscriber to output the messages to a log or something and then watch that from the CLI.If you want to subscribe an arbitrary client to a queue of messages, thenSQSmight be more suitable. | I'm looking for a way to listen arbitrarily to my SNS Topic, and in parallel trigger a SNS message from my code base. Next I need to test if that message was sent correctly.code-that-listens-and-exits-when-it-gets-hello-world-message
aws sns publish --topic-arn arn:aws:sns:ap-southeast-1:123456789:hello --message "Hell... | How to listen to SNS messages from the CLI to test they have been sent? |
If you want to use several commands on one line, you have to separate them with a semicolon:0 */1 * * * PHANTOMJS_EXECUTABLE=/usr/local/bin/phantomjs;/usr/local/bin/casperjs /usr/local/share/casper-test/test.js 2>&1Or, if you need to execute commands sequentially and only progress to next if the previous has been succe... | so I have phantomJS and casperJS installed, everything is working fine, but I'm trying to add my casperJS file to cronjob (ubuntu) and I'm getting error:/bin/sh: 1: /usr/local/bin/casperjs: not foundMy crontab file:0 */1 * * * PHANTOMJS_EXECUTABLE=/usr/local/bin/phantomjs
/usr/local/bin/casperjs /usr/local/share/cas... | CasperJS and cronjob |
Thesonar-custom-rules-examplesyou pointed at are all written in Java and use parsers written in Java for the various target languages.
Thesonar-dotnetanalyzers for C# and VB.NET are written in C# using theRoslyn frameworkprovided by Microsoft.If you want to write your own custom rules for C# then writing a Roslyn analy... | I've been doing some research on it.
What I found is a list of quite nice samples but forotherlanguageshere.I also looked atsonar-dotnet. But it doesn't look similar to the other implementations.Finally, and to be honest probably my last chance, I took a quick look atFxCop Custom Rulesand I'm not sure what would be the... | How can I create my own C# custom rules for SonarQube? |
Please delete the ssl folder on the puppet client too and try again a puppet agent --waitforcert 60 --test | Created a new Puppet Master to upgrade to Puppet6Did "rm -rf /etc/puppetlabs/puppet/ssl" to clear old certificatesAfter pointing the old client at the new master, the client cannot generate new certificates.Error received is this:Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Failed to generate additional resource... | Cannot generate new puppet certificates with new puppet master |
Having your name in a comment is not a good way to take credit because other people can change the file later on and they should take credit as well. Let's look at how other projects give credit to authors.Let's take Rails as an example.Authors are credited in the commit themselves:https://github.com/rails/rails/commit... | I recently made a pull request to an open source repository that I frequently contribute too (one that I am a maintainer too as well), and I got a request from another maintainer to delete all credit to myself as this is an open source project.I'm currently giving myself credit by using a comment at the top of the file... | In a pull request to an open source project on githhub, how should the maintainer credit the original author? |
Unfortunately, AWS does not support custom domain names for ECR. You'll have to make do with the auto-generated ones for now. There are 'hacks' about, which centre around Nginx proxies, but it really isn't worth the effort.
|
Amazon Elastic Container Repositories (ECR) have quite human-unfriendly URIs, like 99999999999.dkr.ecr.eu-west-1.amazonaws.com. Is it at all possible to configure custom domain name for an ECR?
Simplistic solution would be to create a CNAME record to point to the ECR URI, but this doesn't really work (SSL certificate... | How to configure custom domain name for Amazon ECR |
You have two separate problems here, and they're related. The first is that you've failed to configure your the name and email used in your commits, and so Git is refusing to commit any changes. The second is that because you have no commits in your repository, trying to push the branch main or master doesn't work, ... |
I'm trying to upload a navbar file to git, but it keeps saying that some references couldn't be pushed, and I don't know where I'm going wrong.
PS E:\navbar> git init
Initialized empty Git repository in E:/navbar/.git/
PS E:\navbar> git add README.md
fatal: pathspec 'README.md' did not match any files
PS E:\navbar> gi... | Error failed to push some refs to git commit |
The scheduling unit of GPUs is the warp / wavefront. Usually that's consecutive groups of 32 or 64 threads. The execution time of a warp is the maximum of the execution time of all threads within that warp.
So if your early exit can make a whole warp terminate sooner (for example, if threads 0 to 31 all take the early... |
We've written GLSL shader code to do ray tracing visualisation using the GPU. It seems to be pretty standard to put an early exit break in the ray marching loop, so if the light is extinguished, the loop breaks.
But from what I know about GPU code, each render will take as long as the longest loop run. So my question ... | is early exit of loops on GPU worth doing? |
This has happened because some changes have been pushed to the remote branch since you last downloaded it. Your local branch was not up-to-date with the remote branch. You have to bring them to the same level and then push your local branch to the remote repository.
This can be done using either of them:
1. Fetch +... |
I keep getting an error over one file after trying to push a repo to my github after a minor change was pushed from another computer, even after pulling the update. Here is the error I get when I try to git push origin master:
To https://github.com/[me]/[project].git
! [rejected] master -> master (non-fast-fo... | Cant push or pull git repo from github |
1
You could try nginx stomp, it support rabbit mq and etc. It is nginx module
# nginx.conf
server {
....
location /sendqueue {
stomp_pass stomp;
stomp_command SEND;
stomp_headers "destination:/amq/queue/stompqueue
persiste... |
I've enabled RabbitMQ's Web-Stomp plugin by following this, because we need STOMP over WebSockets, and it works. Now what I need is a Nginx server as a reverse proxy in front of my RabbtMQ server.
Here are the configuration part from Nginx server as following.
http {
upstrem websocket {
# this is the... | How can I use Nginx as a reverse proxy to my RabbitMQ's websocket function? |
This is an idea = it may not work, so you may still need to work on it to improve it.Save it to the Prometheus with the structure:metric name: config_name_version
labels: host=h1, config_name=c1
value: 1 (integer only not a string v1)
time: timestampUse math - population standard deviation = Prometheus aggregation ope... | We have microservices and they require a set of configurations that are broadcasted to hosts by a separate system (say publisher) whenever there is an update in the configuration.The receiving hosts are publishing the below metrics -{
"host": "h1",
"configName": "c1",
"configNameVersion": "v1",
}There could be a ... | Observe Service consistency state in Grafana |
1
I think you could achieve what you want with a Git post-commit hook. whether or not this is a wise thing to be doing is another matter entirely.
Hrm. Somehow my link to http://kernel.org/pub/software/scm/git/docs/v1.3.3/hooks.html isn't showing up, but that's what you wan... |
Is there anyway I can push changes from my Github Repository to a remote server automatically?
I would like to deploy changes in master branch in my github repository to a remote deployment server. If possible.
| GitHuB repository to remote server |
13
I didn't know this was possible with aptitude, I always used apt-cache policy to get that information (aptitude uses the same repositories as shown with apt-cache policy).
You can use
apt-cache policy fabric
to show version and repository information about the fabric... |
I am trying to prepare an AWS instance by installing some software, one of which is Fabric for Python, a SSH connection library.
By default, AWS's yum doesn't have access to a Fabric distribution to install, so I was attempting to figure out where Aptitude would get Fabric from.
I can't figure out a way to get what re... | Aptitude: Show What Repo a Package is From, Listing Contents of a Repo |
8
Unfortunately not SNS. You can invoke a StepFunction from:
Lambda
API Gateway
EventBridge
CodePipeline
IoT Rules Engine
(other) Step Functions
Share
Improve this answer
Follow
answered De... |
I want to execute my step function when an SNS message is published and consume it. What's the best solution for this?
I know that one option is using a Lambda, subscribe to the SNS topic, and then trigger the SF from inside the Lambda....I was wondering if there's any (simpler) solution without this intermediate step... | Trigger a Step Function from SNS |
Azure has deprecated the support managing Helm charts using the Az Cli. So you will need Helm client version3.7.1to push the Helm charts to ACR.To push the Helm charts to ACR, follow the next steps:Enable OCI supportexport HELM_EXPERIMENTAL_OCI=1Save your chart to a local archivecd chart-dir
helm package .Authenticate ... | I get the below error when I try to push the chart to ACR. Can you suggest the steps to be done here?"This command is implicitly deprecated because command group 'acr helm' is deprecated and will be removed in a future release. Use 'helm v3' instead."I followed this article to create helm charthttps://cloudblogs.micros... | pushing the helm chart to azure container registry fails |
Yes, you can use the resource-level classes such asTablewith both the real DynamoDB service and DynamoDB Local via theDynamoDB service resource, as follows:resource = boto3.resource('dynamodb', endpoint_url='http://localhost:8000')
table = resource.Table(name) | I have some existing code that uses boto3 (python) DynamoDB Table objects to query the database:import boto3
resource = boto3.resource("dynamodb")
table = resource.table("my_table")
# Do stuff hereWe now want to run the tests for this code using DynamoDB Local instead of connecting to DynamoDB proper, to try and get th... | Can I get a boto3 DynamoDB table object from a client object? |
You need toderivate(calculate rate of the change) your metric on the time series database (TSDB) level. Please check documentation of your used TSDB.For example:InfluxDB DERIVATE documentation | I have a counter metric which I want to display as requests/time period. How can I display it in Grafana? All I was able to do was to show it as increasing value: | Group counts by time in Grafana |
The biggest use is with LoadBalancer services where you want to expose something on (usually) 80 or 443, but don't want the process to run as root so it's listening on 8080 or something internally. This lets you map things smoothly.ShareFollowansweredMay 7, 2020 at 22:52coderangercoderanger53.1k44 gold badges5454 silve... | Today I have started to learn about Kubernetes because I have to use it in a project. When I came to the Service object, I started to learn what is the difference between all the different types of ports that can be specified. I think now I undertand it.Specifically, theport(spec.ports.port) is the port from which the ... | What is the advantage of allowing port and targetPort to be different in Kubernetes services? |
Check if this new feature (Jan. 2023) can help:GitHub Actions – Support for organization-wide required workflows public beta(Jan. 2023)Today, we are announcing public beta of required workflows in GitHub ActionsRequired workflows allow DevOps teams to define and enforce standard CI/CD practices across many source code ... | In my company we have a few hundred repositories, for at least 20 of those we want to apply linting by doing github actions.
It seems not good to copy the same github action workflow into each.github/workflowsfolder for a few reasons one is that the action is duplicated, no single source of truth, there should be one f... | How to apply a github action across multiple projects in my organization? |
You can use something like this to only check for alerts on mondays 4:25 ish:sum(count_over_time({app="my-service"} | label_format day=`{{ __timestamp__.Weekday }}` | label_format hour=`{{ __timestamp__.Hour }}` | label_format minute=`{{ __timestamp__.Minute }}` | hour = 4 and day = "Monday" and minute > 25 and minute... | I'm trying to trigger an alert using Grafana Loki. If no log seen by 5AM, each day need to trigger an alert.Here is the query I came up with. I dont think its correct as theoffset 16h25m: shifts the time range by 16 hours and 25 minutes.count_over_time({env="dev", app="test-app"} |="YOUR Test Keyword" [1d] offset 16h25... | Setting up Daily Grafana Loki Alert, If no log seen by 4:25 AM, each day |
Your problem is that you don't call the original entrypoint to start Cassandra - you overwrote it with your own code, but it just running the cqlsh, without starting Cassandra.
You need to modify your code to start Cassandra using the original entrypoint script (source) that is installed as /usr/local/bin/docker-entry... |
My docker file
FROM cassandra:4.0
MAINTAINER me
EXPOSE 9042
I want to run something like when cassandra image is fetched and super user is made inside container.
create keyspace IF NOT EXISTS XYZ WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
I have also tried out adding a shell script... | How can we run flyway/migrations script inside Cassandra Dockerfile? |
2
Seems like there is no straight forward way to do that as rd command doesn't put the folder into the bin, it moves it straight into folder heaven. However, if you are lucky the files are not overwritten yet by your system, and you can use a file recovery programme such as... |
I tried to upload my project to GitHub but accidentally deleted it. How can i restore it?
| I accidentally removed my project using cmd command rd. git /s/q |
The NSInvocation retains its target because it needs the target to still be around when the timer fires. That fact is sort of buried in the documentation for -[NSInvocation retainArguments]:
If the receiver hasn’t already done so, retains the target [...]
NSTimers always instruct their NSInvocations to retain their a... |
I have a problem regarding NSTimer. See the following code:
NSTimeInterval timeInterval = 1.0f;
SEL selector = @selector(executeDataRefresh);
NSMethodSignature *methodSignature = [[ExecuteDataRefesh class] instanceMethodSignatureForSelector:selector];
NSInvocation *invocation = [NSInvocation invocationWithMethodSign... | NSTimer retain count increases, why? |
After some more research I found a solution. The solution is to use register_shutdown_function
One drawback is that this function will get executed after PHP ran out of memory and not before (which is still fine with me, since I can just let the users know about it)
|
Is it possible to find out (programmatically) if the current PHP process is about to run out of memory?
Some Background:
I am the author of the Bulk Delete WordPress plugin, which allows people to delete posts, users etc in bulk.
One common complaint I get from my plugin users is that they get a blank page when trying... | Find out if PHP ran out of memory |
Assuming that your S3 content is static and doesn't change often. I believe more than aDaemonSetit makes more sense to use a one timeJobto copy the whole S3 bucket to a local disk. It's not clear how you would signal the kube-scheduler that your node is not ready until the S3 bucket is fully copied. But, perhaps you ca... | I wanted to copy an S3 bucket on Kubernetes nodes as a DaemonSet, as the new node will also get the s3 bucket copy as soon it gets launched,
I prefer an S3 copy to the Kubernetes node because copying S3 to directly to the pod as an AWS API would mean multiple calls as multiple pods require it and it will take time to c... | How to copy an S3 bucket onto Kubernetes nodes |
1
In case someone else comes along seeking answers - note that the question has been well answered via discussion in the comments.
It sounds like my practice won't blow anything up but there's a better way: a "Version Control System" or "VCS". I'm going to have to do a litt... |
I'm learning C# (self-teaching first real programming language other than VBA).
Consistently, my text book asks me to create new project and add a bunch of existing items from an old project when I don't want to mess up my existing project. This seems to be their way of creating a backup. They never really said not to... | Is it a bad idea to copy project folders for backup? Add existing items instead? |
OK, several things to note:didReceiveMemoryWarning will be called before an out-of-memory crash. Not other crashes. If you handle the warning properly and free up memory, then you can avoid the out-of-memory condition and not crash.You can manually trigger a memory warning in the simulator under the Hardware menu. High... | I'm at the part of my development process for tracking down crashing and memory leaks. As a strategy, do you put any NSLog messages or notifications of some such intodidReceiveMemoryWarning:? The documentation for this method is rather sparse. Is it accurate to say that before a crash will happen, the UIViewController ... | iOS: helpfulness of didReceiveMemoryWarning: |
First check if the issue persists with the latest Flume agent available (release 1.7), using a recent image likemrwilson/docker-flume.You can compare itsdocker-compose.ymlwith yours.An image likegilt/docker-flumeis older and still in 1.5.ShareFollowansweredApr 22, 2018 at 6:30VonCVonC1.3m539539 gold badges4.6k4.6k sil... | I have a simple Flume agent with the following configuration:agent.sources = http-source
agent.sinks = logger-sink
agent.channels = logger-channel
# HTTP Source
###############################
agent.sources.http-source.type = org.apache.flume.source.http.HTTPSource
agent.sources.http-source.channels = logger-channel... | Simple Flume agent hat some lag when logging to the console |
To change the EIP you can just use PythonbotoSomething like this:#!/usr/bin/python
import boto.ec2
conn = boto.ec2.connect_to_region("us-east-1",
aws_access_key_id='<key>',
aws_secret_access_key='<secret>')
reservations = ec2_conn.get_all_instances(filters={'instance-id' : 'i-xxxxxxxx'})
instance = reservat... | I am running some web crawling jobs on an AWS hosted server. The crawler scrapes data from an eCommerce website but recently the crawler gets "timeout errors" from the website. The website might have limited my visiting frequency based on my IP address. Allocating a new Elastic-IP address solves the problem, but not fo... | AWS: dynamically allocate & associate new IP addresses to EC2 instance? |
As described in thisdocby phoenixnap.There are several ways to fix the “helm has no deployed releases” error, one ways is by running the following command:kubectl -n kube-system patch configmap [release name].[release version] --type=merge -p '{"metadata":{"labels":{"STATUS":"DEPLOYED"}}}'[release name] is the name ... | After I uninstalled a release(with --keep-history), there will remain a release history with "uninstalled status".Then if I want to install this release again,installandupgrade --installare both failed.installfailed because of "cannot re-use a name that is still in use"
butupgrade --installfailed because of "xxx has no... | How to install/upgrade a uninstalled release(--keep-history) |
Yes, that's why it is called conservative. Every integer that looks like it points inside the heap will make the region non-garbage. And as a result, a memory leak may occur.ShareFollowansweredApr 28, 2009 at 22:42UnknownUnknown46.3k2727 gold badges141141 silver badges182182 bronze badgesAdd a comment| | I've looked atConservative GC Algorithmic OverviewCan a misdetection happen in the 'marking' part?
If some data is stored and by coincidence happen to be the same as an address of an allocated memory, will the collector keep the memory ? | Mark phase misdetection on garbage collection for C |
I want to setup SSL certificate and HTTPS Listener for ALB at this subdomain that was provided by AWS - how I can do it?
You can't do this. This is not your domain (AWS owns it) and you can't associate any SSL certificate with it. You have to have your own domain that you control. Once you obtain the domain, you can... |
I have following setup at AWS ECS:
Container with Caddy web-server at 80 port that serves static files and performs proxying of /api/* requests to backend
Container with backend at 8000 port
EC2 instance at ECS
ALB at subdomain http://some-subdomain-12345.us-east-2.elb.amazonaws.com/ (subdomain was provided automati... | Can I setup SSL on an AWS provided ALB subdomain without owning a domain? |
Found the answer:select * from pg_proc where proname ilike '%<function_name>%'In the column:prosrcyou can find the function definition. It seemed empty in SQLWorkbenchJ, but the code revealed itself after a double-click. | A co-worker at one point in time has defined a function in AWS Redshift. I have some doubts about its results and would like to see the code behind the function.Is there any query I can do (or another method) that returns this code? | How to find definition of user defined function in AWS Redshift |
To find the size of the cache directory use the codebelow.public void clearCache() {
//clear memory cache
long size = 0;
cache.clear();
//clear SD cache
File[] files = cacheDir.listFiles();
for (File f:files) {
size = size+f.length();
f.delete();
}
}This will return the num... | I'm using fedor's lazy loading list implementation in my test application where I can clear the cache with a single button click. How can I get the cache size of the loaded images in the listview and clear the cache programmatically?Here is the code for saving the cached images:public ImageLoader(Context context){
... | How to get cache size in Android |
My approach,Configured the map reduce program to use 16 reducers, so the final output consisted of 16 files(part-00000 to part-00015) of 300+ MB, and the keys were sorted in the same order for both the input files.Now in every stage i read 2 input files(around 600 MB) and did the processing.. So at every stage i had to... | I am working with a 2 large input files of the order of 5gb each..
It is the output of Hadoop map reduce, but as i am not able to do dependency calculations in Map reduce, i am switching to an optimized for loop for final calculations( see my previous question on map reduce designRecursive calculations using MapreduceI... | Reading a large input files(10gb) through java program |
0
HTTP-Track website mirroring utility.
Wget and scripts
RSync and FTP login (or SFTP for security)
Git can be used for backup and has security features and networking ability.
7Zip can be called from the command line to create a zip file.
In any case you will need to imp... |
Does anyone know of a script or program that can be used for backing up multiple websites?
Ideally, I would like the have it setup on a server where the backups will be stored.
I would like to be able to add the website login info, and it connects and creates a zip file or similar that it would then be sent back to ... | Multiple Website Backup |
I'm using the upstream nginx ingress and use helm controller to install it.
BTW, I have carefully gone through the values and overridden the values as below using the helm release. Now, it is working fine. All of my ingresses came online to serve traffic even without the annotation.No errors appeared in the logs. I sup... | I have upgraded my nginx controller from old stable repository to new ingress-nginx repository version 3.3.0. Upgrade was succeeded without an issue.My ingress resources stopped working after the upgrade and after annotatingkubernetes.io/ingress.class: nginxto the existing resources, I could see the below message in th... | nginx ingress resources not working after upgrading to ingress-nginx repo from stable repo |
If you make the methodsfinal, then SonarQube will not trigger the warning anymore. | My entities (using Spring Boot with Spring Data JPA and Hibernate) are all extending from anAbstractEntityclass I have defined. This class implementsequals()andhashcode()in such a way that subclasses do not need to handle this anymore.SonarQube will now report a violation about:Subclasses that add fields should overrid... | Ignore sonarqube rule 'Subclasses that add fields should override "equals"' for all subclasses? |
The root option has to point to the public directory:
server {
server_name lumen.dev;
root /var/www/lumen/public;
The error appears because it's trying to call /index.php?$query_string which is relative to the root. So it tries to find /var/www/lumen/index.php in an endless loop.
|
I'm trying to setup Lumen - "micro-framework" built on top of Laravel's components. On server-side there's nginx + php-fpm.
Here's my nginx config:
server {
server_name lumen.dev;
root /var/www/lumen;
location / {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
... | Lumen + nginx = error 500, rewrite or internal redirection cycle while internally redirecting to "/index.php" |
This isn't CORS related -- it's S3 itself. The S3 website endpoints are only equipped forGETandHEAD. Anything else should be denied before the redirection rules are checked.Website EndpointSupports only GET and HEAD requests on objects.—http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html | I have the following CORS configuration for S3 in order to use one of my buckets as a static website hosting:<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
... | S3 POST request to S3 with response 405 |
Can't be done with the current version (3) of the GitHub API.You will have to deal with the mix of files until they add a parameter (much like how Listing method has thepathflag) that allows you to specify what file to limit the view/compare commit method. | Using the github API'scompare endpoint, I can request the unified diff between two commits:curl -H 'Accept: application/vnd.github.3.diff' \
'https://api.github.com/repos/danvk/dygraphs/compare/01275da4...335011f'Using the git command line tool, I can filter that diff to just a single file:git diff 01275da4..335011f dy... | Is it possible to get the diff for just one file using the github API? |
Navigate to task manager, and End all Docker desktop Processes running.thendocker logout
docker loginthis worked for meShareFollowansweredApr 25, 2022 at 6:22Robert IshokaRobert Ishoka3633 bronze badgesAdd a comment| | I keep getting this error on my bash terminal using WSL2C:\windows\system32>docker run -d -p 80:80 docker/getting-started
Unable to find image 'docker/getting-started:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": Service Unavailable.
See 'docker run --help'. | docker: Error Get https://registry-1.docker.io/v2/: Service Unavailable. IN DOCKER , WSL2 |
It is not strictly related to github. It is supporting emoji as a lot of other sites are doing it.see the following link for the github markdowngithub markdownsee the following link for the complete list of the emoji that can be usedemoji-cheat-sheetShareFolloweditedNov 1, 2016 at 11:18answeredNov 1, 2016 at 11:12crist... | Some repositories have icons in their description.For examplehttps://github.com/Leaflet/Leafletis using:leaves:Where is that documented ? | using icons in github repository description field |
There is no reason to get "get socket.io working though nginx". Instead you just route HAProxy directly to Socket.IO (without Nginx in the middle).
I recommend you checkout the following links:
https://gist.github.com/1014904
http://blog.mixu.net/2011/08/13/nginx-websockets-ssl-and-socket-io-deployment/
|
I've been trying for hours and have read what this site and the internet have to offer. I just can't quite seem to get Socket.IO to work properly here. I know nginx by default can't handle Socket.IO however, HAproxy can. I want nginx to serve the Node apps through unix sockets and that works great. Each have a sub dir... | Node.JS, HAproxy and Socket.IO through NGINX, app sits in subdirectory |
A few things to note :
You can use the EXISTS to check if the key already exists. This is better because you can now cache users that actually have 0 transactions.
INCR and INCRBY commands will create the key if it doesn't already exists
So, in pseudo code, here's what you should do -
if EXISTS user:<userid>:trans... |
I am using ServiceStacks CacheClient and Redis libraries. I want to cache counts of the number of certain transactions that users perform. I am using the following to GET the cached value or create it from the DB if the key does not exist:
public int GetTransactionCountForUser(int userID)
{
int count;
//get c... | How to use ServiceStack CacheClient and Redis to increment or create counters |
You can try to run in each branch this command:git ls-files | grep YOUR FILEAnd see if it appears.Or you can do a more elaborated script like this:for i in $(git branch | sed 's/\*//'); do git checkout $i; git ls-files | grep -q YOURFILE ; if [ $? -eq 0 ] ; then echo "File found in branch: $i"; fi; doneDo a loop for ea... | Is there a way in git to find whether a file is present in multiple branches or not? If so list the branch names. Please provide help on this. | How to find whether a file is present in multiple branches in git |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.