Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
0
in my case, ERR_EMPTY_RESPONSE (and ERR_CONNECTION_RESET) was fixed by
remove server_name localhost; to fix DNS issues with IPv6, and access the server by its IP address (127.0.0.1) instead of its hostname (localhost)
set keepalive_timeout 65;
set worker_processes 3;
... |
I have a problem with my Docker and NGINX config?
Everything is running but my web page returns a ERR_EMPTY_RESPONSE
Here is my NGINX config:
server {
listen 8443;
server_name api.test.dv;
root /api/public;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
fastcgi_pass ph... | ERR_EMPTY_RESPONSE with Docker and NGINX |
0
Based on this "(Get-ChildItem $source -Filter .| Sort LastAccessTime -Descending)[0]" you only ever expect to copy 1 file per day. And it sounds like the problem is that the script copies a file over even when no new files have been added to $source. Hopefully I have that... |
I am working on a script to create a daily backup ( task schedule )
First I copy the folder "source_folder" and rename all the files with timestamp inside the "bkp" folder , when a new files is added in "source_folder" need to copy only the last file and also renamed ( I tried with LastModified or LastAccessTime but w... | Backup folder in Powershell |
You should create virtualhost and point it to /v2/public folder. For example:<VirtualHost *:80>
ServerName v2.mywebsite.com
DocumentRoot "/home/path_to_your_v2_folder/public"
<Directory "/home/path_to_your_v2_folder/public">
AllowOverride all
</Directory>
</VirtualHost>After restarting Apache, you'll be abl... | I have a 1&1 WebServer unlimited, and I am trying to put my new Laravel (latest version) project via FTP inside a subfolder (calledv2) of this server.When accessing my website like that:www.mywebsite.com/v2/I am getting the following:Error 403 - ForbiddenL'accès au fichier requiert une autorisation.
(this is french... | Laravel on 1and1 server |
On the step 4 ofkong official docker installation,just change the config of docker run command FROM-e "KONG_DATABASE=postgres"TO-e "KONG_DATABASE=off"and you can go ahead!remember that if you have a kong container run with postgres or cassandra before, firstly remove that configured kong container and image! Then run c... | As of Kong 1.1 you can use db-less (declarative) configuration.I can't find any information on how to start a Kong 1.1 based container in db-less/declarative mode without having to set up a db connection first. Does anyone know how to do this?Checks documentation athttps://hub.docker.com/_/kong | Kong DB-less in Docker |
UseEtOrbi::EoTime#to_timebefore comparison. | When run sidekiq, in log receive this error:ERROR: CRON JOB: comparison of Time with EtOrbi::EoTime failed
ERROR: CRON JOB: /home/user/.rvm/gems/ruby-2.0.0-p247@script-admin/gems/sidekiq-cron-0.3.1/lib/sidekiq/cron/job.rb:434:in `<'error in this placedef not_enqueued_after?(time)
@last_enqueue_time.nil? || @last_enqu... | error when comparing dates in sidekiq-cron |
What gives? Is there an up-to-date replacement provider that I can use?
They have been deprecated in favor of the classes implementing the new Hibernate 3.3/3.5 SPI with its CacheRegionFactory. These implementations are respectively:
net.sf.ehcache.hibernate.EhCacheRegionFactory
net.sf.ehcache.hibernate.SingletonEh... |
I am configuring my hibernate project to use a 2nd-level cache provider, so that I can take advantage of query caching.
I added a dependency to ehcache:
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
<version>2.2.0</version>
</dependency>
I think that the provid... | Why is EhCacheProvider deprecated? |
Is there any good way to have docker or docker-compose copy the results of git config --list to a file in the container, which I can then use with my entrypoint to setup the git config.You really needn't do that to reach your aims, there is a outbox solution:For your host machine which run git, all the contents ofgit c... | I'm using both docker and docker-compose to host what for the most part is a LAMP stack. I'd like to be able to use git inside one of my containers without it asking for my user.email and user.name on push after I build. Along with other things such as my push.default and branch settings. Is there any good way to have ... | Copying local git config into docker container |
You seem to be confusing buckets, folders, and object keys. Your code should look something like this (where key contains both the folder and file name, and bucket contains only the S3 bucket name):obj = s3.get_object(Bucket='bucketname', Key='folder1/folder2/filename.csv') | I'm trying to load a csv file in pandas from a s3 bucket in aws. Boto3 seems to fall short in providing functionalities for loading files from subfolders. Let's say i have the following path in s3:
bucket1/bucketwithfiles1/file1.csvHow do i specify how to load file1.csv? I know s3 doesn't have a directory structure.imp... | Loading files from s3 with subfolders with python |
1
This typically happens when the Docker container isn't aware of where you make changes outside of the container. The code in the container is a copy of the code you have in your project, it is NOT the code itself. You thus have to tell Docker somehow that "this is my code... |
I am trying to learn Docker. Maybe I am over complicating it. I have built a Docker Container with Nginx and am just trying to build a static HTML Website. I originally only put Hello World in my HTML file and ran the container. It showed up just find in browser. I then stopped the container and added a lot to the htm... | Stopping and running Docker container doesn't update |
1
You can use map, location and alias directives to map a specific URI to multiple files based on the value of a header.
For example (where all of the files are in the same directory):
map $http_user_agent $browser {
default "nonexistent";
"~*Firefox" ... |
How can I correctly write the configuration of the nginx server?
...
if the client has useragent (A) and it refers to http://somehost.domain/somefile.someextension
nginx responding a file from the root /file.zip
if the client has useragent (B) and it refers to http://somehost.domain/somefile.someextension
... | Different files by useragent in NGINX |
Solved it by adding a ssh key and changing remote url to Github ssh url.ShareFollowansweredOct 28, 2021 at 16:52ZaynZayn74111 gold badge55 silver badges2323 bronze badgesAdd a comment| | My account has 2FA enabled and my repo is private. I'm trying to deploy my node.js application using Jenkins to AWS Ec2 and everything works fine including (build, tests, coverage) but in the end deploy does not work because of 2FA issue. I have added my username and token in jenkins which seems to work but as soon as ... | How to configure Jenkins for 2FA enabled github account? |
To be honest. Since where dealing with laravel I will not recommend to go with https forced on the .htaccess file.
simply create a middleware that will check if the user is not on https and redirect him. It'll work better on laravel 5.1 and I also think that the problem will solve.Middleware example:class HttpsProtocol... | I've purchased a test SSL certificate while my client acquires the EV one and I've set it up with a Laravel 5.1 project. I've forced the site to usehttps://all the time using .htaccess but once in a while the entire site breaks and becomes unusable after this error:"The operation couldn't be completed. Protocol Error.... | Laravel SSL Protocol Error |
-1Are you sure it's not a red herring? Have a look athttps://github.com/aws/amazon-eks-pod-identity-webhook/issues/164ShareFollowansweredFeb 23, 2023 at 14:59Andres CarvajalAndres Carvajal11Add a comment| | I have an EKS 1.21 cluster which I am trying to upgrade to 1.22. While upgrading resources with deprecated API versions I found that I have a mutating webhook configuration calledpod-identity-webhookthat is using deprecated APIVersionadmissionregistration.k8s.io/v1.It seems thatpod-identity-webhookis managed by AWS, wi... | Upgrade pod-identity-webhook mutating webhook configuration for EKS 1.22 upgrade |
May be you mean something like this:__device__ void fun2(double *y)
{
int i=blockIdx.x;
y[i]=...;
}
__global__ void fun1(double *x)
{
fun2(x);
...
}
int main(){
double *x;
...
cudaMalloc((void**)&x, N*sizeof(double));
fun1<<<N,1>>>(x);
...
}But it's common to calculate thr... | I am optimizing some code using CUDA. I am not sure if I should use cudaMalloc inside _ _ global _ _ function (fun1) or not (isn't x already allocated on GPU's memory?):__global__ void fun2(double *y)
{
int i=blockIdx.x;
y[i]=...;
}
__global__ void fun1(double *x)
{
//should I cudaMalloc() y for fun2 or ju... | CUDA (nested?) memory allocation |
If you actually want to redirect (301 or 302) your web traffic
You create a server {} section listening on port 3000 and you just redirect it to another server {} section that is listening on port 80. In each server {} section set the listen property appropriately.
I guess you are trying to handle the redirection with... |
How can i rewrite a domain with a port to a subdomain?
e.q.: domain.com:3000 to sub.domain.com ?
thanks for your help! :)
greetz
| nginx - rewrite domain.com:port to sub.domain.com |
I did small research on topic and it come out that a configmap wasintentionallymadeReadOnlysome time ago.If you really need interacting with files from a configmap then you could instead put the files in a writeable volume andmount the volume.
Or you could to use the centralized configuration like consul.Addtionally, ... | I need to pass "PODIP" env value to configmap for configuration during k8s deploymentdeploy.yaml- env:
- name: PODIP
valueFrom:
fieldRef:
fieldPath: status.podIPhow to do this? 10x | copy PODIP in configmap during kubernetes deployment |
This is controlled by the--service-node-port-range portRangeargument tokube-apiserver- the way to change that depends on your environment.Keep in mind that nodePorts are meant to be used by load balancers as building blocks. So what you are trying to do is most likely not the best practice.Hope this helps.. | I want to create a loadBalancer service on kubernetes that exposes a large range of ports. As you can't do that on kubernetes yet (https://github.com/kubernetes/kubernetes/issues/23864).I have manually entered a range of port by having a yaml file in the following format:apiVersion: v1
kind: Service
metadata:
name: ... | How to increase the range of ports available to services in kubernetes |
By inspecting the browser I found the problem and the solution ishttps://github.com/grafana/grafana/issues/10950#issuecomment-371555881 | I wrote an exporter to export my statistics to Prometheus and then I created some simple graphs in Grafan for them. When I create a graph they are working but as soon as I save and close the dashboard and open it again all the graphs/panels greyed out (as it can be seen). I checked the logs of Grafana but there is no l... | Custom Grafana panels greyed out |
22
It should be below service, I can verify it, but here is what offical documentation said
SHM_SIZE
Added in version 3.5 file format
Set the size of the /dev/shm partition for this build’s containers.
Specify as an integer value representing the number of bytes or as a
... |
I'm currently having some issues with the shared memory in one of my containers.
I have a docker-compose file in where I expect to be able to set the size. I basically converted an old docker run that had a --shm-size 16gb. I would guess it's as easy as adding shm_size:16gb to my service in the compose file.
Adding it... | Changing shared memory size in docker compose |
There's no right answer to this question. A few wrong ways to do it, but common sense will guide you.My advice:Start by having the source of this open source code checked into your company's source control system somewhere and capable of being built or re-built as needed. Not necessarily in your project, but just getti... | I'm a beginner in Android programing, and I'm working with android studio...now i wander what is the best way for installing open sources libraries from gitHub.
my question is from organization principles point of view-
should i create a new package for every library and put all the library source code as is in that pa... | Using open source libraries in Android projects |
It looks like there are no CSS /js files on the static folder. Hugo uses the static folder to render the js and CSS files and also for images. | My Hugo website is configured to publish in a folder calleddocs, which is the source (master/docs) for the website on my GitHub repo; however, the website itself won't show any css/js.I've tried manually changing the reference for css in theindex.htmlfile so that the path iskhobbs3.github.io/docs/main.....cssbut that d... | Hugo website on GitHub not showing themes |
Do not include thenode_modulesdirectory in your source repository. Git is forsource code, not built distributions. That is the best practice as it has been for decades. Ignore the hipsters you see occasionally putting build artifacts into git. They are wrong, they just haven't felt the pain enough yet to realize it. Be... | i have a nodejs project with a few dependencies on my own modules. as per npm's current best practices, those dependencies are represented using thenpm link/npm link $package-namecommands, so the project now has some symbolic links in itsnode_modules. locally that works.however when i push that project to github, the l... | nodejs, github, npm, and symbolic links |
After making a big fuss with the technical team of my hosting provider, they confirmed my .htaccess file was not being uploaded via my FTP client. It looks like I should have added it to the dist folder after the build. The code for the .htaccess file they added is just the same as one of the versions I tried before an... | I know a lot of people ask this, but I have looked at all the answers and nothing is working.I am sure the problem is I need to create a .htaccess file and add it to my dist because that is what the ISP console guide says to do.I am using Angular cli and the build command:ng build --aot --prod --base-href ./I have adde... | .htaccess redirects not working with Angular 4 |
This might not be real fix, but setting
PHP_FCGI_MAX_REQUESTS=400
environment variable will force php to kill itself after 400 requests and being re-executed, so the problem won't appear.
|
I recently setup a new ubuntu machine, with wordpress, spawn-fcgi and nginx.
Every morning, I'd try to see my blog and I got a 502 error Bad Gateway error.
I tried finding some kind of log of why php-cgi died but couldn't find anything.
I run spawn-fcgi like so:
sudo /usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-dat... | spawn-fcgi dying after a number of connections |
No, they would need to provide an API to allow you to upload multiple files first. This is a limitation of the API, not pre-signing.
See Is it possible to perform a batch upload to amazon s3?.
|
I have written an implementation for generating pre-signed URLS for a bucket on aws-s3. It works fine, for getting single files/objects.
How would I go about this for generating pre-signed URLS for entire directories? Lets put it this way, on my s3 bucket, there are multiple folders with their own small html5 applicat... | Pre-signed url for multiple files? |
Is it possible to cherry-pick within a same branch? Is that even why cherry-pick exist?No.What you can do is:fetch the remote branch, referenced in your repo asorigin/mastercreate a test branch from your currentmaster(unchanged because you didn'tgit pull, justgit fetch)cherry-pick a commit fromorigin/masterintotest, fo... | I am new to git related platforms, currently working primarily with github and gitlab on the side for project purposes. I have a confusion regarding an abstract terminology, it's related to fetching commits(perhaps unmerged or in different branch or from anywhere within a repo).As far as I understand, we use cherry-pic... | Clarification regarding commit pulling terminology : Relationship with git cherry-pick and branches |
I resolved this problem by switching to the remote server's Docker context on my local machine:docker context create some-context-label --docker "host=ssh://user@remote_server_ip"
docker context use some-context-label
docker ps
# A list of remote containers on my local machine! It works!After that:Connect via Remote-... | I want to work in a container in a remote server.
But it doesn't work.Environment:Local: Windows 10Local Terminal for ssh: WSL in Windows 10Server: Ubuntu 18.04I checked these two articles.https://code.visualstudio.com/docs/remote/containers-advancedhttps://code.visualstudio.com/docs/containers/sshI followed these step... | VS Code: connect a docker container in a remote server |
6
AWS Batch is a management/abstraction layer on top of ECS and EC2 (and some other AWS resources). It does some things for you, like cost optimization, that can be difficult to do yourself. Think of it like Elastic Beanstalk for batch operations. It provides a management... |
AWS Batch documentation says it is based on ECS.
So why shouldn't we just use ECS? What pressing benefits does AWS Batch offer that are not available in ECS?
Both offer autoscaling as well. Is queuing and priority of jbos the only advantages of AWS Batch?
| Selecting between ECS vs AWS Batch |
8 * * * sleep $[RANDOM\%90]m; cmdHereThat will run once between 8 and 9 after a random delay after 8:00am | Closed.This question does not meetStack Overflow guidelines. It is not currently accepting answers.This question does not appear to be abouta specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic onanother Stack Exchange site, ... | Running program in a random minute of an interval [closed] |
Do a phpinfo() to understand your PHP runtime config. If your system is configure as "CGI/FastCGI" then it is probably running suPHP as the PHP initiator.In this case you can specify your own php.ini file. By default suPHP looks in the script directory but you can override this by the following directive in your .hta... | I am trying to use PHP's built-in functionget_browser(). I followed the instructions inthis useful post, but I'm still getting the errorbrowscap ini directive not set.I downloaded the php_browscap.ini file and moved it into the same directory as my .htaccess file, so that its location ishome/hostname/subdomain/php_brow... | Changing PHP.ini using htaccess on a Server |
I will just compile a list of some crucial things about interaction with Services:You can create a Service object before creating pods with services, it is OK.To access the service inside a cluster, you should use "ClusterIP."You cannot use variables like a name of a service, but you can use FQDN of the service, and it... | I have my Kubernetes service of which I'm getting the url in my minikube installation using:minikube service postgres --urlWhich returns the URL like:http://192.xxx.xx.xxxx:3xx62However I want this URL to be used in my ConfigMap as the pghost and pgport - so for example:apiVersion: v1
kind: ConfigMap
metadata:
name: ... | Kubernetes - Get the public URL of a service into my ConfigMap |
2
The application is built inside the docker container and you need to have your dependencies available when building.
golang:onbuild gives compact Dockerfiles for simple cases but it will not fetch your dependencies.
You can write your own Dockerfile with the steps needed ... |
I'm trying to build a docker with a local package but get the error 'import path does not begin with hostname'. If my understanding is correct, my Dockerfile should be just
FROM golang:onbuild
EXPOSE 8080
based on this article Deploying Go servers with Docker
I use this code git-go-websiteskeleton as the source for b... | Error 'import path does not begin with hostname' when building docker with local package |
You can inject the underlying cache manager instance:constructor(@Inject(CACHE_MANAGER) protected readonly cacheManager) {}And then use it to delete the caches for all keys:const keys = await this.cacheManager.keys()
await this.cacheManager.del(keys) | I'm building an API and the data get updated every day at 3 am and need to clear all cached endpoints whatever is!I'm using theCacheModuleand the decorator@UserInterceptor(CacheInterceptor)to cache whatever I need in the controller.there aCronfunction that runs every day at 3 am to update the content, I need to know wh... | Nestjs how to clear ( reset ) all cache |
"Multiline" codec is the tool for this. | I have seen a log in Kibana where the http request and response was displayed in a single line/record.My Kibana setup currently displays the request and response in separate lines/records.How do i customize and ultimately achieve this? | ELK - How to match http request and response and store it as a single line of record? |
The suggestion to use date wasn't really going to work for our use case. We ended up creating a base version in SSM and creating a script that runs within the buildspec that grabs, increments, and updates the version back to SSM. It's easy enough to do:Create a String/SecureString within SSM as [NAME]. For example l... | Currently my team is using Jenkins to manage our CI/CD workflow. As our infrastructure is entirely in AWS I have been looking into migrating to AWS CodePipeline/CodeBuild to manage this.In current state, we are versioning our artifacts as such<major>.<minor>.<patch>-<jenkins build #>i.e.1.1.1-987. However, CodeBuild do... | Semantic versioning with AWS CodeBuild |
AWS CLI and console are not working for filtering instance-lifecycle "normal".So I've use jq tool instead of '--filter Key=instance-lifecycle,Values=scheduled'aws ec2 describe-instances --filter Name="instance-state-code",Values="16" \
| jq '.Reservations[]?.Instances[]? | select(.InstanceLifecycle == null)| .InstanceI... | I can list all my spot instances by issuing the following CLI command:aws ec2 describe-instances --filter Name="instance-lifecycle",Values="spot"But how can I show all mynotspot instances? None of these work:aws ec2 describe-instances --filter Name="instance-lifecycle",Values=""
aws ec2 describe-instances --filter Name... | aws ec2 describe-instances: how to filter *out* spot instances? |
I think you just made a typo.EC2Instancein your resources list andEc2Instancein your outputs. | I am trying to create a EC2 instance using cloudFormation template.
I have written below JSON for this and trying to upload json using option in CloudFormation "Upload a template to Amazon S3".
But after uploading JSON I am getting error:Template validation error: Unresolved resource dependencies [Ec2Instance] in the ... | CloudFormation: Unresolved resource dependencies [Ec2Instance] in the Outputs block of the template |
runwhich phpto see where the php executable is, copy that path.crontab -e(I'm assuming this is your project root where your artisan is located/home/pofindia/public_html/beta-var1/but this requires you to add artisan to it, as so/home/pofindia/public_html/beta-var1/artisan)add the crontab entry* * * * * /usr/local/bin/p... | I have created an example schedule job to run after a specific time in Laravel 5.2. And this is working fine onlocalhostthroughartisancommand.I am running this command on local server:php artisan Demo:CronNow I am adding this task in cPanel's advance option cron job on HostGator hosting server. But it is not working.Th... | How to run laravel 5.2 artisan command on cron job on hostgator hosting server cpanel? |
The answer is in the documentation: https://nginx.org/en/docs/http/server_names.html
Search for the word "empty"
Fix: server_name "";
– Barmar
|
I've got a special server {} block for the case of people who use an IP address in a host header (server_name ~^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+;) and that works fine. I'd like a different server block for one when no host header at all is provided. I've been testing with:
telnet localhost 80
GET /foobar HTTP/1.0
And I... | nginx: how to get a server for the case of no Host: header? |
12
Comment in the OP should get credit for this but i'll add again so i find it easier in a few months:
docker run -it --rm --privileged --pid=host justincormack/nsenter1
From https://github.com/justincormack/nsenter1/blob/master/README.md
... this is useful when you are ... |
I am using Docker for Mac but currently only using it for its Kubernetes cluster. The Kubernetes cluster's single node is named docker-for-desktop.
I'm currently going through a Kubernetes tutorial on Persistent Volumes (https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/) and... | equivalent of "minikube ssh" with docker-for-desktop Kubernetes node |
You can use regular expressions when label matching to aggregate the two time series. It would look something like this:sum(rate(namedprocess_namegroup_cpu_seconds_total{groupname=~"$processes",instance="$host", mode=~"system|user"}[1m])) by (groupname, instance)The above gives you the total CPU used bysystemanduser, a... | I'm calculate CPU usage of process by process-exporter, but it have two different label in one metric for example:namedprocess_namegroup_cpu_seconds_total{groupname="(sd-pam)",instance="localhost:9256",job="process_exporter",mode="system"}namedprocess_namegroup_cpu_seconds_total{groupname="(sd-pam)",instance="localhost... | Metrics sum of label in rate or irate |
Solved the issue by registering my custom collector to the REGISTRY withREGISTRY.register(CustomCollector())and then usingDispatcherMiddleware(
app.wsgi_app, {"/metrics": make_wsgi_app(REGISTRY),}
) | I am trying to service custom Prometheus metrics through Flask. Looking athttps://github.com/prometheus/client_python, I have a code similar to:from flask import Flask
from werkzeug.middleware.dispatcher import DispatcherMiddleware
from prometheus_client import make_wsgi_app
# Create my app
app = Flask(__name__)
# Ad... | prometheus_client custom metrics with Flask |
You need to make sure you have installed the cuda dependencies in your base container.I made this component for testing if the GPU was available using tensor:@dsl.component
def simple(
word: str,
number: int,
) -> None:
log.info("Running Simple")
if torch.cuda.is_available():
device = torch.de... | I'm relatively new to Vertex AI Pipeline and I'm facing an issue where I'm unable to enable GPU utilization within my pipeline. Despite specifying the hardware type for a particular component, it still runs on the CPU, as indicated in the figure below. I suspect there might be a missing configuration in my pipeline set... | How to enable GPU in Vertex AI Pipeline |
As @Blender Fox posted in the comment, in the cluster, you can import already-issued certificates.Use--from-fileor--from-env-fileto generate a Secret from one or more files. The file must be in plaintext format; it is unimportant what extension it has.The command states:kubectl create secret SECRET_TYPE SECRET_NAME
-... | I have a digicert SSL cert that I want to install in GCP secrets and reference it to one of the ingress resources. Currently have four filesprivatekey.pem
{domain-name.crt}
DigiCertca.crt
Trustedroot.crt | How to add Digicert SSL certificate to Kubernetes Secrets in GCP? |
+25It's perfectly normal in a Kubernetes environment that pods are shutdown sometimes and that replacement pods are scheduled on another worker node. This happens all the time due to node maintenance or to balance the workload. You can read more about this in thedocumentation about pod-lifecycle. | I have a Spring batch 2.1.x application deployed on Azure Kubernetes. Base image is Ubuntu 18.04. I see that the process is getting killed at times.Process flow:kubectl command line command to start the bash scriptbash script to start the spring batchspring batch application to print / generate the CSV file | Azure Kubernetes : Spring Batch running on Ubuntu 18.04 is getting killed rarely |
To answer myself:avg_over_time(instance:cpu_usage:irate[$__range])ShareFollowansweredFeb 9, 2019 at 15:20Ivan SavcicIvan Savcic19422 silver badges77 bronze badges1Note thatinstance:cpu_usage:irateis a record rule of mine:round(100 - (avg without (cpu) (irate(node_cpu_seconds_total{job="nodes",mode="idle"}[2m])) * 100))... | I can't seem to figure out the Prometheus query to calculate the single value of, say, average CPU usage per instance over a time period and create the Grafana table out of it:Period: last 3h
Instance A: CPU usage A
Instance B: CPU usage BSimply put, I want to:select a time period in Grafanahave Prometheus average the ... | Prometheus average over a time period into Grafana table |
As Mark said, you just have to use theWS APIto query the database. What you're missing is probably the name of the metrics related to integration tests (they are not documented yet on ourmetric definitions page). So here they are:it_coverageit_lines_to_coverit_uncovered_linesit_line_coverageit_coverage_line_hits_datait... | I am developing an application using sonarJava web service client API. I would like to get Integration Test code coverage per class from theJaCoCo plugin. Can this be done with this API? | Get JaCoCo Integration Coverage from Sonar |
That output means that the process is running. Which is what you want. You should try accessing the URL from the browser directly after running the command without pressingctrl+c.As a side note you can write a bash script to do this which will make it easier to add arguments to the gunicorn commands.I have a gist that ... | I am trying to implement nginx + django + gunicorn for my project deployment. I am taking the help of following article:http://tutos.readthedocs.io/en/latest/source/ndg.html. I followed the steps as described. Now, I am trying to start gunicorn. What am I getting at the screen is:$ gunicorn ourcase.wsgi:application
[20... | Gunicorn stuck at Booting worker with pid: 9293 |
It's all in how the sonar.modules properties are set.Following my example, the properties might look like this:sonar.modules=ProjectA,ProjectB
ProjectA.sonar.modules=SubprojectA,SubprojectBThe remaining properties for setting basedir, source dirs, etc. are just like any other sonar properties file. | There are plenty of examples of how to do multi-project Sonar projects with Ant. However, what if the projects are nested multiple layers deep? For example:root
Project A
Subproject A1
Subproject A2
Project BI want to generate a Sonar project that reflects the same structure as the projects, w... | How to do a multi-level multi-module Sonar project with the Ant task? |
6
It all depends on the level of aggregation that you want:
if you define instance as a source and set instance_id for the name of the stream, then you will have separate log streams for your instances.
If you define your application as a source and set e.g. "MyApp" as ... |
I'm trying to setup Amazon Cloud Watch as a remote logging destination for some C# applications I am working on. One thing that is not clear to me is the difference between a Log Group and a Log Stream and how they should be used?
I have a number of small applications which many different users will be running on man... | What is the difference between a Log Group and a Log Stream? |
Don't store your credentials in code! Use environmental variables.
For example using bash on linux or OSX:
On the command line you can set the environmental variable and then run your script.
$ export PASSWORD=my_password
$ python run.py
Your script can then grab the password. This way you don't expose any secrets wh... |
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
... | Password protection for public github [closed] |
Very probably you are opening connections in /thesystem/code/api.py entry point.
That means your file descriptors will be inherited in workers and this does not work with sqlalchemy.
Add --lazy-apps (lazy-apps = true in your ini config) to load /thesystem/code/api.py in each worker instead of loading it in the master ... |
I'm using a setup with nginx, uwsgi and SQLAlchemy. I recently switched from SQLObject and I'm now seeing strange random errors with SQLAlchemy. For instance:
sqlalchemy.exc.ResourceClosedError: This result object does not return rows. It has been closed automatically.
or:
sqlalchemy.exc.NoSuchColumnError: "Could not... | Random errors with SQLAlchemy |
I am not sure you can use an Exponential Backoff if you are using the SQS Trigger because, behind the scenes, this is not essentially a trigger. Lambda keeps polling the SQS queue for messages instead.SQS will make the message invisible for whatever period is defined in theVisibility Timeoutattribute, meaning every tim... | I have an AWS Lambda (python) that is triggered by SQS events. If the lambda fails , SQS retries based on the retry settings. How can I make changes to the retry settings to enable exponential backoff? | AWS Lambda - SQS Integration with Exponential Backoff |
Refer to thisSO questionFurther try thisProcess currentProcess = System.Diagnostics.Process.GetCurrentProcess();
long totalBytesOfMemoryUsed = currentProcess.WorkingSet64; | How to measure the total memory consumption of the current process programmatically in .NET? | How to measure the total memory consumption of the current process programmatically in .NET? |
Most likely you have another service listening on 8080, I think the omnibus install have some service hooking 8080 - just use 8081 instead.Edit:I just did a quick search and found that it's the unicorn server that is listening to 8080 with the original omnibus installer.Note:You will only need to change the external_ur... | I'm currently in the process of trying to get Gitlab omnibus installed on my private Debian server, and it works perfectly on port 80, the problem is I also have an Apache server listening on port 80. So I'm trying to get Nginx listening on port 8080 but for some reason I'm getting a
"502
Gitlab is not responding" Er... | Gitlab on port 8080 |
It doesn't fail to copy the nginx.conf file, it fails to find the data generated during the react-build stage.
I had the same problem once, that I solved changing the WORKDIR directory, since the original one was exposed as VOLUME (and it seems like it doesn't work using multi-stage builds). Try with a different one, ... |
I have Dockerfile to deploy my frontend, which is in react.
This is what I have in my dockerfile.
# Stage 1
FROM node:8 as react-build
WORKDIR /app
COPY . ./
RUN yarn
RUN yarn build
# Stage 2 - the production environment
FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=react-build /app/b... | Docker fails to copy nginx conf |
On the repository page there is commits button below the Big Green Pull-Down Code button to see all commits. Clicking on it will open all the history
|
I am looking for the history button on gitHub for all the past git commits.
These are buttons on the gitHub page.
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Settings
1 branch
0 tags
| Where can I see the commit history on the gitHub website? |
+100You can specify acontextin yourdocker-compose.yml, which does not need to be the same directory as your Dockerfile.So you can create something like this:version: '3.5'
services:
ui:
build:
context: .
dockerfile: ui/Dockerfile
ports:
- 'xxxx:xxxx'
api:
build:
context: .
... | My folder structure looks like this (monorepo):project
|
+--- /api
| |
| +--- /.offline-cache
| +--- /src
| | +--- index.js
| | +--- ...
| |
| +--- Dockerfile
| +--- package.json
| +--- yarn.lock
|
+--- /common
| |
| +--- /src
| | +--- index.js
| |
| +--- package.json
... | yarn: install local package from monorepo and use it inside docker image with offline cache |
Figured out the issue:I currently have spark 2.3.1 installed locally and the variableSPARK_HOMEpoints to/usr/local/spark. For this current project I downloaded a distribution of spark 2.4.5. I was in the 2.4.5 directory and runningbin/spark-submit, which should have (as far as I can tell) pointed to thespark-submitbund... | I'm usingspark-submitto create a spark driver pod on my k8s cluster. When I runbin/spark-submit
--master k8s://https://my-cluster-url:443
--deploy-mode cluster
--name spark-test
--class com.my.main.Class
--conf spark.executor.instances=3
--conf spark.kubernetes.allocation.batch.size=3
--conf spark.kubernetes.name... | Some spark-submit config options not reflected in k8s pod |
Please, read documentation.https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSOperationQueue_class/Reference/Reference.html(void)addOperation:(NSOperation *)operationParametersoperationThe operation object to be added to the queue. In memory-managed applications, this object is retained by the ope... | Does inserting an NSOperation to a NSOperationQueue increments the retain count of the NSOperation? If YES when will it get decremented? | Retain count behavior for NSOperation |
I use this package:https://github.com/aws/aws-sdk-php-laravelThis package AWS components with works!I recommend it to you | I get this error in laravel when trying to access Queue -Class 'Aws\Sqs\SqsClient' not foundMy default queue is 'sync' and I have not required 'Sqs' anywhere in my composer.json. Then why is this happening? Is it compulsory to include it in newer versions of Laravel. | Error related to AWS Sqs Queue in Laravel |
perhaps its being called by another crontab as acurlor awgetrequest. are there any other machines that are being used?also check the timestamps to determine if they are regularly occurring vs just happening often. if they are not occurring at a (roughly) equal amount of time per execution, then its probably not cron at... | I have a php file that is being executed at frequent intervals on my server. I've checked crontab and the cronjobs, I cannot find the source. Is there something I can print from the php file to identify the calling process? | Identify calling process of a php file |
1
The most common cause of leaks is circular references. However, as of PHP 5.3, those are now detected and taken care of.
So now the only causes of "leaks" should be:
A bug with PHP (I don't know of any offhand; check the active bug reports.)
Building large (for instanc... |
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Finding cause of memory leaks in large PHP stacks
What are common causes of PHP memory leaks? I'm looking for things that are commonly done by unsuspecting PHP ... | What are common causes of PHP memory leaks? [duplicate] |
You can uselintrand upload the results toSonarQube. There is an example at here:https://github.com/paulospx/sonarqube-r | A simple question: does anybody knows if a tool similar to sonarqube exists for R code? or a sonarqube library?
I mean, a tool for analyzing technically quality of the code, not only highlighting or sintax formating.
thanks in advance! | Analyze and measure technical quality in R code: any tool similar to SonarQube? |
I don't know a ready to use library. But it seems pretty easy to write a script, which generates an Nginx config file from application's routes (for example, during application setup). This file can be included into main configuration of server using "include" command of Nginx config:server {
listen 80;
server_... | I've been following theWeb Frameworks Benchmarkand have noticed that a number of web framework suffer from the same performance penalty, that being they do HTTP routingwithinthe framework itself and not leverage the highly performant HTTP server of NGINX to do routing.For example, in theFlaskpython framework, you might... | How to dynamically load HTTP routing into NGINX from your webframework? |
You can take look at about:networking#dns which directly lets you clear the cache.
And Where does Firefox keep cached DNS responses? had already been answered by Firefox's Support Team.
ScreenShot:
By the way for chrome it is chrome://net-internals/#dns
|
Like in the title, how to clear that cache?
There are some plugins, but its installation is disabled for Firefox Quantum...
https://addons.mozilla.org/en-US/firefox/addon/dns-flusher/
https://addons.mozilla.org/en-us/firefox/addon/clear-dns-cache/
| How to clear DNS cache in Firefox Quantum? |
You can specify multiple insecure registries by lining them up:
--insecure-registry IP1:PORT --insecure-registry IP2:PORT --insecure-registry IP3:PORT
Source: https://github.com/docker/docker/issues/9026
|
As we all known, we can add one --insecure-registry to the /etc/default/docker config file to allow insecure registry, like this:
DOCKER_OPTS="$DOCKER_OPTS --insecure-registry myregistry:5000"
My question is: Does it support adding more than one --insecure-registry since we need to communicate with more than one regi... | How to allow multiple '--insecure-registry' for docker registry |
This is the new best way toupgradenpmon Windows.Run PowerShell as AdministratorSet-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install -g npm-windows-upgrade
npm-windows-upgradeNote: Do not runnpm i -g npm. Instead, usenpm-windows-upgradeto update npm going forward. Also if you run the NodeJS installer, ... | I am looking for a way to upgrade my npm, I follow the option 3 for windows in herenpm docs. but when I install it it said npm.exe already in nodejs folder. I try to overwrite it with --force but it still not overwritten. How to do it correctly? also how to update node? | How to update npm in windows? |
If you have no commited file, you can't run command mvn sonar:sonar.
You need commit any change into your branch and after run mvn sonar:sonar.
This fix me. | I couldnt run my maven project in sonarqube using command mvn sonar:sonar.
It results with the error :Missing blame information for the following files.
But a normal helloworld program run successfully and it got added in the projects tab of sonarqubes.Kindly help me to sort out this error. | Missing blame information for the following files SonarQube Error |
Email in git config should be same as in your Github accountgit config --global user.email "[email protected]"Source:https://help.github.com/articles/setting-your-email-in-gitTry to add email with which you sent your commits fromGithub settingsto make previous commits belong to your account. | I got a problem.
When I am committing something to github from my console, it asks me to provide my login & password. After this when I am going to my github page, I notice that in there only my name appear (without my avatar and link to my account). In the contributors list there is no my account also. I have done a l... | github, contributor list, there is no my name |
TLDR; No.
From Documentation
The Compose file is a YAML file defining services, networks and volumes. The default path for a Compose file is ./docker-compose.yml
Now to answer on your arguments regarding the format and the difficulty to find errors violating original meaning:
yamllint is a first tool that can help ... |
Yml depends on formatting for nested structures, and for inaccurate filled files it is very hard to find out all format errors that violate original meaning. Is there any alternative to yml format for docker-compose configuration file?
| Docker compose yml alternatives |
I think you are getting some overlap of naming. Be explicit and see if it works:HttpContext.Current.Cache["KeyName"]="blah blah blah";You can also do the following in your ASP.NET codebehind:Page.Cache["KeyName"]="blah blah blah";orthis.Cache["KeyName"]="blah blah blah";Cacheis handled by ASP.NET so you just have to u... | I would like to use Cache for my web application.Here is the questionI found this link,http://msdn.microsoft.com/en-us/library/18c1wd61.aspxFor that link, all the example use something likeCache["KeyName"]="blah blah blah";When I try to do the same thing, I have an error message, said"using System.Web.Caching.Cache is ... | Question about ASP.NET Cache class |
Yep, if it has "Copy" in the name, you should release it. If it returns an array of ABRecords, it's the array itself that is being retained for you. If the array is empty and no names were found, you'd still need to release it.
I haven't used this function though, and there's a chance this could be an edge case that d... |
I call ABAddressBookCopyPeopleWithName(book, fullname); which is supposed to return an array of ABRecords for all the names that match 'fullname' from the AddressBook. Since this has a 'Copy' in it's name, it's returning with a retain count of 1 which I should release.
What if it couldn't find any matching names? Sho... | memory management: should I release if a Copy method returns empty? |
You could write aBEFORE UPDATEtrigger where you use theOLDandNEWaliases in your trigger to compare the values that were available in the record before the update with the values you are updating with. Depending on the result of the comparison you can write an entry to your audit table.ShareFollowansweredMay 15, 2009 at... | In looking at similar questions like:Getting trigger to insert changed column values only in audit tableAudit Logging StrategiesI would like to take this one step further and compare the updated data to see if it actually has been updated... I'm not sure if this is ideal (performance wise).Background:We have some data ... | MySQL Trigger based Audit logging with comparisons |
Your Internet search gave you the right answer.
Block size of 16 bytes -> need 4 bits to specify the offset within the block.
8K byte cache and 16 byte lines -> 512 blocks. (8K / 16 = 512)
Direct mapped cache -> 512 / 1 way set associativity = 512 sets
512 sets -> need 9 bits for the index (512 = 2^9)
With a 32 bit ... |
If i have a
32bit address
,
cache size(c) 8 KB
,
Block Size(b) 16 B
,
Set Associativity(a) 1
its a Direct Mapped Cache
what would be the bits per line in cache? including dirty bit and validity bit.
what would be the total no of lines in cache?
some idea which i got via searching on internet is
offset bits ... | Cache bits per row and total length |
ok, in this case, even thoughdocker statswas showing that my container had 6gbs, the virtual machine on which docker was running was limited to 1gb. so i changed my virtual machine limitations and solved the problem. | when i start a container like this:docker run -d --memory=6g $image,docker stats $container_idshows that it has a memory limit of 6gb, which is expected.however, when i connect into that container (docker exec -it $container_id /bin/bash), my shell is limited to only 1gb. (which is confirmed by callingfree -mas well as... | available memory when attached to docker container is less than container limit |
I have found a solution for this. The Sonar.exclusions parameter does not directly work forSonar Scanner for MSBuildunlike the general Sonar Scanner. For MSBuild projects, we need to add the exclusion in the .csproj which we want to exclude.
Adding the below code to the .csproj file will result in the exclusion of fil... | I have an MSBuild project which is analyzed usingSonar Scanner for MSBuild. I have passed the following sonar.exclusion properties as part of my pipeline script to exclude a folder from the analysis. But all my exclusion combinations fail to actually exclude the files./d:sonar.exclusions=\"IxMilia.Dxf/**,IxMilia.Dxf/*,... | Sonar.exclusions not working with Sonar scanner for MSBuild |
You can't. Your pull request will merge with the existing head of the project, or whatever branch you specify. If the project has a branch devoted to that version, you can target that branch in your pull request. | I have created a patch, in a fork, for an older version of a project hosted on github. Having checked out the tag for the version I'm fixing, committing my change and creating a new tag, I'm not sure how to proceed. Pull request seem to only compare branches.Is there a process for this? | What is the process for submitting a github pull request for a modification to an earlier tagged version of a repository? |
Yes, of course you need to use Intruments.
Swift uses Automatic Reference Counting (ARC) to track and manage your app’s memory usage. In most cases, this means that memory management “just works” in Swift, and you do not need to think about memory management yourself. ARC automatically frees up the memory used by cla... |
As I learnt from the apple documentation that ,In iOS ARC will automatically take care of the memory leaks and memory management.
But my doubt was, do we still need the role of Xcode instruments (Allocations and Leak) to ensure whether memory leak has happened in our application??
Please do share if you know the solut... | As ARC came into existance in iOS, do we stil need the requirement of using xcode instruments (Allocations and Leak)? |
Sure, github even got doc about it:https://help.github.com/articles/remove-sensitive-data/ShareFollowansweredNov 27, 2016 at 23:46ReactormonkReactormonk21.6k1414 gold badges7575 silver badges124124 bronze badgesAdd a comment| | I would like to remove a single file from my commit histories. I have already deleted the file, not knowing that it is still visible in my commit histories (I'm new to github...). There are several posts about how to remove the entire commit history as well as how to amend a commit that hasnt been pushed, but I have al... | github remove single file from commit history |
The intention of .cache function is to speed up your data pipeline by cache your samples into memory/disk space. Therefore, for all epochs after initial epoch, your pipeline will no longer need to read/parse/process. So with that being said, it is usually the best to put it at the end of your data pipeline.You can time... | I am trying to use tf.Dataset.cache but it seems to have no affect.I have 3 questions please:At what point would you want to cache your dataset ? I assume it will be before any mapping action that has random behavior. Is it recommended to cache the dataset after inital parsing from a TFRecord file before any other mapp... | Tensorflow Dataset API : Cache |
Try this
<script src="script.js" type="text/javascript"></script>
Use closing script tag.
For more check this answer.
|
This question already has answers here:
Why don't self-closing script elements work?
(12 answers)
Closed 5 years ago.
I am able to load my javascript file on the local machine. But... | Javascript file not working on github pages [duplicate] |
Since your estimators arePipelineobjects, thebest_estimator_attribute will return a pipeline as well. You have to further access the correct step with your regressor by indexing it, for example:plot_tree(
Dtree.best_estimator_['regressor'], # <-- added indexing here
max_depth=5,
impurity=True,
feature_... | This question already has an answer here:sklearn "Pipeline instance is not fitted yet." error, even though it is(1 answer)Closed2 years ago.I have GridsearchCV with a pipeline using decision tree as estimatorNow i want to plot the decision tree corresponding to the best_estimator of the GridsearchCVThere are some reply... | Plot best decision tree with pipeline and GridsearchCV [duplicate] |
You need to modify your test case like this:it('export configuration', () => {
spyOn(service, 'exportData');
// This will serve the 'if' condition
const type = 'config';
service.exportData(type)
expect(service.exportData).toHaveBeenCalledWith('config');
// This will serve the 'else-if' c... | I have this snippet of code:exportData(type: 'config' | 'equipment'): Observable<any> {
url = '';
if (type === 'config') url = `${path}Exportconfig`;
else if (type === 'equipment') url = `${path}ExportEquipment`;
return httpClient(...);
}I mocked the tests but still having this message in sonarbra... | mock test if/else with Jasmine |
1
At the risk of gross oversimplification:
There is no real relationship between page size and new. Most C++ implementations call malloc () for actual memory allocation within new.
Most malloc implementations manage a heap memory pool. When a call to malloc makes a request ... |
Can someone explain me the relation between C++ new and Virtual memory page size. OS divides physical memory into page (usually 4K) for which are mapped into virtual memory. I want to understand how C++ new/delete affects allocation of page.
Thanks
Nayeem
| C++ Memory Management and Virtual memory Page size |
I encountered the same problem as you.
Finally I found the missing rbac.
I solved it by the following method:get sa loki-promtailkubectl get sa -n lokiNAME SECRETS AGE
default 1 17h
loki 1 41m
loki-grafana 1 41m
loki-grafana-test 1 41m... | caller=client.go:349 component=client host=loki:3100 msg="error sending batch, will retry" status=-1 error="Post "http://loki:3100/loki/api/v1/push": dial tcp 172Please help | Loki connection refused on Grafana |
bind is the simpler one to understand. It takes a host path, say /data and mounts it inside your container, say /opt/app/data. /data can be anything, probably mounted on NFS or it maybe a local host path.
docker run -v /data:/opt/app/data -d nginx
volume mount is where you can use a named volume.
You would normally ... |
I am using docker-compose syntax version 3 and want to use some volumes. The documentation on the long syntax for volumes states the following:
type: the mount type volume or bind
but never fully explains the difference. What is it?
| Docker compose v3: The difference between volume type mount and bind |
You should commit all the source code project folder like:
YourProjectFolder/
app.yaml
application.py
lib/
foo/
One potential user will:
Clone the source folder from github.
Select Add existing, from the GAE Sdk dashboard, specifying the cloned source folder.
|
I have a google web application project that I want to host on github. I'm familiar with the basics of github. I have committed simple java projects. But how do I commit a google web project so that a user can just import the project from github and its created.
Do I just commit all of the source code. Then anyone wh... | Commiting a google web app project to github |
Each time you call$(this)or$(selector)it is a function call to create a new jQuery object... so if you have already created it once, caching will save calling a function to create the same object againShareFollowansweredMar 7, 2012 at 14:38charlietflcharlietfl171k1313 gold badges122122 silver badges151151 bronze badges... | We all know it's good to cache calls to the DOM, so instead of calling $('#someElement') more times, just save it to a var $someElement and use that.But is it the same when using $(this) inside an event listener for example?
Should $(this) be cached?Thank you. | Caching $(this) in jQuery is a best practice? |
The name of your file needs to match the module name in the Handler configuration. In this case, your Handler should be set to helloworld.handler, where helloworld is the file that would be require()'d and handler is the exported function. Then it should work with the same zip file.
|
I am trying to create a simple lambda function, and I'm running into an error.
My code is basically
console.log('Loading function');
exports.handler = function(event, context) {
console.log('value1 =', event.key1);
console.log('value2 =', event.key2);
console.log('value3 =', event.key3);
context.succe... | Creating a lambda function in AWS from zip file |
You can check howhawaii-desktop/hawaii-terminalincludesqmltermwidget, since it is based on it, asseen in its sources.It involves compiling the qmltermwidget sources through aplugin/qmltermwidget/qmltermwidget.profile (SeeQT pro file Configuration Features)Those sources are declared in the main projectplugin/CMakeLists.... | I would like to know how to use thisqmltermwidget GitHublike how should I use it in a qt program whether I shouldinclude something like libs=-qmltermwidget in the .pro file or what should I do??? | How to use Qmltermwidget |
I had issue in creating user. When I tried to login as user, it used to somehow pick up my container ip I am trying to login from. All I needed to do was make user not local host but global with '%' and that solved the issue.create user 'user'@'%' identified by 'password'; | I am fairly new to the system. Fortunately Google cloud plateform has a one click setup for master slave mariadb replication which i opted or(https://console.cloud.google.com/marketplace/details/google/mariadb?q=mariadb).After which I could login in as root and create a user. I ran the following sql command.create user... | Kubernetes mariadb user login |
Man your mod_rewrite is not enable in apache.For enable mod_rewrite follow this.Referencehttp://www.kingpabel.com/apache-mod-rewrite/<Directory /var/www/html>
AllowOverride All
</Directory>
//enable mod rewrite
a2enmod rewrite
//restart apache
service apache2 restartShareFollowansweredMay 21, 2015 at 10:12Imtiaz Pabe... | I'm trying to setupSlimfor me application i've got issue that route with parameters not working.This is myindex.phprequire 'Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$app = new \Slim\Slim();
// GET route
$app->get('/', function () {
print "hello";
});
$app->get('/books/:id', function ($id) {
prin... | Slim route with parameter not working |
This is because your system depends on an environment variable for places where to search for executable files and that variable is not set in the cron sessions. This variable is named$PATH. You can see it's contents in your current session by just typingecho $PATHin your terminal.When a cron session is started for a j... | I have a script to invalidate Amazon CloudFront in a .sh file and it works fine when I run it with bash (bash /../filename.sh). I need to invalidate my distribution every thursday, so I wrote a cron job, but it is giving the error "aws: command not found".This is my cron job
45 10 * * 2 /usr/bin/bash /var/www/cm... | Cronjob fails to run a bash script giving an error "aws : command not found" |
The result of your map is always the original value of $arg_latitude, because that is the value that you have inserted in the right hand column.
You need to add a capture to your regular expression and use that as the new value.
For example:
map $arg_latitude $rounded_latitude {
default $arg_latitu... |
I am trying to use nginx caching features, however we have and endpoint that uses latitude and longitude, so for that, to increase the cache hit ratio, we have to truncate lat and long.
I created a map to ignore last two latitude digits. The problem is the map isn't working, it always returns the original latitude (4... | Regex to truncate a string on nginx |
2
Good day,
it seems that FileChannel.map causes the problem on java 7. if you use FileChannel.map, you can no longer close the the file.
a quick work around is instead of using FileChannel.map(MapMode.READ_ONLY, position, length)
you can use
ByteBuffer b = ByteBuffer.alloc... |
I'm working on a sc2replay parsing tool. I build it on top of MPQLIB http://code.google.com/p/mpqlib/
Unfortunately the tool uses filechannels to read through the bzip files,
and uses map(MapMode.READ_ONLY, hashtablePosition, hashTableSize);
After calling that function closing the file channel does not release the fil... | Java 7 filechannel not closing properly after calling a map method |
For future reference, I figured out my own issue. The issue was that I had to change the containment type of the database that I wanted attached.I opened Microsoft SQL Management Studio, right-clicked the database whosemdfandldffiles, I wanted and selectProperties. Then, I select theOptionspage on the left-hand side an... | I am having trouble getting a SQL database instance to attach to Docker container.Here is my Dockerfile.FROM microsoft/mssql-server-windows-express
EXPOSE 1433
WORKDIR C:\\tmp
COPY MyDBNAME.mdf ./
COPY MyDBNAME_log.ldf ./
WORKDIR /I use that to build an image:docker build . --tag=mynewsql.At this point, themdfandldf... | Attaching SQL database in container does not work |
This line:java.lang.NoClassDefFoundError: org/apache/commons/text/RandomStringGenerator$Buildermeans that your JMeter installation is broken somehow, you'resupposed to have commons-text libraryinJMeter ClasspathThis line:2024-03-07 15:09:43,994 WARN o.a.j.p.h.p.ProxyControl: Could not read key store keystore password w... | Trying to record in Jmeter, but when clicking on Start in Http Script recorder, getting below error :Jmeter - 5.6.22024-03-07 15:09:43,994 WARN o.a.j.p.h.p.ProxyControl: Could not read key store keystore password was incorrect; cause: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final ... | Issue with Jmeter Script recorder regarding SSL |
3
You have to create a PR on the branch of the other person that he will merge or squash in its repository (that will update it's PR).
If you want to add more than one commit without creating a merge commit or even modify the already pushed history, the best thing to do is ... |
We have a repository from which everyone has created a fork and make PR for features and bug.
I want to make changes into another person PR. One way I have seen is that I can login into github and go to that file in that PR, make changes and commit there.
But since I want to compile my changes locally, how can I do it... | How to make changes to other person pull request in github? |
From what I can see, no, there is no traffic recorded for a Gist.
The only recent evolution regarding Gist are:
"Gist notifications " (May 2019)
"Authors subscribed to gists " (June 2019)
Thanks to the OP stevec's own query to GitHub, the official answer is (Sept. 2020):
I'm afraid we do not currently have this fea... |
Getting 'insights' for a repository on github is very straight forward (go to repository url, click 'Insights', go to any section of interest (e.g. traffic etc).
i.e.
How can we see similar stats for a github gist?
| How to get insights (traffic etc) for github gist? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.