Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
I have the feeling that the problem is due to the use of the @Cached annotation. In fact if you cache the value manually it works, but if you use the annotation (like described in the doc by the way- it doesn't seem to work.
The following piece of code can demonstrate it easily:
@Cached(key="page1")
public static ... |
@Cached(key="homePage")
public static Result index() {
return ok("Hello world");
}
The docs doesn't tell me much about smart caching. Is this really all I have to do?
What if the content changes? Does play automatically update the cache?
This seems to good to be true.
Update 1:
For some reason it does not work
@Ca... | Java Play2 - Smart cache |
The error you encountered means that a class used by the AWS SDK is not allowed within App Engine (for some obscure reasons).Even if you manage to bypass this error, the AWS SDK could not be run on GAE because it uses HttpClient and not URLFetch.For more information you could read :http://www.apcjones.com/blog/2010/11/... | I'm trying to access an S3 bucket from Google app engine and I get an exception regarding a restricted class trying to initialize the AmazonS3Client client. See code and exception below.Any idea how to make this work?Code:AmazonS3 s3 = new AmazonS3Client(new ClasspathPropertiesFileCredentialsProvider());Exception:Cause... | Initiating AmazonS3Client on GAE throws NoClassDefFoundError |
Use it in the following manner :
FROM ubuntu:14.04
CMD ["Hello docker!"]
ENTRYPOINT ["echo"]
|
I have such dockerfile:
FROM ubuntu
CMD "Hello docker!"
ENTRYPOINT echo
I build image as following:
docker build -t mydocker .
Then I run it:
docker run --name mydocker1 -t mydocker
But as output I see only empty string, I exptected to see "Hello docker1" though.
I tried to also:
docker logs mydocker1
It gives me ... | Can't see output of Docker container |
What is the core driving design of memory management ?In almost all cases, you should use automatic resource management. Basically:Wherever it is practical to do so, prefer creating objects with automatic storage duration (that is, on the stack, or function-local)Whenever you must use dynamic allocation, use Scope-Bou... | It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened,visit the help center.Closed11 years ago.What is the design factor in managing m... | What is the philosophy of managing memory in C++? [closed] |
Try:RewriteEngine on
RewriteCond %{REQUEST_URI} !^/(index.html)?$
RewriteCond %{REQUEST_URI} !.(gif|jpeg|png|css|js)$
RewriteRule .* / [L,R=302] | I would like to redirect all requests to main page (index.html). URL in status bar should not show index.html. At this moment I'm using the following code which redirects to index.html and shows it in URL:RewriteEngine on
RewriteCond %{REQUEST_URI} !^/index.html$
RewriteCond %{REQUEST_URI} !.(gif|jpeg|png|css|j... | Redirect all requests to main page using htaccess (hide index.html in URL) |
There are no risks other than usual risks of misconfiguration or potential security holes you could leave - but nothing in particular related with the scenario itself.Anyway answering your question, you will just do it as with traditional multi master way, just make sure you have met thisrequirements:Full network conne... | I am trying to add additional master nodes to my K8 master which is a physical server. Can I add 2 virtual servers in a separate subnet as additional masters for the cluster. The secondary masters will be hosting K8, docker, and etcd.
Is the a risk in trying to do this beside latency? | Can Kubernetes mix physical and virtual servers as masters |
The error issue was related to the location / having an end value of /index.html. Essentially, nginx was first trying the uri as a file, then as a directory, and then reverting to index.html. Instead I wanted it to return a 404. So I changed it to the below and now it works.
location / {
try_files $uri $uri/ =4... |
First off, first time nginx user. So, I'm still learning the differences from Apache and nginx.
I have a stock install of nginx. (apt-get install nginx-full) I modified the default configuration found at '/etc/nginx/sites-enabled/default' for my setup. However, error pages just don't work. My docroot is /server/w... | nginx configure default error pages |
0
When you create a snapshot, you can specify a storage location. The location of a snapshot affects its availability and can incur networking costs when creating the snapshot or restoring it to a new disk. You will find the pricing for snapshot storage here.
This article... |
I've two VMs created at the Compute Engine session with hourly snapshot as backup copies. I never created any storage bucket, I wonder where do those snapshots stored and how does it count for the storage space charges?
And, is there a way I can backup the VMs to on-prem storage? e.g. can I use any API command to dow... | Compute Engine Backup |
Even for subtree, a pull --squash can be troublesomeThat command is more used on the integrator side, when you merge a PR (Pull Request) branch into your original repo (in order to get only one commit).See for instance "Merging a PR (yours or contributors)"Remember that pull requests are equivalent to a remote github b... | I'm using a forked repo on GitHub and from time to time I need to merge in work on the real ("upstream") repo, as describedhere.I would love to squash their changes like thisgit pull https://github.com/mixedinkey-opensource/MIKMIDI.git MIDIFiles --squashbut... will my stuff be automatically merge-able with the upstream... | Merging Upstream Repo with --Squash |
It says:This image exposes the standard MySQL port (3306), so container linking makes the MySQL instance available to other application containersFirst, make sure your docker run map that port:-p 3306:3306(orthe exposed port from the Dockerfilewouldn't be accessible from the Linux host)Then, you needeither to add aport... | I'm trying to run mysql server on a Docker (installed with Docker Toolbox for Mac) container and access it from my machine running OS X Yosemite. The documentation from the official repo does not explain how to connect from outside the docker host !!I've created a container using theofficial repositoryas follows:$ dock... | Connecting to a mysql running on a Docker container |
If you look at theconfigsyou'll see thatserver_tokenscan be either in thehttp, server, locationcontexts in yournginx.conf. So, on the nginx ingress controller to it really depends on where you want to add that setting (and how):http context means for all configs in the ingress controller so you'd have to change in the ... | I using NGINX Ingress Controller in Kubernetes cluster, need to hide the Nginx version information for the client request. since Nginx configuration file generated dynamically. What is the best way to include below line in nginx.conf file?server_tokens offThanks
SR | NGINX Ingress Controller hide Nginx version |
Noticed you have changed your question. Anyway, you can whitelist using the EIP that associated with the NAT. | I have a cluster v 1.15 running in AWS. I have a service that I use from within the pod that I'm not in control of and that requires whitelisting via IP address so I wanted to get a static IP use NAT gateway IP. The cluster is currently running in a public subnet but I'm planning to move the node groups to a private s... | expose cluster running private subnet to an internet facing load balancer |
Use this as your base image:
FROM mcr.microsoft.com/dotnet/aspnet:5.0.0-buster-slim AS base
|
I have a dotnet5 Console application that is inside a solution and has dependencies on other sibling projects. I create the Docker file with visual studio tools and this is the Docker file:
FROM mcr.microsoft.com/dotnet/runtime:5.0-buster-slim AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS ... | why dotnet 5 docker container fail in run time? |
School boyed it. Top right I needed to select the correct region, it defaulted to Oregon.
Appending this graphic to your answer rather then writing a new one.
|
Following this tutorial http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_PHP_symfony2.html
Application URL works with Hello World and I see the data in the S3 console.
| Why is my Elastic Beanstalk application created through the CLI not showing up on the online AWS Elastic Beanstalk console? |
Environment variable ?You may try to add this:. /etc/profile
source $yourHomePath/.bash_profile
source $yourHomePath/.bashrcThis is used to add user's profile into path. | I have one script that I am trying to set as crontab, but it is failing at "p4 sync" statement.Getting following error :/bin/sh: 1: p4: not foundI can run it manually without any errors.I tries adding full path:/usr/local/bin/p4 syncStill not working.Any clue what i am missing?? Thank you in advance. | Cronjob command is not working |
There is a file in.gitdirectory,config. You can fix it there. (You can edit the same withgit config -e).Or use the command to fix the origin:git remote set-url origin[email protected]:path/to/repo | I've looked at the other threads with similar questions, but I'm new to git, so most of it didn't make sense :(Here's the problem:I can't push a simple readme onto my repository on github.$ ssh -T[email protected]seems to be working fine.But whenever I push the README using the following:$ git push origin masterI get t... | fatal: remote server hung up unexpectedly |
~/your-repo $ git remote add pr-source https://github.com/<user-providing-pull-request>/<repo-name>
~/your-repo $ git fetch pr-source
~/your-repo $ git merge pr-source/<pull-request-branch-name>
Note that:
you don't need the main repo, either from github or cloned locally
you don't need a clone of the repo providi... |
My situation is as follows:
- I have a fork of an opensource github project.
- I do all of my development in my forked repo in branches from the develop branch
- There is an unmerged pull request I need in the main repo's develop branch
- To test the unmerged pull request I created a new directory and cloned origin to... | git: how to merge a pull request into a fork? |
Does agit push my_fork my_branchupdate the3-2-stablebranch only in my_fork?Yes it will. It won't affect any other repo.Note that the3-2-stableon your fork won't be impacted either: anewbranchmy_branchwill be created on your fork to reflect your local branch.But if you want to push/pull that branch from the repomy_fork,... | I'm trying to update the 3-2-stable branch on my fork of the Ruby on Rails project. So after cloning rails, I initially did agit checkout -b my_branch remotes/origin/3-2-stable. Then I made my changes. Then I added my fork as a remote repository withgit remote add my_fork[email protected]:myusername/rails.git. Does agi... | Pushing a branch to a remote repository in git |
First you have to go to your settings.py and do the following:
Set DEBUG = False (the default installation comes with DEBUG = True)
Add STATIC_ROOT = 'static'
Then you have to tell EB where your static files are gonna be. For that, create a file inside .ebextensions folder, at the root, named staticfiles.config (can... |
I deployed my django project to aws elastic branstalk. I followed all the steps. In EBS console, project health seems Ok. When I try to run the project, I get the following error.
`Refused to apply style from '' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is en... | Mime Type error from AWS Elastic Beanstalk |
Simply delete theawait.$does not return a promise, so awaiting it is useless.const element = $(header.content); | I'm getting anRefactor this redundant 'await' on a non-promise.error on SonarQube on this code:async getText(): Promise<string> {
const element = await $(header.content);
return await element.getText();
}For this lineawait $(locators.content)How can I solve this?The solution on SonarQube is using something like... | How to refactor this redundant 'await' on a non-promise |
When the container is terminated, just do this to get the container id:
$ docker ps -a
|
I am trying to follow the instructions here in order to run a Jupyter Notebook that's not part of a prebuilt Docker container.
In order to get the contain id, I did this in Docker Quickstart Terminal when the notebook server is terminated with Ctrl + C (no response when the notebook server is running), I got
$ doc... | How to get docker container ID within Docker? |
Thereceive_messages()function takes aMaxNumberOfMessagesparameter that defaults to 1 message. Therefore, you will need to ask for more messages.However, thereceive_messages()documentationstates:MaxNumberOfMessages(integer) -- The maximum number of messages to return. Amazon SQS never returns more messages than this val... | I have a little problem receiving more than 1 message/line from my queue inAWS SQS.Here is my code:import boto3
import boto
AWS_ACCESS_KEY = '*****'
AWS_SECRET_ACCESS_KEY = '******'
sqs = boto3.resource('sqs', aws_access_key_id=AWS_ACCESS_KEY,
aws_secret_access_key=AWS_SECRET_ACCESS_KEY,
region_name='us-east-... | How to receive more than 1 message from an SQS queue in AWS? |
security=authencwith eitheraction=alloworaction=bypassdepending upon your particular requirements.ShareFollowansweredNov 10, 2016 at 10:48CompoCompo37.5k55 gold badges2828 silver badges4040 bronze badgesAdd a comment| | I am trying to use "netsh advfirewall firewall add rule" to create a windows firewall rule.How can I set the "action" parameter to "Allow the connection if secure" and require connections to be encrypted? | netsh advfirewall firewall (set Allow if encrytped) |
4
Running this should do it:
clj -P
Share
Improve this answer
Follow
answered Sep 14, 2021 at 7:56
user2976698user2976698
10322 silver badges66 bronze badges
Add a comment
... |
I inherited a clojure code base and I'm trying to containerize it for local development. The creators used deps.edn to manage the dependencies. However, I can't figure out what RUN command I should use to pre-install the dependencies for the project.
Currently, my entrypoint is the following ['clj', '-m', 'app'] which... | Install dependencies in container using deps.edn |
<div class="s-prose js-post-body" itemprop="text">
<p>Not sure if it's best solution. </p>
<p>I took DNS that appears on my host after connecting to VPN</p>
<pre><code>scutil --dns | grep 'nameserver\[[0-9]*\]'
nameserver[0] : xxx.xxx.xxx.xxx
</code></pre>
<p>Modified docker run command: </p>
<pre><code>docker run --ci... | <div class="s-prose js-post-body" itemprop="text">
<p>I'm trying to run docker image on MacOS with VPN turned on (TUN device). Docker container can access internet, but is not able to access resources behind vpn. What is the right way to make Docker go to VPN network?</p>
<p>I've tried
<code>docker run --net host</code... | Docker container and host network VPN |
RDS is a managed service. You can't modify the ca-cert.pem file.and to authenticate using a client certificate attested to by a CA I controlThat is not something RDS supports at this time. | I want to require connections to my RDS instance to use TLS/SSL, and to authenticate using a client certificate attested to by a CA I control. I understand I can do the former by modifying my instance's parameter group and settingrds.force_ssl=1. As for the latter, I believe I need to update the CA cert used by my data... | How can I edit the Amazon RDS ssl_ca_file parameter? |
I resolved this by applying a branch protection to the main branch. Pull requests raised after that time now show the "Enable auto-merge" button.
This makes sense because, if the base branch is unprotected, the PR would merge immediately after being raised since status checks typically take at least a couple of second... |
According to GitHub's docs, after enabling "Allow auto-merge" in my repo settings, I should see a button that says "Enable auto-merge" in my pull requests. I do not.
I've opened new PRs, toggled the types of merging allowed, and switched my repo visibility to public, but nothing has worked.
| GitHub auto-merge option isn't showing in pull requests |
2
AppHarbor will always build the contents of the entire repository. Judging by the name of the folder, you're not committing source code with a solution file. Consider using that approach, as that will make it easier to control what AppHarbor deploys. Details here: http://... |
I have one private repository on GitHub folder and I would like to push over AppHarbor and for that I have created application over there and with below option I have mapped GitHub repository.
Configure GitHub to deploy to AppHarbor
However I got failed status and noticed that I need to point AppHarbor application t... | How to point Appharbor to child folder of Github repository |
It seems like the best way to do this is to make a HashSet of URL's to ignore. If the url isn't something in your set of url's to ignore, then you can deal with bad certificates.private Hashset<string> UrlWhiteList
...
private bool shouldIgnore(string url){
return UrlWhiteList.Contains(url);
}ShareFollowansweredFeb 28,... | I have a multi-threaded application that calls a number of URL's from Parallel.ForEach loop. For some of those URL's I need to ignore bad certificates for some I should not.ServicePointManager.ServerCertificateValidationCallback seems to provide global handling of all certificate validation callbacks.Can anyone give a... | Ignoring bad SSL certs on HttpWebRequest calls |
You need to remove the trailing newline character from the input; you can use the-nswitch to trim the trailing new line from theechocommand and get the same behavior as seen with the Kubernetes secrets.echo -n "admin" |base64
YWRtaW4=
echo -n "YWRtaW4=" |base64 -d
admin | When I use base64 inside Ubuntu to encode admin, I get: YWRtaW4K. But when I see secret in kubernetes I get YWRtaW4=.enter image description here | why is kubernetes using its own base64 format? |
I'm not sure how your files are structured. But you should just be able to add Pods/* to your .gitignore and then when you want to add a specific file to git use:git add Pods/IWANTTHISFILE --forceThat should do the trick. | I am looking to transition to checking in only the podfile in my Github repo instead of constantly checking in every single pod whenever I run a pod install. . right now my gitignore code CocoaPods looks like this looks like thisPods/Pods-Acknowledgements.markdown
Pods/Pods-Acknowledgements.plist
Pods/resources... | What can I add to my .gitignore so that I can prevent checking in pods on my github repo? |
In Chrome, IE, Firefox, and most other browsers,Ctrl+F5("hard refresh") will force reloading cached resources on the page. I do this all the time. I can't speak for Safari, but I'd expect it would do the same.Edit: I just did a search for "+Safari +hard +refresh" and it looks like on the Mac, youhold down theOptionskey... | IssueI work a lot with stylesheets, I change something and I check how it looks. However most if not all current browsers, store the stylesheet and thus won't let me see the differences. Only with a lot of Reset Safari, Empty Cache button presses it suddenly updates but this is really annoying.QuestionIs there a way to... | Disable cache in browser |
In linux default location of volume is:/var/lib/docker/volumesFor windows i am not sure. but you can inspect container that will give you path and all details that you want.docker inspect containernameShareFollowansweredOct 4, 2016 at 10:40pl_rockpl_rock14.8k33 gold badges3030 silver badges3333 bronze badges1I tried to... | I've a simple tiny issue. I have an app (ASPNET Core) and db (Postgres). I run the container of the db first and then run the app container so that the app can discover the db at runtime. Now I can connect the Postgres database using pgAdmin tool (On Windows) and everything works fine.Now if I run the Postgres containe... | Docker Postgres data volume on the host |
'*/1 * * * *': async() => {
console.log("I am running " + new Date(), Object.keys(strapi.config));
await strapi.services.article.publish();
}Inyour-project/config/functions/cron.js. you can add as many functions in the above format.
The function name in itself is a cron expression which is parsed by strapi t... | Hi I was wondering If anyone got examples of using Cron Schedule functions on Strapi:https://strapi.io/documentation/3.x.x/configurations/configurations.html#functionslike sending email, accessing the strapi config, etc. | CRON Example for Strapi |
Your clone() should return a smart pointer appropriately, i.e.
virtual std::unique_ptr<Base> clone() {
...
}
This avoids all ambiguity.
|
Another "modern C++" beginner question. I seem to have some misconception about how to properly use smart pointers / smart pointer destruction policies.
struct Base {
virtual Base* clone() const = 0;
virtual ~Base() { }
};
void clone_and_use(const Base &original) {
auto clone = std::unique_ptr<Base>(origi... | Destruction policy for `std::unique_ptr<Base>(ptr)` when I don't know how `ptr` was allocated? |
you can try something like this :def get(path)
@headers['Content-Type'] = MIME_TYPES[path[/\.\w+$/, 0]] || "text/plain"
unless path.include? ".." # prevent directory traversal attacks
@headers['X-Sendfile'] = "#{PATH}/static/#{path}"
else
@status = 403 # "403 - Invalid path"
end
end | I'm creating a Rails application which will be deployed to desktop machines, running both the webserver and the browser (it's a test-taking application which needs to be able to run without an internet connection).For this reason, I'll be running Mongrel or WEBRick, without an Apache/Nginx in front of it as you would n... | Making Mongrel/WEBRick serve static assets with future expires header |
1
No, it's impossible to do it like this.
But you can add a step that will identify the trigger, by checking if ${{ github.event_name }} is pull_request or push and based on that set env value.
One example will be:
env:
TOKEN: "${{ github.event_name == 'push' && 'toke... |
on:
push:
branches:
- main
- 'releases/**'
The above is from the documents here: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#using-filters
Is it possible to include env in this area? And example like the following:
on:
push:
branches:
- main
... | Setting "env" on the "on" field in a GitHub Workflow |
It is because you are trying to download using the ssh link and you have not configured your ssh. Instead try this
git clone https://github.com/fatfreecrm/fat_free_crm.git
cd fat_free_crm
|
I am trying to install fat free crm using these instructions http://guides.fatfreecrm.com/Setup-Linux-or-Mac-OS.html. But I am not able to run even the first instruction
This is what I get when I try to clone the repository
Cloning into 'fat_free_crm'...
Permission denied (publickey).
fatal: Could not read from remote... | Git repository not cloning |
AGit sparse checkoutstill uses the working tree to restore its content. That means you would always get theEWINSfolder.My workaround would be to do this checkout in a dedicated folder, and then make a mirror-rsync with the right folder (which would be outside the Git repo, not managed by Git at all). | I am trying to pull all the files and folders within a specific folder in my git repository. I have already tried using sparce-checkout but this pulls the specific folder. I wish for it to only pull the files within the folder.I have a folder called /EWINS/ and I wish to pull every folder and file within that directory... | How to pull all items within a specifc folder located on external git repository |
'I want to use a memory allocator in multithreading enviroment and each thread eats a lot of memory.' - why? What for?
'Which should I choose?' - two possibilities:
1) Profile/analyze your application and match the memory requirement charateristics again the specs for each of the allocators.
2) Test you app with each... |
I want to use a memory allocator in multithreading enviroment and each thread eats a lot of memory. Which should I choose? Is there any performance between these allocators? Thanks.
| Is there any performance comparison between TBB::scalable_allocator, tcmalloc and jemalloc? |
See:https://help.github.com/articles/remove-sensitive-dataTo get a local version of the repository, look up the URL from the repo page on Github and clone as explained in the link above.ShareFollowansweredFeb 26, 2013 at 20:55community wikiCvWAdd a comment| | I've seen the command needed to remove a file and erase it from the history on git. Is there a way to do this with the github website? If not, it looks like I need to know where the file is to do it with a git command. Where does github store the local repositories? | How do you completely remove a file on github |
These two features are identical and you don't have to pull anything even if you delete your branch from within Github. | I created a new branch in my local repo, them pushed it to myGithubaccount. Used it and now I want to remove it. To delete it locally I can go:git branch -d test-branchTo delete this branch inGithubI can do:git push origin --delete test-branchButGithubhas its ownDelete Branchfeature. Is there any difference between usi... | Deleting a branch locally then push vs delete locally then use Github's own 'Delete branch' feature |
UsereplSetReconfigReplication Command.The replSetReconfig command modifies the configuration of an existing replica set. You can use this command to add and remove members, and to alter the options set on existing members. Use the following syntax:result = db.command('replSetGetConfig')
config = result['config']
max_me... | I am creating a replicaset using pymongo with this code sample :client = MongoClient(allIps[0]+':27017',username='mongo-admin', password='${mongo_password}', authSource='admin')
db=client.admin
config = {'_id': 'Harmony-demo', 'members': [
{'_id': 0, 'host': allIps[0]+':27017'},
{'_id': 1, 'hos... | How to add a new node in mongo in an already initilized replicaset using pymongo? |
1
As stated in nginx documentation:
$fastcgi_script_name variable takes value of incoming request URI, and in case URI is finished by a slash, then $fastcgi_script_name is appended with what is defined with fastcgi_index directive.
So if your request is "/phpmyadmin/set... |
I have this configuration of nginx + phpfpm + phpmyadmin:
root /var/www/utils;
location ~ ^/phpmyadmin/.*\.(jpg|jpeg|gif|png|css|js|ico)$ {
root /var/www/utils;
}
location = /phpmyadmin {
index index.php;
}
location ~ ^/phpmyadmin.*(\.php|)$ {
index index.php;
fastcgi_index index... | nginx directories without slash |
If you want to see only 1 time series instead of 3 you either have to filter so that you end up with a single series or you aggregate them together for example with sum() or avg(), generally. | Let's say I have the following metricand I am only interested in the value of labelTwo which is the same for all three of these.metric1{labelOne="foo",labelTwo="barfoo"}
metric1{labelOne="bar",labelTwo="barfoo"}
metric1{labelOne="foobar",labelTwo="barfoo"}If I querymetric1{labelTwo="barfoo"}, then I get all three back.... | How can I query only one instance of a label? |
4
The role must include SageMakerFullAccess and access to the S3 bucket, so it looks like you've got that covered :)
Please check that:
the user creating the labeling job has Cognito permissions: https://docs.aws.amazon.com/sagemaker/latest/dg/sms-getting-started-step1.h... |
I'm trying to run a simple GroundTruth labeling job with a public workforce. I upload my images to S3, start creating the labeling job, generate the manifest using their tool automatically, and explicitly specify a role that most certainly has permissions on both S3 bucket (input and output) as well as full access to ... | AWS SageMaker GroundTruth permissions issue (can't read manifest) |
Somecronimplementations don't supportsteps(e.g.*/4) - checkman 5 crontabon your particular system.You can use thelist0,4,8,12,16,20instead.Off-topic: If you are using bash, you could probably replace> /dev/null 2>&1with the shorter&>/dev/nullor just close stdout and stderr with1>&- 2>&-.(see @Keith Thompson's comment b... | I have been trying to make a cron entry for a shell script:50 */4 * * * /path/script-file.sh > /dev/null 2>&1aimed to run the script at HH:50 at a frequency of 4 hours. But this errors out with the message:crontab: error on previous line; unexpected character found in line.crontab: errors detected in input, no crontab ... | Error in crontab entry |
you can use the commandkubectl port-forwardit will work like same way and create a proxy tunnel between local and clusterfor example, if you service name istest-servicekubectl port-forward svc/test-service 8080:3000this will create the tunnel local to cluster where the local port will be8080and service port will be3000... | I have a k8s deployment that contains a docker image that's running a jar that is supposed to have one HTTP 3000 port and a WebSocket 8982 port exposed.When I run the standalone jar locally, I can communicate with those ports using curl and a WebSocket client.
I create a proxy usingkubectl proxy, and go to this address... | How to expose the ports of my deployment? |
Solved it with markalex suggestion count by(hostname) ( <your attempt sum by(message, hostname) ...> )ShareFollowansweredSep 23, 2023 at 16:23FalkeFalke11199 bronze badgesAdd a comment| | I am currently working on a Grafana dashboard where I visualize various errors logged in different systems and count the number of times these errors occur. I am using Loki to send journal logs to Grafana. I've managed to create a query that groups error messages and counts their occurrences over a span of 7 days.Here ... | Calculating Unique System Counts per Error Message with Loki Query in Grafana Dashboard |
You can simply mount the same directories as volume binds on each of the containers that require it. Youcan use absolute paths. Even one of the examples in the docs is using an absolute path as bind mount.However, volumes are not available during image build (docker-compose build, which is where commands likecomposer i... | This question already has answers here:How to cache package manager downloads for docker builds?(5 answers)Closed3 years ago.I'm usingdocker-composeto orchestrate containers for multiple separate projects. Each of these projects has their own set of containers and do not relate to other projects.For example:/my-project... | Shared volume across multiple docker-compose projects [duplicate] |
In the above class,SonarQubeis trying to say thatDATE_FORMATTERdoes not need to be static if it is not used by anystaticmethod.In fact,SimpleDateFormatshould not be an instance variable as well, as it's not thread safe (explainedhere). If multiple threads are accessing methods ofTimeAclass simultaneously then it will l... | SonarQube 5.5 (with thesonar-java-plugin-3.13.1.jarplugin) reports an issue on this code:public class TimeA {
public static final SimpleDateFormat DATE_FORMATTER;
static {
SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
df.setTimeZone(TimeZone.getTimeZone("GMT"));
D... | How to resolve the "Make field an instance variable" issue? |
Yes, when a web app is added to the home screen, it will no longer be opened using MobileSafari, but using WebSheet. Unless they share the same local storage, it makes sense that you would need to cache the app again after adding it to the home screen.
|
I need clarification.
My webapp is cached in safari. With airplane mode on (wifi off) everything is working fine.
When I say "add to homescreen" the app only works when I open it one time with wifi on. After that the app works perfectly well offline.
Is that the expected behavior?
Till now I understood that the cached... | Do I have to open a iOS webapp before the app is cached (cache manifest)? |
As @suren mentioned in his answer this issue is not present in istio version 1.3.2 . So one of solutions is to use newer version.If you chose to upgrade istio to newer version please review documentation1.3 Upgrade NoticeandUpgrade Stepsas Istio is still in development and changes drastically with each version.Also as ... | I've this configuration on my service mesh:mTLS globally enabled and meshpolicy defaultsimple-web deployment exposed as clusterip on port 8080http gateway for port 80 and virtualservice routing on my serviceHere the gw and vs yamlapiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: http-gateway
spec... | Exposing virtual service with istio and mTLS globally enabled |
This isn't easy if your GitHub repo has many folders and files.You would use theGet Content APIfor a given repo:GET /repos/:owner/:repo/contents/:pathYou can call it in python, using a JSON library to decode the result:see this answer.But it isn't a recursive function, so the result list the files and folders directly ... | I am trying to implement a python code to count files with a particular extension (of a repository) in Github. Any help in this direction will be appreciated.EDIT: I have been able only to list the repositories of a particular language:
For example by requesting the below url:
url='https://api.github.... | Github API How to get a count of all the files of a git repository with a particular extension (.c, .cpp, .py etc) using python language? |
The event needs to be triggered via angular.See the following liuk:https://tommcfarlin.com/triggering-angular-events-with-jquery/The following code taken from the link above is the example to which solves the issue:$('select[ng-model="schedule.payment_method"]').each(function() {
// For the purposes of this example,... | I have modified an existing Grafana panel plugin (Boom table) so that it can read a configuration file, and update patterns and thresholds with data from that file.Now I would like to also update the Data Source queries and aliases to match the patterns. I am using InfluxDB. I have managed to, from my modified panel pl... | Grafana: Configure InfluxDB queries from panel plugin.Problem with html input element after setting value from typescript |
Try this :<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/shopping/search/?$
RewriteCond %{QUERY_STRING} ^query=([^&]+)$
RewriteRule . /shopping/search/%1? [R=302,L]
Options +FollowSymLinks
RewriteEngine on
# Send request via index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_F... | i am trying to rewrite the codeigniter url when using the get method.
I programmed a search engine for my project(a shop) which works fine, but is not very url friendly.
The current url is:shopping/search?query=catShopping is the controller, search is the method and query is the get parameter that been searched, in thi... | codeigniter rewrite url get method(url friendly) |
There is an option to click in the sidebar menu. | How can I close the GitHub web-based editor?The web-based editor is a useful tool and very simple to start. You just need to press.to open.But if you want to close and go back to the repository page, is there a shortcut key or an option to click?Until this moment I don't know how to do it and I need to close the browse... | Close GitHub web-based editor |
Reuse existing container imageA simple solution is using a configmap to alter suchxyz.shlike:apiVersion: v1
kind: ConfigMap
metadata:
name: new-entrypoint
data:
new_entrypoint.sh: |
#!/bin/bash
sed -i 's/Host:xyz\.com/Host:abc.io/' /path/to/xyz.sh
exec <your-original-entrypoint.sh> "$@"Then mount this n... | I build a Docker Image and useCOPY xyz.sh /bin/Thexyz.shfile contains 1000+ lines of code and one of the line isHost:xyz.comI used this Image in K8s. Now I want to change theHostValue in xyz.sh file.I don't want to Create a ConfigMap of full xyz.sh file and replace
that value with the new host.I don't want to create a ... | Replacing Existing Value with new Value in Script Kubernetes |
It seems that Git is not correctly installed on your Windows machine (wrong configuration or wrong install).On my Windows nodes, I followed this process to install Git using msysGit:http://guides.beanstalkapp.com/version-control/git-on-windows.htmlIt works well and you have nothing to declared on your Jenkins server. | Dears,Kindly help on the below issues which I am facing when trying to run my selenium test present in github via Jenkins from windows environment.Issue 1: From the JENKINS > Global Tool Configuration section > GIT section,
the Path to Git executable is by default set to "git.exe" which is giving me the errorThere's no... | Jenkins - GitHub - Selenium |
I believe you would want the following cron jobcron: 0 8 8-14,22-28 * 6The logic behind this is the 2nd Saturday of the month must fall between days 8-14 and likewise the 4th Saturday to be between 22-28. You can test this by clicking the 3 dots on the pipeline and checking Schedule Runs. The problem with this is it o... | I have a little testing project that I will need to compile and build every 2 weeks specifically on a Saturday.according to Microsoft Azure documentation I can use theschedulesand set my cron, so I did as follow:trigger : none
schedules:
- cron: '* 8 1/14 * 6'
displayName: Trigger every 2nd and 4th Saturday
b... | Azure yaml trigger pipeline every 14 days on a Saturday |
2
The OS can only allocate memory in pages. On x86, for example, the page size is 4kiB (4096 bytes), so the kernel can either allocate 4096 bytes or not. Also, your program's data segment is very unlikely to stop exactly at 4k boundary - so the leftover space will just be t... |
I am learning how sbrk, brk, mmap etc work and what they offer. I am writing a very basic code like this
int main(int argc, char* argv[]) {
void* f1 = sbrk(0);
int* newarr = (int*)f1;
for(int i=0;i<2048;i++) {
newarr[i] = 1;
}
cout<<newarr[9]<<endl;
return 0;
}
In this case, I have simply done sbrk(0), to... | Does sbrk(0) also allocate memory behind the scenes? |
You can do this with the commandaws s3api get-object-tagging --bucket bucketname --key objectkey. For example➜ ~ aws s3 ls helloworld-20181029141519-deployment
2018-11-24 07:19:11 0 hello.world
➜ ~ aws s3api get-object-tagging --bucket helloworld-20181029141519-deployment --key hello.world
{
"TagSet": [... | I need to get object tags by AWS CLI. Is it possible to display all object tags? Or even display the value of a specific key from tags. | AWS CLI S3 get object tags |
Was looking for a status plugin for grafana when I found this question.Pnp4nagios only understands performance data, so as stated by pzkpfw, you need to add that in your check script by adding a pipe after your message and a label=value. Then if you want to display up/down or ok/warning/critical, there's thevonage sta... | I am creating a dashboard in Grafana with data from PNP4Nagios for problem resolution. One of the criterias is if there is a connection to a certain service. I have a plugin that verifies this properly. The answer is either connected or not conncted.
Is it possible to generate an output that PNP4Nagios will understand ... | Nagios Performance Data for Binary State (on/off) |
The simplest way to do this is with anifdirective. If there is a better way, please let me know, as people say theifdirective is inefficient. Nginx converts dashes to underscores in headers, soX-Forwarded-Protobecomes$http_x_forwarded_proto.server {
listen 80;
server_name example.com; # Replace this with your o... | I'm hosting a website behind a Cloudflare proxy, which means that all requests to my server are over port 80, even though Cloudflare handles HTTP (port 80) and HTTPS (port 443) traffic.To distinguish between the two, Cloudflare includes anX-Forwarded-Protoheader which is set to "http" or "https" based on the user's con... | How to make nginx redirect based on the value of a header? |
Bad news - you have a bug in second one ;)
Original code
.L3:
mov ecx, DWORD PTR v[0+eax*4]
add eax, 1
cmp eax, 10000000
jl .L3
Second version
.L3:
mov ecx, DWORD PTR v[0+eax*4]
mov ecx, DWORD PTR v[0+eax*4 + 4]
mov ecx, DWORD PTR v[0+eax*4 + 8]
mov ecx, DWORD PTR v[0+... |
I have run the following assembly code: (that iterates 1000 times through an array of 10 000 000 elements each of 4 bytes) on an Intel Core i7 CPU (with 32KB L1 data cache and 64B L1 cache line size)
main:
.LFB0:
.cfi_startproc
mov edx, 1000
jmp .L2
.L3:
mov ecx, DWORD PTR v[0+eax*4]
add eax, 1
... | Intel Core i7 processor and cache behaviour |
Apple'sPackageMaker, included with Xcode, can install the files along with your application; but that's usually done for files that need an absolute path. Alternatively, just distribute the application bundle and example files in a.dmg, and let the user allow or block the connection inSystem Preferences. As a convenien... | I've bundled a jar file as a mac application using jar bundler. I'm now trying to create an installer for this app so that:
1) The application will be placed in the applications folder
2) The application is added to the list of permissible apps in Mac Application Level FirewallAlso, I have several example files I would... | How to deploy an application with firewall permissions on Mac? |
Since version 1.7.0 fabricjs is not caching Images. This is from documentation.objectCaching :Boolean Whentrue, object is cached on an additional
canvas. default to false for images since 1.7.0Please checkfabricjs imagedocumentationI know it is too late, but maybe somebody can update their library to newer one.ShareF... | I am trying to load an image using fabricjs using the function:
fabric.Image.fromURL()I want to turn off caching because when the image is updated, the fabricjs image object doesn't get updated because it gets cached.I cannot use a random string as a dummy parameter in the url to stop caching because the url I am using... | Turn Off Caching for fabricjs image object |
I managed to figure out why it wasn't working.
It turns out that to pass the JMX options to the service we were using the Kubernetes service descriptor in YAML. It looks like this:- name: _JAVA_OPTIONS
value: -Dzipkinserver.listOfServers=http://zipkin:9411 -Dcom.sun.management.jmxremote -Dcom.sun.management.j... | With my team we are trying to move our micro-services to openj9, they are running on kubernetes. However, we encounter a problem on the configuration of JMX. (openjdk8-openj9)
We have a connection refused when we try a connection with jvisualvm (and a port-forwarding with Kubernetes).
We haven't changed our configurat... | JMX Connection refused on Kubernetes with AdoptOpenJDK OpenJ9 |
This is the entire code using streaming on the latest version of aws-sdk
var express = require('express');
var app = express();
var fs = require('fs');
app.get('/', function(req, res, next){
res.send('You did not say the magic word');
});
app.get('/s3Proxy', function(req, res, next){
// download the file vi... |
My goal:
Display a dialog box prompting the user to save a file being downloaded from aws.
My problem:
I am currently using awssum-amazon-s3 to create a download stream. However I've only managed to save the file to my server or stream it to the command line... As you can see from my code my last attempt was to try an... | NodeJS How do I Download a file to disk from an aws s3 bucket? |
3
I think you might want to do
list = new Fruit * [10];
If list is supposed to be an array of Fruit pointers. The following:
list = new Fruit[10];
is allocating memory for 10 new Fruit objects using the default constructors rather than 10 pointers to Fruit objects.
... |
I have an array list that carries an array of pointers to existing static objects. Somehow, it manages to leak lots of memory.
Fruit fruits[20];
Fruit **list;
void addFruites()
{
list = new Fruit*[10];
for(int i=0; i<10; i++)
{
list[i] = &fruits[i];
}
}
Until now, everything seems to be work... | Array of pointers, to shared objects |
4
Simple Answer, you have two options here:
First, stash your new changes, then either
Option 1 - Create a new branch, and cherry-pick all your changes from your old branch, search on how can you cherry-pick a range of commits.
OR
Option 2 - If you don't want to create a ne... |
First question so I'm going to try to get this correct.
I created a branch and was working on a project for a couple of weeks. I created a pull request to merge my branch with the master branch. When my branch was merged with master it created a lot of various issues (whoops lots of emails in the morning). So, my pu... | Creating pull request after revert |
Requests to/.envare, by all means, malicious.Many apps (Laravel based for example) use.envfiles to keep very sensitive data like database passwords. Hackers/their automation scripts attempt to check if.envis public accessible.If they can red.envfiles in the first place, this indicates an improperly configured server an... | 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, ... | Do these .env GET requests from localhost indicate an attack? [closed] |
<div class="s-prose js-post-body" itemprop="text">
<p>You have changed the path to the web application in the proxy (/ -> /webapp). This is generally a bad idea as it breaks a whole bunch of stuff that you then need to fix. In this case it is probably the cookie path that is your immediate problem. To fix that you n... | <div class="s-prose js-post-body" itemprop="text">
<p>I am using Tomcat 7 and using nginx 1.5.7 as a load-balancer(on Windows 8). I configurated nginx server like this.</p>
<pre><code>server {
listen 80;
server_name www.something.com something.com;
location / {
proxy_pass http://127.0.0... | Http session couldn't hold in Tomcat and nginx proxypass using Spring mvc |
php-fpm
You must run php-fpm for fastcgi_finish_request to be available.
echo "I get output instantly";
fastcgi_finish_request(); // Close and flush the connection.
sleep(10); // For illustrative purposes. Delete me.
mail("[email protected]", "lol", "Hi");
It's pretty easy queuing up any arbitrary code to processed a... |
I have PHP's mail() using ssmtp which doesn't have a queue/spool, and is synchronous with AWS SES.
I heard I could use SwiftMail to provide a spool, but I couldn't work out a simple recipe to use it like I do currently with mail().
I want the least amount of code to provide asynchronous mail. I don't care if the email... | Making PHP's mail() asynchronous |
Try adding this to your.gitattributes:*.pdf binaryThen commit the attributes file.ShareFollowansweredJun 7, 2011 at 19:45VeetiVeeti5,27033 gold badges3232 silver badges3737 bronze badges1I added a .gitattribtues with only that text in & committed the file. It exists on the root where my .gitignore is but pdf files are ... | In one of my GitHub repositories I have a .pdf file, which gets updated frequently. The problem is in the GitHub commits page, which shows the diff for this pdf. As pdfs are mostly binary the diff is long and so the page works very slowly and is useless for a quick peek as to what has changed between commits.Is there a... | Github .pdf diffs |
You are probably looking for something like that:RewriteEngine on
RewriteRule ^/songs/(.+)$ /songs.php?dir=$1 [L]Note: this is the version for the http host configuration. For usage in.htaccessstyle files you have to adapt it slightly. But if you have access to the host configuration you should always prefer that over.... | I expose here my issue, I hope to explain myself clearly and correctly. In case of any specification, please ask me.What I need is to redirect all the request (except the one to index.php) to another .php file, without the necessity to specify an argument.here an example of what I need to do:http://www.example.com -> s... | HTACCESS: Redirect all the requests to another page, in place of index, hiding arguments? |
Here's how you need to organize:<ifModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [NC,QSA,L]
</ifModule>And then you will have everything as you need. | I want to remove index.php from url but so far i couldn't succeed it. I'm using Wamp server on my local and Apache on remote server..
In local root directory, my project files are located in a subfolder likewww/project/index.phpI can access web pages likelocalhost/project/index.php/homelocalhost/project/index.php/messa... | How to Remove index.php from URL in PHP |
WeakHashMap isn't useful as a cache, at least the way most people think of it. As you say, it uses weak keys, not weak values, so it's not designed for what most people want to use it for (and, in fact, I've seen people use it for, incorrectly).
WeakHashMap is mostly useful to keep metadata about objects whose lifecyc... |
Java's WeakHashMap is often cited as being useful for caching. It seems odd though that its weak references are defined in terms of the map's keys, not its values. I mean, it's the values I want to cache, and which I want to get garbage collected once no-one else besides the cache is strongly referencing them, no?
In ... | Java's WeakHashMap and caching: Why is it referencing the keys, not the values? |
You can just follow the usual Ubuntu install instructions, just within theRUNstatement in yourDockerfileRUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \
&& apt-get install -y nodejsDocsShareFolloweditedAug 22, 2016 at 14:26answeredAug 22, 2016 at 14:13GuyGuy11.2k55 gold badges3636 silver badges4747 bron... | I would like to know how can update my custom Dockerfile to install Node v6.3.1 and NPM v3.10.6 without breaking what is already in there.Currently this is my custom file:FROM ubuntu:16.10
MAINTAINER Fátima Alves
COPY . /my-software
WORKDIR /my-software
RUN apt-get update \... | Installing specific version of node.js and npm in ubuntu image with Dockerfile |
I solved the problem by callingProject.by_key(params[:id])Sonar passes the the project key asidrequest parameter. | How can I get current project id from RubyApplicationControllerclass?The code is executed fromSonarQubemenu (SECTION=Navigation::SECTION_RESOURCE) so I cannot pass any parameters.The ultimate goal is to check user's permissions for the current project, so if it can be done without project id it will be also a valid sol... | How can I get current project id in SonarQube plugin? |
Your first example doesn't show what you think. You are not getting a pointer to ary. Rather, you are getting a pointer to the first element of ary. You can pass an array of T with & to a parameter expecting pointer to T, as described in this Swift blog article, under "Pointers as Array Parameters".
If you change ptr ... |
Just out of curiosity, I wrote following code in Swift:
func ptr(x:UnsafePointer<Void>) -> UnsafePointer<Void> {
return x
}
var ary = [Int]()
var curp = ptr(&ary)
println("ptr(init): \(curp)")
for i in 0 ... 100000 {
ary.append(i)
let p = ptr(&ary)
if(curp != p) {
println("ptr(chgd): \(p) at i... | Understanding Array implementation of Swift |
Theabsent()function exists for this purpose:# Both namespace and deployment name are mandatory to obtain a precise trigger.
absent(kube_deployment_created{namespace="foo", deployment="bar"})kube_deployment_createdis a metric that shows when the deployment has been created. It will disappear when you delete the deployme... | I need to know if a deployment/pod exists and it's in running state from a list of deploy, for example, if I have 3 deployments (app1, app2 and app3) I want to verify if this deployment exist. It is possible? I use kube-state-metrics to expose more Kubernetes metricsThank you | Prometheus verify if a deployment exist |
5
There is now an (unofficial) tool to translate ARN to deep links into the AWS console:
https://link2aws.github.io/
You can install it locally too:
https://github.com/link2aws/link2aws.github.io
I have tested it with IAM policies, Lambda functions and few others and seem... |
If I have an Amazon Resource Name (ARN) like "arn:aws:config:ap-southeast-2:1234567890:config-rule/config-rule-h0e6s3" how would I get a link to the appropriate management interface?
Is there a lookup through the AWS SDK or a magic URL to generate a link or use a global redirect point (e.g. https://aws.amazon.com/reso... | Generating a link to AWS Mangement Console from ARN |
The stack for different architectures may go different ways, and it is decided by the ABI of that architecture. Have a look at this link
If you are referring specifically to MIPS or x86, then yes, the stack pointer does go from higher to lower addresses. (And it follows LIFO, so whatever comes at the last is removed f... |
I have a question on memory addressing on x86 and MIPS. Now I am taking a computer organization class at my school and havin trouble because the professor's explanation is not so clear to me. What I know about the memory addressing is below.
The memory(stack) address start from top to bottom, the esp(stack pointer) po... | x86 and MIPS memory addressing |
You probably want a SurfaceView with one thread handling all of your drawing. Having one thread per animation seems overly-complicated. You can certainly have one method per animation type, e.g. renderStars(), renderText(), etc. that are called whenever your one animation thread renders.
Recommended reading:
The Su... |
i make an app which would fire different small animation, such a falling rotating star or a like a text floating from bottom to top, animated with canvas on a surfaceview
they are all constant once fired,
so i planned 2 ways for that, 1 is a big thread which
handles them all animations, updates each after each other... | Android: for canvas animation, better have 1 big thread, or a number of small threads |
git pull equals git fetch plus git merge unless it is a fast forward, where the merge is not needed, or you have configured pull.rebase=true, in which case a rebase is done instead of a merge.
So there are two possibilities:
You have local commits in Windows but not in Ubuntu. Then, do a git fetch and optionally a gi... |
When I type git pull origin master on Ubuntu, it pulls the changes from the remote repository into my local repository, and it works fine.
However, if I do it on Windows (using git bash), it pulls the changes as a merge commit (as if I was accepting a pull request). So even if I'm just updating my local repository, ne... | How to remove git pull message from windows |
you can divide the data
using--make-grm-part n iwhere n is the number of folds and i is the ith fold. so for example:
you want to divide by 3--make-grm-part 3 1 ...
--make-grm-part 3 2 ...
--make-grm-part 3 3 ...and you can concatenate the results.
for more info see the --make-grm-part discussion underhttps://cnsgeno... | I am processing some genetic data using gcta64 via python through os.system() (in a screen). However, I am running through a memory problem.
My machine is a VM instance from google cloud with 1 TB of memory.The first picture is a screenshot of my htop and the second is a screenshot of the code/error.
You can clearly se... | Error: can't allocate enough memory to (parted) GRM - GCTA 64/ python |
0
You can use PclZip instead of ZipArchive.
The sample code :
\PhpOffice\PhpWord\Settings::setZipClass(\PhpOffice\PhpWord\Settings::PCLZIP);
Share
Improve this answer
Follow
answered Jul 1, 20... |
I have a server whch runs a little app that we use to create .docx.
It worked perfectly on an old server but I had to move it on another one and now it has a great problem: when I run my php script - based on PHPWord - the output files are broken and cannot be used (MS Word reports "The file xyz.docx cannot be opened ... | ZipArchive addFromString doesn't work properly on Windows |
The script is listening to 127.0.0.1 in the container, making it inaccessible from the host. It must listen to 0.0.0.0.
|
Here's my Dockerfile:
FROM alpine:3.5
RUN apk add --no-cache python3 && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools && \
rm -r /root/.cache
# Copy files
COPY ./requirements.txt /app/requirements.txt
COPY ./main.py /app/main.py
# Insta... | Cannot hit docker container running locally |
There are a couple of things that could be happening here.
If you repeatedly run docker-compose up -d, it will make an effort to keep existing containers alive. If you're in an ordinary development cycle and repeatedly docker-compose stop app; docker-compose up --build -d, this will only restart the containers that h... |
I have a redis service defined like this in the docker-compose.yml file:
redis:
container_name: redis
image: redis
ports:
- "6379:6379"
As you can see, there's no volume(s) defined here. Will the redis database persist between calls to docker run / docker-compose run? I can see some data in the database whe... | docker-compose service without a volume |
Make sure your VSCode application is not placed on ~/Downloads or ~/Documents folder. Move it to /Applications directory. | The application “Google Chrome” does not have permission to open “vscode://vscode.github-authentication/did-authenticate?windowid=3&code=xxxxxxxxx&state=xxxxx-xxx-xx-xx-xx.”macOS Catalina 10.15.7Tried copy pasting the code in the address bar, did not work.
Also tried with "Github Pull Requests and Issues" installed on ... | Google Chrome not redirecting to VScode after authorizing with Github |
Services do not guarantee 100% uptime, especially if there are only 2 pods. Depending on the timing of your request, one of a number of possible outcomes is occurring.You try to open the URL before the pod is marked as notReady. What happens, in this case, is your service forwards the request to your pod which is about... | I am running 2 pod(replicas) of particular deployment on Kubernetes with nginx ingress. Service using web socket also.Out of 2 pod I have deleted one pod so it starts creating again while 1 was in a ready state. In between this, I tried to open the URL and got an error 504 gateway timeout.As per my understanding traffi... | nginx ingress 504 timeout with running multi pod |
You're giving all your parameters as one single parameter, but they are distinct. You should do
CMD ["java", "-jar", "myapp.jar", "myapp.yml"]
|
I have the following project directory structure:
myapp/
grails-app/ (its a grails app, derrrr)
target/
myapp.jar (built by grails)
myapp.yml
...where target/myapp.jar is the executable JAR (actually a self-contained web app running embedded Jetty), and where myapp.yml is a config file required at... | Docker not able to run Java app |
The way you have your port assignment setup requires you to use the docker machine's ip address, not your localhost. You can find your docker machines ip using:
docker-machine ip dev
If you want to map the container ip to your localhost ports you should specify the localhost ip before the port like this:
docker run ... |
I'm working on a node.js web application and use localhost:8080 to test it by sending requests from Postman. Whenever I run the application (npm start) without using Docker, the app works fine and listens on port 8080.
When I run the app using Docker, The app seems to be running correctly (it displays that it is runni... | Docker node.js app not listening on port |
Enablemod_rewriteand.htaccessthroughhttpd.confand then put this code in your.htaccessunderDOCUMENT_ROOTdirectory:Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteRule ^results/([^/]+)/([^/]+)/?$ /search.php?search_query=$1&custom_title=$2 [L,NC,QSA] | I wish to rewrite the url of my search page resultNow ishttp://www.example.com/search/?location_name=Los+Angelesand i want to do like thathttp://www.example.com/search/LosAngelesI want to get rid of ?, the location_name and if a city has two words, i don't want to separated by +, but shown as one.Either in .htaccess or... | How to rewrite the url of a specific search? |
S3 storage can be accessed using the bucket name either as a domain or as a path. This can be controlled in halyard and set it up to access S3 as a path.hal config storage s3 edit --path-style-access=trueRun this before deploying spinnaker using halyard. Then halyard will useminio-vocal-waterbuffalo.defaultas the host ... | I am trying to deploy Spinnaker in Kubernetes with Minio as storage which is also running in Kubernetes. Now, spin-front50 pod does not start and is crashing. Looking at the pod logs, it is failing withCaused by: java.net.UnknownHostException: spin-37f4958d-f5e4-4515-9894-25da8fcc7f66.minio-vocal-waterbuffalo.defaultIt... | Spin-front50 pod is crashing while deploying Spinnaker on Kubernetes with Minio as storage |
No, this is not possible. All thecaches_page-method does is to register a block viaafter_filterwithout storing any additional information. If you need to know wether the current action is to be cached, you will have to provide a clue yourself by ie. an enhanced version ofcaches_page. | I am using caches_page in controllers, like so:
caches_page :indexIs there a way I can check in the view files whether the action is to be cached or not?Thanks | In Rails, can I check in a view whether the action is to be cached? |
git.exe... so Windows?Narrow things down. From outside of Android Studio, from a Command Window, if you typegit, does it return a help list of git commands, or does it also not find git?If it doesn’t find git, are sure you installed it? Do you know where it is? Can you identify the location of the git executable?If so,... | Error-Cannot run program "git.exe":CreateProcess error=2, The system cannot find the file specifiedI have been looking on forums for a good 2 hours now and every forum is from a couple of years ago, which advises to change the path to git executable, but i'm guessing after an update this has disappeared from the settin... | Error running git |
I believe this option is limited for repositories in organizations. | TheGitHub docssay there should be an option to allow specific actors to bypass required pull requests:I need this for CI, which commits version updates automatically on the master branch. However other admin users should still have to go through PR process.But this option isn't showing in GitHub:How do I get this optio... | Where is the "Allow specified actors to bypass required pull requests" option? |
2
There isn't, and it doesn't make sense for GitHub.
Every person who owns a repo on GitHub can decide for himself how he manages the issues in his repo. Usually, you find such information somewhere in the repo. Sometimes a repo has a CONTRIBUTING.md file that details this.... |
I posted a new issue on github for an opensource project. Shortly after posting I got a comment on the new issue saying "ya I agree and also [XYZ subject tangentially related to your ABC issue] needs to be fixed also".
On Stackexchange websites there is clear documentation specifying one topic per question: https://me... | Github one topic per issue, where is this documented? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.