Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
It depends what the language is of the runtime. For example, if it is NodeJS, then the handler name should look like:
"app.handler"
If it is Java, then it should look like:
"com.example.LambdaHandler::handleRequest"
The image will look for them in LAMBDA_TASK_ROOT so you will need to make sure that your code (or com... |
When I run an AWS Lambda container (Docker) image, for example:
docker run public.ecr.aws/lambda/java bash
I get the following error:
entrypoint requires the handler name to be the first argument
What should the handler name be?
| Lambda container images complain about entrypoint needing handler name as the first argument |
I believe that syntax is not valid.Try this:OriginAccessIdentity:
Fn::Join:
- ""
- - "origin-access-identity/cloudfront/"
- Fn::ImportValue: !Sub "supertest-${Environment}"Here is another example where i use it similarly:https://github.com/faermanj/Sitting-Ducks/blob/master/cfn-beanstalk-env.yml | I have a stack which depends on a value which is exported in a different stack (value issupertest)I try to use it as belowOriginAccessIdentity: !Join [ "", [ "origin-access-identity/cloudfront/", !ImportValue: !Sub "supertest-${Environment}" ] ]But I got a syntax error while this works (hardcoding the supertest value)O... | How to use importValue and join in Cloudformation |
Yes indeed.JIBdoesn't needDockerfileordockerd.Sharing an example below, you can just copy it intopluginssection of yourpom.xml
com.google.cloud.tools
jib-maven-plugin
0.9.7
true
gcr.io/distroless/java
gcr.io/my-gcp-project/${project.artifactId}:${project.version}
gcr
-Xms256m
-Xmx512m
-Xdebug
-X... | I have a Spring boot Application and using spotify plugin to Dockerize my application.So, I will have a Dockerfile like the below one.FROM jdk1.8:latest
RUN mkdir -p /opt/servie
COPY target/service.war /opt/service
ENV JAVA_OPTS="" \
JAVA_ARGS=""
CMD java ${JAVA_OPTS} -jar /opt/service/service.war ${JAVA_ARG... | Dockerizing multi module Spring Boot application using JIB plugin |
It depend on situation once process end kernel will send connection close message if suppose kernel doesnt get response back it will go to time wait state and it will remain there for few minute.if it got response connection will get close immediately.Basically in your case you are geting resp thats why socket is geti... |
I got confused when write a C program...
The program I wrote is a client end program, its function is quite simple, it just sends requests to the server end.
I initialized a socket in my program to communicate with the server. I think what I should do is to disconnect and destroy this connection before the thread en... | Does TCP/IP connection automatically closed when OS do a garbage collection after a thread end? |
Switch away from using TCP sockets and going to UNIX sockets (assuming you are on a unix based server)Start memcached with a socket enabled:
Add-s /tmp/memcached.socketto your memcached startup line (Note, sockets disables networking support)Then in PHP, connect using persistent connections, and to the new memcache soc... | I am running memcached on my server and when it hits 600+ req/s it becomes unstable and causes a big load of problems. It appears when the request rate gets that high, my PHP applications at random times are unable to connect to the memcache server, causing slow load times which makes nginx and php-fpm freak out and I... | 600+ memcache req/s problems - help! |
Negation is done using the!operator. Using the[NC]flag will also discard strings likechrome,chRomeetc:RewriteCond %{HTTP_USER_AGENT} !Chrome [NC]
RewriteRule ^abcd.html$ chrome.html [NC,L] | I want to configure redirect if the user doesn't use Chrome, Safari, Opera or Mozilla.For inverse problem (if I don't want Chrome etc.) there is a solution:RewriteCond %{HTTP_USER_AGENT} Chrome
RewriteRule ^abcd.html$ chrome.html [NC,L]
RewriteCond %{HTTP_USER_AGENT} Safari
RewriteRule ^abcd.html$ safari.html [NC,L]Ad... | .htaccess allow only from Chrome, Opera, Mozilla, Safari, redirect from others |
Take a piece of paper, draw a graph with the objects as vertices, references as edges.If you can't find a path of strong edges from a GC root (e.g. static field or local variable on the stack) to the object in equestion then it is not strongly reachable and thus eligible for GC. | I have cache, implemented with WeakHashMap, like this:private static WeakHashMap<Object, WeakReference<Object>> objects = new WeakHashMap<>();I have an instance of class City:City c = new City();I now add this instance to my map like this:objects.put(c, new WeakReference<Object>(c));According to WeakHashMap jvm impleme... | Garbage collector work with 2 WeakHashMaps |
Check first your main repository .gitmodules content: the ltp-html5-authoring should be part of the path associated with each of your submodules.
If the path is wrong, you can (preferably with Git 2.18 or more) use git mv to move the submodule.
git mv ltp-html5-authoring/ltp-css3-specialist anotherPrefix/ltp-css3-spe... |
I created a submodule to display the code i did for my class (lesson class not code class) in my github website.
The first class I did was learn to program HTML, so i made a repository for it. Then I created a submodule to link the code with the site. This worked well. Then I started the next class, CSS.
Then I tho... | How to rename a git submodule |
Allocate a 2 GB block. If it is located below the limit, allocate another 2 GB (this one must be above 2 GB since only one block that size can fit below 2 GB).
/* Allocates size bytes at an address higher than address */
void *HighMalloc(size_t size, void *address) {
size_t mysize = (size_t)address;
void *y, *... |
In LuaJIT on linux, all VM magaged ram has to be below the 2GB process memory boundary because the internal pointers are always 32bit. therefore I want to manage bigger allocs myself (using FFI and malloc,etc), e.g. for big textures, audio, buffers, etc.
I now want to make sure those are mapped above the 2GB boudary, ... | Malloc specific address or page (specify a "minimum offset") on linux |
I used the following method to solve this issue on Mac OS.You can add a shebang to the top of your python script to specify the Python versions path:Python 3#!/usr/bin/env python3Python 2.7#!/usr/bin/env python2You will also need to ensure the file isexecutable:chmod a+x filename.pyThis will allow you to execute the py... | I'm trying to test a python script that has to be run by a cron job. I'm trying to config the cron job in my mac but doesn't run. Here is my cron job...* * * * * user /usr/local/bin/python3 ~/Documents/wpc/stocks/daily_stock.pyIf Icrontab -lthe job is there. I ran the script manually and works but is not runn... | Running crontab in mac |
The easiest way to create a secret from a file is to usekubectl create secret generic.Put your filesecret.jsonin a folderconfigand then run:kubectl create secret generic my-secret --from-file=configYou will get a secretmy-secretwith one keysecret.jsoncontaining your file (which you can then mount to a pod volume). | I'm trying to put a Service Account into a secret - I did it previously a year ago and it works but now - no matter how I approach it, the application doesn't see it right and says there isInput byte array has incorrect ending byte- When creating normal secret I know you've gotta do it with a new line soecho -n "secret... | Kubectl create multiline secret |
For a Jenkins job to be triggered by new commits on a repository workspace, or delivered to a stream:TheBuild Definitionuses a schedule indeed:To set up a continuous integration build, set the build schedule to run at an interval, such as every 5 minutes, and ensure that the Build only if there are changes accepted opt... | I would like my jenkins job to activate as soon as I commit to a specific stream on RTC (or my workspace). Currently I can do this on any commit I do on RTC using the "Build Trigger -> section
Poll the source code management system "but I can only specify the polling time, not the stream or the rtc workspace to monitor... | Jenkins job triggered by commit on specific stream in RTC |
Try removing it from your Chrome extensions. | I wanted to try out a third party application for github called ZenHub, I do not want to use it anymore. In github through the browser I have revoked the third-party access, underSettings > Application > Authorized OAuth apps, but I can still see it as aa tab in my repositories, and I am unable to remove it.If I click ... | Remove unused third-party tab in github |
Nothing just disappears in Git. You can do one of the following:Undo the merge on development branch.Undo a Git merge that hasn't been pushed yetCherry-pick your last commit (with all your contributions) from the history.How-to git backport (rebase/cherry-pick) an already merged branch | This is what he says he did:There was a merge conflict so I chose mine.What I'm seeing is that my changes are totally gone. The commit is there, but if I go on GitHub and click 'history' for the file, there's nothing showing that my changes were ever there. I found the guilty commit but all it says about it is:Conflict... | Git - coworker somehow overwrote my entire commit while resolving a conflict |
According tothis support matrixfrom rancher website,the istio version given is 1.4.7.RequestAuthentication kind was introduced in istio in the version 1.5.So you might be applying the incorrect resource in this version.Seethisfor istio's upgrade notes on 1.5.Since rancher is having not the latest version ,you will have... | i'm trying to use istio end-user authentication example with latest rancher, but I'm getting below errorunable to recognize "STDIN": no matches for kind "RequestAuthentication" in version "security.istio.io/v1beta1"when I use below commandkubectl apply -f - <<EOF
apiVersion: "security.istio.io/v1beta1"
kind: "RequestAu... | Rancher v2.4.4 Istio end-user authentication error no matches for kind "RequestAuthentication" |
10
In your docker-compose file you named the cAdvisor service ‘cadvisor’ so in the docker network it can be accessed via the DNS name cadvisor. Change your prometheus.yml static_config like this to scrape the service:
- job_name: "cadvisor"
scrape_interval: 5s
sta... |
I'm trying to get a Prometheus container to scrape metrics from cAdvisor.
This is my prometheus.yml:
global:
scrape_interval: 10s
evaluation_interval: 10s
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: "docker"
static_configs:
- targets: ['loc... | Prometheus - Target Connection refused |
5
The download link icons are enabled in the
_config.yml
file of your github.io home directory by adding
show_downloads: true
Note, the link(s) are to file(s) that contain the entire repository.
The documentation is under the "Customizing" heading at https://github.com... |
I am creating my OSS project page with Github pages.
I selected the theme which is provided Github below.
The theme example shows the zip file and tar.gz file link icons.
However, these icons are not shown up in my project page.
Is there anyone who knows how to show the icons?
| How to add zip file and tar.gz file links on Github pages |
These are actually different versions of the same resource in different API groups.In general, when new resource types are introduced to Kubernetes, they are first managed in theextensionsAPI group (iterating through multiple versions). Once the resources are regarded stable, they are moved to a "stable" API group, suc... | I have run a simple command:kubectl api-resourcesI was a bit surprised to get duplicates (albeit in different Api groups), e.g.:NAME SHORTNAMES APIGROUP NAMESPACED KIND
ingresses ing extensions true Ingress
ingresses ... | Kubectl api-resources lists duplicate resources with different API groups |
CloudTrail tracks API access for infrastructure-changing events, in S3 this means creating, deleting, and modifying bucket (S3 CloudTrail docs). It is very focused on API methods that modify buckets.
S3 Server Access Logging provides web server-style logging of access to the objects in an S3 bucket. This logging is ... |
What's the difference between the AWS S3 logs and the AWS CloudTrail?
On the doc of CloudTrail I saw this:
CloudTrail adds another dimension to the monitoring capabilities
already offered by AWS. It does not change or replace logging features
you might already be using.
| AWS S3 bucket logs vs AWS cloudtrail |
create labels for the nodes:kubectl label node <nodename> <labelname>=allowdelete above labels from its respecitve nodes:kubectl label node <nodename> <labelname>-ShareFollowansweredMay 5, 2017 at 9:43Gaurav GharatGaurav Gharat1,98111 gold badge1111 silver badges55 bronze badges63To remove for all nodes "kubectl label ... | Add label to nodes:$ kubectl label nodes 10.xx.xx.xx key1=val1If I want to deletelabel(key1=val1)on node(10.xx.xx.xx), how can I delete by kubectl command and API? | How to delete a node label by command and api? |
When I try to push my latest changes from development to ui branch using this command :
git push web ui
Pushing a branch to another would be:
git push web development:ui
The first push will:
push the commits, and
update the remote ui commits with new commits done on the local ui branch (meaning 0 commits here, ... |
I'm working on one of the cakephp website, where i use git as a version controller. I have 2 types of different branches are there :
1) development
2) ui
When i try to push my latest changes from development to ui branch using this command :
git push web ui, below message will displayed.
Counting objects: 43, done.
... | How to upload changes from development branch to remote branch on GIT? |
Gist is an independent service with some really nice metadata including when it was last active and versioning, just like GitHub proper. Wikis don't check into git as a version control system.Supporting docs:About wikisAbout gists | What is the difference between a GitHub gist and GitHub wiki page?I have steps that I want to share with the GitHub community so they can modify their profile settings. But unsure which one to use | difference between github gist and wiki |
If it's possible to change isExpired: V => Boolean to timeToLive: V => Duration, then you can use
def refresh(k: String): Future[V] = readV(k) andThen {
case Success(v) => Cache.set(k, Future.successful(v), timeToLive(v))
}
def get(k: String): Future[V] = Cache.getOrElse(k)(refresh(k))
To control concurrency, I li... |
Given following functions
val readV : String => Future[V]
val isExpired: V => Boolean
How to memorize the result of readV until it isExpiredby using play cache(or something else)
Here is how I did:
def getCached(k: String) = Cache.getAs[Future[V]](k)
def getOrRefresh(k: String) = getCached(k).getOrElse {
this... | play-cache -- memorize an Future with expiration which depends on the value of future |
Where should I read about this?
Herb Sutter's Exceptional C++ and Scott Meyers's More Effective C++ are both excellent books that cover the subject in detail.
There is also a lot of discussion on the web (Google or StackOverflow searches for "RAII" or "smart pointer" will no doubt yield many good results).
Is thi... |
I am pretty proficient with C, and freeing memory in C is a must.
However, I'm starting my first C++ project, and I've heard some things about how you don't need to free memory, by using shared pointers and other things.
Where should I read about this? Is this a valuable replacement for proper delete C++ functionality... | Starting a C++ project. Should I worry about freeing dynamic allocated memory? |
Please post the relevant error messages. Reschedule the cron job like this:19,56 * * * * /usr/bin/php /home/sites/cron.php > /home/<user>/cron.err 2>&1Look what is present in the file /home//cron.err. Or simply run the command in a terminal/usr/bin/php /home/sites/cron.phpand verify if it is working. | I have 3 Debian servers. For years I was using this command to run a php cronjob:19,56 * * * * /usr/bin/php /home/sites/cron.php >/dev/null 2>&1it works on my first server. On the second server it doesn't work and I use:19,56 * * * * php -f /home/sites/cron.php >/dev/null 2>&1on the third server don't work any commands... | Php cronjob doesn't run |
Docker hub is a repository for Docker images (make with a Dockerfile). When you use docker-compose your are simply connecting together one or more images on docker hub using your composition (the yaml that describes the images and how to connect them). You aren't making an Image with docker-compose. I don't think ther... | I'm very new to docker, I made a simple django app with docker-compose.How do I post it to docker hub so someone can rundocker runagainst it? | Using docker-compose, how do I share my image to docker-hub? |
If you're looking for something lighter-weight than GitLab, you might want to look atGitweb, which is an official part of the Git project. It might even already be installed on your server. Gitweb iswell-supported on Arch.Another possibility isGo Git Service(GOGS), which is a relative newcomer written in Go. GOGS is de... | I believe asimilarquestion to this has been asked before but its not quite the same. I would like to host a private git on a server, and generate web pages based on it with all the nice statistics and stuff similar to github (does github have an api another for this [other than the one I am about to mention]?). I have ... | Generate Web Pages For Git Repository? |
The below code will remove php extention from the URLRewriteEngine On
# for 404 redirection
ErrorDocument 404 https://www.yourdomain.in/404
# below code rewrites php extention
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [NC,L]
# Remove php extention
RewriteCond ... | I have a 404 error page and tried the below code which was generated from thislink. But when the wrong URL is entered it redirects to the main page, not to the 404 error page<IfModule mod_rewrite.c>
RewriteEngine On
ErrorDocument 404 https://www.rcis.in/404.php
</IfModule>I have added the code in htaccess file.
And al... | Redirecting to 404 page when wrong url is entered |
Placing arbitrary limits on your classes is considered bad practice.
You should allow the user to put as many items as they want into your container; if they try to put too many in, it's their job to deal with the std::bad_alloc exception that will be thrown.
|
I don't want the class to cause a crash due to too many values. I realize that it would take 268,435,456 integers (if I did my math correctly) to take up one gigabyte (which is pretty extreme). This value is merely an eighth of a signed integer's maximum value (which is what I am currently using for the length. Should... | How may integers should I allow in my container class? |
If you would like to transfer money between two paypal accounts without approval, then you will need to useImplicit ApprovalinAdaptive Payments.Implicit approval payments, in which your application is both the sender of a payment and the caller of the Adaptive Payments Pay API. In this case, PayPal makes the payment fr... | What I am trying to do is I have a one cron file, which check that the user requested payment if yes then this file transfer payment from admin PayPal account to user's PayPal account (of course only if admin account have money :)).I checkAdaptive Payments, but what I am trying to achieve is transfer money from admin's... | How to transfer money from one PayPal account to another PayPal account? |
<div class="s-prose js-post-body" itemprop="text">
<p>A docker container exits when its main process finishes. </p>
<p>In this case it will exit when your <code>start-all.sh</code> script ends. I don't know enough about hadoop to tell you how to do it in this case, but you need to either leave something running in the ... | <div class="s-prose js-post-body" itemprop="text">
<p>I run a container in the background using</p>
<pre><code> docker run -d --name hadoop h_Service
</code></pre>
<p>it exits quickly. But if I run in the foreground, it works fine. I checked logs using</p>
<pre><code>docker logs hadoop
</code></pre>
<p>there was no err... | Why docker container exits immediately |
0
Popular base images that contain commonly used software for building software are (based on) buildpack-deps https://hub.docker.com/r/library/buildpack-deps/ (e. g. openjdk is based on that)
In your case you could specify FROM buildpack-deps:stretch-scm which is based on... |
I have GitLab, GitLab-CI and gitlab-ci-multi-runner running on different machines. I've successfully added a runner using docker and the ruby:2.1 image as detailed on https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-repository.md
What I'd like to do next is have runners for a minimal... | Docker Image Requirements for a GitLab-CI Runner |
An alternative not already mentioned is the Boost Pointer Container Library.
Boost.Pointer Container provides containers for holding heap-allocated
objects in an exception-safe manner and with minimal overhead. The aim
of the library is in particular to make OO programming easier in C++
by establishing a standa... |
I'm trying to save objects in an stl container (in this case a vector) and want the container to destroy the objects at its destruction, but I can't quite figure out the details.
One way I don't want to do it is simply using it like
vector<MyClass> myVec;
myVec.push_back(MyClass(...));
due to the fact that the constr... | Element Lifetime of STL Containers |
Chances are, you moved the files into the new directories, added the files at their destination, but you did not tell Git to remove the originals.You can do so by typinggit rm <file>for each of the files in the root directory which you'd like removed, or by typinggit add -uwill stage all of the changes (including dele... | I had a bunch of files in a folder and i pushed the whole folder to a github repo.Then, I said to myself, "I should have these files in seperate subfolders"...So, I made some subdirectories, committed the changes and pushed again.Now, my remote repo has the subdirectories with all the files I separated, but it also has... | How to move files to folders in github? |
How can I grant permissions to kube-applier pod to apply configurations in other namespaces?Create, or find, aClusterRolewith the correct resource permissions, then bind theServiceAccountto it using aClusterRoleBindinglike soapiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
# C.R.B. don't ... | I have kubernetes cluster which I created withkopson AWS. I'm trying to usekube-applierto applyyamlconfiguration to my cluster: I created a deployment withkube-applier:apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata:
name: "kube-applier"
namespace: "kube-system"
spec:
# specand started it inkube-syst... | Apply kubernetes configuration from kube-system namespace |
You cannot. Labels are not supposed to be used in this way, and there are no ways of combination labels and metric values.Best course of action in this case would be to split your metric into two metrics:my_metric 123
my_metric_expected_value 123And introduce alerting rule based on expression:my_metric != my_metric_exp... | I have this metric :my_metric{expected_value="123"} 123Using Prometheus, how can create an alert that triggers when the value differs from the labelexpected_value's value ? | PromQL : compare metric value with its label's value |
2
Add iam_user=true&account=<id>& right after ? and before # sign.
e.g.:
https://console.aws.amazon.com/iam/home?iam_user=true&account=111222333444#/users/user.name
Share
Improve this answer
Follow
... |
I'm looking to a way to generate urls/links to specific resources of a given account in the AWS console website.
For instance I want to link to the summary view of a given user in IAM.
The resource URL is the following:
https://console.aws.amazon.com/iam/home?#/users/user.name
All good, but how do I force the browser ... | generate url to feature in aws console of a specific account |
<div class="s-prose js-post-body" itemprop="text">
<p>The <code>Location</code> header does not, by itself, trigger the browser to redirect. The redirect is actually triggered by an HTTP response code that is in the <code>3xx</code> series. <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" rel="nofollo... | <div class="s-prose js-post-body" itemprop="text">
<p>I'm in the process of moving a working apache/mod-php website to nginx/php-fpm.</p>
<p>Under Apache/mod-php, I could use <code>header("Location: $url");</code> to redirect the browser to a different page, such as after a login attempt. After switching to nginx/php-f... | With nginx/php-fpm, location header sometimes ignored by browser. Why? |
My solution was to create a new image based on the official kong image and override the entrypoint like this:#!/usr/bin/env bash
set -e
# Disabling nginx daemon mode
export KONG_NGINX_DAEMON="off"
# Setting default prefix (override any existing variable)
export KONG_PREFIX="/usr/local/kong"
# Prepare Kong prefix
if ... | I have aKong API Gatewaycontainer and apostgrescontainer and I need to check whether postgres has started up and ready from the Kong container before running the migrations. I was thinking of installing the postgres client utilities into a custom image based on the official Kong image usingRUN yum install postgresql -y... | Docker - check if postgres is ready |
The TLB also includes a supervisor flag that indicates if the mapping can be used by regular processes or if it is only usable when a process is running with the supervisor flag set -- i.e., when the process is executing in kernel context.
This supervisor flag allows the TLB to be useful for both the process (it doesn... |
Virtual Memory I: the problem [LWN.net]
http://lwn.net/Articles/75174/
in particular, the hardware's address translation buffer can be shared between the kernel and user space.
I am totally confused about it. Why they can share the TLB when the vm is split? I know there is page global bit in some CPU that
indicat... | What's the advantage of 3G/1G vm split ? 32bit linux kernel |
This is a false positive. SonarQube wrongly considers$_FILES['attachment']['tmp_name']as user-controlled data. According to thePHP documentation,$_FILES['userfile']['name']is user-controlled, but$_FILES['userfile']['tmp_name']is not.You can mark this issue as a false positive in SonarQube.The problem was fixed in Sonar... | I'm using a normal code to upload a file but when I use the functionmove_uploaded_fileit shows me the error in the image.Point #1 says: This value can be controlled by the user.Point #2 says: Taint value is propagatedPoint #3 says: taint value is used to perform a security-sensitive
operationSee my code:if (!empty($_FI... | Upload File Issue - Refactor code to not construct the path from tainted, user-controlled data |
Just enumerate cluster names in regexp. For instance the following filter would select time series withenvoy_cluster_name='name1'andenvoy_cluster_name='name2':envoy_cluster_name=~'name1|name2' | I am trying to run this query in Prometheus. But I need to add "OR" operation in envoy_cluster_name and add another cluster name, so incase a change of cluster name it picks the correct one.Really appreciate if you can tell me how to use OR operator here.https://prometheus.test.com/api/v1/query_range?query=sum(increase... | Prometheus OR Operator |
2
In cases like this you need to restructure your code, so that it works with small chunks of data. Create a small buffer, read the data into it, process it and write it to the Excel file. Then continue with the next iteration, reading into the same buffer.
Of course the Ex... |
I have an code which reads lots of data from a file and writes that to an excel file. The problem im facing is, when the data goes beyond the limit of heap size, its throwing an out of memory exception. I tried increasing the heap size and the program ran normally. But the problem is, there is limited RAM on my machin... | How to avoid Out of memory exception without increasing Heap size on eclipse |
1
It seems like to me that my JVM can only allocate ~2GB heap for all running java apps.
That is not correct. The JVM is capable of asking for and using a >2GB heap.
It must be that Windows is restricting what the Java process can ask for. It may also be that Windows ha... |
I have a Windows 7 laptop, with 16GB RAM. When I run multiple java servers I get OutOfMemory error, however, windows task manager shows that I still have 6GB of free physical memory left. It seems like to me that my JVM can only allocate ~2GB heap for all running java apps.
So I wrote some very simple Java code:
publi... | 64 bits JVM Could not reserve enough space for object heap |
You cannot do it. It is impossible. | When I add sonar.tests I get the tests analysed and the number of tests, I only want the number of tests but not the analysis.sonar-project.properties:sonar.projectKey=xxx
sonar.java.binaries=target/classes
sonar.java.test.binaries=target/test-classes
sonar.sources=src/main/java
sonar.tests=src/test/java
sonar.test.ex... | SonarQube 6.7.7 How to add junit test count to dashboard without analysing tests |
RAPIDS 0.15 release does not support CUDA10.0.
Please update your CUDA package or use RAPIDS 0.14 releaseCommand to install cuxfilter 0.14 using conda :conda install -c rapidsai -c nvidia -c conda-forge -c defaults cuxfilter=0.14 python=3.7 cudatoolkit=10.0 | I am working with a > 5GB CSV file for competition in Kaggle. I am using cudf and cuml for data preprocessing and machine learning. but for visualization, my plan was to use GPU accelerated visualization using Plotly. Since Kaggle docker doesn't include Rapids yet, I am using the following Dataset to install it.https:/... | Unable import "cuxfilter" package in Kaggle Notebook environment |
Now I've seen people have a problem like this in my classes and the most common thing is the person is using vector graphics. Vector graphics use a ton of memory my friend had 14 gb of space need to load some tree's in his flash project because of them being set as a vector graphic. So I would take a quick look at that... | I've got a problem with a Swf that I'm exporting from Adobe Flash CS6: in this Swf there are a lot of animations, mainly made using tweens.
However, while this animations are constantly looped, the quantity of memory used by Flash player continues to grow, and of course at a certain point flash player crashes.How can I... | SWF memory: flash player runs out of memory |
JaCoCo pluginprovides an option to enable the XML report generation:plugins {
id 'jacoco'
}
jacoco {
toolVersion = '0.8.9'
}
jacocoTestReport {
reports.xml.required = true
} | I run SonarQube on Bamboo build withgradlewcommand:./gradlew -Dsonar.projectKey="${PROJECT_KEY}" -Dsonar.projectName="${PROJECT_NAME}" -Dsonar.branch.name="${bamboo_planRepository_1_branch}" -Dsonar.coverage.jacoco.xmlReportPaths=${TEST_REPORTS_PATH} :"${module}":testDebugUnitTest sonarqubeand there is no matter whichT... | How to generate JaCoCo xml reports in Gradle on Bamboo |
If you have no use for the.githubdirectory, one solution is to simply delete it. You can have a look atthisanswer to see what it contains. Many of its contents can simply be moved to the project root (or deleted, if you don't need them).You could theoretically put them in the.gitfolder, but you would not be able to act... | is there a way to move this folder with Issue Templates to .git ?i have more diverse stuff to fill this file list with, this one just takes space for no use . and i don't want to extend editors with file hiding functions . | Change location of .github folder? |
CodePipeline (CP) does not have build-in mechanism for rollbacks. Thus in your case I seethree options:if the target S3 bucket isversioned, you can roll back "manually" by deleting latest version of each object. This way you will effectively move back to a previous deployed version of your application.You have to roll ... | I have a code pipeline in AWS which performers CI/CD for my react app and deploy it into the s3 bucket.Now I am curious how can I achieve a rollback in this flow.my current code pipeline flow is:git bucket(repo) - > Code build(to build the app into static hosting) - > code deploy action(with action provider s3).In cas... | Rollback integration with aws code pipeline which is deploying a React app on S3 |
From what you have shown (which doesn't show how the class is implemented), here is a guess:
Your Test class's copyWithZone: method returns the receiver object itself, without retaining. (Which by the way is a violation of the memory management rules, which says that a method starting with copy must return an owning ... |
For this question:
Test *t1 = [[Test alloc]init];
Test *t2 = [Test new];
Test *t3 = [t1 copy];
NSLog(@"Retain count of Object 1 : %ld",[t1 retainCount]);
NSLog(@"Retain count of Object 2 : %ld",[t2 retainCount]);
NSLog(@"Retain count of Object 3 : %ld",[t3 retainCount]);
NSArray *arr = @[t1,t2,t3];
NSLog(@"Retain ... | Memory management in objective c arrays |
Installing version 0.12.4 (I had 0.12.2.2 before) solved the problem. See How can I install the latest wkhtmltopdf on Ubuntu 16.04? for the steps.
|
When I use wkhtmltopdf (version 0.12.2.4, installed via apt-get) within a Docker container it fails with
QXcbConnection: Could not connect to display
(When I set the environment variable DISPLAY=unix0, I get QXcbConnection: Could not connect to display unix0 which makes sense as no Xserver seems to be installed)
Ther... | How to use wkhtmltopdf with Docker |
Heroku doesn't provide this out of the box, and package.json doesn't natively support environment variables.
One option is to build your dependency as an NPM packages and publish it on a private package repository, e.g. Gemfury, whose Heroku addon has a free plan supporting a single private module.
Briefly, you can pu... |
I would like to remove my user name and personal access token from the package.json file in my React application.
The package being installed is a private remote GitHub repository for which I am the owner.
The request is being made over the HTTPS protocol.
E.g: "react-trello": "https://username:[email protected]/usern... | How to use Heroku config vars with GitHub to install remote private repo? |
After installing theContributions Graphextension, you can go to any project on Azure DevOps -> Boards -> Contributions Graph | Im using Azure repos and where can i find graphs like github in azure devops ? | Where can i find contribution graphs in Azure DevOps |
It's in the documentation for Azure SQL somewhere, if you search for "azure sql firewall allow azure services", but here's what you need to do - create a rule with a start and end address of 0.0.0.0, like this:az sql server firewall-rule create --resource-group <resource group name> --server <azure sql name> -n <any na... | After creating a new Azure SQL server usingaz sql server create, how can I enable the following options through PowerShell(Azure CLI)? | How to enable "Allow Azure services and resources to access this server" through PowerShell (Azure CLI)? |
It really depends on what you are comparing and how.
If you mean is
ptr = malloc(10 * sizeof(int));
slower than:
int arr[10]
ptr = arr;
and then using ptr to access the integers it points at?
Then no.
If you are referring to using arr[0] instead of *ptr in the second case, possibly, as the compiler has to read... |
As known:
ptr = malloc(size);
or in C++
ptr = new Klass();
will allocate size bytes on the heap. It is less efficient than on the stack.
But after the allocation, when we access it:
foo(*ptr);
or
(*ptr)++;
Does it have the same performance as data on the stack, or still slower?
| Does allocation on the heap affect the access performance? |
I think this is the answer. In the documentation for initWithContentsOfFile: it says:
This method loads the image data into memory and marks it as purgeable. If the data is purged and needs to be reloaded, the image object loads that data again from the specified path.
None of the other methods in UIImage mention pu... |
According to the UIImage documentation:
In low-memory situations, image data may be purged from a UIImage object to free up memory on the system.
Does anyone know how this works? It appears that this process is completely transparent and will occur in the background with no input from me, but I can't find any defini... | How does UIImage work in low-memory situations? |
in D an array is essentially a struct with a pointer and a length field and is treated as such
to get the address to the first element you can query the ptr field
|
In C:
int a[10];
printf("%p\n", a);
printf("%p\n", &a[0]);
Yields:
0x7fff5606c600
0x7fff5606c600
Which is what I expect. Now, in D, I'm trying this (obviously no use case, just fooling around):
int[] slice = [...];
writeln(&slice);
writeln(&slice[0]);
Yields:
7FFF51600360
10E6E9FE0
Why the difference? Looks like a... | Why is &array != &array[0]? |
Through testing, I can reproduce this issue:The cause of this error could be the selected service connection, when the service connection is to aGitHub-InstallationToken, I got the same error, as shown below:When I choose the service connection as shown below, everything is normal:You can check the service connections ... | This is a very simple question, but after trying to find an answer for 3 hours I am asking, so I apologize if it is a duplicate.I am trying to add a "Continuous deployment trigger" to my Azure DevOps Pipeline:But after configuring the Branch Filters and trying to save, I get the following error message:"GitHub Could no... | "Resource not accessible by integration" when trying to create trigger |
0
The Fallback Header has to be on it's own line, like so:
NETWORK:
*
(new line after the colon).
Share
Improve this answer
Follow
answered May 14, 2012 at 15:27
codecandiescodecandies
27... |
I am using a manifest file to cache my files. Between these files some are the index.html and some javascript libs.
After I tested my webpage , the files are successfully cached (i validated this with the web inspector), however when I open the page again the non-cached linked resources are not receiving response.
The... | HTML5 cache manifest index.html not loading linked files |
The workaround I got was to give a "777" access to JENKINS_HOME in one pod in the Kubernetes Host. This persisted in all of the other pods that got created too. In this way, everytime my container runs with jenkins user , it was able to create workspace in jenkins_home dir which had nobody user access. | I have created a docker image for jenkins/jnlp and using that in a kubernetes cluster to spin up dynamic slaves. With this, I am able to checkout my code and run build on dynamic slaves.However, when I mention volume(jenkins_home ie /mycom/jenkins) inside the plugin configuration as NAS persistant volume claim , I am o... | Pass Security Context to Jenkins-Kubernetes Plugin |
Instead of using HTML entities like and (as others have suggested), you can use the Unicode em space (8195 in UTF-8) directly. Try copy-pasting the following into yourREADME.md. The spaces at the start of the lines are em spaces.The action of every agent <br />
into the world <br />
starts <br />
from t... | I'm struggling to add empty spaces before the string starts to makemy GitHubREADME.mdlooks something like this:Right now it looks like this:I tried adding<br />tag to fix the new string start, now it works, but I don't understand how to add spaces before the string starts without changing everything to . Maybe the... | How to add empty spaces into MD markdown readme on GitHub? |
You could use a condition to check if the requested file exists.RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php?page=$1 [L,QSA]I tested this code withhtaccess.mwl.befor this requested urlhttp://mydomain.co.uk/mypage?page=mypageand it redirects tohttp://mydomain.co.uk/index.php?page=my... | I have a rewrite rule for my site that passes everything after the domain name as a parameter:RewriteRule ^([0-9a-zA-Z_=/&\-]+)?$ index.php?page=$1 [L,QSA]But when going to:mydomain.co.uk/mypage..it is appending the query string after the URL (In the browser address bar) like this:mydomain.co.uk/mypage?page=mypageI t... | Stop query string from being appended to URL |
As noted by Adrian Klaver,\gsetis available only inpsql.Try something like this, instead:cur.execute("""
with get_uri as (
select aws_commons.create_s3_uri(
'data-analytics-bucket02-dev',
'output',
'ap-southeast-1') AS s3_uri_1
)
select e.... | Im trying to run the below postgres sql queries using Python.SELECT aws_commons.create_s3_uri('data-analytics-bucket02-dev','output','ap-southeast-1') AS s3_uri_1 \gset"SELECT * FROM aws_s3.query_export_to_s3('SELECT * FROM sample_table', :'s3_uri_1');"The below is my Python Code:print('PostgreSQL database version:')
... | Executing Postgresql Query in Python |
If you are open to use other Json parser then you can try Jackson's Streaming API which can be used to parse huge JSON upto even giga bytes of size.It can be used to process huge files without loading them completely in memory.It allows get the data you want and ignore what you don't want also
Read more: https://githu... |
I am trying to parse large JSON file with JSON Simple and i am getting out of memory errors. I am on Windows 10 and my laptop has an 8gb RAM. The file is 250mb, i will also need to parse a 2gb file. I also tried with StrinBuilder but then i am getting memory errors on StringBuilder. Here is my code with StringBuilder:... | Parse large JSON file with JSON Simple (OutOfMemoryError) |
In the first one parameters--dry-run -o yamlare applied to the command you run in the container (sleep), in the second one, they are applied to your kubectl executionShareFollowansweredApr 23, 2020 at 9:52SmasherHellSmasherHell88499 silver badges2020 bronze badges0Add a comment| | I am tryng to create a pod using kubectl run by creating an yaml file, where first command is creating container but showing state as error and second one is creating with out any issue. what is the difference between these commands?master $ kubectl run --restart=Never --image=busybox static-busybox --command -- sleep... | Understanding kubectl run command |
You can guarantee session affinity with services, but not as you are describing. So, your customers 1-1000 won't use pod-1, but they will use all the pods (as a service makes a simple load balancing), but each customer, when gets back to hit your service, will be redirected to the same pod.Note: always within time spec... | Say I am running my app in GKE, and this is a multi-tenant application.I create multiple Pods that hosts my application.Now I want:
Customers 1-1000 to use Pod1
Customers 1001-2000 to use Pod2
etc.If I have a gcloud global IP that points to my cluster, is it possible to route a request based on the incoming ipaddress/... | Is it possible to route traffic to a specific Pod? |
Moved from comments since this is now solved.
This is likely a github problem that you should report. I know when they first introduced the svn interface it had similar problems.
|
I recently moved a project on github and I still use this library in some svn projects as external. However I can't get github svn interface working at this time. If I run
svn list http://svn.github.com/fabn/zle.git
I obtain this error
svn: Server sent unexpected return value (500 Internal Server Error) in response to... | Github svn interface: Server sent unexpected return value (500 Internal Server Error) in response to PROPFIND request |
The property issonar.qualitygate.It was not documented because this is generally not a good idea to change the quality gate that should be used during a standard analysis - but it's true that it can be useful with the build breaker onpreviewanalyses.I updated the documentation. | I am using Jenkins to kick off Sonar-runner for analyzing projects.Now I use theBuild Breakerplugin.
This breaks a build when a quality gate is reporting that the quality is below/above given values.I'd like to change the quality gate used by the Sonar-Runner, on a per-job basis in Jenkins.
Looking up atAnalysis Parame... | Change: Quality Gate from Jenkins (sonar-runner) |
This is the configuration of lambda function you have created. So click on the lambda function first. After that you will get a window called function code. There you have to write you handler. After that you can test like you did before. | I have deployed anode jsapp toAWS lambda. I have the following code in my test event :function getRoutes(callback){
request('http://localhost/php-rest/api.php/routes?filter=route_short_name', function(error, response, body) {
if (!error && response.statusCode == 200) {
message = JSON.stringify(J... | aws lambda: test event configuration: Error in JSON event |
You could useWindows Authentication, so only internal users can access the site.ShareFollowansweredDec 9, 2013 at 12:45Joe RatzerJoe Ratzer18.3k33 gold badges3737 silver badges5151 bronze badges0Add a comment| | I have a webserver (IIS) that is both reachable externally and internally.A few websites on it are also reachable internally and externally.Now I want to create a new site, that only can be reached internally.I don't want to work with username/password due to security reasons.Can this be done in the firewall, of any ot... | make a website invisible externally |
The new operator, and new[] operator should throw std::bad_alloc, but this is not always the case as the behavior can be sometimes overridden.
One can use std::set_new_handler and suddenly something entirely different can happen than throwing std::bad_alloc. Although the standard requires that the user either make m... |
Can the new operator throw an exception in real life?
And if so, do I have any options for handling such an exception apart from killing my application?
Update:
Do any real-world, new-heavy applications check for failure and recover when there is no memory?
See also:
How often do you check for an exception in a C++ ... | Can the C++ `new` operator ever throw an exception in real life? |
Please note that it isn't recommended to send application data to Prometheus via remote_write protocol, since Prometheus is designed to scrape metrics from the targets specified inPrometheus config. This is known aspull model, while you are trying to push metrics to Prometheus akapush model.If you need pushing applicat... | I am trying to find a working example of how to use theremote writereceiver in Prometheus.Link :https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiverI am able to send a request to the endpoint (POST /api/v1/write) and can authenticate with the server. However, I have no idea in what format I ... | 'remote write receiver' HTTP API request in Prometheus |
As the error states, you can either do a filegroup backup or you can bring the full text data catalog online. You can identify the location of the fulltext catalog (or at least, where it's supposed to be), using the following:
SELECT sf.filename
FROM sys.fulltext_catalogs ftc
JOIN sys.sysfiles sf ON ftc.[file_... |
My organisation uses Microsoft CRM 3.0, and I am attempting to backup the database. The following error is preventing me from doing so, does anyone know how to resolve this issue?
Error:
System.Data.SqlClient.SqlError: The backup of full-text catalog 'ftcat_documentindex' is not permitted because it is not online. Che... | How do you backup CRM3.0 when the 'ftcat_documentindex' is offline? |
Try playing withgit config core.autocrlf trueorgit config core.autocrlf falsesetting.ShareFolloweditedMay 20, 2013 at 18:29answeredMay 20, 2013 at 17:57Ruslan OsipovRuslan Osipov5,70544 gold badges2929 silver badges4444 bronze badges1Windows/Unix line endings is clearly the source of the problem, answer provides one of... | It's my first time using github and I've faced an annoying problem with it.Me and my friend are working on a web project on github and we've worked on it for over a month without a problem. I've installed github's windows application on multiple computers and all of the sudden, they are having the exact same problem.Wh... | Github doing unwanted changes on index.html |
It seems this issue got fixed: | I'm trying to query the branch protection rules which has the similar patterns using wildcards. Any suggestion are welcome.query {
repository(owner:"user",name: "repo") {
branchProtectionRules(first: 10) {
nodes {
pattern
}
}
}
}O/P:{
"data": {
"repository": {... | Pattern matching in GitHub GraphQL query |
You need to useauto-discovery(either Docker or Kubernetes) withtemplate conditions.You will probably have at least two templates, one for capturing your containers that emit multiline messages and another for other containers.filebeat.autodiscover:
providers:
- type: kubernetes
templates:
- conditio... | in our cluster some apps are sending logs as multiline, and the problem is that the log structure is different from app to app.How can we set up an 'if' condition that will include themultiline.pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}'
multiline.negate: true
multiline.match: afterIn it?Our code:filebeatConfig:
fil... | elasticsearch - filebeat - How to define multiline in filebeat.inputs with conditions? |
Providing developer with a copy of repository to work with is not docker's responsibility. Many people do the other way - you putDockerfileor a script to pull (or build) and run your container into the sources of your project. | Suppose I have a python web app.I can create docker file for installing all dependencies.
But then (or before it if I have requirements for pip) I have like two different goals.For deployment I can just download all source code from git through ssh or tarballs and it would work.But for a developer machine it wouldn't w... | How to use docker for deployment and development? |
13
Maybe something more difficult to setup than Webdis but you can do that directly in the nginx daemon with some extra modules like redis2-nginx-module. You will have to recompile nginx.
There is some good examples of configuration on the home page.
For instance :
# GET /... |
I am using nginx to pass requests to a Node app. The app basically acts as a remote cache for html (checks to see if what the user is requesting is in the redis db, if it is just show that, if not grab it and store it in the redis cache and serve it up.)
I was curious if there was anyway to bypass hitting the Node ap... | Using nginx to serve content directly out of a redis cache |
You are trying to compare different storage systems for different use cases with different pricing models.
EFS is a filesystem for which you don't need to provision storage devices and can access from multiple EC2 instances. EFS might work fine for your use case, but you will need to manage files. Meaning you will nee... |
My web application requires extremely low-latency read/write of small data blobs (<10KB) that can be stored as key-value pairs. I am considering DynamoDB (with DAX) and EFS and ElastiCache. AWS claims that they all offer low latency but I cannot find any head-2-head comparison and also it is not clear to me if these t... | AWS Ultra Low Latency Read/Write Data Store: EFS vs Dynamodb DAX vs ElastiCache |
I see now:AttributeNamereturns AWS's attributes like "ApproximateFirstReceiveTimestamp"MessageAttributeNamereturns message (user specified) attributes | The SQS "ReceiveMessage" endpoint has two params that seem to do the same thing and I don't understand the API docs. Can someone explain the difference:https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessage.htmlAttributeName.N
A list of attributes that need to be returned along with ea... | What is the difference between "MessageAttributeName.N" and "AttributeName.N" in SQS ReceiveMessage |
Not really.Assuming you are referring to HPAs, you can define a behaviorscaleUp Policyonly if you are usingK8s 1.18 or later (v2beta2HPA API). For example:behavior:
scaleDown:
stabilizationWindowSeconds: 300
policies:
- type: Percent
value: 100
periodSeconds: 15
scaleUp: 👈
stabilization... | Kubernetes 1.18 has a very nice ability to change auto-scaling going up through the behavior and scaleUp set. For 1.17, there's a way to control downscaling. Is there a parallel way to scale up faster? We are expecting very variable loads and our cluster isn't scaling up fast enough.I am not sure what other info to inc... | Kubernetes scaling up not fast enough (for K8 1.17 or below) |
Whether or not you provide SSH access, it'll always be possible for your users to mount the root EBS-volume of your AMI on another EC2-instance to investigate its contents, so disabling SSH or making certain files unreadable for an SSH-user doesn't help you in this regard.Instead of trying to to keep users away from yo... | I'm planning to start a small business and submit an Linux AMI to Amazon's AWS Marketplace. As I'm reading the seller's guide, I see this:AMIs MUST allow OS-level administration capabilities to allow for compliance requirements, vulnerability updates and log file access. For Linux-based AMIs this is through SSH." (6.2... | Securing Folder on EC2 Amazon Marketplace AMI |
The RFC7231 mentioned that the 403 (Forbidden) status code indicates that the server understood the request but refuses to authorize itlink.So the firewall rules set up inside GCP are working fine becuase is allowing the connection to your VM but the IP 10.20.1.4 it seems has a kind of restriction to access so, I sugge... | Problem DescriptionOur SRE had setup a firewall for a pool of VMs to allow 10.0.0.0/24 on certain ports.When I connect through VPN, I get assigned 10.20.10.1 and I can access the target.
When a coworker connects through VPN, he gets assigned 10.20.1.3 on one machine and 10.20.1.4 on another. He can access target on fro... | GCP VM has firewall to allow /24 but some IPs get rejected |
Once you have started your container withhello-world-3image, you can just run acurlcommand from your host (on another terminal) to access the specific endpoint exposed:curl -X POST http://localhost:9000/2015-03-31/functions/function/invocations -d '{}'You can find that at the end of the documentation here :https://hub.... | I have a very simple Lambda function that I'd like to test locally.app.pydef lambda_handler(event, context):
return "hello"DockerfileFROM public.ecr.aws/lambda/python:3.8
COPY app.py .
CMD [ "app.lambda_handler" ]After I build my image withdocker build -t hello-world-3 .I can't run it locally:docker run -p 9000:808... | Using container image for Lamda function |
I think that there is something wrong with the package. I have the same error. Then, I tried to run the example available in the help of the function dredge of the MumIn package to see what I am doing differently and I get the same error even using the example below:fm1 <- lm(y ~ ., data = Cement)
dd <- dredge(fm1)The ... | I am trying to do model selection for generalized additive mixed models (made usinggamm4using theMuMInpackage in R.
I am essentially trying to followthispiece of literature for model selection with MuMIn and gamm4.I am creating a model with 9 variables, and a random individual effect - which looks likes this:library(ga... | Error in model selection (gamm4) dredge function (MuMIn R package): family not recognised, model skipped |
HAProxy Ingress uses ingress objects to exposes http services in thebindconfigured port; dochere. The configuredservicePorthas the port name or number of the internal service, which does not reflect in the haproxy's listening ports. TLS's sni extension is used here to choose a certificate to start the handshake if usin... | I need to scrape a Prometheus exporter running in a pod. It runs on port 9098, the exporter is working fine and i can manuallyscrapeit from the host it is running on. The issue is with the ingress. I am trying to get the ingress to allow outside scraping on port 9098 (it is http and TCP). Here is my ingress yaml.ap... | haproxy-ingress load balance http on non standard port |
linkerd vizuseskubectl port-forwardunder the hood, which itself relies on thesocatbinary to be installed in the kubernetes host. It appears Minikube doesn't providesocat, at least in older versions. You can try a newer Minikube version, or I'd recommend instead switching tokindork3dwhich is what the linkerd project use... | I have minikube running on AWS EC2 instance, installed linkerd and meshed with the application. And installed linkerd viz, when i try to view the dashboard using the commandlinkerd viz dashboard &gets the following error. it says socat not found, what excatly it was?Waiting for linkerd-viz extension to become available... | Waiting for linkerd-viz extension to become available |
This code worked for me. You can use it to receive and process DynamoDB events in a Lambda function -public class Handler implements RequestHandler<DynamodbEvent, Void> {
@Override
public Void handleRequest(DynamodbEvent dynamodbEvent, Context context) {
for (DynamodbStreamRecord record : dynamodbEven... | I'm trying to create a DynamoDB trigger using DynamoDB Streams and AWS Lambda. I researched a lot but I couldn't find any way to read and process a DynamoDB Stream event in Java 8. I'm completely new to both these technologies so don't know how to work with this.Essentially, what I want to do is create a record in tabl... | Setup DynamoDB Trigger using Lambda |
I think it actually is more related to the setup of storage on your cluster.There are several storage options as mentioned atOpenShift Origin: Persistent StorageIf you run it locally, you could useNFS(seeOpenShift Origin: Persistent Storage using NFS).If you run it in minishift or single node cluster, you can useHostPa... | I'm trying to run thisZookeeper Openshift exampleor the equivalentkubernetes one, but I end with errors such as:FirstSeen LastSeen Count From SubObjectPath Type Reason Message
--------- -------- ----- ---- ------------- --... | Kubernetes/Openshift Statefulset example: cannot find volume plugin for alpha provisioning |
The instructions say that you should runmake build_prodThe makefile does not define thedisttarget. | I am trying to install a Github project namedoTranscribeon my system, this is the first time I am installing any project from Github.I followed the given process to install the project:-Install Node.js and NPMRun npm install to install dependenciesRun make build_prod to compile the dist folder.I successfully completed ... | make command not working in windows command prompt |
You have the notion ofchecks for a GitHub Pull RequestThat includes a build report, with anautomatic buildwhich could, as part of this build, check if the version has changed or not (compared to the target branch).If not, the build can stop right there in failure.An alternative approach would be to force the update of ... | Working on a python package (in github), where the version is kept in the file:<package>/__init__.pylike this:__version__ = "1.0.3"How to automatically disallow pull request to master if this file has no changes? | Automatically check git pull request for file change |
In the end, it ended up being that my EC2 instances were not being assigned public IP addresses. It appears ECS needs to be able to directly communicate with each EC2 instance, which would require each instance to have a public IP. I was not assigning my container instances public IP addresses because I thought I'd ha... |
I've got an EC2 launch configuration that builds the ECS optimized AMI. I've got an auto scaling group that ensures that I've got at least two available instances at all times. Finally, I've got a load balancer.
I'm trying to create an ECS service that distributes my tasks across the instances in the load balancer.
Af... | Why can't my ECS service register available EC2 instances with my ELB? |
You have two separate lists ofvolumes:and also two separate lists ofvolumeMounts:. When Kubernetes tries to find the list ofvolumes:in the Pod spec, it finds the last matching one in each set.volumes:
- name: configs-volume
volumes: # this completely replaces the list of volumes
- name: atp-secretIn both cases you nee... | I have references to both Secrets and ConfigMaps in my Deployment YAML file. The Secret volume is mounting as expected, but not the ConfigMap.I created a ConfigMap with multiple files and when I do akubectl get configmap ...it shows all of the expected values. Also, when I create just ConfigMaps it's mounting the volum... | ConfigMap volume is not mounting as volume along with secret |
No, std::launder may only be necessary in the allocator itself, not at the point where it's used.
Note the effect of allocate:
a.allocate(n)
Result: XX::pointer
Effects: Memory is allocated for an array of n T and such an object is created but array elements are not constructed.
[Example 1: When reusing storage den... |
I have a code similar to the following which uses an allocator to allocate raw memory, and then uses std::uninitialized_default_construct_n (or another function of the same family) to construct objects in it.
std::allocator<T> allocator;
T* buffer = allocator.allocate(n);
std::uninitialized_default_construct_n(buffer,... | Is std::launder needed after std::uninitialized_default_construct |
5
I was facing same issue as I had two account connected in the Team for signing in capabilities.
my solution, remove other account and keep main account for Xcode Cloud.
-Tenant
Share
Follow
ans... |
Since Xcode Cloud was launched last year I'd been able to connect from the Xcode wizard to my Github.com account and the CI worked like a charm, however today I'd been trying to create an Xcode Cloud for a new app and it doesn't finish the wizard flow throwing an error
Connecting Xcode Cloud with your source control p... | Can't create Xcode Cloud flow from a Github.com repository |
The -m switch needs to be followed by the commit message, so when passing several switches to the command, m should be the last. git commit -am "Sample commit" works. Or just specify -a and -m "Sample commit" separately.
|
I am new to git and I am getting the error below:
-bash-4.2$ cat README.md
# demo-project
Hello World.
Adding another line to demonstrate change!
Added one more line 10 Aug -2018 4.46 PM
-bash-4.2$ git commit -ma "Sample commit"
error: pathspec 'Sample commit' did not match any file(s) known to git.
-bash-4.2$ ls
R... | error: pathspec 'Build commit' did not match any file(s) known to git |
If you really want to use a shell command for that you could go for
$ git clone https://<YOUR_REPOSITORY_URL>.
However, if you are using a Jenkins pipeline job you might consider using following command in your Jenkinsfile:
stage('Checkout') {
git branch: '<BRANCH_NAME>', credentialsId: '<JENKINS_CREDENTIAL_ID>',... |
I'm running a Jenkins job on a GitHub project (Project A), as part of this job I want to checkout another different GitHub project (Project B) using shell script command
| what is the shell script command to checkout a project from github |
1
As several people already mentioned, you are trying to do something complex that would need troubleshooting in multiple areas. I will share some steps to approach this, but please consider the following:
You are using quite a complex solution for what might be a simple ... |
I have this sample R scraper script (I can't use actual website):
#!/usr/bin/Rscript
library(RCurl)
library(httr)
library(rvest)
library(lubridate)
library(stringi)
new_files <- Map(function(ln, y, bn) {
fun1 <- html_session(URLencode(
paste0("https://example.com", ln)),
config(ssl_verifypeer = FALSE))
... | Getting java.io.IOException errors running an R scraper script |
EKS node group would create an auto scaling group to manage the worker nodes. You need specify the minimum, maximum and desired size of worker nodes. Once any instance is stopped, the auto scaling group would create new instance to match the desired instance size.Check below doc for details,https://docs.aws.amazon.com/... | UPDATEDFollowing theAWS instance schedulerI've been able to setup a scheduler that starts and stops at the beginning and end of the day.However, the instances keep being terminated and reinstalled.I have an Amazon Elastic Kubernetes Service (EKS) that returns the following CloudWatch log:
discovered the following log i... | How to prevent my EC2 instances from automatically rebooting every time one has stopped? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.