Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
The latest versions of Views and DevCokpit require that you run thesonar-runner viewsandsonar-runner devcockpitcommands to compute the views/devs. Running a Sonar analysis on a project is not enough.With the latest version of the Jenkins Sonar plugin, you can run those 2 computation tasks by defining dedicated jobs (on... | I've installed Sonar 3.6 with both the Developer Cockpit and Views plugins. The Developer Cockpit seems to work fine since I can get the list of developers for a given project, see for example at bottom left ofhttp://sonar.xwiki.org/dashboard/index/1However when I click on Projects > All Developers, I get an empty page... | "All Developers" and "All Views" screens are empty |
Gunicorn is looking for the files inside the Docker container.You can use Docker volumes to make your SSL key/certificates on your machine available in your Docker container.Example:docker run -v /path/to/registry.key:/ssl/registry.key:ro -v /path/to/registry.crt:/ssl/registry.crt:ro -v /path/to/ca.crt:/ssl/ca.cert:ro ... | I'm developing an app locally in docker that requires ssl to work with an API endpoint and I've been having trouble getting these parameters to work:gunicorn -c "python:config.gunicorn" --reload "dataexplorer.app:create_app()" --timeout 3600
--workers=5 --certfile=/ssl/registry.crt
--keyfile=/ssl/registry.key --ca-ce... | Running gunicorn with SSL on localhost? (with docker) |
PromQL can indeed be tricky, for example, if one happens to use a wrong data type it simply fails silently. The problem you are running into seems to be that the left-hand side of your combined query, that is, the(sum(rate(container_cpu_usage_seconds_total...part returns a scalar value (so, exactly one value) while the... | On Prometheus UI when I am running the below query it worked as expected(sum ( rate (container_cpu_usage_seconds_total{namespace="nginx-enabled", container="nginx"}[30s])) * 100000) / 110000
Output Returned: 23.34
container_spec_cpu_quota{namespace="nginx-enabled", container="nginx"}
Output Returned: 110000But when ... | Monitoring Container CPU Utilization using Prometheus |
If the bucket name is hard coded like the example you pasted above, you can always externalize it to the cdk context file. As you've seen, when you access the bucket name from the Bucket construct, it creates a reference to it and that is so if you need it in another resource, cloud formation will depend on the value ... | I've create an S3 bucket for hosting my website. For that I've used the below code from the AWS CDK for python docsself.bucket = s3.Bucket(
self,
"my-bucket-name",
bucket_name="my-bucket-name",
removal_policy=core.RemovalPolicy.DESTROY,
website_index_document="index.html",
public_read_access=Tru... | How to get bucket name from Bucket object in AWS CDK for python |
Although I also don't understand why the thumbprint doesn't match. You can find the certificate with the correct thumbprint onthispage. | This question is regarding the critical changes to the certificate (Baltimore to DigiCert migration)As perhttps://techcommunity.microsoft.com/t5/internet-of-things-blog/azure-iot-tls-critical-changes-are-almost-here-and-why-you/ba-p/2393169, we need to include below certificate.However, In this article,https://learn.mi... | Which is the right subordinate Certificate Authorities (CAs) utilized by Azure while connecting to the IoT Hub? |
If you want to run an interactive process, you should use the -i (keep stdin open in case you detach) and -t (allocate a pseudo-tty) flags:
docker run -it ubuntu
You can look at the docs for more information on those flags and their usage.
|
How to stat a docker container. I had created it using
docker run -d -P -v /Users/bsr:/usr/local/users --name test ubuntu
I do have virtual box guest addition installed, and mounting works. But, I am not sure why I can't I keep the shell running.
bsr[~/tmp/web] $ docker ps -a
CONTAINER ID IMAGE ... | How to start a docker container (ubuntu image) |
NOTE: No there is no extra addon/extension in PHP for str_replace.
str_replace() is built in string function on PHP 4, PHP 5, PHP 7, PHP 8.In your code, there can be 2 possible errors. As your code is running local and your files have write permissions.The First point is - your/config/constants.phpfile is too big that'... | I am developing a laravel ride sharing applicaiton and for the settings data I used a config files. To change any value usign file file_get_contents after that with str_replace and file_put_contents for updating the value.
here is some code example:$config = base_path() . '/config/constants.php';
$file = file_get_conte... | str_replace() is not working in aws server returning empty string but working on cpanel and locally |
-1It seems you're breaking component/module/library conventions or mis used it. FromConfiguration Managementprinciples you're not supposed to "include" (build in the case of Binary Configuration Management) your component multiple times.Having a library which have many other ones which depends on and last ones are inde... | I have four projects, which have several modules in common.When I try to run a SonarQube complete analysis, only the first project gets successfully analyzed. Starting with the second project, I get an error message along the lines of "XXX module is already present in the server".Each of my four projects contains an ag... | SonarQube: How to analyze projects that share multiple modules? |
.) InfluxDB doesn't support SQL, but InfluxQL (syntax is similar, but it is not a SQL).
Please check InfluxDB doc for correct time condition syntax - there is a few options (absolute/relative):https://docs.influxdata.com/influxdb/v1.7/query_language/data_exploration/#time-syntax2.) It looks like yourX,Yare atags, but G... | I am using node-red and influxDB with it. Basically I am running node-red (which execute a python code), with node-red I am getting a data from gauge strain cell, and I have them with a json format as follows :{ “X” : “-0.18102575652004627”,“Y” : “0.8599837901151595”}That data is stored inside influxDB, then I would li... | SQL request for a JSON file |
The builtin Kafka metrics include record bytes sent, and consumer offset lag. If you want to count number of records per client instance, or latency of some processing, that's not causing any duplicated code, since it's not otherwise included by Kafka. | I'm using Prometheus to collect metrics on my application which is written in Java 8 (without Spring).
I useKafka Streamto read andKafka Producerto publish.I want to expose metrics on Kafka client used by the application such as counting the messages sent to each topic, number of records read, latencies, number of publ... | How to monitor Kafka client with Prometheus exporter |
In index.html are you loading style using:
<link rel="stylesheet" href="css\styles.css">
But it should be:
<link rel="stylesheet" href="css/styles.css">
Also, in styles.css you should load image using
background-image: url(../images/main.jpg);
GitHub sites runs on Linux machines, that use in pathnames / instead \ a... |
I have a sample landing page which I uploaded to gitHub. When I preview it on my computer with local files, everything works fine but I cannot see background image when I upload it to gitHub.
I've tried below codes to make it work but couldn't. You can check gitHub respiratory from here if you wish. And page from here... | My Background Image Doesn't Show Up On Github |
17
You need to set the app to run on host='0.0.0.0'. That is:
app.run(host='0.0.0.0')
So when you run:
> docker run -d -p 5000:5000 simple-flask-app --name simple-flask-app
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
* Restarting with stat
Then curl http://l... |
Problem:
From the windows host machine. Port mapping/exposing does not work.
Container app is not reachable.
curl http://localhost:PORT (127.0.0.1 / 0.0.0.0)
-> Could not get any response
curl http://DOCKER-IP:PORT (127.17.0.1 / 127.17.0.2)
-> Could not get any response
curl http://DOCKER-SUBNET-ADDRESS:PORT (10.0.... | Windows + Docker + Port not exposed/reachable |
Did you try to HTML encode these?
< to - <
> to - >
& to - &
|
Does anyone know how to include brackets in a comment on GitHub issues?
I'm trying to add something like this, but nothing shows up:
<dependentAssembly>
<assemblyIdentity name="dotless.Core" publicKeyToken="96b446c9e63eae34" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
<... | Brackets on GitHub issues |
From CommentsIssue was resolved after upgraded to Python 3.9.6 (paraphrased from
Idan Tobis)For the benefit of community providing tested build configuration | OS: Windows 10 (also tried with Ubuntu to no avail)CPU: Intel Core i7-8750H @ 2.2 GHzGPU: NVIDIA GeForce GTX 1060 with Max-Q designPython version 3.8TensorFlow version 2.3.0 (I did install it withtensorflow-gpu)Code:import tensorflow as tf
print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
print... | TensorFlow not detecting GPU (Dell Vostro with NVIDIA GeForce GTX 1060) |
As w3d pointed out the problem is not only for the robots and there was nothing wrong with the htaccess file.The problem was with my main controller which is framework.phpI renamed that to index.php and now the issue has been solved. For some reason even though the url and folder structure is virtual, the server is loo... | I am new to URL Routing so this issue might be from something which I did wrong. I am using PHP and I need to have simple clean URLs without showing the .php extension in browser. So I used the routing engine from the fat free framework (f3) and added a .htaccess file to the root folder. I followed a tutorial on this a... | 403 error on htaccess url routing |
It is possible to use template variables within the query field of another template variable via$Variable_name, similarly to how you reference them in queries.The exact format depends on the data-source but with influxDB it would look something like this.First variable:Name:NetworkQuery:SHOW TAG VALUES FROM readings WI... | We want to have a single drop down for parameter X and we wish to deduce the other parameters say Y and Y from the selected X value.Is it possible in Grafana?Did not find much content around it | Conditional template values in Grafana |
imagePullPolicyis only taken into account by Kubernetes when a POD is created or re-started. It is NOT taken into account while a POD is running, which means it does NOT check for image updates at any time while a POD is running.Even if another POD with the same image would be scheduled onto the same Kubernetes node, t... | I want that every time I create a new image with the taglatestKubernetes automatically pull the new image. I addedimagePullPolicy: Alwaysin pod spec but it doesn't update the old image with new image.apiVersion: apps/v1
kind: Deployment
metadata:
name: node
namespace: dev
labels:
app: my-node-app
spec:
repl... | kubernetes imagePullPolicy:Always is not pulling image automatically |
The natural thing (for me at least) to do here is to have these modifications in a new commit, keeping history of your project. There's no need to push --force!To do so, you must first clone your repo back to the local machine, but in a different directory so that it doesn't overwrite.git clone git://myrepo.com clonedr... | so I re-installed my OS, and now I am facing a git dilemma.I have an existing git repo on the web which has some things I have changed specifically because they weren't working with my server yadda yadda etc etc..I now have a very similar repo but with quite a few core changes, here's what I need to know how to do:I wa... | git: Trying to re-create same repo but with some different files |
I think you used create-react-app. create-react-app also initiates a git repository.Just delete./client/.gitand then do it. That should be fine.cd ./client
rm -rf .gitShareFollowansweredDec 29, 2020 at 4:23PalPalashPalPalash14211 silver badge99 bronze badgesAdd a comment| | I've been using ReactJS for front-end development for quite a while now a decided I want to upgrade my skill to full-stack with MERN (MongoDB - Express - React - Node). I've successfully developed my MERN app but failed the deployment process.I was trying to use the "from GitHub to Heroku" method where you first upload... | How to deploy MERN stack app to GitHub and Heroku? |
You can save your current iptables configuration and then load it when the server is started:iptables-save | sudo tee /etc/iptables.confCopy the following into /etc/rc.local# Load iptables rules from this file
iptables-restore < /etc/iptables.conf | I'am trying protect containers from external IP access "0.0.0.0"I would like to configure some containers to public access and others restrict to certains IPs.sudo iptables -N DOCKER-USER
sudo iptables -I DOCKER-USER -j DROP
# where x.x.x.x is external IP allowed
sudo iptables -I DOCKER-USER -s x.x.x.x -j ACCEPT
# wh... | how to secure docker containers with iptables |
PerAWS documentationYou cannot use * in both the Day-of-month and Day-of-week fields. If you use it in one, you must use ? in the other.Also the year field does not support the?wildcard, so your first expression is invalid.The second one works:aws events put-rule --schedule-expression "cron(0 0 1 */3 ? *)" --name so-te... | I am trying to set a CloudWatch schedule event rule that will run on every quarter of year. But I am getting this error"Parameter ScheduleExpression is not valid".I tried following Cron expressionscron(0 0 1 */3 * ?)
cron(0 0 1 */3 ? *)But not working. Can anyone help in this? | How can I add CloudWatch schedule event rule for every quarter? |
I was missing a piece. Here's the whole answer.
Nginx Configuration
Add the following line to http or server or location context to increase the size limit in nginx.conf:
# set client body size to 20M #
client_max_body_size 20M;
PHP Configuration
Edit php.ini and set the following directives:
;This sets the maximum a... |
Error: 413 Request Entity Too Large
I have attempted to increase upload_max_filesize to 20M using the Edit PHP FPM Configuration and Edit PHP CLI Configuration tools in Laravel Forge. It successfully saves my settings, but the changes don't seem to take affect. I have tried restarting nginx and the server.
Environment... | Increase upload_max_filesize via Forge |
When first time the device uses or saves an VPN configuration, the device shows a prompt asking the user for permission to install it, but just for the first time. If you have other VPN installed in the device you can see in the settings app which one is active in that moment with a tick on it.Once installed the VPN pr... | I created application that have vpn connection IPSec(with This tutorial)my question is what should I do in MY CODE that every one want to connect to my vpn , only going to my application and connect to vpn(user go to setting iPhone and tap on my vpn not at all can't connect ) | Connect To IPSec VPN connection only inside app with swift |
click your profile photo --> Settings --> Repositories --> choose Repos you need to leave | I accidentally made a pull request or raised an issue for RxJava. I don't know which one, but one of these activities caused my Github page to display that repository as one of my contributions. How do I remove it from the list? | How do I remove my "repository contributed to" for a specific Github repo? |
You cansetup a Environment Protection Rulewhich will be called to check whether a release is allowed to proceed.But itrequires setting up a custom GitHub App to block the deployments to the environment base don your own rules. | I am pretty new to Git Hub actions. We have a requirement to disable release to PROD on Fridays and keep it enabled for the rest of the days.
Is there a way to achieve that in GitHub Actions(GHA).Thanks! | Disabling git hub actions on Fridays for PROD Deployment |
The issued to be with the various versions of the softwares/modules that are needed. I was able to find a simple installation steps to accomplish the same | All,I tried setting up Kubernetes on my two Ubuntu v20.0 using the below link -https://www.edureka.co/blog/install-kubernetes-on-ubuntuBut I get an error when the Ubuntu was rebooted and since then I have not been able to proceed forward.invalid variable assignment ignoring cgroup-driver=systemd/cgroup-driver=cgroupfsT... | Environment Variable error while initializing kubernetes |
I would add to that setup a:
git checkout selective
git merge -s ours master
That will record a merge between selective and master (while retaining selective changes, here specifically the deletion of file1)
That will ensure that the next merge from master to selective will update only file2, and would not restore fi... |
I have a Git repository at github with files, file_1 and file_2 in the master branch. I need to have another branch 'selective' with only file_2 in it. What I did was that, I created a new branch with the checkout command. Then I deleted file_1 and committed. Now master branch has 2 files, file_1 and file_2 and select... | Git - Selective Branching |
I agree the use of smart pointers is a good way to go, but there are at least two alternatives:
a) Copying may not be as expensive as you think it is. Try implementing a map of values
std::map<int, std::vector<MyObject>> myMap;
b) Replace the vector with a class of your own that wraps the vector. In that classes dest... |
I have a map that relates integers to vectors (of objects). These vectors represent a set of tasks to perform. In order to reduce the amount of copying going on while using this map and vector I've set them up to make use of pointers.
std::map<int, std::vector<MyObject *> *> myMap;
During initialization of the clas... | Memory Management on Objects in a C++ Collection |
Your earlier non-capture group is not optional thus it is trying to match 1+ spaces after matching%2Cand failing. You may use this rule:RewriteCond %{QUERY_STRING} (.*coords=-?\d{1,2}(?:\.\d+)?)(?:[+\s]+|\%2C|\%20)+(-?\d{1,3}(?:\.\d+)?,?.*) [NC]
RewriteRule ^ %{REQUEST_URI}?%1,%2 [L,NE,R=301] | My website uses a comma to separate some coordinates in a parameter, like?coords=38.88,-77.03. I'm now finding issues as,is a url reserved character. The issue seems limited to when the links are shared with Facebook and Facebook changing it to?coords=38.88%2C-77.03.Long term I'd like to fix it but I need to make a tem... | URL Encoded text not matching htaccess QUERY_STRING |
gitis a command-line tool that manages git repositories. You can invoke it from the command line and it will modify your git repository as you want to.GitHub Desktopis a graphical application that provides a GUI for some git operations. You can commit, push etc using GitHub desktop but it doesn't have the whole functio... | Some months ago, I installed GitHub Desktop (Version 2.8.2 x64) for Windows on my Windows 7 machine. I used GitHub Desktop to manage versions of my thesis, written in LaTeX, between my local machine and the GitHub cloud.Now, an educational workshop on Python/Shell/Git I'm attending in a few weeks instructs me to instal... | Are Git and GitHub Desktop completely independent applications? |
The problem is thatcrontreats%as newlines. You need to escape themFromcrontab POSIX manpage:Percent-signs (%) in the command, unless escaped with backslash\,
will be changed into newline characters, and all data after the first%will be
sent to the command as standard input.* * * * * date +\%Y\%m\%d\%H\%M\%S >> /h... | I'm trying to append the current date and time to a log file every minute using cron. I want the date and time to be formatted in a specific way.This works:* * * * * date >> /home/user/time1.txtThis doesn't:* * * * * date +%Y%m%d%H%M%S >> /home/user/time2.txtAny insight is much appreciated! | cron task not writing to file |
As of now there is no provision as such with either with ctr or crictl cli to copy a host file to a running container as we have with docker cli (eg: docker cp).
Though there is a project under containerd known as nerdctl which is trying to emulate the same.
nerdctl is a Docker-compatible CLI for containerd.
Link for ... |
I find that I can use ctr snapshot mount to copy a file from a container to a host.
But how can I copy a file from a host to the container using containerd?
I used golang to write some code to start a container, but I can't find any documentation about copying host files to a running container.
| How containerd copy a file from host to a running container? |
Userobots.txtfile in your web server.So, in your subdomain put a robots.txt file that looks like this:User-agent: *
Disallow: /ShareFollowansweredSep 7, 2010 at 1:28Pablo Santa CruzPablo Santa Cruz179k3232 gold badges244244 silver badges297297 bronze badges3Do i have to add the sub domain name in the file or just what ... | Closed.This question does not meetStack Overflow guidelines. It is not currently accepting answers.This question does not appear to be about programming within the scope defined in thehelp center.Closed10 years ago.Improve this questionI want to block search engines like Google and Yahoo from crawling user sub.domains ... | How to block search engines from finding sub.domains? [closed] |
you will need to convert the dotCover report to html format, then only you can import its results in sonaruse something similar to below to convert to htmldotcover analyse /TargetExecutable="c:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/mstest.exe" /TargetArguments="my.test.target.dll" /ReportType="HT... | I am having a build step in teamcity which runs nunit tests and generates the coverage report using dotcover.It generates the hidden artifacts having converage report under folder.teamcity/.NetCoverageI need to set this part to sonar coverage report pathsonar.cs.dotcover.reportsPaths, i can see the dotcover files under... | integrating teamcity dotcover report with sonarcube |
SQLAlchemy calls database drivers"dialects". So if you're using SQLAlchemy with PostgreSQL and using psycopg2 as the driver, then you're using the psycopg2 dialect of PostgreSQL.I was looking for the same thing as you, and found no existing solution, so I wrote my own and published it. To use the AWS Aurora RDS Data AP... | AWS Recently launched theData API. This simplifies creating Lambda functions, eliminating the necessity for additional complexity by allowing API calls, instead of direct database connections.I'm trying to use SQLAlchemy in an AWS Lambda Function, and I'd really like to take advantage of this new API.Does anyone know i... | Is it possible to use SQLAlchemy with AWS RDS Data API? |
That URL (http://169.254.169.254/latest/dynamic/instance-identity/document) doesn't appear to work anymore. I get a 404 when I tried to use it. I have the following code which seems to work though:
EC2_AVAIL_ZONE=`curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone`
EC2_REGION="`echo \"$EC2_AVA... |
Is there a way to look up the region of an instance from within the instance?
I'm looking for something similar to the method of finding the instance id.
| Find region from within an EC2 instance |
Short Answer:We can't do that yet.Medium Length Answer:I had to actually install the SSL certificate directly on my application. | I am trying to add anSSL Certificateto my Virtual Machine Instance on Google Compute Engine I created the key file and generated aCSR File, which I copied into GoDaddy to request aSSL Certificate.I copied what they sent me and pasted it into a file nameexample.csrI then ran this line in the instance:gcloud compute ssl-... | SSL Certificate from GoDaddy on Google Compute Engine |
31
Lambda Proxy Integration should be enabled on the API Gateway in order for API Gateway to pass the event details, including the params, to Lambda.
See this image here for how to do this in the console:
Go to your API, then your Resources, then your Method Execution,... |
I am using Lambda function to query a RDS MySQL database. To fetch a row, I am passing the primary key as parameter in the URL (with AWS API Gateway). Example URL is:
https://aaaaaaa.execute-api.aaaaaaa.amazonaws.com/default/getresult?pk=1245
In the Lambda function,
exports.handler = (event, context, callback) => {
... | Event Object is empty in AWS Lambda nodejs function |
The Grafana backend binds to port 3000 by default, even if you open the firewall on port 8080 it may not work. You have to use one of the following alternatives:Redirect port 8080 to the Grafana port using:$ sudo iptables -t nat -A PREROUTING -p tcp --dport 8080 -j REDIRECT --to- port 3000Put a webserver like Nginx or... | I have Grafana hosted on Google Cloud Platform using docker -https://github.com/kamon-io/docker-grafana-graphite. I confirmed docker is running on GCE and as GCE only allows port 8080 upwards I change the Grafana port to 8080. I tried previewing using the console, and it returnedError: Could not connect to Cloud Shell ... | How to preview web apps on GCloud |
I have finally discovered that for some reason putting a cache on all my pages,
will let them have a back button forever, however when the page is refreshed, it will still fetch a new one from the server.Wierd, but it works!ShareFollowansweredJun 10, 2012 at 18:05yehudayehuda1,28422 gold badges1111 silver badges2121 br... | Can someone explain to me how to set a cache for my page that if the user hits the back button and is offline or something then he will still see the previous page like on SO and most sites.But how can i force that when a new HTTP request is sent, it will fetch a new one since the content changes by the minute (ie a fo... | How to cache only for the back button |
Unfortunately there's no good workaround here. EC2 does not allow any manipulation of the MAC address on an instance. | On Windows machines that we own it's possible to change a MAC address to a pre-assigned value. But is it possible to set the MAC address on EC2 Windows machines to a pre-assigned value?Here is the problem:We provide a virtual lab/training/evaluation environment that runs off Amazon EC2. Every so often a customer wants ... | Fixed MAC addresses on Windows EC2 machines |
The class is loaded into memory the first time it is used, and it is only loaded once in normal situations. In fact, the equals method of Class is written as ==, which means that Java is expecting it to be the exact same object.
This is different than class instances which get memory allocated upon instantiation and ... |
I have a class that is used heavily (> 400,000 instances) in a performance heavy program. Does leaving these methods in the class seriously effect memory usage for each object, or does it not really matter?
| Should I Leave Methods I Don't Use In a Class? |
SQS is designed to provideat least once delivery. There is a chance that your message could be received by more than one lambda invocation.If you need exactly once delivery, consider using afifo queue.Regarding the second part of your question - why are messages being written to the DLQ. The easiest way to troubleshoot... | I have a system design like thisSQS -> trigger -> Lambda -> if fails -> DLQpre conditionLambda function using a try catch block , it won't throw any errors .Lambda function never run out of memory , or timeout . (from Lambda monitoring)Error count is 0 in Lambda monitoringNever use SQS console to view messagesLambda SQ... | Will Lambda receive SQS messages that have been consumed? |
first,addthe files you need and exclude the ones you don't (after the add) withgit checkout .(yes, with the dot). Sadly, those files get modify every time and you must exclude if don't need it to push. | I am using Android Studio 1.3.2 under Windows 7 in combination with GitHub.
I would like changes made (most often automatically) in some files (class, apk, bin, etc.) and directories (build, etc.) to be ignored.
I have tried putting a ".gitignore" in the project folder and also using the "configure ignored files" butto... | Cannot get Android Studio to ignore changes files when committing to GitHub |
1
There's no hard limit on the number of graphs, but you will eventually run out of memory and/or other GPU resources. The maximum number you can show in a particular app will depend on the physical size and complexity of the graphs as well as the hardware it's running on.
... |
I am developing an iPad app , it has the option to show Scatter Plots user able to plot the points.I have used core plot library.i have to show 40 Scatter plots in a view controller. my application becomes not responding and get quits when i load 25 graphs.
Is there any limitation (No.of Scatter plot counts) in Core... | Application get stuck when drawing nearly 40 Scatter Plots using Core Plot in IPad |
With the help of thisSO answerand the comments I was able to get it working. If my answer doesn't help you I suggest you look at that one when running Nginx in a docker container.For me it was moving theinclude /etc/nginx/mime.types;and addingsendfile on;outside myserverblock and in thehttpblockMy example.com.conf now ... | When uploading static files to my server using Nginx as the web server my css, javascript, and google fonts are not working as they do when testing the site on localhost.I'm running Nginx in a docker container using the base image.DockerfileFROM nginx
COPY example.com.conf /etc/nginx/nginx.conf
COPY build /etc/nginx/ht... | docker nginx not loading css styles |
1
You can use Azure Monitor service to create alert for Backup failure.
Search for Monitor in Azure Portal. Click on alerts under Monitor.
Click on +Create -> Alert rule.
Click + Scope and select the required fields.
Under Condition tab, select the option Activit... |
Does anyone know how to create an alert when, for whatever reason, an Azure SQL Database backup fails to complete?
| Is there a way to create an alert when an Azure SQL Database backup fails? |
I don't believe there's a builtin mechanic to 'load balance' the cluster.
Over time, the system will return to normal by itself.If you want to trigger a bit of redistribution, you could scale up the deployments that can be run in parallel, then scale them down again. Others you can re-release.ShareFollowansweredMay 14,... | I have a cluster of 5 worker nodes, then I shutdown one of the workers and the pods being executed in it are distributed to the other nodes.Now I start again the worker node but the pods are not redistributed again so I have one node almost free.Is there any way to force kubernetes to redistribute the load to the "new"... | Redistribute load after a Worker node is returned to the cluster |
parsing kubernetes version: strconv.ParseUint: parsing "": invalid syntaxTry to use different version notation. Here is an example from theKubernetes documentation:minikube start --kubernetes-version v1.7.3ShareFollowansweredOct 22, 2018 at 16:49VASVAS8,74611 gold badge2828 silver badges4040 bronze badges2wow! That act... | I have a Homebrew installed kubernetes-cli 1.12.0 and minikube 0.30.0:~ ls -l $(which kubectl)
/usr/local/bin/kubectl -> ../Cellar/kubernetes-cli/1.12.0/bin/kubectl
~ ls -l $(which minikube)
/usr/local/bin/minikube -> /usr/local/Caskroom/minikube/0.30.0/minikube-darwin-amd64
~ minikube delete
Deleting local Kubernet... | Error creating simple minikube: `Error updating cluster: generating kubeadm cfg: parsing kubernetes version` |
In First activity :
Button b=(Button)findViewByid(R.id.button);
b.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
doTakePhotoAction();
}
});
private void doTakePhotoAction() {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
mUri = Uri.fromFile(ne... |
Hi stackoverflow friends,
I need to take a picture using camera and after takin the picture go to next activity without showing the first activity. And display it in an imageview.
Below is the flow of my application
first activity-> there is button for camera intent->go to the next activity(without showing the fist ac... | capturing image using camera in Android |
How can one go about "refreshing" the instance variable?
Simply set it to nil. Then, upon next call, it'll be reloaded from the db.
Or you could proactively replace the value yourself. First, separate memoization and computation.
def self.get_lastname(client_id)
@client_by_lastname ||= compute_client_by_last_name
... |
I have a model instance variable in which I keep descriptions that will be "mostly" static throughout the application.
The code looks like this
def self.get_lastname(client_id)
@client_by_lastname ||= Client.select(:id, :lastname)
.map{|e| e.attributes.values}
.inject({}){|memo, client| memo[client[0]] = client... | Refresh class instance variable that is set with ||= |
6
I would recommend using the https address for your remote 'origin':
https://github.com/AlphaModder/Space-Dimension-Mod.git
That would avoid having to deal with all the intricacies of ssh setup.
Plus, you can cache your credentials too.
If you do need an ssh address... t... |
I am attempting to push my code to my github account, however whenever I try, i get this
Pushing to [email protected]:AlphaModder/Space-Dimension-Mod.git
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Questio... | Git push "permission denied" |
According to "How can I prevent web fonts from being downloaded and used illegally?", this isn't really possible.Especially when you consider that GitHub pages, through Jekyll,does not suport.htaccess, so you can't evenprevent hotlinking with a .htaccess file.At least, make sure your font has a license, and is subsette... | On my github website, I'm using a few images and fonts. The problem is that I don't want others to download these images or fonts (or link directly to their websites so that they can use them).How do I prevent people from downloading them?I've been searching for answers but I can't find an answer!Edit: Just to add a bi... | How to protect my images & fonts when I upload my website on Github? |
Your data looks like it has a carriage return (the '/r') character at the end of the line. jq is expecting a float value, which the parsed value is not, as it has this character added.Difference between \n and \r? | when I pass the parameters from a sh to my server prometheus shows the error, the data I get from a jsonmy sh#!/bin/bash
REPORT=C:/gauge2/gauge/reports/json-report
FILE=$REPORT/result.json
# Validate & push the metrics
if [ -f $FILE ]; then
echo "File $FILE exists."
cat $REPORT/result.json | \
# Extract... | How to solve this error in prometheus ktext format parsing error in line 1: expected float as value, got "41584\r" |
Independent of MLflow you can approach this in a standard file permission way.Exec into your pod and view the permissions at that file pathkubectl exec -it <pod>
ls -l /opt/mlflowWithin your pod/container see what user you are running aswhoamiIf your user doesn't have access to that filepath, then you could adjust the... | I'm attempting to write MLflow artifacts to an NFS-mounted PVC. It's a new PVC mounting at/opt/mlflow, but MLflow seems to have permission writing to it. The specific error I'm getting isPermissionError: [Errno 13] Permission denied: '/opt/mlflow'I ran the same deployment with an S3-backed artifact store, and that work... | Permission denied writing artifacts to an NFS-mounted PVC |
There appears to be a setting for this: underscores_in_headers
http://nginx.org/en/docs/http/ngx_http_core_module.html#underscores_in_headers
|
I am also having this issue on an EC2 instance with the latest Amazon Linux build. The getallheaders() function doesn't work when on nginx. All of the posted replacements for getallheaders() only get values from $_SERVER. The problem is that the headers I need are not there.
I am testing my original implementation us... | getallheaders() missing when using nginx and php |
Indeed the Facebook connection with the FB API AS3 doesn't work anymore since august...With the FlashWebExemple.fla fromhttp://code.google.com/p/facebook-actionscript-api/downloads/detail?name=GraphAPI_Examples_1_8_1.zipFacebook.init(APP_ID, onInit);
protected function onInit(result:Object, fail:Object):void {... | I am setting up a facebook app - with the AS3 facebook API. The first thing i do is call Facebook.init(). When this is done on our normal development setup (a normal http site) - this works perfectly and i am able to access the graph. However when i switch to a https site (with a self signed certificate) Facebook.init(... | How can i get AS3 facebook API to init on a self signed https site |
The upstream maven image defines this directory as a volume. Once an image does this, you cannot reliably make changes to that directory in the image.
From their Dockerfile:
ARG USER_HOME_DIR="/root"
...
VOLUME "$USER_HOME_DIR/.m2"
The Dockerfile documentation describes this behavior:
Changing the volume from within... |
Running Docker version 17.06.0-ce, build 02c1d87, I have a dockerfile that looks like this:
FROM maven:3.5.2-jdk-8-alpine as builder
RUN chmod -R 777 /root/.m2 &&\
mkdir -p /root/.m2/repository/com/foo/bar &&\
echo "Text" > /root/.m2/repository/com/foo/bar/baz.txt &&\
ls -R -a -l /root/.m2/repository/com/foo
RUN l... | Docker: created files disappear between layers |
i think you can notmovethe cluster to another VPC, although you can create a new or clone the cluster to new VPC.You can clone the existing one by usingDUPLICATEtab in cluster details however it will just create infrastructure with the same config specs, during that time you can update Networking (VPC) as per need.Once... | We have one Kubernetes cluster running and we want to connect it to a new cluster. I found Google Cloudsmulticluster-service (MCS API)which seems promising, but it needs allclusters to be in the same VPC.How do one migrate / move / add a running cluster to a VPC? | Google Cloud: How to move a running Kubernetes cluster to a shared VPC? |
I'm going to recommend a different approach. It sounds like a deploy key might solve your problem. This completely bypasses the need for machine user A to have a GitHub account.
Generate an SSH key for machine user A
Go to your repository's settings page in GitHub's web UI
In the sidebar, click Deploy Keys and then A... |
I need to allow one Github account (lets call this account A) to clone some private repository of another account. A is a machine user, there is actually no human to lead it.
Of course, the private repository's owner want to share it with A (but only with A).
The first thing I tried to do is by using a SSH key but I d... | Allow specific GitHub user to clone a private repository |
Brute force nbody is definitely suited to GPUs, because it is "embarrassingly parallel". Each body-to-body interaction computation is completely independent of any other. Your variation that includes keeping track of time spent in the "presence" of other bodies would be a straightforward addition to the existing body... | I have a problem where I am going to have a bunch of nbodies - the movements of each is predescribed by existing data, however when a body is in the range of another one certain properties about it change. For the sake of this question we'll just assume you have a counter per body that counts the time you were around o... | NBody Simulation - appropriate design approach |
The source of the error is that I have taken the ThumbPrint directly from the certificate file of signroot.cert, which is created from the first makecert command needed for creating "Trusted Root Certification Authorities", which is used again to really create(and install) the self-sigend trusted certificate in the sec... | I have followed the instructions inSSL with Self Hosted WCF Service. When I am trying to bind the certificate on Windows 7 using netsh as described inHow to: Configure a Port with an SSL Certificate., it is failing as follows.In WindowsPowerShellPS C:\> netsh http add sslcert ipport=0.0.0.0:8732 certhash=0000000000003e... | Using netsh, bind an SSL certificate to a port number is failing |
One of the easiest options that you can configure is two targets for same s3 image upload event.
Push the Same Event to SQS
launch Fargate task at the same time
Read Message Event from SQS when Fargate is up (No Lambda in between), also same task definition that will work a normal use case, make sure you exit the pr... |
I'm new to Cloudwatch events and to Fargate. I want to trigger a Fargate task (Python) to run whenever a file is uploaded to a specific S3 bucket. I can get the task to run whenever I upload a file, and can see the name in the event log; however I can't figure out a simple way to read the event data in Fargate. I'v... | AWS question - How can I get Cloudwatch event data in a Fargate task with Python |
You could try to use theMemoryFailPointclass:try
{
using (new System.Runtime.MemoryFailPoint(20)) // 20 megabytes
{
...
}
}
catch (InsufficientMemoryException)
{
...
} | Is it possible for a .NET 3.5 application to tell the .NET runtime: "hey, I'm going to usenMB memory later on, so please either commit that muchnowor failnow?"The context for this is: I have a C# console application that runs a database query that returns a lot of data and and then does some processing on it. The query... | Pre-allocate (guarantee) memory in a .NET application |
-1
The container 4 is not using the same network as the other ones (the --net=host) so your DNS can't work in all cases.
Either:
You are on the physical machine network and you have to address the node-web-app using it's container IP
You are inside a docker network and you... |
Aim: Get a docker container to use the DNS provided by the host machine, which is a consul agent running in another container, to access services available via traefik reverse proxy.
Setup
Host machine: Ubuntu 16.04.2 LTS
Registrator registers new containers to the consul agent, traefik is the reverse proxy to load ba... | Resolve containers using consul DNS on host |
You only get ARC support with Objective-C, so you're responsible for memory management when using frameworks that aren't written in Objective-C. What you describe above can be an issue if you're creating many large objects (like a 1.5 MB bitmap context) and never releasing these objects.
You should familiarize yourse... |
I'm fairly new to iOS: I'm creating a simple application where I can add drawings on top of an image : and I can change the color I'm drawing with . . . .
After drawing for some time I get the following error on the iPad Simulator
CGBitmapContextInfoCreate: unable to allocate 1478400 bytes for bitmap data
this is r... | iOS Simulator - Canot Allocate Memory to app |
To create a "non mergeable" PR on github : you can mark it as draft
Links to github's doc :
Draft pull requests
for new PRs : step 6 of Creating the pull request - drop down menu of the "Create pull request" button
for existing PRs: Converting a pull request to a draft
|
I am working on several features, where feature N+1 is depends on the feature N. And I want to achieve clean diff for each pull request, and to create PRs one by one. This not a big task, this is just several bugs, but to run the app I need in N+1 the previous fixes.
So I am following next workflow:
Create bugfix/bug... | Can I block PR created by me from merge on the git? |
Adding
permissions:
contents: write
and removing token - so the last line becomes simply
git push
Should solve this. See here for details: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
Note, however, that there may be issues with merge conflicts with this workflow - in case there are ... |
I'm new to github workflows and the CI/CD.
I have a CSS repo where I'm making my custom css library. I want to create an Action to automatically minify files and push them to same repo
- repo
| - source
| - minifier
| - minified
Here is my action file
name: Minifier Workflow
on:
push:
branches:
- main
... | Github Action Workflow Push to private repo with access token |
The hostnames are contained in environment variables within the pod by default calledHOSTNAME.
It is possible to modify the configmap itself if you first:mount the configmap and set it toThisHost=hostname -s(this will create a file in the pod's filesystem with that text)pass a substitution command to the pod when start... | i am running a statefulset where i use volumeClaimTemplates. everything's fine there.i also have a configmap where i would like to essentially replace some entries with the name of the pod for each pod that this config file is projected onto; eg, if the configmap data is:ThisHost=<hostname -s>
OtherConfig1=1
OtherConfi... | replace configmap contents with some environment variables |
The metrics must have the same labels and values.If "metric1" has labels "labelA" and "labelB", and "metric2" has labels "labelA" and "labelC", "metric1 + metric2" will return nothing.If "metric1" has label "labelA" with "A" and "B" values, and "metric2" also has label "labelA" but with "C" and "D" values, "metric1 + m... | I have two jobs configured in promethus.yml- job_name: serviceA
scrape_interval: 60s
metrics_path: /
static_configs:
- targets:
- serviceA:8080
- job_name: serviceB
scrape_interval: 60s
metrics_path: /
static_configs:
- targets:
- serviceB:8080Both services have a counter metric named in eachmet... | How to sum metrics in Prometheus across jobs |
I would probably use these settings:
Cache-Control: max-age=31556926 – Representations may be cached by any cache. The cached representation is to be considered fresh for 1 year:
To mark a response as "never expires," an origin server sends an
Expires date approximately one year from the time the response is
se... |
I want to find a minimal set of headers, that work with "all" caches and browsers (also when using HTTPS!)
On my web site, I'll have three kinds of resources:
(1) Forever cacheable (public / equal for all users)
Example: 0A470E87CC58EE133616F402B5DDFE1C.cache.html (auto generated by GWT)
These files are automaticall... | Ideal HTTP cache control headers for different types of resources |
My first question is whether LambdaName references something that can be used with GetAtt to provide an ARN. Otherwise, it could just be a formatting issue. I'm not sure AWS CFN can read the embedded curly brackets you're using to wrap theFn::GetAtt.Maybe one of these would work better?FunctionName:
Fn::Join:
- '... | I am trying to define value in one of the attributes forType: AWS::Lambda::EventSourceMappingBelow is my snippet (latest attempt):FunctionName: #trigger the echo function previously defined
"Fn::Join": [":", [{"Fn::GetAtt" : ["LambdaName", "Arn"]}, "live" ]]My cloud formation stack, however fails to deploy with... | Cloudformation: Using Fn::Join and Fn:GetAtt together |
49
To run a PS1 script file, you can do something like this:
SHELL ["cmd", "/S", "/C"]
RUN powershell -noexit "& ""C:\Chocolatey\lib\chocolatey.0.10.8\tools\chocolateyInstall.ps1"""
You can also do:
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $Pr... |
I try these below commands in dockerfile but it didnot run the script.so are there any other commands for running the ps script in dockerfile?
ADD Windowss.ps1 .
CMD powershell .\Windowss.ps1;
| How to run Powershell script in DockerFile? |
The applications in a pod all use the same network namespace (same IP and port space), and can thus “find” each other and communicate using localhost. Because of this, applications in a pod must coordinate their usage of ports.https://kubernetes.io/docs/concepts/workloads/pods/pod/#resource-sharing-and-communication | I have set up a multi-container pod consisting on multiple interrelated microservices. On docker-compose if I wanted to access the another container in a compose I just use the name of the service.I am trying to do the same thing with Kube, without having to create a pod per microservice.I tried the name of the contai... | How to access another container in a pod |
filebeat has an awesome feature calledtest. You can check whether config file and output server configurations are correctly configured. for more information about the test tool, use help./usr/share/filebeat/bin/filebeat test --helpCheck for config file correctness/usr/share/filebeat/bin/filebeat test config --path.c... | This is a fresh installation of filebeat. I copied the configuration file filebeat.yml from an existing server.filebeat version : 6.8.5When the service is started withsudo systemctl start filebeat, following error is thrown when viewed the status of the service throughsudo systemctl status filebeatfilebeat.service: mai... | filebeat not starting in linux and no logs are printed to troubleshoot |
I've run into this problem as well, and figured out a workaround. When Hudson runs as a service, something is missing that your normal desktop environment has, which causes something to do with the network to have to re-load for each process. msys-1.0.dll attempts to load something in netapi32.dll which causes it to ... | I'm setting up my first Hudson + Git project (previously done many with Hudson + SVN). I expected the clone stage to be slow, as our repository is quite large, but subsequent builds where a fetch + merge is being used are just as long. The following options are enabled:Merge before buildClean after checkoutI amnotdoing... | Hudson + Windows + GitHub + Git Plugin = really really slow fetch stage |
I've solved it myself. here is the code:import boto3
import datetime
client = boto3.client('ec2',region_name='us-west-1')
snapshots = client.describe_snapshots(OwnerIds=['12345678'])
for snapshot in snapshots['Snapshots']:
a= snapshot['StartTime']
b=a.date()
c=datetime.datetime.now(... | I have already written a program to delete old snapshots.But the problem for me now is if the snapshot is attached with an ami then it doesn't get deleted and the program also stops.It displays the following message :botocore.exceptions.ClientError: An error occurred (InvalidSnapshot.InUse) when calling the DeleteSnaps... | python (boto3) program to delete old snapshots in aws |
I think there is something missing from the AWS documentation in http://docs.aws.amazon.com/lambda/latest/dg/setup-awscli.html, it did not mention that you should edit the file ~/.aws/config to add your username profile. There are two ways to do this:
edit ~/.aws/config or
aws configure --profile "your username"
|
Every time I want to config something with AWS I get the following error :
"The config profile (myname) could not be found"
like : aws configure
I'm using Python 3.4 and I want to use AWS CLI Keyring to encrypt my credentials..
| AWS : The config profile (MyName) could not be found |
2
You will need to add https:// at the starting of the image url like
garyzhubc.github.io/assets/steam-fish-1.jpeg
to
https://garyzhubc.github.io/assets/steam-fish-1.jpeg
because garyzhubc.github.io/assets/steam-fish-1.jpeg url is redirecting to the https://garyzhubc.github... |
Here is my website
https://garyzhubc.github.io/life-style/2018/06/10/steam-fish.html
I have a folder called assets and I'm referencing the images from the post in this way

by following what I've seen from the tutorial at https://jekyllrb.com/docs/posts... | Image not showing up in Jekyll post but shows up locally |
Do you have a typo? It looks like you might have mis-typed Desktop?
Another thing to do is to redirect the output of running the script to a file so you can see what's going on like this:
1 * * * * /Users/apple/Destop/wget/down.sh >> /tmp/cron.out
and then check out the file to see what's going on.
|
I'm new to cron jobs. I read a post on how to write a cron job with crontab.
So my crontab looks like this:
1 * * * * /Users/apple/Desktop/wget/down.sh
which basically means that every minute i want to execute the script :down.sh. Now the script runs
fine manually. The script is a simple program that downloads a PDF ... | crontab is not running my script |
Define some "overides" properties for fields a to e. Define for each field ("fields with name") "standard options > color scheme" -> single color and chose the color you wish in the right.Good luck.
Alexander | Grafana version : 9.2.4
Bar graph that I created hassame colour for each legendI want to have different colour for each legend.something like thisHow to achieve this on grafana dashboard UI | How to get different colour for each legend in a bar chart |
In a nutshell, what worked for me is to install git from git-scm and have Visual Studio work with that instead of what comes pre-installed.Download and install git fromhttps://git-scm.com/downloads/winNote that I needed to exit VS before installationConfigure VS to use the new version of gitIn VS Solution Explorer righ... | I have just created my first asp.net 6 project.However, whenever I try to install a bower package I get the following error (happens to all packages I attempt to install):PATH=.\node_modules.bin;C:\Program Files (x86)\Microsoft Visual
Studio 14.0\Common7\IDE\Extensions\Microsoft\Web
Tools\External;%PATH%;C:\Program... | Cannot install bower packages in my new ASP.NET application |
%signs in a crontab command are converted to newlines, and all data after the first%is sent to the command's stdin. Replace each%with\%.(And you only had 4 time fields:* * * *; you need 5 (you later fixed the question).) | This question already has answers here:Is there a special restriction on commands executed by cron? [duplicate](2 answers)Closed5 years ago.I can use this commandmysqldump -u"root" myDB| gzip > mydb_`date +%d-%m-%Y`.sql.gzbut when run in crontab* * * * * mysqldump -u"root" myDB| gzip > mydb_`date +%d-%m-%Y`.sql.gz( t... | Backup database use crontab with date function [duplicate] |
If your SDK is recent enough, it probably includes an application called Java VisualVM which is pretty nice. Look for bin/jvisualvm.exe.
|
I have a Java desktop application I wrote, and I would like a recommendation about a monitoring application that can spot bottlenecks in the code and real time memory consumptions.
As I was developing for J2Me, the WTK then, had a memory monitor, and I found it really useful, I would like to know which monitoring prog... | Monitoring application to monitor a Java desktop application performance |
Try to set upHorizontal Pod Autpscaler.The Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment, replica set or stateful set based on observed CPU utilization (or, with custom metrics support, on some other application-provided metrics). Horizontal Pod Autoscaling do... | I'm trying to figure out the pieces and how to fit them together for having a pod be able to control aspects of a deployment, like scaling. I'm thinking I need to set up a service account for it, but I'm not finding the information on how to link it all together, and then how to get the pod to use the service account. ... | What is needed to enable a pod to control another deployment in kubernetes? |
SQL Server does not permit backing up a single table. Full stop. No provision is made for this whatsoever.
It does permit restoring a single table from a complete backup, but this does not seem to be what you want.
|
I want to backup some specific data of SQL database by using vb.net code. In fact i want to save this file as .BAK file and then i want to restore it.
I couldn't find anything. all the solutions in the web was about full backup of database and there was not any method to backup some tables via code.
| how to backup of specific tables from database sql server and save .bak file in computer using vb.net code |
Your link is working, but you're on separate networks inside of Docker. From the docker-compose.yml docs:
Note: If you’re using the version 2 file format, the externally-created containers must be connected to at least one of the same networks as the service which is linking to them.
To solve this, you can create yo... |
I have started a docker container with the following command
docker run --name mysql --restart always -p 3306:3306 -v /var/lib/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=password -d mysql:5.7.14
and then would like to connect a wordpress site with the following docker-compose.yml file
version: '2'
services:
wo... | docker-compose + external container |
2
cmd + shift + p - Toggles between the Write and Preview tabs.
See the Issues and Pull requests shortcuts for more info.
Share
Improve this answer
Follow
answered Dec 30, 2020 at 15:56
Sam... |
Is this possible to quickly switch between the Preview and the Write modes in the Wiki editor of the GitHub website? I mean without using the mouse at all.
| Hotkey to switch between Preview and Write |
Regex locations have precedence over prefixed location blocks in nginx request processing. Hereinafter are relevant excerpts of nginx'slocation directive documentation.I strongly encourage you to read them carefully as many people don't do it and miss the basics.A few examples before to understand keywords :prefixed lo... | upstream app {
server localhost:3000;
}
server {
...
# If I comment this location out, images are displayed on the website
location ~* \.(?:jpg|jpeg|png|gif|swf|xml|txt|css|js)$ {
expires 6004800;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, prox... | Express js app with nginx - a conflict with static files when serving a subfolder |
RHEL 6 is not recommended and not supported for Docker use.
There was many addition made to recent version of Linux kernels that allows Docker, but they are missing on RHEL 6 because it is designed to be an enterprise system with very long term support (10 years).
Simply put it is too old, and Red Hat themselves aren'... |
Any idea how to install docker-compose on Linux RHEL.
I followed below steps
sudo yum install epel-release
sudo yum install -y python-pip
sudo pip install docker-compose
sudo yum upgrade python*
I am getting below message when trying to check its version (docker-compose -version)
Traceback (most recent call last)... | How to install docker-compose on Linux RHEL 6.6? |
Yes appcache can be used for dynamic content if you handle you url parameters differently.I solved this by using local storage (I used the jquery localstorage plugin to help with this).The process isInternally from the page when you would normally href from an anchor or redirect, instead call a function to redirects fo... | I am trying to use HTML5 Appcache to speed up my web-mobile app by caching images and css/JS files. The app is based on dynamic web pages.As already known – when using Appcache the calling html page is always cached -> bad for dynamic websites.My solution - Create a first static page and in this page call the manifest ... | Appcache for dynamic site |
It's not Git that has problem removing that file, the problem is telling it to Git the right way in the shell. Due to the special symbols this is tricky, but you can do it like this:git rm $(echo -e "path/to/\001\006@@x\021@8")Btw, in your specific case, and based on the output of yourgit status, you could actually ski... | I have recently acquired a couple corrupted files in my github repository. I have deleted them from my host but I'm having trouble removing them with git because they have messed up names. They show up like this under git status# Changes not staged for commit:
# (use "git add/rm <file>..." to update what will be co... | Trouble removing oddly named files from github repo |
add an ingress alias annotation to theannotationsblock:nginx.ingress.kubernetes.io/server-alias: domain.com | apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
ingress.bluemix.net/rewrite-path: "serviceName=nginx rewrite=/"
name: nginx-ingress
namespace: 'default'
spec:
rules:
- host: www.domain.com
http:
paths:
- path: /*
backend:
... | default backend - 404 without www ( ingress ) |
If the GPU version of TensorFlow is installed and if you don't assign all your tensors to CPU, some of them should be assigned to GPU.
To find out which devices (CPU, GPU) are available to TensorFlow, you can use this:
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
Regarding th... |
I have a code written in tensorflow that I run on CPUs and it runs fine.
I am transferring to a new machine which has GPUs and I run the code on the new machine but the training speed did not improve as expected (takes almost the same time).
I understood that Tensorflow automatically detects GPUs and run the operati... | Does tensorflow automatically detect GPU or do I have to specify it manually? |
2
Ernest is right - MBean servers are per JVM not per ClassLoader, so you need to ignore duplicated domains. But what's more interesting - Wildfly uses Infinispan for session clustering, so the default cache manager might be already running. I strongly recommend using your ... |
I'm working with Infinispan 8.1 and WildFly 10.
I initialize my CacheManager programmatically using these code lines:
public class SessionManager {
private static DefaultCacheManager cacheManager;
public void initializeCache(){
if (cacheManager ==null){
GlobalConfigurationBuilder gcbLoc... | Infinispan Unique Cache Manager for deployed Web Applications |
Without a heap dump it's hard to say for sure what the issue is, but I've personally hit several memory leaks in Cassandra 4, I'd recommend upgrading to the latest 4.0.7 release, it seems to be far more stable and there are multiple leaks fixed between your version and the latest. The most recently fixed that has help... | We have Cassandra only in standalone (single Node) database which is serving writing approx 7800 data-points per sec.However, from from last few days we are facing issue that Cassandra is getting stop frequently.Even though we have enough resources available.We have observe the same error coming again and again.Our ser... | Cassandra -Out of memory: Killed process 20707 (java) total-vm:4393466140kB |
The documentation for PHP saysThis extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, theMySQLiorPDO_MySQLextension should be used.$mysqli = new mysqli('localhost', 'my_user', 'my_password', 'my_db');
/*
* This is the "official" OO way to do it,
* BUT $connect_error was broken until... | This question already has answers here:mysqli or PDO - what are the pros and cons? [closed](13 answers)Closed10 years ago.So I have this Amazon Web Service database all set upI'm working off an old tutorial for an application that I'm planning on using it with.I noticed that mysql_connect was deprecate when I looked it... | Replacement for deprecated function mysql_connect [duplicate] |
If you use docker for your storage engine make sure you use docker volumes to store your data.Docker VolumesI would however recommend running mongoDB on a node without docker, simply due to disk performance. I'd probably do the same for elastic search tbh.EDIT: And yes, seperate your services over seperate docker insta... | I am studying to use docker to deploy a nodejs app with mongo DB and elastic search. I want that it be scalable, the nodejs server and the elastic search server. I found docker. But I don't know how I design the project structure. I found aws ec2. I think that it would work fine. But, my doubt is, how I can deploy thi... | How to correctly deploy and scale applications using docker |
This was discussed inthis issue. You can add triggers to an existing User Pool using a Custom Resource:import * as CustomResources from '@aws-cdk/custom-resources';
import * as Cognito from '@aws-cdk/aws-cognito';
import * as Iam from '@aws-cdk/aws-iam';
const userPool = Cognito.UserPool.fromUserPoolId(this, "UserPool... | I'm trying to use AWS CDK to create a new lambda tied to already existing AWS resources which were not created using CDK and that are part of a different stack.Can I trigger my lambda from an already existing user pool using CDK? I've imported the user pool to my new stack using:const userPool = UserPool.fromUserPoolAr... | Add Lambda trigger to imported Cognito User Pool with AWS CDK |
Use the base64 command rather than the @base64 filter from jq, because the later can only encode textual data and not binary data as from a .gz archive.
Pipe the base64 stream to jq to format it into a JSON data stream.
Curl will read the JSON data stream and send it.
# use base64 to encode binary data and -w0 all in ... |
I am trying to upload a file to Github using its API.
Following code works, but only with smaller size content which is approx less than 1MB.
tar -czvf logs.tar.gz a.log b.log
base64_logs=$(base64 logs.tar.gz | tr -d \\n)
content_response=$(curl \
-X PUT \
-u :"$GIT_TOKEN" \
-H "Accept: application/vnd.github.v... | Convert log files to base64 and upload it using Curl to Github |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.