Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
1
The best tool I know of to compare memory footprints is to run your program under each and use top or time to monitor its memory usage. /usr/bin/time (not the one built in to your shell) will output the maximimum memory size used by the program in the course of its run. B... |
Is there any tool to compare memory footprint of different JVMs. currently running on JAMVM.
I want to know, how to compare JVM. and what are the deciding factors.
| JVM- how to find and compare which JVM is better for linux? JAMVM vs OPENJDK. |
If you're using OpenSSL < 1.1.0 it sounds like you are running into aknown issue(see last paragraph there) with android-compatible certs (as issued by default by CAs like LetsEncrypt). Usually, performing regular OS software updates will update OpenSSL and fix this. | When trying to clone a repo on OS X 10.14.6, it fails in the following way$ /usr/bin/git --version
git version 2.21.1 (Apple Git-122.3)
$ /usr/bin/openssl version
LibreSSL 2.6.5
$ git clone https://host/repo.git
Cloning into 'repo'...
fatal: unable to access 'https://host/repo.git/': SSL certificate problem: certificat... | Choose one of multiple certificates provided by git host |
Assuming that is not possible to base your image on aOpenJDKofficialimage.Take a look to how it is installed in theofficialimageDockerfile(or therepository).There are also alternatives images, likeAdoptOpenJDK(Dockerfilebased on Ubuntu) | I am trying to make a Dockerfile where Java11 has to be "loaded".However, when I try:RUN add-apt-repository -y ppa:linuxuprising/javathen I get this error:/bin/sh: 1: add-apt-repository: not found
The command '/bin/sh -c add-apt-repository -y ppa:linuxuprising/java' returned a non-zero code: 127My question is how cou... | How to add Java 11 on Dockerfile? |
Might be that yournodecannot be found whencronis running; becausecronhas a limited search path. Try prefixing it with wherever you havenodeinstalled, so e.g., instead ofnode /home/pi/Sites/node-raspberry-pi/index.js 3000you would get/usr/local/bin/node /home/pi/Sites/node-raspberry-pi/index.js 3000You can also extend t... | I have a simple question. I try to run a Node JS program on a Cron task via a bash script.So, on crontab -e, I made a task @reboot that execute boot.sh :# m h dom mon dow command
@reboot bash /home/pi/boot.shAnd my bash script :#!/bin/sh
set -e
cd /home/pi/Sites/node-raspberry-pi/
/usr/bin/git pull
node /home/pi/Sit... | Running Node as Cron task |
Since your elasticsearch is driven by AWS and you are using Kibana Dev tools, you could get your query results by following wayPOST _opendistro/_sql
{
"query": "SELECT * FROM your_index "
}You dont need to enter domain name. It worked for me. | AWS documentation here indicates SQL querying is supported:https://aws.amazon.com/about-aws/whats-new/2019/05/amazon-elasticsearch-service-sql-support/This page shows the syntax:https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/sql-support.htmlPOST elasticsearch_domain/_opendistro/_sql
{
"query"... | How to query AWS ElasticSearch with SQL |
Except checking that process exists, you can always check netstat -tulpn | grep nginx
# netstat -tulpn | grep nginx
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 4158/nginx.conf
|
If nginx init.d script does not take status option (like Apache) - how could I possibly know if it is running or not? I can verify nginx process exists but it does not tell much.
| Verify that nginx is running |
Give these a look through just in case:http://www.uvd.co.uk/blog/labs/configuring-jenkins-continuous-integration-server-to-work-with-git/andhttp://justinramel.com/2012/10/20/jenkins-dot-net-setting-up-your-first-job/You'll want to select git as your VCS system, you'll want to type in the url to the repository so jenkin... | i have been trying to run selenium scripts automatically from Jenkins. i have my scripts on Github and also added a plugin for Github on Jenkins. how to run those scripts from Github repository? i am new to all this so not sure what would be the next step | Selenium integration with Jenkins |
It is inside the container.
Taken for the Dockerfile reference site https://docs.docker.com/engine/reference/builder/#workdir
The WORKDIR instruction sets the working directory for any RUN, CMD, ENTRYPOINT, COPY and ADD instructions that follow it in the Dockerfile. If the WORKDIR doesn’t exist, it will be created ev... |
What context does the WORKDIR keyword in a Dockerfile refer to? Is it in the context I run docker build from or inside the container I am producing?
I find myself often putting RUN cd && ... in my docker files and am hoping there's another way, I feel like I'm missing something.
| Docker WORKDIR - on my machine or the container? |
You will have to installgeos-devlibrary too for that. | I want to use GeoDjango on alpine docker and should add some dependencies on docker to use postgis database, refers to DjangowebsiteI have to install by$ sudo apt-get install binutils libproj-dev gdal-binI found thatgdalandgdal-devhave already existed on alpine, so I usedRUN apk add gdal gdal-devbut after running thisd... | add GeoDjango dependencies on alpine docker |
You could test for the existence of a file by listing the file, and seeing whether it returns something. For example:
aws s3 ls s3://bucket/file.txt | wc -l
This would return a zero (no lines) if the file does not exist.
If you only want to copy a file if it does not exist, try the sync command, e.g.:
aws s3 sync . ... |
aws s3 cp "dist/myfile" "s3://my-bucket/production/myfile"
It always copies myfile to s3 - I would like to copy file ONLY if it does no exist, throw error otherwise. How I can do it? Or at least how I can use awscli to check if file exists?
| How to cp file only if it does not exist, throw error otherwise? |
You just pass it as a property to maven task.Dsonar.links.ci=${JOB_URL} sonar:sonar | I have a build job on Jenkins which executes Maven tasks. One of the tasks issonar:sonarwhich makes a static source code analysis on our SonarQube server.How can I tell Maven in the build job configuration to take the propertysonar.links.ci=%JOB_URL%which is responsible for displaying the build job's URL on the project... | How can I configure Maven build job on Jenkins to tell SonarQube the build job's URL? |
Theurllib3library is responsible for this, in theurllib3.util.connection.create_connection()function. There's a loop there that checks each result fromsocket.getaddrinfo():for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
# ....
try:
sock = socket.socket(af, socktype, proto)
... | Let us say I am sending a GET request to an URL which's DNS record contains multiple IP addresses (DNS Round-Robin). For example, to thehttps://www.twitter.com. If we dodigof it, we see:;; ANSWER SECTION:
twitter.com. 60 IN A 104.244.42.193
twitter.com. 60 IN A 104.244.42.129I have tried to use DE... | How can I see in debug logs which IP address is used for connection by Python's request? |
I had issues with this as well in my Large project. After working with an Apple engineer on trying to locate the leaks, he finally asked the main Apple dev team behind NSURLConnection. They basically said that there is an internal cache that is not clearable at all in NSURLConnection and it was a known issue.
So I set... |
I have follwowing peace of code in which I have specified the leaky line . As I am new to iPhone developement I can't understand what actually is wrong with that line . please have a look at that line and tell me .
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init];
//take away
//NSURL *url1 = [[NSURL a... | What should be the reason behind this leaky line? |
Below troubleshooting steps will help you to resolve your issue:1.Check if your deployments are in running state without any errors.2.Check if the service exporter is working fine and pointing to correct podskubectl describe servicemonitors <redis-exporter-servicemonitor> -n <service-monitor-namespace>3.Check if the co... | I installed from helm prometheus stack (prometheus-community/kube-prometheus-stack).After that I updated my redis helm config, I enabled monitoring:values.yaml:...
metrics:
enabled: true
...
serviceMonitor:
enabled: true
namespace: "monitoring"
...I see that servicemonitor was created and redis has 3 si... | K8s: How to enable metric collecting for Redis (Prometheus) |
1
It's not terribly difficult to put together your own archiving scripts, but there are a few things you need to keep track of, because when you need your backups you really need them. There are some packaged backup systems for PostgreSQL. You may find these two a good plac... |
i am in no way a db admin, so please don't shoot me if i'm doing it completly wrong ...
I have to add some archiving to a productive postgres database (newest version in docker container) and trying to build some scripts to use with WAL.
The idea is to have a weekly script, that does a full backup to a new directory a... | postgres backup with WAL |
'refs/remotes/origin/victor' exists; cannot create 'refs/remotes/origin/victor/moreLocalGCPStorageTesting'Git fetched a new branch reference calledvictor/moreLocalGCPStorageTestingfrom the remote, but it cannot create thevictordirectory locally because there's already a branch reference calledvictor.Here's how it look... | My git pull results inerror: cannot lock ref
'refs/remotes/origin/victor/moreLocalGCPStorageTesting':
'refs/remotes/origin/victor' exists; cannot create
'refs/remotes/origin/victor/moreLocalGCPStorageTesting'
From github.com:deanhiller/webpieces
! [new branch] victor/moreLocalGCPStorageTest... | infinite git pull git remote prune loop - how to fix? |
By default Mongo syncs the writes with the disc every minute, so while the inserts will be fast, on each minute it will have to flush them on disk, leading to increased I/O. This causes a slow-down about every minute.
You can change the default setting to higher, but you will lose your data in case of power outage, or... |
There is a 9 million records file being inserted using a perl script. No bulk inserts/mongoimport are being used because of the need to do some processing on each record before insertion.
The program takes 40 minutes to complete, but for some reason, it keeps pausing (getting swapped out?) every now and then and hence... | MongoDB inserts pausing inconsistently (or getting swapped out) |
So, first of all @WTP is absolutely right, and you should accept his answer. +1 to him.
The right thing to do is not touch 'item' after you have released it. And certainly don't pass it around to other unsuspecting methods after you have already released it.
But, having said that, if you want to understand why the ord... |
My algorithm is pretty simple. Add an item to a cache. The item is stored in both an NSMutableArray and an NSMutableDictionary. The array serves as a FIFO queue, where if I pass a specified maximum size, I delete the oldest items until the size is lower than the allowed maximum.
When I remove an item, I first remove i... | Order of removing object from two collections affects memory management? |
48
The git flow is not installed in your machine. Just run this command,
macOS:
$ brew install git-flow-avh
Linux:
$ apt-get install git-flow
Windows:
$ wget -q -O - --no-check-certificate https://raw.github.com/petervanderdoes/gitflow-avh/develop/contrib/gitflow-installe... |
I am very new to Git and am starting to learn the command line version. I believe my git flow is not installed correctly. I am running this from a pc.
When i run following command:
git flow feature start JamesTest
I get the following error:
git: 'flow' is not a git command. See 'git --help'
Did you mean any of th... | Git flow command error: 'flow' is not a git command |
There is no API for the reverse index. You can look up bindings and filter on ones containing the expected subject. For example, using bash, jq, and kubectl:# $1 is kind (User, Group, ServiceAccount)
# $2 is name ("system:nodes", etc)
# $3 is namespace (optional, only applies to kind=ServiceAccount)
function getRoles()... | I can use kubectl to see to which subjects a cluster role is applied, eg:kubectl get clusterrolebindings system:node --all-namespaces -o json
{
"apiVers... | kubectl and seeing (cluster)roles assigned to subjects |
Have you tried?ExcludeFromCodeCoverageAttributethis attribute could be used at class level tooIf not work, could be a problem in your Sonar Analyzer | I am using sonarqube for code coverage in visual studio c# project
I want to exclude some methods for the sonar sonarqube code coverage.
I have tried the ExcludeFromCodeCoverage attribute but this is not working. | How to exclude method in c# for sonarqube code coverage |
Verifying queue existence is a good use case forGetQueueUrl; it'll return either the queue url if it exists, or an error if it doesn't.ShareFollowansweredFeb 15, 2018 at 3:50KreaseKrease16k88 gold badges5555 silver badges8787 bronze badgesAdd a comment| | I've got a C# application which uses AWS SQS. I'm using SQS inside a wrapper/adapter component to hide away the messy details, and this component has an initialization hook that I'd like to fill in to make sure that the connection is valid. I don't see anything in the API for this besides sending a message. I'd like to... | How to test an AWS SQS connection? |
The pod will not schedule anywhere, because it does not tolerate Node1's taint and it does not have an affinity for Node2.Here is the missing pod taint that would, in combination with the affinity, successfully schedule PodA on Node1.tolerations:
- key: "node1taint"
operator: "Exists"
effect: "NoSchedule"A taint is... | Say you have Node1 with taintnode1taint:NoScheduleand labelnode1specialkey=asdf.
And Node2 with no taints.Then you create PodA with affinity to Node1:apiVersion: v1
kind: Pod
metadata:
labels:
name: PodA
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDurin... | Can a Pod with an affinity for one node's label, but without a toleration for that node's taint, mount to that node? |
It's not a markdown feature since markdown doesn't result in a rendered view. The app that's rendering your markdown is what's in charge of spacing. For example, I used your exact file in a GH repo and it looks good:
I then added even more text to see if it gets ugly. It still looks good:
The way GitHub renders th... |
I am writing a GitHub issue/wiki page which contains a table where one of the columns is quite large for many of the entries. Is there any way to wrap long columns in a table in GitHub-compatible markdown?
Example:
| Regular Column | Long Column |
| -------------- | ----------- |
| Small amount | So much stuff tha... | Can I word-wrap long columns in GitHub-compatible Markdown? |
Thedurationfunction does not seem to work in the panel titles (v. 8.4 at the least).Thus you can try to imply the period with a "since" sentence/statement structure:`Detected events since ${__from:date:MMM-DD h.ma}`You should get something likeDetected events since Mar-09 12.53pmHope it helps. | I have a variant time filter (in the screenshot it's "Last 6 hours") and I want to present it in the title of the panel.
I want to present the time-filter in the title, and make it dynamic.The only thing I found is this:${__from:date:DD-MM-YYYY HH}:${__from:date:mm} To ${__to:date:DD-MM-YYYY HH}:${__to:date:mm}It's not... | Grafana: how to put time-filter in panel title? |
viewDidUnloadwill notbe called every time likedeallocmethod.viewDidUnloadis called only when your app receives low memory warning!Just think, if you are releasing your object both inviewDidUnloadanddeallocmethods. If both gets called every time, then you are releasing already released object, which will lead to applica... | I'd like to know whether or not bothviewDidUnloadanddeallocarealwayscalled in succession in the UIViewController tear-down process. Is it possible thatdealloccould be called on my view controller withoutviewDidUnloadhaving been called first?In either case, if I am safely releasing the properties and retained references... | Are viewDidUnload and dealloc always called when tearing down a UIViewController? |
Probably not the best approach. One extreme situation is let's say you have 100 authentications per minute, with 99 of them failing and Prometheus scraping once a minute, immediately after the one successful authentication. You'd have 99% failure rate and never find out about it.If on the other hand you increment a cou... | I'm using Prometheus to collect metrics for a java application. In my application, I'm making calls to authenticate via an API. I'm devising the best approach for Prometheus to send an alert to my e-mail if authentication to the API ever fails. I'm thinking of using a gauge, initializing it as 0, and if authenticatio... | Prometheus: What's the best way to alert on a condition? |
Your job will need to implement theStatefulJobinterface. It is a marker interface that tells Quartz that it should not trigger the job if it is still running. In other words it prevents concurrent executions of the job. | I am using Quartz scheduler to schedule the process of file download from SFTP.
The job triggered after every 2 hrs. But sometimes due to huge file size, downloading
takes more time and before it completes, the process is restarted. Is their any way we
can hold the scheduler to trigger same job again till the previo... | Holding Quartz scheduler to trigger job again till previous job finish processing |
You can do it in below way
ssh-keyscan github.com >> /root/.ssh/known_hosts
|
I would like to ask how to solve the problem that when I try to git clone ... in the container it will fail due to that the server is not in known_hosts. Is there way how to force "yes" in:
The authenticity of host '192.168.0.136 (192.168.0.136)' can't be established.
ECDSA key fingerprint is SHA256:tZiiWJJYFdtTmjjk3... | Git clone inside of newly created container - problem with known_hosts |
You need to ssh into your EC2 instance and rungit pullso that your working tree in your EC2 is up-to-date with what's on github.Then, you need to restart your server so that your changes are reflected on the server. For EC2 instances that are served using apache, this can be done by runningsudo service apache2 restart. | I have followed the tutorial below and successfully deployed my django app to AWS on ec2.my configuration isUbuntu,nginx,gunicornandsupervisorhttps://dev.to/subhamuralikrishna/deploying-django-application-to-aws-ec2-instance-2a81(I have not connected my EC2 to RDS yet)Now that I have made some changes to my django app ... | How to push your updated changes to an ec2 instance with django |
Ignoring the possibility of a server farm and load balancing, this behaviour can be caused by the application pool running as a web-garden. To quote the relevant section from MSDN:
Because Web gardens enable the use of
multiple processes, each process will
have its own copy of application
state, in-process sess... |
Although i have specified a unique key, it seems the following code will return one value for 5 requests, then another for the next couple, then revert back to the value saved in the original request and just continue until there are 10's of different objects all stored under the same key.
It then seems almost random ... | Httpruntime cache keys not unique? |
For me it worked after removing an audio file i was testing on. | When I am trying to push my WordPress project to GitHub I got thiserrorerror: RPC failed; curl 56 OpenSSL SSL_read: error:140943FC:SSL
routines:ssl3_read_bytes:sslv3 alert bad record mac, errno 0
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-... | Github error on git push: error: RPC failed; curl 56 OpenSSL SSL_read: [duplicate] |
Your httpd configuration is incorrect. Here is the snippet you should set to make the reverse proxy working correctly.RequestHeader set X-FORWARDED-PROTO "https"
ProxyPass "/" "http://my.sonarqube.com:8082/"
ProxyPassReverse "/" "http://my.sonarqube.com:8082/"If you want to prevent issue with BREACH and CRIME attack, r... | I would like to have Sonarqube 5.2 (https://my.sonarqube.com) configured as a secured connection and behind a reverse proxy, but it doesn't work.
I installed mod_proxy and mod_ssl.In httpd.conf<VirtualHost *:80>
ServerName my.sonarqube.com
Redirect permanent / https://my.sonarqube.com/
</VirtualHost>
<Virt... | Setup Sonarqube behind a reverse proxy on RedHat |
Try the following:RewriteEngine On
RewriteRule ^index\.html$ /index.php?pageID=Forside [L]I think this may help you to resolve your problem.ShareFolloweditedApr 3, 2018 at 3:16Darryl Hein144k9595 gold badges220220 silver badges263263 bronze badgesansweredJan 5, 2013 at 11:37John PeterJohn Peter2,86833 gold badges2727 s... | I have a small problem with my Apache configuration when creating "pretty" URLs. I've got it to the stage where typing (or linkig for that matter) toindex.htmlforwards you toindex.php?pageID=Forsidethat is exactly what I want.But how can I get index.html to stay in the address bar of the browser?Right now it forwards a... | mod-rewrite forwarding without changing URL |
Updated:(16th Nov 2020 onwards)Remove olderpod 'Fabric' & pod 'Crashlytics'from Podfile. Add following dependencies.# Add the pod for Firebase Crashlytics
pod 'Firebase/Crashlytics'
# Recommended: Add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'Older :Please check whether you are using latest Crashly... | [31merror: could not complete submission of dSYM at /Users/XXUSERXX/Library/Developer/Xcode/DerivedData/ProjectName-flcoueeibbfifebpxptgzctdsqel/Build/Intermediates.noindex/ArchiveIntermediates/ProjectNameAlpha/BuildProductsPath/ProjectNameAlpha-iphoneos/ProjectName.app.dSYM:
Error Domain=com.crashlytics.mac.error-do... | This version of OSX is not able to perform the necessary dSYM transformations |
Use below , works like a charm with classic loadbalancers.argocd login your-argocd-server.com --skip-test-tls --grpc-web | Argocd loginIs not working, I endup with below error.abilash@LAPTOP-BOSTG8L5:~$ argocd login 10.111.252.193 --sso --loglevel debug
FATA[0040] dial tcp 10.111.252.193:443: operation was canceledI am able to login to the ui using the kubenetes svc.NAME TYPE CLUSTER-IP EX... | Not able to login to argocd cli |
Docker manages /etc/hosts. It does this to make container linking work. You can ask docker to append to the hosts file when starting the container withdocker run -it --add-host foo:192.168.99.100 | Dockerfile:FROM ubuntu:latest
RUN touch /tmp/foo
RUN echo 'bar' > /tmp/foo
RUN echo '192.168.99.100 foo' >> /etc/hosts
ENTRYPOINT /bin/bashInside the container:root@47040a03cbc1:/# cat /tmp/foo
bar
root@47040a03cbc1:/# cat /etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localn... | Docker echo to /etc/hosts not working |
Sounds like you just want a "local" branch of origin/pro-rata-TSR.Use the following commands:Download any commits, branches/tags from the remote repo and add them
to your local repo (but does not change the state of your repo (i.e.
does not merge anything or change your files):git fetchYou don't have to do this step, b... | I have a master and a branch repo in github and i've been working on the project in multiple locations, ie. work and home. The local repos at work are fine because this is where i created the branch.What i want to do is get my local repo at home to the same point. ie. sync to the remote repo that has the new branch on ... | git - keeping multiple location in sync |
It looks like you're trying to run a class compiled with Java 8 on an older version of the JVM. Is that Tanuki wrapper honouring the JAVA_HOME variable that you set? What happens if you run it without going through the wrapper?See here:How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor versio... | Installed the sonarqube 6.1,
Set the JAVA_HOME as C:\JDK\jdk1.8.0_92 in StartSonar.bat file and added C:\JDK\jdk1.8.0_92\bin in path variable alsoWhen trying to start getting the below errorSetting JAVA_HOME
PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System3
2\WindowsPowerShell\v1.0\;C:\P... | Unable to start sonarqube 6.1 |
3
upstream backends {
server backend1.example.com;
server backend2.example.com;
}
server {
location / {
# your static configuration
root /path/to/static/files;
}
location ~ \.php$ {
# your proxy configuration
proxy_pass... |
We have setup nginx server and also trying to do the load balancing with 2 other servers.
The setup is: One main server (proxy server) and other two servers (which serves the request)
We have set of .css, .js and .php files. We want the main server to serve all the static files like, .css, .js and image files and only... | NGINX load balencer |
I do observe different Memory numbers on iOS 6 & iOS 7.
I have an app that makes use of openGL (a 3D viewer), and of AVFoundation (my own camera implementation, with AVCaptureDevice...)
I ran the app on iPhone 4S with iOS 6, and on iPhone 4 with iOS 7, my observations so far :
Allocations, Dirty & resident VM sizes r... |
I was recently trying to make my iOS 6 compatible app work with iOS 7 (noted still in beta). So i had my boss install iOS 7 on his iPhone 4S. We noticed that camera picker was slow and not responsive, and when we take a picture everything freezes. When i run the profile with memory allocations i notice that we have a ... | iOS 7 memory issues |
Once you have created your account on GitHub, you will be able to create a new repository from the GitHub web interface.
Once you have created this repository, you will see (detailed in GitHub on your repository page) the URI for it. You can then set this as a remote from your local machine and then push to it.
The ... |
I have a Java project in my workspace, which I am trying to push to GitHub.
I am a first-time Git user and didn't create a GitHub account yet.
These are the steps I followed.
Initially from the source code folder, I did:
git --bare init
Again I ran the git init command:
git init
Created a remote repository:
git remot... | How to view repository on GitHub |
Quoting from manpage for wget:-O fileUse of-Ois not intended to mean simply "use the name file instead of the one in the URL;" rather, it is analogous to shell redirection:wget -O file http://foois intended to work likewget -O - http://foo > file;file will be truncated immediately, and all downloaded content will be wr... | I need to start a remote PHP script (example.com/cron.php) every minute with a cronjob. At the moment, my cronjob looks like this:wget example.com/cron.php. This works, but puts a cron.php file on my server every time. How can I prevent this? Or are there alternatives towget? | How to start a remote PHP script via cronjob (alternative to wget)? |
0
At least it is broken on Windows (See issue on github) and it’s not in the docs.
Share
Improve this answer
Follow
answered Feb 16, 2021 at 14:11
karlsebalkarlsebal
1,59111 gold badge1818... |
Problem
Docker image sizes should commonly be as small as possible. Using full-blown environments like a standard python image results often, with all dependencies installed, in heavily bloated images. Packaging python into stand-alone executables (e.g. using pyinstaller) is a perfect way of reducing image sizes and o... | PyInstaller unbuffered stdio |
the issue has been traced.
My API are hosted in us-east-1 region whereas I was trying to access the data in the ap-southeast-1 region due to that there was a latency. I will be moving all the resources in a single region in order to reduce the cost and latency issue.
|
We had a few API which were hosted in AWS Elastic beanstalk. we decided to combine all of those applications in a single EC2 instance under individual docker container in order to isolate their environments.
After the setup I have ran into a performance issue. the response time is extremely slow (~58 sec)
I looked at... | .net core 3.1 docker container extremely slow response |
3
Each Docker container has a self-contained filesystem. You can never directly run commands from the host or from other containers' filesystems; anything you want to run needs to be installed in the container (really, in its image's Dockerfile).
If you want to run a tool ... |
I'm having trouble connecting postgresDB to my app using docker-compose
My understanding of docker compose is that I can combine two containers so that they can communicate with each other. Suppose I have an app in the appcontainer that runs the psql command (just a one liner python script with os.command("psql")). Si... | Running psql command from a docker container |
1
Run amplify init and then select Y to confirm the Project Information. To verify that you have set up the app locally, run amplify console and select authenticate with AWS profile
Share
Improve this answer
Follow
... |
I am following this tutorial, and when I do
amplify pull --appId <my app id> --envName staging
It opens the Amplify Admin UI but I don't know what to log in with?
Has anyone else had this problem?
https://aws.amazon.com/getting-started/hands-on/build-react-app-amplify-graphql/module-two
| AWS Amplify how to sign into Admin UI after running "amplify pull" command |
You need to add a condition to your Jenkins job to figure out who is executing the job right now, if it's the SCM or a manual build.
In the build cause you have a list of options which you can later on get as parameter in the job.
use it to determine who is the initiator of the build.
|
I have a job on Jenkins.
When i click manual build now, it is building.
When triggered from a git commit, it is also building.
How to determine trigger source, whether manual build or scm change?
| Is there any way to determine trigger source, whether manual build or scm change? |
The scheduler is not able to schedule the pod on linux nodes because those nodes have got taints. So you need to addtolerationsin the pod spec of the deployment.tolerations:
- key: "cattle.io/os"
operator: "Equal"
value: "linux"
effect: "NoSchedule"Also add a specific taint to the windows nodes so that on... | I have set an On-Prem Kubernetes cluster using Rancher, with 3 Centos nodes and 1 Windows node.
I wanted to set a Deployment that will never run over the Windows node, so I set in the Deployment spec.template.spec.nodeSelector: kubernetes.io/os: linuxIt seems to run but the deployment gets stuck in Pending, with this e... | Kubernetes FailedScheduling using nodeSelector |
27
You can use aws-cli to do it. Here is a sample command, replace POOL_ID and EMAIL_ADDRESS accordingly:
aws cognito-idp admin-create-user --user-pool-id <POOL_ID> --username <EMAIL_ADDRESS> --message-action RESEND --profile <AWS_PROFILE>
Share
Improve this an... |
I need to restore or reset user password when his status is FORCE_CHANGE_PASSWORD. This situation happened when user try to restore password using "forgot password" feature and he lost email with temporary password. Now he can't do anything because he don't remember password and he can't reset password again
This code... | Restore password for FORCE_CHANGE_PASSWORD status |
(Moved from comments)In Azure, when you're performing cluster upgrade, there's a parameter called "max surge count" which is equal to 1 by default. What it means is when you update your cluster or node configuration, it will first create one extra node with the updated configuration - and only then it will safely drain... | Here's the scenario: we have some applications running on a Kubernetes cluster on Azure. Currently our production cluster has one Nodepool with 3 nodes which are fairly low on resources because we still don't have that many active users/requests simultaneously.Our backend APIs app is running on three pods, one on each ... | How to scale up Kubernetes cluster with Terraform avoiding downtime? |
Yes,affinity: {}implies an empty map.It would help if you tried converting it to JSON to understand what YAML is considering or not. I like to usethis tool.Here is the output:{
"affinity": {
"nodeAffinity": {
"preferredDuringSchedulingIgnoredDuringExecution": {
"nodeSelectorTerms": [
{
... | Based on the vanilla valuesfile, I'm trying this YAML:affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: eks.amazonaws.com/capacityType
operator: In
values:
- SPOT...expecting it to work, but inst... | Why is this incorrect YAML syntax for a helm chart? |
You need to specify both the name and the email of the author of a commit to entirely vanish traces of your current account. | I check this question about commit under another authorgit commit as different user without email / or only emailHow can I also push to remote repo under another login. I do:git commit --author="notMe" -m "whatever"
git push https://<remote-repo>
Username for 'https://github.com': notMe
Password for 'https://[email pro... | How to push to remote repo under another user |
GitHub states that commits made in a fork won't be counted as a contribution in the contribution graph in your profile. Pull requests and issues are counted IIRC.
Here's where I found the reference: https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-... |
I pushed a few commits to my forked repository.
I can see my commits in the commit history in my forked repository, but my contributions isn't showing the commit activity..
Is it because I pushed to forked repository, not my repository..?
Is there any way to show contributions of forked repository?
https://github.com/... | Why isn't forked repository showing contributions? |
I don't think there will ever be a strict definition forDocker build stagebecause a build stage is in general something theoretical which:can be defined by youdepends on your case (language / libraries)In this question:Difference between build and deploy?one of the answers says...Buildmeans toCompile the project.I thin... | As far as I understand build stages in Docker are fundamental things, and I have a practical understanding of them but I have trouble coming up with a proper definition, and I also can't seem to find one.So: what is the definition of a Dockerbuild stage?Edit: I'mnotasking "how do I use a build stage?" or "how can I use... | What is a Docker build stage? |
You can store Github APP private key
andAPP_IDas a variable for the repo.Then useactions/create-github-app-token@v1to create an installation token.Then you can use generated token in a step. Inside the step you can use for example gh cli.steps:
- uses: actions/create-github-app-token@v1
id: generate_token
wit... | I have Repo A (private, in an organization), which has a GitHub Actions workflow that builds and bundles my application into atar.gzfile and includes it as an artifact in a Release.I have Repo B (also private, same organization) which, in the GitHub Actions workflow, needs to download the release artifacts from a speci... | GitHub Actions: Downloading release files from a different repository |
you can generate a html file if you run an analysis in the preview modehttp://docs.sonarqube.org/pages/viewpage.action?pageId=6947686 | I want to create a custom report. Response format for sonarqube web service API /api/issues/search is JSON or XML. How can I use that response to create a html or CSV file using "unix shell without using command line tools" so that I can use it as a Report. Or is there any other better way to achieve this? | How can I use SonarQube web service API for reporting purpose |
The Flutter WidgetsBindingObserver class provides a method to detect low memory, as demonstrated in this article.
|
I have a data cache. It is expensive to fetch some of the data.. other data is quite disposable. The data can be quite large and could conceivably cause the OS to ask apps to free memory.
Android has onTrimMemory() and IOS has applicationDidReceiveMemoryWarning(). Is there a flutter equivalent?
| how can a Flutter application receive low memory notifications? |
You can use your WordPress root.htaccessfile for this, or you can create one in the uploads directory. I'd recommend sticking to the file you're already using for WordPress./wordpress/.htaccessamended contentRewriteBase /wordpress/
# ^ your base should already be set - if it hasn't, put this just under RewriteEngine On... | I'm working with wordpress and I am using .htaccess, but I don't really understand its functionality.The scenario is the following:
When user tries to reach a file from upload directory (example:http://[localhost]/wordpress/uploads/video.mp4) he is redirected to a php page which decides if the user has a permission to ... | deny file request and redirect to .php page using .htaccess |
Have it this way:RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_URI} ^/site/ [NC]
RewriteRule ^ - [L]
RewriteRule ^inicio/([^/]+)/?$ site/$1/index.php [NC,L,QSA]
RewriteRule ^([^/]+)/([^/]+)/?$ site/$1/pagina.php?pagina=$2 [L,QSA]RewriteCondare ... | This line is workingRewriteRule ^(.*)/(.*)?$ site/$1/pagina.php?pagina=$2 [L]Now I'm trying to make when accessing the link/iniciogo to theindex.phppage.RewriteRule ^inicio/(.*)?$ site/$1/index.php [L]TherebyRewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_U... | Use Two rules for Htaccess |
2
Try to pass the socket path instead of server:port:
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
Also, the server_name _; will work only if a default server is specified, are you sure the 200 code comes from from the url you requested (you should rule out possible f... |
I've just installed nginx and php7.0-fpm on clear debian 9 and tried to configure it by standard way, but when i try to access http://mysite/test.php i get blank page. There aren't any errors in /var/log/nginx/error.log or /var/log/php7.0-fpm.log files (i get 200 answers, but page is blank). My configs files below..
/... | Nginx + php7.0-fpm = blank page |
If you have not yet added those files to the index (if you have, but not committed, you can do agit reset, to unstage them), you can add a.gitignorewith, as its content, the one formgithub/gitignoreSwift.gitignore.Then do agit status: you can add, commit and push the files which are still listed.ShareFollowansweredOct ... | I'm adding some swift playgrounds to a public GitHub repo but i'm unsure which files to commit and push.Here are the files in one playgroundFile.playground/Contents.swift
File.playground/contents.xcplayground
File.playground/playground.xcworkspace/contents.xcworkspacedata
File.playground/playground.xcworkspace/xcuserda... | What files do I need to push when adding a swift playground to a public GitHub repo |
You can configure Kubernetes networking in a number of different ways when configuring the cluster, and a few different ways on a per-pod basis. If you want to try verifying whether the docker networking arrangement is the problem, sethostNetworkto true in your pod specification and give it another try (example here). ... | I setup a kubernetes cluster with 2 powerful physical servers (32 cores + 64GB memory.) Everything runs very smooth except the bad network performance I observed.As comparison: I run my service on such physical machine directly (one instance). Have a client machine in the same network subset calling the service. The rp... | kubernetes network performance issue: moving service from physical machine to kubernetes get half rps drop |
5
See docker source tree: this & this:
func (s *DockerSuite) TestRunAddHost(c *check.C) {
// Not applicable on Windows as it does not support --add-host
func (s *DockerSuite) TestRunCreateVolumeEtc(c *check.C) {
// While Windows supports volumes, it does not su... |
Environment : Docker for Windows
Container : Windows Container
In docker run command , there is --add-host option. This is not working for Windows container.
Same way there is a configuration option in a compose file , extra_host. This is also not working for windows container.
Is there any specific reason , this i... | Add-host or extra_host not working for windows container |
I found that there was no environment variable to access only that name.When the name is used, the environment branch name from GitHub uses the Name whereoriginorremotewould usually be in the branchname. For example, if the GitHub branch name ismynewfeature, the Jenkins environment would understand that branch name as... | I'm seeing in the Source Code Management section of the Jenkins job, that there is a Name.Can I reference this name in the Execute Script section using an environment variable?I've read through the documentation for theGit Pluginhowever, there is no information here on how to reference the given Name.This would be incr... | How can I reference Jenkins Github repository Name from the Execute Shell? |
Every primitive floating point operation will have a rounding error; if the result is x then the rounding error is <= c * abs (x) for some rather small constant c > 0.If you add 1000 numbers, that takes 999 additions. Each addition has a result and a rounding error. The rounding error is small when the result is small.... | I am trying to analyze how reduction (parallel) can be used to add a large array of floating point numbers and precision loss involved in it. Definitely reduction will help in getting more precision compared to serial addition . I'll be really thankful if you can direct me to some detailed source or provide some insigh... | Understanding Floating point precision analysis for Parallel Reduction |
0
Check the documentation:
pip currently supports cloning over git, git+https and git+ssh:
Here are the supported forms:
git+git://git.myproject.org/MyProject#egg=MyProject
git+https://git.myproject.org/MyProject#egg=MyProject
git+ssh://git.myproject.org/MyProject#egg... |
Hi I am trying to install this python library from github:
https://github.com/eskerda/PyBikes
However when I typed:
pip install git+git://github.com/eskerda/PyBikes.git
or
pip install git+https://github.com/eskerda/PyBikes.git
It returns:
Cannot find command 'git'
This is my first time trying to install a library ... | installing python library from github |
@user273098 curious to see how you figured out the answerAthena currently does not give the ability to specify the ACL. However, two workaround is possibleInstead of having account A assume a role in Account B, have Account B grant account A's account root/role with access to Account B's Athena. Then Account A can use ... | We(account A) would like to use programmatically way to trigger athena query(startQueryExecution) in different aws account ( Account B), we use assumed role to achieve it. After athena query done, we are expecting that result should be written to our aws account s3 bucket (Account A). We managed to do so by setting bot... | how to ensure that Athena result S3 object with bucket-owner-full-control |
1
Depends on what kind of analysis you are doing. Using the sparse matrix functions from package Matrix (as Shinobi_Atobe suggested above) might be helpful if your matrix is sparse, that is, contains "lots" of zero values, whereas the simplest operational definition of "l... |
I am working with a big (500000*2000) matrix containing data that can be one of 4 values. Keeping it in the standard R data type is pushing the capabilities of my workstation.
Is there a data type in R that allows for more efficient memory usage by allocating only 2 bits to each one of these values? This would increas... | How to change to a less memory-hungry data type in R? |
Just make a cache(python dict) which stores the first query and return it everytime, clear the cache every N mins, for this you make a decorator or cache class e.g.import time
cache = {}
lastTime = time.time()
def timedCacheDecorator(func):
def wrap(*args, **kwargs):
key = str(args)+str(kwargs)
... | Our application fetches the correct database server from a pool of database servers. So each query is really 2 queries, and they look like this:Fetch the correct DB serverExecute the queryWe do this so we can take DB servers online and offline as necessary, as well as for load-balancing.But the first query seems like ... | Cache the result of a MySQLdb database query in memory |
git cloneThe clone command in git is used when you want to download an existing git repository to your local computer.2 git pullWhen you want to take changes or updates done by other developer/team member on git repository, you have to use git pull.In detail git pull is the command that fetches the content from a remot... | This question already has answers here:What is the difference between 'git pull' and 'git fetch'?(38 answers)Closed2 years ago.Could you explain the difference between git clone, git pull and git fetch? I have read some other answers but none of them state the difference between the three clearly. | What is the difference between git clone, git fetch and git pull? [duplicate] |
I would suggest using my packagegistr- which is built for working with GitHub gists. There are many ways you can create gists, including from files on your machine, or from R objects. You can knit .Rmd files during the creation process before uploading, etc. An example:install.packages("gistr")
library("gistr")
file <-... | I would like to find a simple way of putting gists on Github from R. Assume I have an object I want to convert into a gist. Normally I would save it as a text file and then upload it manually on Github. Is there a better way?How can I create a gist directly from an R object and upload it to Github? | Post a gist directly from R? |
1
I had the same problem and tried different things for the last hours and what seems to be the cause is, that if you're using Debian 10 like me, Rancher 1.6 uses iptables for some rules and iptables-nft (which is simlinked from iptables) for other rules. Debian 10 uses ipt... |
I have setup: Rancher (1.6.30) and Docker (18.09.9).
When I create a rancher cluster from docker-compose:
version: '2'
services:
mongo:
image: mongo:4.4.2
stdin_open: true
volumes:
- /var/lib/mongo/data/db:/data/db
tty: true
ports:
- 27017:27017/tcp
app1:
image: XX
stdin_open: t... | Rancher doesn't expose ports |
First, you have to know that Proparse doesn't give access to every detail of the preprocessor. That said, the methodunit.getMacroGraph()will give you access to the visible part of the preprocessor, so that's a good starting point.
If you're looking for usage of given preprocessor variable, you can search for NamedMacro... | I am trying to create a custom plugin, based on theRiverside OpenEdge pluginand its version ofProparseto create a rule that valids a &IF preprocessor.This rule needs to verify if the application is using a deprecated value of a&GLOBAL-DEFINElike this:/* "A" is the deprecated value of "opts" so I want to create a new IS... | SonarQube OpenEdge custom rule to verify &IF preprocessor with Proparse |
yeah, you are right. onExit is called when you remove node from it's parent, or when it's parent is removed from the stage/other parent.
|
eg)
1. When X sprite is touched, pointer of X is stored in class Y
2. when X sprite is removedFromParent, X sprite will notify Y that it's going away
How do I achieve the second step?
Specifically, onExit(of class X) is a good place to do this kind of stuff?
When does onEnter/onExit get called? I don't find the refere... | cocos2d onEnter, onExit |
Actually, After lots of efforts and research, the found an option in the maven findbugs help documentation within maven a way to specify heap size of the forked jvm as indicated by @second in the first comment of the question. SO inside the POM XML within the inside the findbug's tag I can specify 1024 like the fo... |
So basically the current configuration works for all the builds. But this time. Added some code to the project, but this time the build fails and throws
java.lang.OutOfMemoryError: GC overhead limit exceeded
while FindBugs analysis. while searching out more on this I found out there is a <effort> option in the Fin... | java.lang.OutOfMemoryError: GC overhead limit exceeded while running findbugs in maven |
With the newsubquery syntax(introduced inPrometheus version 2.7) you can do this with the below code.Warning: These subqueries are expensive, i.e. create very high load on Prometheus. Use recording-rules when you use these queries regularly (in alerts, etc.).(metric{ dim = "some value" } > 0 ) [2m:5s]Subquery syntax<in... | Lets say I have some metricmetricand I perform a selection over a dimension by doingmetric{ dim = "some value" }. The result of this is an instant vector which I now want to filter by using a simple> 0. I expect the result ofmetric{ dim = "some value" } > 0to be another instant vector and this is what I gather from the... | How to filter instant vector by value then take range in promQL? |
If I do a manual release at the end, it seems to satisfy the analyzer
You aren't using ARC. Manual releasing is forbidden with ARC, this wouldn't compile. Check your build settings.
|
Following the StringCalculator kata from Xcode Katas, I ended up with a following class.
@implementation StringCalculator
- (int) add: (NSString *) string {
// this is marked as a potential memory leak by the `Analyze` tool
NSMutableString *separatorCharacters = [@"\n" mutableCopy];
if ([string hasPr... | Why am I getting potential leak with ARC? |
Your question isn't very clear, but I think you're on the right track vis-a-vis implementing a web server. So, my answer to your question is: you need to implement a web server to receive the webhook requests.
Edit
At the bottom of this document, you will find instructions on how to implement a very simple web server ... |
I'd like to capture webhooks from GitHub (for various events, like commits, etc), from my C# console application. I figured I could "listen" to an endpoint and webhooks would be thrown there, but it seems that perhaps github is actually sending webhooks to endpoints that you need to setup and listen from.
If the latte... | Receiving webhook from GitHub from C# Console App |
If you're willing to move away from Ehcache, you could considerInfinispan, which now includes integration withmemcache. It's a bit more of a faff to get working than Ehcache, but not too much.Starting with version 4.1, Infinispan distribution contains a server module that implements the memcached text protocol. This al... | We have a web application that loads a User object from database. Its a high volume application with thousands of concurrent users so we're looking at ways to cache the User objects to minimise database load.Currently using ehcache but are looking at memcached to lower the memory requirements of the application, and ma... | Using ehcache in front of memcached |
Modern Maven projects are easy to analyze using the specialized scanner for Maven: it discovers the necessary configuration from Maven's metadata, most notably, the sources, test sources, compiled Java bytecode, and additional information that can improve the quality of the analysis, such as library dependencies.Withou... | We have some old Maven1 project (we cannot upgrade it to the latest maven versions) so I am just trying to understand if there is a way we can run SonarQube on Maven1 version projects..?If not what is the best alternate to analyze the code quality other than SonarQube? | Can we run SonarQube on a Maven1 project? |
If you use a common computer, with a.rodatasection:#include <stdio.h>
static const char *s = /* string of 100 characters */;
int main(void)
{
puts(s);
return 0;
}It allocates100 + sizeof(char *)bytes in the.rodatasection.#include <stdio.h>
static const char s[100] = /* string of 100 characters */;
int main(void... | This question already has answers here:Closed11 years ago.Possible Duplicate:What is the difference between char a[] = “string”; and char *p = “string”;Will the array version allocate the array memory, so a 100 byte string will use 100 bytes on the constant section and 100 on the static array, or will it use only 100 b... | What is the difference between static const char * const and static const char []? [duplicate] |
I guess you also executedCREATE EXTENSION pg_cron;otherwise thecron.schedule()call would have failed.Not sure why you have also allowed0.0.0.0/0in pg_hba.conf that means anywhere on earth (assuming IPv4 is not used outside of earth) ;)When calling thecron.schedule(), which should be executed on the ${cron.database_name... | Create a cron job to run a stored procedure with the configuration files:/etc/postgresql/12/main/postgresql.conf:shared_preload_libraries = 'pg_cron' # (change requires restart)
cron.database_name='navstar_ankay'/etc/postgresql/12/main/pg_hba.confhost all all localhost trust
... | POSTGRESQL: cron job 1 connection failed |
[Updated Jun 2019]We now have official docker images forOpenLibertyon Java 11 (and 12).Any image with-java11-in the label uses OpenJDK 11 w/ Eclipse OpenJ9 for the VM. | I'm looking for some guidance on how to use Websphere Liberty (19.0.0.4) with Open JDK 11 on Docker containers.
The Liberty images hosted on Dockerhub use IBM JDK 8.
Does anyone know what is the best practice to build an image which utilises Liberty and a different JDK to the default? | Websphere Liberty running on Docker with Open JDK 11 |
there is only one way to get this done is migration lambda trigger. In short:create new cognitocreate migration lambdaadd this lambda as a trigger to login and/or forgotten passwordspoint users at new cognitoupon login, Cognito will check locally and if user is not found, will use the trigger to check another cognito. ... | Is it possible to export the AWS Cognito users with password from one pool and import them to another pool?Possible way:I know we can ask users to reset the password but just wanted to know if is there any other way apart from this? | Export AWS Cognito Users with password |
This is confusing in the GitHub Actions documentation on the "Events that Trigger Workflows."https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#releaseIt states that Activity Types are "published," "unpublished," and "prerelease" but it doesn't tell you how to invoke these activities. You... | I've created a "publish" workflow in new repository that publish my project on new release with this triggeron:
release:
types:
- createdIn my local machine I created a tag and pushed it:git tag v0.0.1 main
git push origin v0.0.1Now I see that my repo contains 1 tag and 1 release, but the workflow did not run... | Github Action trigger on release not working on tag |
The default behaviour is to store the content in memory in the same way asHttpRuntime.Cache(actually in an internalHttpRuntime.CacheInternalwhich behaves similarly to the publicly visible cache), but in ASP.NET 4.0 you can write your own provider to store the content however you wish.This a nice introduction to impleme... | I need to enable caching in my asp.net application, but I do not want to use the webserver's memory for holding cache objects. If I add the page directive for output caching will the page be stored in the asp.net cache object?Thanks! | Is page output cache stored in ASP.NET cache object? |
Try to rely on the service or container names instead. They will be resolved by the docker daemon.version: '3'
services:
server:
container_name: myserver
...
client:
container_name: myclient
...
environment:
- REACT_APP_API_HOST=myserver
- REACT_APP_API_PORT=3001 | I want to convert the environtment variable's value (it is a service in the same docker-compose.yml file) to the ip of that respective container and i can't achieve this.docker-compose.ymlversion: '3'
services:
server:
restart: always
build:
dockerfile: Dockerfile
context: ./server
ports:
... | Transform docker-compose environment variable's value to service ip address |
0
This method is depreciated after iOS 6.0.
Try this thread[1] instead.
[1]: Dismiss popover when clicking a uibutton "this link".
Share
Improve this answer
Follow
edited May 23, 2017 at 11:49
Commu... |
My app consists of a parent view controller with 10 buttons that all lead to 10 different modal views, all of which have have quite a bit of content to them. The app runs perfectly on the simulator, but on the actual device, it receives many memory warnings, and sometimes crashes.
When testing the app on the simulato... | Releasing Memory Dismissing Modal View Controller |
This is because when you specify a day of month and day of week, cron will execute the job when EITHER of those constraints are true. From the man page for crontab (5):Note: The day of a command's execution can be specified by two fields —
day of month, and day of week. If both fields are restricted (i.e.,
ar... | I have cronjob to be run on every month first friday evening
i used the below mentioned entry00 20 1-7 * Fri [ "$(date '+\%a')" = "Fri" ] && $HOME/path/to/my/script.sh > /dev/null 2>&1This entry should run my script if Friday falls withing 1-7 day of the month, but my script is getting executed even after 7th ... | How to run cronjob on every month first friday? |
18
In my case I opened the VPC Security group associated with my database
In the EC2 Security groups dashboard I selected Edit Inbound Rules from the actions dropdown and chose edit inbound rules.
At first, I looked at the inbound rules and thought everything was OK sinc... |
I created a SQL Server RDS Instance in AWS and it seems to be up and running, but if I try to connect to it using Management Studio I get this error:
Here is the text of the error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not ... | Cannot connect to RDS SQL Server Database using Management Studio |
With your current rule :RewriteRule ^post/([^/]*)$ /the_post.php?id=$1 [L]You can't have any/afterpost/in your url.[^/]*means any character except/.You can try this rule :RewriteRule ^post/([0-9]+) /the_post.php?id=$1 [L,QSA] | I have a problem with my .htaccess file.In my .htaccess rules if I put this:RewriteRule ^post/([^/]*)$ /the_post.php?id=$1 [L]I'll be able to navigate url like this:http://www.example.com/post/12But if I try:http://www.example.com/post/12/orhttp://www.example.com/post/12/something-else-hereThe page was not founded.What... | PHP .htaccess RewriteRule allow multiple combination |
Unfortunately everything you do in CloudFormation templates is case-sensitive including property names and parameter values. You may have to recreate the stack.
As you correctly pointed out, there is no Fn::ToLower function. If you really want to achieve what you are trying to, the only way to do it as of now is creat... |
I created my RDS Subnet Group via CloudFormation referencing a parameter ProjectName
DB:
Type: AWS::RDS::DBInstance
Properties:
DBSubnetGroupName: !Ref RDSSubnetGroup
Problem now is CloudFormation says it cannot find my subnet group:
DB subnet group 'AbcDef' does not exist because its actually abcde... | CloudFormation fails to find RDS Subnet Group because of lowercase |
If you're using opencl >= 2.0, passing NULL as the local work group size will allow the implementation to split up the workgroups into non uniform sizes (ie maintaining optimum performance with no code modifications). This is supported by intel and AMD, though not nvidia. Under opencl <= 1.2, this will produce poor per... | I am a beginner in OpenCL and trying to use GPU for parallel processing of data sets. These datasets are of different sizes ranging from 10 to 10000 and same kernel is invoked for these sets one by one by. The problem size for each invocation is equal to the `set_size'
The kernel code contains:int id = get_global_id(0)... | Discard computations for extra global work id's in OpenCL |
Try to write a simple compiler parser as it seems that it only contains some string type words, or just use RegExp I think. | invalid_timestamp{name="download_events"} 83converts toinvalid_timestamp{name="download_events", label_name = "foo"} 83What should I do? I have converted this message to dto.MetricFamily, but I do not know how to add labels to dto.MetricFamily. Thanks | How to add labels into prometheus format? |
This is expected behaviour. Local caches entities that were loaded by you from database during lifetime of DbContext object. With query:context.SampleEntities.Select(x => new { x.A, x.B })you are loading to your application memory no SampleEntity object, but only its proeprties A and B. Select is as well translated to ... | FollowingMSDN documentationwe can useLocalproperty to get local/cached data directly from the context without additional requests to a data source:Gets an ObservableCollection that represents a local view of all Added, Unchanged, and Modified entities in this set.(...)This property can be used for data binding by popul... | Using DbSet<TEntity>.Local Property in Entity Framework |
Have it like this:RewriteEngine On
# assuming /page.php is just a single page
RewriteRule ^page\.php$ page-promo.php [L,NC]
RewriteRule ^(.+)\.html$ $1.php [L,NC]However if /page.php can be any other page then use:RewriteRule ^([\w-]+)\.php$ $1-promo.php [L,NC] | I want to have a promo page as a temporary replacement for a main page.mydomain.com/page.php to mydomain.com/page-promo.phpI already have a rewrite rule to convert html to php# HTML to PHP
RewriteEngine On
RewriteRule ^(.*)\.html$ $1.php [L]With the promo page, I want the URL in the user's address bar to remainmydomain... | Redirect/Rewrite without changing address (.htaccess) |
<Files>and<FilesMatch>sections are processed in the order they appear in the configuration files, which means that the last one applied will take precedence, so your first try should work:<IfModule mod_headers.c>
<FilesMatch "\.(css)$">
Header set Cache-Control "max-age=691200"
</FilesMatch>
<FilesMatch "b... | Currently, my cache policy looks like this:<IfModule mod_headers.c>
<FilesMatch "\.(css)$">
Header set Cache-Control "max-age=691200"
</FilesMatch>
</IfModule>And this caches my css files for 8 days. If I wanted to cache a specific file for a year, how would I do this?I saw this answer, so I tried doing this... | How to apply cache policy to a specific file with .htaccess? |
You can also switch, for testing, to an HTTPS URL and see if the issue persists.cd /path/to/repo
git remote set-url origin https://github.com/<me>/<myRepo>
git push -u origin mainMake sure through thatgithub.comis reachable in the first place (no matter the protocol)ShareFollowansweredOct 25, 2021 at 6:30VonCVonC1.3m5... | I am getting quite desperate. I am a beginner in GIT. I am trying to create a new repository by the GitHub guideline:echo "<MY_TAG>" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin <MY_SSH>
git push -u origin mainFor some reason, after writing "git push -u o... | After writing "git push -u origin main" into terminal, nothing happens |
There are two mistakes in your system.First:
The .htaccess located in the root folder should be used to remove the 'public' part of the URL. The code for that is like the following:RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]It basically grabs every route and redirects it to the public folder, exactly as you wishe... | I tried to search and use the solutions already posted but nothing worked for now and I tried pretty much everything I could but didn't work.These are the app directories:localhost/
root/
data/
app/
public/
index.php
.htaccessThe htaccess is this:<IfModule mod_rewrite.c>
Options -MultiViews
... | htaccess for Silex from the root folder not working as intended |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.