Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
That is an alpha feature which has some problems and limitations.Try to find some information on the Issues on Github which is related to your problem:Support automatic resizing of volumes[pvresize]Display of pvc capacity did not make corresponding changes when pv resizedAlso, check thatcomment, it can be useful:@disco... | I have a statefulset of kafka. I need to expand the disk size, i try wihout succes to use the automatic resize feature of k8s 1.9Here :https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claimsI did activate feature gates and admission pluging, i think it's work beacause i can s... | Expand size PVC of statefulset on k8s 1.9 |
There is no direct way of monitoring IAM Users data usage in AWS. One (complex) approach to have some monitoring of this kind if you are using only S3 would be:Implement AWS CloudTrail for auditingUse CloudTrail logs to monitor user activity, such as GetObject requests to S3Implement functions to get the S3 object size... | I have a number of IAM AWS users and I would like to:See when and how much data each user is accessing.Limit the amount of monthly data each user can read (to keep costs under control)Is there a way to do that from within AWS?The scenario I am trying to avoid here is having one user spam AWS S3 requests in a tight loop... | How can I monitor AWS S3 access by user? |
In this case, as you want to listen from that IP address for client connections, you must specify therpc_addresson the cassandra.yaml file:Seecassandra.yaml configuration docfor more info. | I using GCP and want to connect cassandra from outside.
Already add firewall on GCPcassandra-rule Apply to all IP ranges: 0.0.0.0/0 tcp:9042, tcp:9160
Allow 1000 defaultI can using the following code change to 127.0.0.1 and query perfectly.
But if I run this code outside and connect to the GCP 35.190.233.64 it w... | Can't not connect cassandra DB on GCP(google cloud) |
just add this line in your app module gradle file in dependency part:
compile 'agency.tango.android:material-intro-screen:0.0.3'
|
how to download library from "https://github.com/TangoAgency/material-intro-screen" ?
I want to download library file and add that to my project.
| add library into android project from GitHub |
Spending time last one yar with Kubeflow wand echo system what I realize is following:Kubeflow-kale is open sourced however not completely free, there are issues running the kubeflow-kale on latest version, we have reported issues on github for the same, it works with Arrikito however Arrikito is licensedYou should be ... | I am currently trying to use the kubeflow kale jupyter extension on my local jupyterlab server without Kubernetes and kubeflow installed and trying to run my code pipeline on GCP AI pipeline server or any other Cloud Kubeflow pipeline server. I am able to do it through kubeflow pipeline SDK(As it has a feature to add h... | Kubeflow-kale :- How to integrate kubeflow-kale extension to run pipelines on a seperate standalone cluster of Kubeflow pipelines |
All you have to do is checking out to this branch.$ git checkout rewriteGit will switch to a new branch, tracking the remote one. Here is the message you should getBranch rewrite set up to track remote branch rewrite from origin.
Switched to a new branch 'rewrite' | I would like to add this branch to my local clone:https://github.com/dmitriz/mithril.js/tree/rewriteFor some unclear reason, it did not get cloned.So I ended up with local directory without that branch. Is there any easy way to clone this branch too? | How do I add existing remote branch to my locally cloned repository? |
I just put together a little Nomad job showing this working, so you may have a slight configuration error. To allow you to run the job yourself I have made it available as agist here. In the same gist I have a nginx.conf that has nginx listen on whatever port is in the Nomad job file.Here is the Nomad job:job "nginx" {... | With the assumption that Consul and Nomad has been configured to run on a pool of resource. How would you rendered a template file for the sole purpose of generating e.g. an Nginx 'default.conf' file.Using the template stanza configuration below, as an example; Nomad fails to generate a default.conf 'file'; instead a d... | How would you use Hashicorp's Nomad 'template stanza' to generate an nginx config file through the Nomad job file? |
I tried to lure better answers by offering 100 points as a bounty, but none of the answers were really satisfying.
I would aggregate the recommended solutions like this:
Using APC as a session storage
APC cannot really be used as a session store, because there is no mechanism available to APC that allows proper locki... |
Storing sessions in disk very slow and painful for me. I'm having very high traffic. I want to store session in Advanced PHP Cache, how can I do this?
| How to store PHP sessions in APC Cache? |
2
The Java JRE comes with a JAX-WS Provider. This provider has what I would consider a bug. If a SoapHandler is added, either by directly getting the HandlerChain or by using a HandlerResolver, the message, which was correctly created using MTOM, is deconstructed and the ... |
I try to transfer file with Mtom and it is working pretty good until i use SoapHandler to verify client signature. SoapHandler keeps all message and changes it to base64 encoded. So when i try to get huge file, Jvm throws heap size exception. Do you guys know any ways to solve this problem?
| MTOM not working when using SOAPHandler |
TheVMWare doc mentions:If you want to connect to the Internet or other TCP/IP network using the host computer's dial-up networking or broadband connection and you are not able to give your virtual machine an IP address on the external network, NAT is often the easiest way to give your virtual machine access to that net... | Q: I installed ubuntu 14.10 in VmwarePlayer, and the host is Win7, the network configure is Bridge. Then I tried to clone from github, and I got failed to connect to github 443 error.Failed to connect to github.com port 443: Connection timed outThen, I changed the network configure to NAT, and it succeeded to clone fro... | Git Failed to connect to github port 443 - from ubuntu in vmware, network config is bridge |
you can use 'NumericGreaterThanPath' operator as per the docshttps://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-choice-state.htmlWithin a Choice Rule, the value of Variable can be compared with another value from the state input by appending 'Path' to name of supported comparison operators.Nume... | In an AWS Step Function, in a Choice step, we want to compare a result from an AWS Lambda function to a threshold given as a parameter using "NumericGreaterThan".In our example, we compare a calculated from a lambda with a threshold given by the event.I tried defining my step function in the following way:{
"StartAt"... | AWS Step Function NumericGreaterThan a Parameter |
22
Include the following in your docker-compose.yml for your service:
services:
myservice:
...
stdin_open: true # docker run -i
tty: true # docker run -t
Share
Follow
answered... |
In docker, I can simply use the -t switch to have docker run allocate a pseudo-tty (in these examples I'm using nohup to detach from my real tty):
$ nohup docker run debian tty # Produces "not a tty"
$ nohub docker run -t debian tty # Produces "/dev/pts/0"
I'm trying to achieve the same result with docker-comp... | Psuedo-tty allocation in docker-compose |
Git usually guesses correctly whether a blob contains text or binary data by examining the beginning of the contents. In your case, however, git is getting confused and treating the file as binary, possibly due to binary data somewhere in the file.
From the git-diff manpage:
-a, --text
Treat all files as te... |
I have tried adding this to the .gitattributes:
* text=auto
*.sql diff
But it still shows like this:
BIN WebRole/Sql/Objects/dbo.Content.Table.sql →
WebRole/Sql/dbo.Content.Table.sql Binary file not shown
Would appreciate help with this.
| How can I make Git show changes to my .sql files? |
You can do this with any templating package really, like jinja2 or Go templates. That would be done before submitting the resource to the api-server, but there's no native way to do it dynamically in Kubernetes. Ingresses don't have environment variables or a way to reference configmaps.You might also want to check out... | Is it possible to dynamically set values in a Kubernetes ingress definition yaml file?For example:apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: api-ingress
annotations:
kubernetes.io/ingress.class: "traefik"
kubernetes.io/tls-acme: "true"
spec:
tls:
- hosts:
- api.mydomain.com
rules... | Dynamically set values in Kubernetes yaml configuration files |
71
Unfortunately, it's also not possible to import a key having two entries. Only the first entry is imported into the new key pair.
What you can do is:
Don't use the EC2 key pairs but instead use the user_data field to insert multiple SSH public keys in the /home/<user>/... |
While creating an EC2 instance, we provide a key pair name.
But generally, I associate multiple SSH public/private keys with any remote server. I know that it's not possible to attach a key pair once the EC2 server has been created, but I would like to know whether or not it's possible to use multiple key pairs while ... | How do you create an EC2 instance with multiple key pairs? |
39
It takes a while to AWS to verify your card details after you register a new account with AWS. It would be great if AWS would give a more sensible message,
Share
Improve this answer
Follow
a... |
I'm getting following error when tried to create topic for amazon sns :
The AWS Access Key Id needs a subscription for the service (Service:
AmazonSNS; Status Code: 403; Error Code: OptInRequired; Request ID:
4b507354-d0ff-5769-aa80-3c296a6c7f7d)
I've also created IAM user and subscribed for the SNS service but... | The AWS Access Key Id needs a subscription for the service |
To stick with that you're already doing, you could run the AWS CLI from within your userdata script:"UserData": {
"Fn::Base64": {
"Fn::Join": [
"\n",
[
"#!/bin/bash",
"yum update -y",
"yum install -y httpd24 php56",
"ser... | I've created a CloudFormation template that launches an AutoScaling group. During the launch, a policy allowings3:GetObjectaccess is attached to each EC2 instance. After this, I use User Data to install an Apache web server and PHP, and then change the settings for the relevant folders. I then need to copy multiple fil... | How do I copy data from AWS S3 to EC2 in a CloudFormation template? |
When you use sudo the shell this starts will ask for a password on the tty - it specifically doesn't read standard input for this information. Since flask and other web applications typically run detached from a terminal, sudo has no way to ask for a password, so it looks for a program that can provide the password. Y... |
I have a crawler which I want to run everytime a person goes to the link. Since all the other modules are in Flask, I was told to build this in Flask also. I have installed scrapy and selenium both in the virtual environment and globally on the machine with root.
When I run the crawler through the terminal, everything... | Run scrapy from Flask application |
This answer on Stack Overflow helped me solve my issue.
Here is part of that answer:
First commit any outstanding code changes, and then, run this command:
git rm -r --cached .
This removes any changed files from the index(staging area), then just run:
git add .
Commit it:
git commit -m ".gitignore is now working"... |
I have an Android library and for some reason, the files and folders I have specified in my .gitignore are not being ignored.
I have tried modifying my .gitignore and also following these steps, but this doesn't change anything.
Here is my top-level .gitignore (which can also be found on the GitHub repo):
# Gradle fil... | Gitignore not ignoring some build files in Android library |
You can map each JSP in your web app's web.xml file.<servlet>
<servlet-name>myTest</servlet-name>
<jsp-file>/testing.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>myTest</servlet-name>
<url-pattern>/test</url-pattern>
</servlet-mapping>Using t... | I use nginx and tomcat for serving my site that written in jsp. How can I hide/change jsp extension on browser address bar? | How can I hide/change jsp extension on browser address bar? |
+25This is because you are getting an error in the secondRUNcommand,apt-get update -qq. The error is getting buried because of-qqflag (which will quite the error messages. Try without-qqto diagnoise the error)You can try using belowDockerfilefor installingopenjdk-7-jre.FROM ubuntu
RUN apt-get update
RUN apt-get instal... | I've been trying to install openjdk-7-jre in a docker image. But when I tried to install it I got the following error:E: Failed to fetchhttp://security.debian.org/pool/updates/main/o/openjdk-7/openjdk-7-jre-headless_7u111-2.6.7-2~deb8u1_amd64.debConnection failed [IP: 200.17.202.197 80]I've been spending a lot of hours... | Docker installation debian openjdk-7-jre |
If one physical address (e.g., shell program) mapped to two independent virtual addresses
Multiple processes can be built to share a piece of memory; e.g. with one acting as a server that writes to the memory, the other as a client reading from it, or with both reading and writing. This is a very fast way of doing i... |
I do not quite understand the benefit of "multiple independent virtual address, which point to the same physical address", even though I read many books and posts,
E.g.,in a similar question Difference between physical addressing and virtual addressing concept,
The post claims that program will not crash each other,... | virtual addressing v.s. physical addressing |
That is not yet supported, and is studied inissue 2259.That affect other images likedocker-java.Basically, you have tochown and copy (with the right user) your data in the volume, which is not very convenient. | How do I mount a volume writable by a non-root container user? I am ok with either the volume being owned by the non-root user or permissions being set to 777.Dockerfile:FROM alpine
RUN adduser -D myuser
USER myuserBuild image:docker build -t example .Run image, see /app unwritable by user% docker run -i -t -v myapp:/a... | How do I write to a volume container as non-root in docker? |
set Custom Error page in your .htaccessErrorDocument 404 index.htm | Is it possible to change the DirectoryIndex in .htaccess in the event of a 404? I have a scenario where if there is a 404 I want to change the DirectoryIndex to index.htm instead of index.php. By default though I have to declare DirectoryIndex in .htaccess so I am looking for something like an if else statement.if 4... | Conditional .htaccess 404 DirectoryIndex |
0
I found my issue after looking at the logs like Hans Kilian was wondering.
The error I was getting was "exec /usr/bin/dotnet: exec format error". After reading This post, I discovered that the platform I was building for was specific to my machine, an m1 mac. In order t... |
I have a dockerized ASP.NET application that I am hosting on AWS ECS. I have a task definition with one container image: the ASP.NET app, which is marked as essential. When I run that task in a service, the task provisions, is running, and then immediately changes to DEPROVISIONING (Essential container in task exited)... | ASP.NET Docker image exits immediately in AWS ECS |
You created the private key outside of the keystore and have now imported just the certificate. The client application needs access to both the private and public parts.
Either import the private key or generate the certificate signing request using keytool rather than openssl.
|
I'm having trouble setting up a reverse proxy through nginx to a websocket application with client certificate authentication; so far I've gotten the server SSL cert to work no problem. Here are my steps so far for the client auth:
Create the client cert:
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
openss... | SSL websockets proxy via nginx proxy with client auth |
The pathname passed to open could be dynamically allocated by the program (so its on the heap or stack somewhere), or it could be in the read-only section if it was a compile-time constant. In either case, you don't know what other parts of the program might be using it, so its probably not a good idea to change its ... |
I have been playing a while with ptrace. I followed some tutorials like this one or this one. So far, when I have a ptrace-d child process, I am able to:
Detect system calls and browse the registers.
Fetch the strings contained in addresses pointed by the registers, thanks to the PTRACE_PEEKDATA option of ptrace.
Cha... | Ptrace and memory allocation |
Same as any other reverse proxy configuration fornginX, the only difference will be that the endpoints are onlocalhostThis is trivial example:server {
listen 80;
server_name foobar.net www.foobar.net test.io www.test.io;
location / {
proxy_pass http://localhost:81;
proxy_set_header Host $ho... | I have docker containers with my own site and I would like to create external ports 444 and 81 from docker and connect it to a user request from my domain from external nginx on my linux machine. How do I organize the nginx.example1.conf file, I created the containers, I just have to connect the ports, how can this be ... | How can I forward ports 80 and 443 from an external request through Nginx to ports 81 and 444, respectively? |
ENV directive does not allow to parse a file like env.list, as pointed out. But even if it did, the resulting environment variables would still be saved in the final image, passwords included.The correct approach to my knowledge is to set the passwords at runtime with "docker run", when this image runs, or when the chi... | I would like to set a list of environment variables as specified in anenv.listfile during the build process, i.e. have a respective command in the Dockerfile. Like this:FROM python:3.9.4-slim-buster
COPY env.list env.list
# Here I need a corresponding command:
ENV env.listThe file looks like this:FOO=foo
BAR=barMy bo... | Docker: How to set environment variables from file during build? |
You can set amerge strategy. Trygit merge -X theirs BRANCH_NAME. This strategy defaults all conflicts to the incomings | I have a merge conflict with 90+ conflicts and I just want to accept all incoming. How can I do that? Form what I see most people just recommend using a merge tool, but what I have here has me do it one by one which at this point is unsustainable. How can I make this more efficient? | How to resolve a git merge conflict how can I just accept all incoming? |
There is athird party github repowith public layers, including pandas. You don't have to do anything to use, except adding the layer arn to your function. The arndepends on your region, so you have to choose your region. For example, forus-east-1the pandas layer for python 3.8 is:arn:aws:lambda:us-east-1:770693421928:l... | I'm trying to upload a deployment package to my AWS lambda function following the articlehttps://korniichuk.medium.com/lambda-with-pandas-fd81aa2ff25e. My final zip file is as follows:https://drive.google.com/file/d/1NLjvf_-Ks50E8z53DJezHtx7-ZRmwwBM/viewbut when I run my lambda function I get the errorUnable to import ... | How to upload pandas, sqlalchemy package in lambda to avoid error "Unable to import module 'lambda_function': No module named 'importlib_metadata'"? |
pip install gitpythonis a command to type into a command line. That would be a "Bash console" on PythonAnywhere, a "Terminal" on a Mac or Linux, or a "Command Prompt" on Windows. It tells the system to install the Python package called "gitpython"However, in order to make it work, you'll need to install pip (except o... | I have absolutely no idea how to integrate Github into web2py. I have web2py installed on a usb and also onpythonanywhere.The web2py overview document chapter3http://web2py.com/books/default/chapter/29/03/overviewsays :Git integrationThe admin app also includes git integration. Python git libraries are required, e.g.p... | web2py git integration - localhost & pythonanywhere |
I don't think you can do it from the website itself. But you can do it from the terminal.# Pull in the remote changes
$ git pull
# Rebase the last 2 commits interactively
$ git rebase -i HEAD~2
pick abcdef commit to keep
squash 123456 commit to squash
# Override the remote branch
$ git push -f origin <branch> | I did a little editing in a file on my GitHub repository through the website and then committed the changes. It's not like changing a file, committing and then pushing it to the origin, I did it directly by going to the website. Now there are two commits in that branch. Can I squash the last commit from the terminal? I... | How to squash a commit made in the GitHub website? |
You can calculate the difference between current millisecond count and zero before setting up the Observable....
const now = new Date();
const initialDelay = 60 * 1000 - (now.getSeconds() * 1000 + now.getMilliseconds());
Observable
.timer(initialDelay, 60000)
.subscribe(...)Precision might not be ideal but maybe th... | I have a Dashboard component in my Angular 6 application which I need to refresh every clock minute as the data that am fetching from API gets updated every minute (There is a Cron job running on backed to update the data).I know aboutObservable.interval(60000)but it would be my last option to use as my API data gets r... | Refresh Angular component similar to Cron job |
If you have everything working as expected after you configured SonarQube on Azure VM (Windows). You should see the sonar home screen via open a browser and openhttp://localhost:9000/.Make sure you add a rule to the Windows firewall. You could open a command prompt as an administrator on Azure VM and run the following ... | I configured SonarQube on Azure VM (Windows). Everything working as expected. Only thing is I can not access SonarQube portal outside my Azure VM. I whitelisted port in firewall as well as subnet NSG but didn't work. I tried accessing it through VM Public IP as well as DNS but none worked.Port: 9000Is there any specifi... | Access SonarQube Port 9000 outside (publicly) the Azure VM |
As you have accepted that you have rungit stashto stash the changes So the answer isNO You have not lost the changes. You can still get them back by running:git stash applyorgit stash popShareFollowansweredMar 21, 2014 at 6:30Sachin JainSachin Jain21.6k3434 gold badges107107 silver badges172172 bronze badgesAdd a comme... | There are 10 branches in my git. I was working ondevelopbranch and did big changes in 3-4 files. After some time I was advised by our team lead that I should switch to another branch (feature/heavy_calculations) to test a new feature.I switched to that branch just by running a commandgit checkout feature/heavy_calculat... | Did I lose my data on switching to another branch git? |
In case somebody is also looking for answer, we can usekube-state-metricsIt exposes kube_namespace_labels metric which has labels as well as namespace. | I have added some labels to kubernetes namespace metadata, now I want to scrape namespace as well as those labels using prometheus, Actually I am trying to create a grafana dashboard and want to categorise namespaces based on labels. I tried using kubernetes_sd_configs, I am able to get namespace but unable to get labe... | Scrape Kubernetes metadata labels using Prometheus |
1
Find the commit ID of the last blue commit called solve make_1. Have you tried git reset --head thecommitid. Then do git push --force. If needed delete and recreate the repo and push just the blue branch.
Share
Improve this answer
Foll... |
I followed what I saw on the Internet to fill a field of grass on GitHub, but all the commits I've done have been doubled.
I want to get rid of the new cloned commits, what should I do?
As the number of commits in a repository doubled, the grass faded as a whole.
Can't I go back on this? I don't know the Git Terminal... | Couldn't I just pick out the git commit history and delete it? |
We have an open ticket on this:http://jira.codehaus.org/browse/SONARJAVA-91As a background: Sonar has been using its own duplication detection mechanism since end of 2011 (from Sonar 2.11 IIRC). At that time, a decision was made that the number of lines or the number of tokens should not be configurable, in order to pr... | Maybe it is a stupid question, but I cannot find out where can I config the minimal lines of code for duplication check in SONAR. In project settings there is only a switch to turn on cross project check. Any ideas?B.R. | SONAR: config duplicate line for java project |
Just don't include them in your code and use environment variables:$my_very_secret_key = getenv("MY_VERY_SECRET_KEY");You'll define this key wherever your webserver will allow you to. For instance with nginx:env MY_VERY_SECRET_KEY='OhThatsAVerySecretKey'This procedure is recommended by Heroku tostore s3 credentials, it... | So im writing code and pushing it to github and pushing it to github etc etc....Problem is when I do that I am also pushing things like Facebook API keys and config.php encryption keys - anyone know how to push code without doing this? | CodeIgniter and Secrets/API Keys |
If you want to use both of them in the same project, you can achieve the same result with a simple way to listen on differentportsrouter := httprouter.New()
// register prometheus exporter
go func() {
http.Handle("/metrics", promhttp.Handler())
http.ListenAndServe(":8080", nil)
}()
http.ListenAndServe(":80", r... | Cannot pass Prometheus midware intohttprouterendpoint definitions.I'm trying to add a Prometheus midware into our endpoint implementation. But our endpoint are using a third partymuxpackage calledhttprouter. Then when I tried to add this midware into existing code base, I cannot find a good way to integrate both togeth... | How to pass a httprouter.Handle to a Prometheus http.HandleFunc |
You can configure SES to send notifications to an SNS topic which in turn can directly notify a web URL. If you can capture these events on your end you could with relative ease digest this into Prometheus using the relevant format. For general oversite on your SES events there are tools out there (e.g.https://www.sesm... | I want to monitor ses event types such as sends, open and click in my grafana dashboard. Is there any way I could send these event types to prometheus? | How to monitor ses configuration set event types to grafana? |
This feature is no longer available in SonarQube.ShareFollowansweredJun 29, 2017 at 12:42G. Ann - SonarSource TeamG. Ann - SonarSource Team22.5k44 gold badges4242 silver badges8484 bronze badgesAdd a comment| | Using Java, JUnit 4, JaCoCo, Gradle and Sonarqube, I'm able to see code coverage in Sonarqube, however, I'm unable to see which tests cover lines of code (i.e. which tests contributed to the coverage).It appears that using Maven there is asurefireplugin that can be configured to enable this, however I'm unable to find ... | Can Sonarqube show coverage by test using JaCoCo and Gradle? |
<div class="s-prose js-post-body" itemprop="text">
<p>The official answer is available in the section <a href="https://docs.docker.com/storage/volumes/#back-up-restore-or-migrate-data-volumes" rel="noreferrer">"Back up, restore, or migrate data volumes"</a>:</p>
<p><strong>BACKUP:</strong></p>
<pre><code>sudo docker ru... | <div class="s-prose js-post-body" itemprop="text">
<p>As described in the Docker documentation on <a href="http://docs.docker.io/en/latest/use/working_with_volumes/">Working with Volumes</a> there is the concept of so-called <em>data-only</em> containers, which provide a volume that can be mounted into multiple other c... | How to port data-only volumes from one host to another? |
It seems that the solution you are looking for is fully described inthis documentation:Node Problem Detectoris a daemon for monitoring and reporting about a node's health. You can run Node Problem Detector as aDaemonSetor as a standalone daemon. Node Problem Detector collects information about node problems from variou... | We have a Kubernetes cluster behind a L4 load balancer but we do not have programmatic access to the load balancer to add/remove nodes when we need to update/reboot nodes (the LB is managed by the Support team of our hosting provider).The load balancer does support healthchecks but the current setup is to call port 80 ... | Healthcheck to detect drained node |
Found the answer,To find the extension of the file best way is to usepath_infofor both local files and url.$info = pathinfo($filename);
$basename = $info['basename'];
$ext = $info['extension'];create an array for the mime type$mimeTypes = array("mp4" => "video/mp4");//-->See Example hereandHere//get the mime... | Hi I am looking for best way to find out mime type in php for any local file or url.
I have tried [mime_content_type][1] function of php but since it is deprecated I am looking for better solution in php for all file format.mime_content_type — Detect MIME Content-type for a file ***(deprecated)***I have already tried b... | Find Mime type of file or url using php for all file format |
Model TFmStation is best place to have the above logic. Components are there for generic functionality like UploadComponent, EmailComponent, RecaptchaComponent etc. If your logic part have something to do with model, then it should go into that model.
A Model can be called from AppController.php in a similar fashion a... |
I am using Cakephp 2.3 , i want to perform lots of common calculation in my several controllers. so i write those functions in my appcontroller and i cached some datas..
but what happens is my appController will become fatty.. so i create some component to perform these actions.. i dont know my approach is right or n... | Cakephp using Cache in Component |
From what I understand, the viewDidUnload method is called by didRecieveMemoryWarning function in the UIViewController (the super class). Basically iOS gives you couple of warnings and expect to see your memory usage go down. If you continue to ignore these, OS will kill your app.
Sometimes, though, it is critical to... |
This issue never happened to me. I have an UIViewController inside an UINavigationController. When a memory warning is received (nevermind the level), the viewDidUnload method of the visible controller is called, so the view is unloaded and I get an awesome black screen (with a navigation bar at the top).
I'm testing ... | Why my UIViewController's view is being unloaded when visible? |
Makelsproduce full paths of files to be removed. Otherwisermmay fail or remove files in wrong directory if current directory is not/backups/mongo/.2You use bash specific syntax. Usesheebangto make you script use bash.#!/bin/bash
rm -f $(ls -t /backups/mongo/* | awk 'NR>14')
....ShareFollowansweredJan 3, 2017 at 21:33A... | I need some help with abashscript.
The script "backup.sh" looks like this:rm -f $(ls -t /backups/mongo/ | awk 'NR>14')
rsync -pvztr --progress /backups/*...........I want to remove old files in /backups/mongo/ folder, keeping no more than 15 files. The script works fine if I run ./backup.sh, but if I make it run as... | Remove old files rolling by date, keeping certain number of files in Cronjob not working |
<div class="s-prose js-post-body" itemprop="text">
<p>Use the same <code>file.sh</code></p>
<pre><code>#!/bin/bash
echo $1
</code></pre>
<p>Build the image using the existing Dockerfile:</p>
<pre><code>docker build -t test .
</code></pre>
<p>Run the image with arguments <code>abc</code> or <code>xyz</code> or something... | <div class="s-prose js-post-body" itemprop="text">
<p>I am new to the docker world. I have to invoke a shell script that takes command line arguments through a docker container.
Ex: My shell script looks like:</p>
<pre><code>#!bin/bash
echo $1
</code></pre>
<p>Dockerfile looks like this:</p>
<pre><code>FROM ubuntu:14.0... | How to pass arguments to Shell Script through docker run |
I found that when useStatefulsetinstead of theDeploymentthen it's possible to inject the determinable POD name as an environment variable....
containers:
...
env:
- name: "POD_NAME"
valueFrom:
fieldRef:
fieldPath: metadata.nameAnd thenPOD_NAMEvariable has the value like this:... | When we usePM2in cluster mode, we can find out the instance number inside node app usingprocess.env.NODE_APP_INSTANCE, but how we can find that inside a kubernetes cluster withoutpm2. I'm looking for similar like find replica instance number or etc.Imagine a node app with 2 or more replicas and we need to runnode-crons... | NODE_APP_INSTANCE similar variable inside kubernetes node app |
It depends on what you need from your caching mechanism. Ehcache provides a lot of cool features, which require a lot of well designed code to do it manually:LRU, LFU and FIFO cache eviction policiesFlexible configurationPersistenceReplicationmany more ...I would recommend you go through them athttp://ehcache.org/about... | I have always used the java singleton class for my basic caching needs.Now the project is using ehcache and without looking deeply into source code, I am not able to figure out what was wrong with the singleton pattern.i.e What are the benefits of using the ehcahce framework except that the caching can be done by using... | Advantage of using ehcahce over a static HashMap |
You need to move theimagePullSecretfurther down. It's breaking the container spec.imagePullSecretis defined at the pod spec level whilevolumeMountsbelongs to the container specapiVersion: apps/v1
kind: Deployment
metadata:
name: xxx
namespace: xxx
spec:
selector:
matchLabels:
app: xxx
replicas: 3
te... | My deployment is working fine. i just try to use local persistent volume for storing data on local of my application. after that i am getting below error.error: error validating "xxx-deployment.yaml": error validating data: ValidationError(Deployment.spec.template.spec.imagePullSecrets[0]): unknown field "volumeMounts"... | getting error while creating kubernetes deployment |
AWS does not seem to have a HTTP API, but you can use the aws command-line tool to trigger the update:https://stackoverflow.com/a/41715702/5879759 | Is it possible to setup a web hook to automatically deploy a new version of an application from a Docker Hub repository to Elastic Beanstalk?I currently have the following setup:Bitbucket Repo -----> Docker Hub -----> Elastic BeanstalkWhen I push to the master branch on the git repository, it triggers a build on the Do... | EB: Automatically deploy new Docker image build from Docker Hub |
You need to increase memory limit dynamically:-
ini_set('memory_limit','16M');// change 16M to your desired number
Note:-
The above code will increase the maximum amount of memory available to PHP to 16 MB and this setting is only adjusted for the running script.
|
I am trying to grab some database data via ajax in my symfony project. I grabbed all estimates in our database and there are over 60k. When I try and json_encode the results, I get an out of memory error. I know it has to do with the size because I can json_encode one result and it returns fine.
$results = new \stdCl... | Handling data that is too large for json_encode (PHP) |
Edit the Dockerfile and change line 5 from this:RUN DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \to this:RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -yq --no-install-recommends \
^ Add this part ^Then tell whoever wrote that Dock... | I'm using docker toolbox on my Windows machine. I'm trying to build this project from githubhttps://github.com/pyannote/pyannote-video. When I build an image by runningdocker build -t pyannote/video ., I get the following error:Get:17 http://archive.ubuntu.com/ubuntu/ trusty-updates/main python-setuptools all 3.3-1ubun... | Docker build: unable to fetch archives |
You may need to escape%by\. It will be:30 2,8,14,20 * * * /bin/bash -c 'DATE=$(date +\%Y-\%m-\%d_\%H:\%M); echo $DATE' | I am running this via cron:30 2,8,14,20 * * * DATE=`date +%Y-%m-%d_%H:%M`; mysqldump -u mysql_user -ppassword mysql_database | gzip > /home/username/backups/mysql_backup-$DATE.sql.gzWhen I do it command line, it works. But the cronjob gives me an error like this:/bin/bash: -c: line 0: unexpected EOF while looking for m... | cronjob mysql backup issue |
The OutOfMemoryException is not caused by the objects being serialized, but instead it is a result of the construction of the XmlSerializer objects. When an XmlSerializer is created, an assembly is dynamically generated and loaded into the AppDomain. These assemblies cannot be garbage collected until their AppDomain i... |
I have a web site that is throwing OutOfMemoryExceptions on whenever it gets to the following spot in my code:
XmlSerializer xs = new XmlSerializer(t, xoverrides);
Seeing how this only happens when it is on the web server, i don't have a ton of information on why this is happening. I know that the objects that it is ... | .NET OutOfMemoryException on XMLSerializer.Serialize |
Cron is a time-based job scheduler in Unix-like computer operating systems. Which means you can not configure it on Windows. | it's a one line question and i don't know how to describe itmysystem config:-
os: windows Xp
server : Wamp server (latest)is this posible ? | can i configure cron job for localhost |
You can try to mark it as a false positive. Here is a description of how to do this:http://docs.codehaus.org/display/SONAR/Reviewing+Issues#ReviewingIssues-Markinganissueasfalsepositive | In my class I have logger likeprivate static final Logger LOGGER = org.slf4j.LoggerFactory.getLogger(Myclass.class);While running sonar qube I am getting error like:Malicious code vulnerability - Field should be package protected-
A mutable static field could be changed by malicious code or by accident. The field cou... | Malicious code vulnerability - Field should be package protected. How to fix this sonar issue? |
Nginx operates within the directory, so if you can'tcdto that directory from the nginx user then it will fail (as does thestatcommand in your log). Make sure thewww-usercancdall the way to the/username/test/static. You can confirm that thestatwill fail or succeed by runningsudo -u www-data stat /username/test/staticIn ... | I am using the default config while adding the specific directory with nginx installed on my ubuntu 12.04 machine.server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
index index.html index.htm;
# Make sit... | Nginx: stat() failed (13: permission denied) |
Yes, that plugin is deprecated: have a look at thedeprecated pluginsand theplugin version matrixpages. You can have a look at theGovernance pluginbut than you have to pay for an enterprise version. The best "free" option is to use theWeb APIto get the information you need and generate a PDF report yourself.ShareFollowa... | We're looking for a SQ plugin that would allow us to generate a PDF report witha a list of issues from the analyzed project.There is this community pluginhttps://github.com/SonarQubeCommunity/sonar-pdf-reportbut as far as I know it's deprecated. Can you confirm that?Is there any other option to achieve the goal?We're c... | Plugin "Sonar PDF Report Plugin" compatible with SQ 5.6? |
I've tried using your podfile in a sample project. Seems good. I successfully installed OverlayContainer. You could try your podfile too in a new sample project, if it doesn't work too, then the problem should be in your local pod settings.
There are multiple ways to solve that.
Run pod setup (this may take time).
U... |
I'm attempting to load the following github repository through Pods:
https://github.com/applidium/ADOverlayContainer
$ pod install
Analyzing dependencies
[!] Unable to find a specification for `OverlayContainer`
Also tried 'ADOverlayContainer'.
The podfile, note the other two pods work:
# Uncomment the next line to d... | iOS Podfile issue with OverlayContainer from ADOverlayContainer |
I have to use theSonarScanner.MSBuild.exeinstead of theSonarQube.Scanner.MSBuild.exeAll my csproj are now on my dashboard.ShareFollowansweredOct 11, 2018 at 15:39pixpix1,2761919 silver badges3434 bronze badges41SonarScanner.MSBuild.exeandSonarQube.Scanner.MSBuild.exeshould be functionally equivalent if they come from t... | I want to run the SonarQube analyse on my sln files meaning, all the csproj included into that file.
Apparently I am missing one point in the configuration because my scanner will only takes one csproj (always the same)This is how I use my command lineE:\SonarQube\bin\SonarQube.Scanner.MSBuild.exe begin /k:"MySuperPro... | SonarQube takes only on csproj to do the anlyse from SLN |
Set the following in your Apache directive:PythonOption django.root /djangoThen django will trim/djangooff the front of every URL request.ShareFollowansweredNov 30, 2009 at 15:28jcdyerjcdyer18.8k55 gold badges4242 silver badges4949 bronze badges2Hmm - I am on a shared host and using FastCGI and I don't believe I can ed... | I am in the process of deploying a new Django site to replace a current Wordpress blog. As I get it setup, I want to test everything in the domain's subdirectory before I switch things to the root and "go live". For example:http://example.com/django/Editing my.htaccessfile allows me to redirect things without a hitch... | How to temporarily move a django site into a subdirectory (for testing)? |
Use the QSA (Query String Append) flag:RewriteRule (.*) app.php?_target=$1 [L,QSA] | I'm wasting hours here with .htaccess to make those nice looking URLs possible and reached a dead end. This is what worked for me in the past:RewriteRule ^(.*)\?*$ app.php?_target=$1 [L]Now I would like to extend this rule to support URLs like this:http://mydomain.com/articles/regex-cheatsheet/?sortby=expression&order=... | Use mod_rewrite, yet keeping the "?" |
No, there is no such (portable) function. In modern operating systems implementing memory protection, user-space (as opposed to kernel-space, i.e. parts of the OS) cannot access physical addresses directly, that's simply not allowed. So there would be little point.
No, virtual memory does not need to involve hard disk... |
I know there are two types of addresses. Virtual and Physical. Printing the address of an integer variable will print its virtual address. Is there a function that will facilitate to print the physical memory of that variable?
Does virtual memory mean a section on hard disk that is treated as RAM by the OS?
| C memory mapping |
If you are running on the Oracle JDK you can use jcmd to bring up the remote agent.jcmd <pid> ManagementAgent.start jmxremote.port=8008 jmxremote.ssl=false jmxremote.authenticate=falseWhere <pid> is the process identifier of the process for which you want to start the agent. | i am wondering if there is a possibility to configure a JMX monitoring without restarting my TOMCAT server since it is still workingi want to add the below commands in a setenv.sh file-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8008
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.mana... | how to execute JMX monitoring without restarting tomcat |
Try
7z a %DATE:~-4%-%DATE:~4,2%-%DATE:~7,2%.7z *.* for (YYYY-MM-DD)
or
7z a %DATE:~7,2%-%DATE:~4,2%-%DATE:~-4%.7z *.* for (DD-MM-YYYY)
(*.* is the mask for the files to back up)
|
I'm trying to setup 7zip for automated backups but I'm having trouble with output file names.
I tried using the %date% command but it just made 2 directories within my backup.
C:\Users\Desktop\Sun 11\07\2010.7z
How can I make it just log the day and month?
C:\Users\Desktop\Sun 11-07-2010.7z
| How can I output weekday and month in batch (log files)? |
I ended up also asking the same question onLetsencrypt forumswhere I got an answer.Basically, when you have created certificate with--standaloneplugin, just regenerate it with--webrootand then it can be updated with--webrootfrom next time onwards.sudo ./letsencrypt-auto certonly -a webroot --renew-by-default -w -d | I have already set up certificates using the --standalone flag which is working great but the problem is I have to stop Nginx server every time I have to renew the certificates because the --standalone option requires port 80 to be free.The --webroot method does not require stopping the server and essentially taking do... | Letsencrypt - Change installed certificates to use --webroot for renewal instead of --standalone |
UseAWS s3 rmcommand with multiple--excludeoptions (I assume the last 5 files do not fall under a pattern)aws s3 rm s3://somebucket/ --recursive --exclude "somebucket/1.txt" --exclude "somebucket/2.txt" --exclude "somebucket/3.txt" --exclude "somebucket/4.txt" --exclude "somebucket/5.txt"CAUTION: Make sure you try it wi... | I can fetch the last five updated files from AWS S3 using the below commandaws s3 ls s3://somebucket/ --recursive | sort | tail -n 5 | awk '{print $4}'Now I need to delete all the files in AWS S3 except the last 5 files which are fetched from above command in AWS.Say the command fetches1.txt,2.txt,3.txt,4.txt,5.txt. I ... | How do I delete all except the latest 5 recently updated/new files from AWS s3? |
You have tofree()the allocated memory in exact reverse order of how it was allocated usingmalloc().Note that You should free the memory only after you are done with your usage of the allocated pointers.memory allocation for 1D arrays:buffer = malloc(num_items*sizeof(double));memory deallocation for 1D arrays:free(buffe... | I'm writing code which has a lot of 1 & 2 dimensional arrays. I got "error: can't allocate region" and I think its because too much memory is allocated. I use "malloc" and "free" functions, but I'm not sure I'm using them correctly. Maybe you know where I could see good examples on memory management in C?so.. I just tr... | How do I free memory in C? |
If this were my project, I would take a different approach. I would set subscription expiry to the actual expiry date rather than a decrementing integer. That makes less work for the cron and also feels like good date practice . . . you get the benefit of persisting expiration dates after the expiration, which might be... | I'm trying to figure out the right approach for calculating the remainder days of a user subscription.For example; user signs up December 25, 2013 for a month and unsubscribed December 29, 2013. Even though he unsubscribed 4 days after subscribing, his subscription should run on PLAN A for the next 27 days (31 day base... | How would you calculate expiry to update column in rails |
The alias of the keypair, the CSR, and the imported signed certificate must all be the same.Otherwise the keytool has no way of associating the signed certificate with the private key.ShareFollowansweredApr 13, 2015 at 10:14user207421user207421308k4444 gold badges315315 silver badges485485 bronze badgesAdd a comment| | I am referring thislinkto configure the CA certifiate.
I have a question here.
The alias name which is used during 1)generating keypairs and 2)Certificate singing request should be the one used while importing the final CA into the keystore and truststore? or can it be imported with different alias? | the alias of certificate signing request and the alias of import should be same for CA certificate? |
I've not tested it, but something like:$gunzip_result=system("gunzip $gzfile 2>/dev/null"); | So, OK, the job runs in cron: it fetches compressed files and processes them. If the files are corrupted, it deletes them. Sometimes they are bad on the remote server, in which case they will be downloaded and deleted each time.My cron logs extensively to STDOUT (directed to logfile in .crontab), using STDERR only for ... | How can I intercept errors from gzip so cron doesn't see them? |
No one can tell based on the information provided whether you should use a firewall or not. There are too many moving parts.Have you done any risk assessment for your application? What kind of data is your application processing, and how sensitive is it? What are your requirements regarding Confidentiality, Integrity a... | I have an Ubuntu droplet running a webserver. It's serving dynamic pages.
The backend is written in python withfastapi+uvicorn.
Generally speaking, security can often affect performance. Asthispaper points outNetwork security and network performance are inversely related.It goes on to say that a firewall indeed does ha... | Is it necessary to set up a firewall for my webserver if it's just serving pages? |
When a folder is created in the Amazon S3 Management Console, it actually creates a zero-length object with the name of the folder. This causes it to appear in the console.
If the object is deleted and there are no files using that path, then the folder will also disappear:
$ aws s3 ls s3://my-bucket
... |
I (think I) understood the concept of S3 of being a key based storage, where the key is actually the path to the file. Thus there is no concept of folders.
But how come, that it is possible to create empty folders in S3? Also, my impression is, that the empty folders exist only for a short period of time (a couple of ... | Empty folders in AWS S3 |
Got this too.I was able to go around by setting the admin at the docker file:environment:
- ADMIN_USERNAME=admin
- ADMIN_PASS=MYPASSWORD
- OVERWRITE_SETTING_Accounts_SystemBlockedUsernameList=administrator,system,userthis will skip the wizard and save you this problem.editAfter 3.18.X, the admin username is reser... | I'm trying to use rocketchat with docker compose but the wizard is stuck at the first stage.
Steps I tookmkdir /tmp/rocketchat
curl -Lhttps://raw.githubusercontent.com/RocketChat/Rocket.Chat/develop/docker-compose.yml-o docker-compose.yml
docker-compose up -dGo to url http://localhost:3000Then use the wizard to finish ... | Rocketchat Installation Wizard Hangs |
I don't know how to validate user @r2evans' comment above, but indeed it worked!
I already had a PAT token set, so I followed the steps in https://happygitwithr.com/credential-caching.html#credential-caching, starting at 10.2.1.1
install.packages("gitcreds")
library(gitcreds)
gitcreds_set()
I had to enter my account ... |
While pushing a commit to GitHub yesterday, I received an email from the GitHub team:
Basic authentication using a password to Git is deprecated and will soon no longer work. Visit https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information around suggested workarounds an... | How to update GitHub authentification token on Rstudio to match the new policy? |
you can just go ahead and specify the security group name:http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-securitygroups"InstanceMember1": {
"Type": "AWS::EC2::Instance",
"Properties": {
"SubnetId": {
"Ref": "privateSubnetA"
... | I want to use existing security group on cloudformation template.
Now I have template that create 2 SG,"InstanceMember1": {
"Type": "AWS::EC2::Instance",
"Properties": {
"SubnetId": {
"Ref": "privateSubnetA"
},
"SecurityGroupIds": [
{
"Ref": "MongoSg"
... | AWS CloudFormation use existing security group |
If anyone also got the same problem as me, I managed to fix the problem. Instead of calling the whole "zlib123dllx64" folder into the system environment path, you simply just add the "zlibwapi.dll" inside the "dllx64" folder into your project folder and include it in your project. This fixed my problem. cheers
|
I am working on a object detection project and wanting to process the project with my GPU. I have completed the NVIDIA setup tutorial and everything works fine. My object detection code originally works with the CPU, however when I add these two lines of code:
net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
net.set... | Could not locate zlibwapi.dll. Please make sure it is in your library path |
Is there a hook in the GitHub API to get the details of multiple repositories in a single call?No, that's not possible currently with the GitHub API. You can only fetch a list of repositories from a specific user (or org) or a list of all public repositories. You can't say "give me the information for repositories X, Y... | I amputting togethera pagethat lists the plugins for theKnockoutlibrary.Right now I am using a simple list of repositories, e.g.[
"civicsource/knockout-responsive"
"civicsource/knockout-spin"
"civicsource/knockout-transitions"
"CraigCav/Knockout-jqGridBinding"
"CraigCav/ko.datasource"
]Then getting the details for each... | GitHub API - get details of multiple repositories |
bower and npm both use registries to identify available versions for packages, when you use bower/npminstallupdateetc. the clients actually access the registries first to get the updated list of packages.For npm, you can see the registry formathere- this is the 'main' registry which points to individual packages. addit... | I am wondering when Bower and NPM package managers become aware of code updates to a package repository on Github. That is, is it somehow instantaneous and the latest code becomes available for download?Or is there a separate process through which the developers need to notify Bower and NPM of changes made to the packa... | When Bower and NPM Become Aware of New Code on Github |
Your flask app has no clue about which port is put in dockerfile.
You can leave your application at the default port and tell docker to expose it on the desired port with the -p option:docker run -i -t -p 6080:5000 ...seehttps://docs.docker.com/network/links/#connect-using-network-port-mappingfor more details. | I built a flask app using docker container which works well on port 5000. However in order to expose a different port I have to put in the port in app.py asif __name__ == '__main__':
app.run(debug=True,host='0.0.0.0',port=6000)which works well once I start the docker container.However, When I just doif __name__ == ... | Expose a different port for Flask App inside Docker Container |
I wanted to add that the issue probably occurs because of the difference in behaviour of STDOUT between Windows and Unix. Therefore, using the STDOUT way of saving like:docker save [image] > file.tarfollowed bydocker load < file.tarwill not work if thesaveandloadare executed on a different OS. Always use:docker save [i... | I'm trying to import a Docker image into Docker on AWS Red Hat Linux (3.10.0-514.el7.x86_64) and am having problems with the error;Error processing tar file(exit status 1): archive/tar: invalid tar headerThis same image works fine on my local machine, and in Boot2Docker on Windows also. It's quite large (2.5 GB), but I... | Docker load and save: "archive/tar: invalid tar header" |
This is not a bug.An array of size 70k x 70k means4.9 billionvariables that need to be stored in a dataframe.Dataframes have overheads relative to objects such as dictionaries and lists. So you will needmore than twicethe memory used by the dictionary to build the dataframe.You need to consider another way of using you... | i have a dictionary variable with almost 70K X 70K dimension, i want to convert it to Dataframe for further operation bywd=pd.DataFrame(wordDict)but after 5 min working it give me follow error:subarr=np.empty(len(),dtype=dtyp)
Memory Errori could find some post about it,but it seems that it is a common problem with pan... | Memory Error with pandas when convert dict to dataframe |
No, it should be in 24 hour format so0 13 * * * | i need to run a cron at 1:00 PM UTC every day, is this the right crontab for UTC ?0 1 * * * | Run a cron script at 1:00 PM UTC every day |
The error that you received has to do with how the files are indexed. Note that this is a fully package codebase from what I can tell (there's a setup.py), so you should be able to install it on machine in either a virtual env or conda environment (I recommend using environments to avoid it corrupting your base enviro... |
I'm trying to create a Bar chart race with Python on Jupyter Notebook that looks like this one:
So I found a package called bar_chart_race on GitHub. However, the package has no option to add images.
Fortunately, I found this forked repository https://github.com/andresberejnoi/bar_chart_race/tree/image_labels that al... | Combine multiple python files from GitHub |
I think the best solution is to add a sample database.yml somewhere in your project and .gitignore the existing one. Someone who checks out the project will need to create the database.yml (either from scratch or the sample). | My friend and I are starting a Rails project together and hosting the repo up on Github.What should I/we be doing with our database credentials to make sure we are not posting them publicly or clobbering each others database.yml settings? | What to do with my database credentials on github hosted projects? |
I think this should clarify the issue:
Capacity Units Consumed by Query
DynamoDB calculates the number of read capacity units consumed based on item size, not on the amount of data that is returned to an application.
When you do the query, you can specify a parameter ReturnConsumedCapacity to get the number of re... |
I am working on a table, in which every item is approx. 3KB in size.
Now as per the docs, the read units are calculated in 4s - i.e. For every item less than 4 kb, it would be counted as 4KB, and occupy 1 read unit.
Let's say i have a table of 100 items, of 3kb each in size (total table = 300kb). I do a query, in whi... | How does AWS DynamoDB count read units for Query? |
It seems like you are using RStudio in a unix system which probably requires root access to pull an image from docker. I think you should try launching Rstudio with sudo privilege from the terminal using the commandsudo rstudioand then rerun the babelwhale function above. | I have trouble pulling a docker image from Rstudio using babelwhale libary. I tried running the command belowbabelwhale::pull_container("ubuntu:18.04")But it gave the following errorGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocke... | Unable to pull docker image in Rstudio |
27
Docker version 1.13.1
For CentOS Linux release 7.2.1511 (Core), ensure following DOCKER_STORAGE_OPTIONS option is set to devicemapper.
bash # vi /etc/sysconfig/docker-storage
...
DOCKER_STORAGE_OPTIONS="--storage-driver devicemapper "
...
bash # vi /etc/sysconfig/docker... |
When I installed docker and ran service docker start I got this message:
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
When I ran journalctl -xe I got this message:
8月 02 20:42:11 centos-master systemd[1]: Unit... | SELinux is not supported with the overlay graph driver |
As mentioned in "Where is the Git commit info set in Xcode 4?", XCode takes user information from your contact card from your (2012) Address Book (called Contact in 2014).
Changing your contact card would change user information (for new commits)
Update 2014 (2 years later), as illustrated in sergtk's answer, XCode (... |
Is there any way to change the Git username and email for Xcode? When I try commit now it will post my real name. I want it to post my GitHub username so that you can link commits to my user on GitHub.
Usually with Git I've been able to just type git config --global user.name whoosh in the terminal but it doesn't seem... | How to change the username for Git in Xcode? |
So it looks the error message has changed at some point: https://aws.amazon.com/premiumsupport/knowledge-center/ecs-pull-container-api-error-ecr/ has steps to work through but mentions the error CannotPullContainerError: API error which might be synonymous with CannotPullContainerError: "Error response from daem?
For ... |
I'm starting a task in ECS using Fargate and after being in PENDING for a little bit it ends up in STOPPED with the following error:
STOPPED (CannotPullContainerError: "Error response from daem
When I expand out the details I see
STOPPED (CannotPullContainerError: "Error response from daemon: Get https://id.dkr.ecr.a... | ECS task not starting - STOPPED (CannotPullContainerError: “Error response from daemon request canceled while waiting for connection” |
You need to consider what the happens if you allocate an array of these structures withmalloc():structc_t *p = malloc(2 * sizeof *p);Consider a platform wheresizeof(double) == 8,sizeof(int) == 4and the required alignment ofdoubleis 8.malloc()always returns an address correctly aligned for storing any C type - so in thi... | typedef struct structc_tag
{
char c;
double d;
int s;
} structc_t;I read in a blog that this will take 24 bytes of data:sizeof(char) + 7 byte padding + sizeof(double) + sizeof(int) + 4 byte padding = 1 + 7 + 8 + 4 + 4 = 24 bytes.My question is why the 7 byte padding, why can't we use 3bytes... | Confusion in Structure Member Alignment |
My understanding was helped bythis diagramfrom theWikipedia page on IAM.Entitiesrepresent the actors on the system, and they may each havemultipleidentities.Unfortunately this doesn't translate well to IAM resources, and the IAM User Guide itself is pretty loose when referring to entities, identities, and principals (i... | I am reading through the AWS documentationUnderstanding how IAM worksand I'm confused about the definitions foridentitiesandentities.IdentitiesThe IAM resource objects that are used to identify and group. You can attach a policy to an IAM identity. These include users, groups, and roles.EntitiesThe IAM resource objects... | Difference between AWS IAM "Identity" and "Entity" |
Exposing ports in a container does not imply that the ports will be opened on the docker host. You should be using thedocker run-poption. The documentation says:-p=[] :Publish a container᾿s port or a range of ports to the hostformat:ip:hostPort:containerPort|ip::containerPort|hostPort:containerPort|containerPortBo... | I created a docker container to run tasks with gulp.
All tasks are running, the problem is I can't enable livrereload in Chrome although I exposed the 35729 port in my container.Here is the Dockerfile :FROM ubuntu:latest
MAINTAINER jiboulex
EXPOSE 80 8080 3000 35729
RUN apt-get update
RUN apt-get install curl -y
RUN ... | How to run livereload with gulp within a docker container? |
See SO #792119.
Declaring the variable does not create the array. In fact, neither does CGColorGetComponents. Whatever created the CGColor object created the array and stored it inside the object; CGColorGetComponents lets you have the pointer to that storage.
In short, do not free your pointer.
You could, however, ... |
I have a line of code:
CGFloat *components = CGColorGetComponents([color CGColor]);
and the analyzer is saying that there is a leak here.
I tried free(components) but the app crashes when I do that.
Is there really a leak here since I didnt allocate anything. I know that CGColorGetComponents returns an array of 3 CGF... | where is the memory leak |
As already explained by @stefansundin you can't move existing EB into a custom VPC. You have to create new one.These aregeneral stepsto consider:Create acustom VPC with public and private subnetsas described in the docs:VPC with public and private subnets (NAT). NAT is needed for instances and rds in private subnet to... | I made and deployed my Django application in AWS Elastic Beanstalk. It has a connection to a Postgres DB in RDS, through the EBS console.When I clickconfiguration->networkin EBS, I see: "This environment is not part of a VPC."How can I make it a part of a VPC?Thanks!NOTE: very new to this ;) | Elastic Beanstalk in VPC |
As you say the intent is triggered by voice. A relatively easy way to do it would be:Generate the audio file expressing the intent using polly tool. E.g. "play my song"https://docs.aws.amazon.com/polly/latest/dg/API_SynthesizeSpeech.htmlWhenever the user clicks on the web link, invoke the intent using the PostContent A... | I am working on a flask app that links to Alexa skills. I am trying to building a capability when a user click on some content (e.g. notifications), Alexa asks if the user wish to proceed, if the user says 'yes', then Alexa takes the user to the relevant webpage.My question is, is it possible to trigger Alexa intent wi... | How can I trigger Alexa intent with clicks rather than voice? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.