Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
17
You have two options, using dynamo db atomic counters or using optimistic locking at the time of incrementing the counter.
Documentation for atomic counters:
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html#WorkingWithItems.Atomic... |
I am trying to implement the auto -increment counter for hash key in dynamo db and my code fails for concurrent transactions. any help to implement the feature will be appreciated. I am new to stack over flow might be not able to specify it correctly. Any implementation will be helpful.
| Auto-increment counter in Dynamo DB |
You may (!?) be able to leverage the fact that Prometheus implements metric (!) names as a special label name__name__.Your metricsmessage_received(sic.) andmessage_sentare thus both accessible through the single query:{__name__=~"message_(received|sent)"}However, this yields 2 metrics with the same labels when name (__... | I wanted to Visualize two Prometheus Query in Grafana in one table as a raw list. the two queries have the same fields. the queries areincrease(message_recieved[$_range])andincrease(message_sent[$_range])When I tried to use transformation merge it visualized them in one raw and two extra columns "value A" and "value B"... | Visualize Multiple Prometheus query in one table |
It makes very little sense to use a cache in front of MongoDB if you are using it for reads only. An extra cache is just going to take up more memory. MongoDB uses memory-mapped files and the Operating System will keep the most requested data in memory. If all of your data fits in memory, then MongoDB will returns all... |
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 10 years ago.
... | How to cache all the data files of mongodb? [closed] |
) Yes2) Yes, but be careful here: you don't want to change name server for your (root) domain name like they did at 2:58 of that video. Instead you have to go to DNS service provider's console (DNS service provider may or may not be the same place where you registered your domain - from mijndomein.nl web site it looks ... | My website's domains are currently managed by a domain provider calledmijndomein.nl. The aws hosted services are connected simply by subdomains using elastic-IPs. Because of some infrastructural changes, I'd like to start using Route53 for certain subdomains. As there are several other things managed by the domain prov... | Managing only a subdomain in Route53 |
It is not recommended at all to touch database. Only UI and web services must be used to prevent from having corrupted data. | I know i can deleteSonarqubeproject from sonarqube web UI with admin credentials.I want to know whether can we delete project by logging into MySQL DB?Thanks, | How to delete a sonarqube project from mysqldb? |
git rm -r --cached .
git add -A
git commit -am 'Removing ignored files'The first command will un-track all files in your git repository.The second command will then add all of the files in your git repository, except those that match rules in your .gitignore. Thus, we have un-tracked several files with just two command... | I have just come across a situation where I have added all the files to git hub withgit add .command. However there are few files like I do not want to add to git hub like.gitignore which has .vscode .env and nodemodulesbut the issue is they do keep adding all the time when I perform thegit add ..I tried to perform ce... | How to remove the file from github and ignore/untrack while you add next time? |
Is it a universal rule that C++ stores variables in memory in the same order as are in the source?
No. Such rule does not exist in C++ for variables in general.
However, member variables with same access control are stored in the same order as declared, yes. The order between members with different access control is... |
This question already has answers here:
Struct Reordering by compiler [duplicate]
(8 answers)
Closed 3 years ago.
Is it a universal rule that C++ stores variables in memory in the ... | Consecutive layout of member variables in memory? [duplicate] |
I had a similar issue today and here are the steps I followed to investigate :-I modified line no 133 at .git/AWSDevTools/aws/dev_tools.py to print the exception likeexcept Exception, e:
print e
* Please make sure of spaces as Python does not work in case of spaces.I ran command git aws.push again
and here is the ... | When I would like to push incremental changes to the AWS Elastic Beanstalk solution I get the following:$ git aws.push
Updating the AWS Elastic Beanstalk environment None...
Error: Failed to get the Amazon S3 bucket nameI've already addedFULLS3Accessto my AWS users policies. | elastic beanstalk: incremental push git |
ÿþis theByte Order Markof a file encoded in little-endian Unicode format. Try this:$cmd = "& 'C:\wamp\bin\mysql\mysql5.6.12\bin\mysqldump.exe' -u ipbform -p123123 wiki"
Write-Host $cmd
Invoke-Expression $cmd | Out-File $backupFilePath -Encoding ASCII | $d= Get-Date
$dString = $d.Year.ToString() + "-" + $d.Month.ToString() + "-" + $d.Day.ToString() + "_" + $d.Hour.ToString() + "-" + $d.Minute.ToString() + "-" + $d.Minute.ToString()
$backupFilePath = "C:\wamp\backupFileName_" + $dString + ".sql"
$cmd = "& 'C:\wamp\bin\mysql\mysql5.6.12\bin\mysqldump.exe' -u ipbform -p1... | PowerShell MySQL Dump Script does not dump correctly |
1
Well there is no such thing as failed/errorneus container. Docker image can have default ENTRYPOIN or CMD which executes as docker container is started but when command ends docker lifecycle ends as well.
I assume you run some server app in docker container which serves f... |
I am running a jar package within a container by docker. I spot when there is database connect timeout issue or kafka connect issue, the container will fail. However, I will be fine if I print java error log to console or log file. Anyone can clarify the logic to define a container as failed/error, Thanks!
| what will cause container failed and exit |
Try redirecting first, then rewriting. That is, put these mobile check rules in front of the rewrites.That way, if it's mobile, and m=t isn't there, it will do the 302 redirect with m=t added. That will then come through again, skip these rules (since m=t is there), and continue on wiht the normal rewrites.I'm not enti... | I'm trying to redirect to a "mobile" version of the site, done by the following:RewriteCond %{HTTP_USER_AGENT} "ipad|iphone|ipod" [NC]
RewriteCond %{HTTP_COOKIE} !^.*mobile.*$ [NC]
RewriteRule ^$ /?m=t [L,R=302,co=mobile:true:.domain.com]
RewriteCond %{HTTP_USER_AGENT} "ipad|iphone|ipod" [NC]
RewriteCond %{HTTP_COOKIE... | Apache Redirect after a RewriteRule |
To answer my own question, the answer isno.I found this in the Recomendation page: | I am currently looking into purchasing a bunch of ElasiCache reserved instances.I know from EC2 and RDS, that it does not matter if you purchase e.g. at3.mediumor 2t3.smallinstances, because the reserved instances aresize-flexibleIs this also the case for reserved ElasiCache instances?I can not find any hint about ithe... | Are AWS ElastiCache Reserved instances size-flexible? |
It looks like your domain was 'parked' with GoDaddy at the time you tried to export you zone file.>>++PARKED1++<<is an internal variable which GoDaddy use in there DNS Db.The actual record is anArecord and you should just replace>>++PARKED1++<<with the external IP address of your hosting provider. (e.g 1.1.1.1)After th... | I am trying to upload zone file from godaddy to AWS, when I copy paste the zone file content to AWS and click upload, the following error appeared:Error parsing zone file: Error in line 38: Invalid address: >>++PARKED1++<< (encountered after 1 correct records)
In line:
@ 600 IN A >>++PARKED1++<< | Importing zone file from godaddy to AWS encountered this error |
(For people who may need it in future)Well, I asked question on their git-hub repository.Good to know they are responsive.And the creator says its not possible to point any.stylelintrcat this moment.Also to apply a set of rules one need to create newQuality Profileand set that as default for respective repository in so... | I am usingSONAR-CSS-PLUGINto check allSCSSfile in my repository.As it comes with default set of 100+ rules, at this moment am not willing to apply all rules in one go as as there is legacy code too and it's reporting many errors.I would like to incremental by applying a set of rules (lets say 10) everyweek.I am usingTe... | Analyze SCSS with SonarQube on TeamCity |
(EDIT: Looks like others, includingJeff Atwood, have created tools to do this.)Ok, figured out that it's hard to recursively search subfolders and delete those folders matching a pattern using a batch file andcmd. Luckily, PowerShell (which is installed on Windows 7 by default, IIRC) can do it (kudos):get-childitem C:\... | I want to do a backup of my Projects folder. It mostly contains sub-folders for .NET projects (VS2005, VS08, and VS10).What should I delete before doing a backup (e.g.TestResults,bin,obj); if there is something I shouldn't delete but should ignore, what might that be; and, most importantly, how best to automate the who... | Clean up .net project folders before performing backup |
Probably not, and for good reasons. SSH keys should be unique and private per user. This is both for identification and security.
Your ssh key is how Github identifies you. When you connect to Github via SSH you use a URL like [email protected]:org/repo.git. The git@ part means you, and everyone else, is connecting as... |
Is it possible to deploy one SSH key on organization level? That is, using this key the user would be able to access all repositories under this organization.
I tried to use the same key for multiple repositories but it's not possible (GitHub says key is already in use)
Thanks.
| Deploy one SSH key for the entire organization |
Please check the following link:How do we control web page caching, across all browsers?There are different ways to do that:If you want to use ahtaccessfile, add the following line to it:<IfModule mod_headers.c>
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set... | I have a simple website with css and html, everytime I upload new content it takes days to refresh. Is there a line of code that forces the browser to reload my code? I have a pdf link which changes week to week. I don't know if to force the entire code or just force the pdf link.
Thanks | How To Force Reload Cached HTML Files |
If the path were invalid, you'd get a 500 error or something. Since the browser prompts for password, most likely the path is correct. However You need to make sure you generated the htpasswd correctly. Check this-http://www.htaccesstools.com/htpasswd-generator/ | I'm trying to password protect a directory on my site. I can get the .htaccess working so that when I visit the directory a password prompt is shown, however when I put the correct credentials that I've stored within my .htpasswd file I am not granted access. The password prompt just pops up again.I believe it's a prob... | htaccess not finding .htpasswd file |
You can use a regex capture group to match against dynamic uris :RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^view/(.*)/?$ test.php?view=$1 [NC,L] | I am trying to brows localhost/view using apache rewrite rule bellow and i am getting output of 14. But this 14 value is static i want to put value from localhost/view this URL which will processed by test.php?view=$value this url. how to do it?RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FI... | Htaccess hide original processing file in php |
I would go through the packet capture and see if there are any records that I know I should be seeing to validate that the filter is working properly and to assuage any doubts.That said, please try the following filter and see if you're getting the entries that you think you should be getting:dns and (ip.dst==159.25.78... | I am new to wireshark and trying to write simple queries. To see the dns queries that are only sent from my computer or received by my computer, i tried the following:dns and ip.addr==159.25.78.7where 159.25.78.7 is my ip address. It looks like i did it when i look at the filter results but i wanted to be sure about th... | How to filter wireshark to see only dns queries that are sent/received from/by my computer? |
Design-related services weredropped in version 5.2. | I liked the package design (later renamed to file design) feature in SonarQube to detect cycles inside my application. See this old blog post:http://www.sonarqube.org/fight-back-design-erosion-by-breaking-cycles-with-sonar/In the recent 6.0 version of SonarQube I can't find this anymore, there is a design plugin but th... | Status of package / file design feature |
Based onPrometheus documentation, you should include the port number of the host on your configmap data, see below:apiVersion: v1
kind: ConfigMap
metadata:
name: prometheus
data:
prometheus.yml: |
global:
scrape_interval: 1s
scrape_configs:
- job_name: metrics-server
scheme: https
... | I want to scrap metrics from the default kubelet and metrics-server with Prometheus in the kube-system namespace. How can I accomplish that?I tried to use this configuration, but it didn't work. I have: Get "https://InternalIP:443/metrics": dial tcp: lookup InternalIP on 10.96.128.2:53: no such host.apiVersion: v1
kind... | Scrapping from the default kubelet and metrics-server with Prometheus |
The normal approach is that your images are coming from a registry that is reachable from all nodes, either a public one like Docker Hub or GitHub Packages or a private one hosted locally (sometimes even inside the cluster).Technically youcouldskip that and manually distribute images to nodes some other way (for exampl... | Closed.This question does not meetStack Overflow guidelines. It is not currently accepting answers.This question does not appear to be abouta specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic onanother Stack Exchange site, ... | Kubernetes & Terraform: installing to all K8s nodes to prevent ImagePullBackOff [closed] |
Couple of things:Try replacing your smart quotes“ ”in the first two lines:$ export AWS_ACCESS_KEY_ID="foo"
$ export AWS_SECRET_ACCESS_KEY="bar"Your default region string is incomplete. Try this:$ export AWS_DEFAULT_REGION="us-east-1" | I am trying to spin up an AWS Cluster. I am running the same code I always am but it is no longer working. The code is this, and I am running it in the command line on mac osx.$ export AWS_ACCESS_KEY_ID=“foo”
$ export AWS_SECRET_ACCESS_KEY=“bar”
$ export AWS_DEFAULT_REGION= "us-east-1d"
$ /Users/xxxxx/Downloads/spark-1... | Creating EC2 Cluster: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128) |
I'm afraid I've come up against one of the limitations of Kustomize.The State of Kubernetes Configuration Management: An Unsolved Problem | by Jesse Suen | Argo Projecthas this to say under "Kustomize: The Bad":No parameters & templates. The same property that makes kustomize applications so readable, can also make it ... | Lets say I need to create environment variables or ConfigMap entries like this:- name: JDBC_URL
value: "jdbc:db2://alice-service-a:50000/db1"
- name: KEYCLOAK_BASE_URL
value: "http://alice-keycloak:8080/auth"Wherealice-is the namePrefix. How do I do this using Kustomize?The containers I use actually do need referen... | How to use Kustomize and create an env like: "http://${namePrefix}service-a/some-path" or "jdbc:db2://${namePrefix}service-b:${dbPort}/${dbName}" |
A tag is an attribute of a specific commit on a single repository.For that reason you cannot create tag across multiple repositories.The only think you can do is to create the same tag on all of them. | I have to manage tags for one project. This project contains three repositories:Desktop app (ElectronJS)Web app (React)Backend app (NodeJS)Now after each build of the desktop app, I have to create a git tag. So, How to create a tag for all repo? Here, I'm confused because I have to create a tag for all the repos, not o... | How to manage tags while working with multiple repositories |
In order to do so you need to set the Content-Disposition header:
Content-disposition: attachment; filename=song.mp3
I don't think this is possible with S3Fox. You could use Bucket Explorer (not free) or write a script to upload the files.
|
I'm using Amazon S3 to put the mp3 file then allow our site visitor to download the mp3 from Amazon AWS. I use S3Fox to manage the file, everything seems working fine until recently we got many complaints from visitor that the mp3 was streamed via the browser instead of displaying browser save dialog.
I try for some m... | Amazon AWS S3 to Force Download Mp3 File instead of Stream It |
Directly through the console or the api you can't.It is possible to create a keypair using external tools and import it. You can try to create the keypair with password and then import it using the console or the api.For more information take a look athttp://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.htm... | Is it possible to use the AWS Management Console to create an ssh key pair that requires a passphrase? I can create a key pair and associate it with an ec2 instance, but I'm never given the option to also set a passphrase for the key. | AWS ssh key pair with passphrase |
You need to merge the remote branch into your current branch by running git pull
|
I am working on a large project, and have two computers I'll be using to do so. I created the initial project on my iMac, and want portability to work on it with my laptop.
So far I cloned the repo, using:
git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
I delete a few folders and go to push to URL of init... | Github, How to add/update/delete from same Repo on Multiple Machines |
In my case, GitHub was down by the time I was trying to push.Just checkhttps://www.githubstatus.comto know about GitHub site status.When it's up you'll be able to push.ShareFolloweditedMay 4, 2023 at 15:57Benjamin Loison4,16444 gold badges1818 silver badges3636 bronze badgesansweredJun 5, 2017 at 19:17vicke4vicke43,133... | When I try to push tomasterbranch that is hosted onhttps://github.comI get:remote: fatal error in commit_refsHow can I solve this? | How do I fix "remote: fatal error in commit_refs" errors trying to push with Git? |
Amazon EC2 console now has a web-based terminal (which presumably guarantees secure connection). Go to Actions > Connect > EC2 Instance Connect > Connect on Instances page. In the terminal, use ssh-keygen command to display a fingerprint of any number of host keys algorithms. The following example shows SHA-256 and MD... |
When I create a new Amazon EC2 server, I connect to it using ssh as usual.
I see the typical warning:
$ ssh myserver
The authenticity of host 'ec2-12-34-567-890.compute-1.amazonaws.com (12.34.567.890)' can't be established.
ECDSA key fingerprint is 31:66:15:d2:19:41:2b:09:8a:8f:9f:bd:de:c6:ff:07.
Are you sure yo... | SSH fingerprint verification for Amazon AWS EC2 server with ECDSA? |
1
I'm not sure I understand your question; your gh-pages branch already has all the files from the master branch. If you're asking how to delete everything except index.html:
git clone [email protected]:cauerego/jsoneditor.git
cd jsoneditor
git checkout gh-pages
git rm -rf ... |
I know this isn't advised and there's a reason they're separated. But to my specific case gh-pages only have 1 page (index.html), and I want that 1 page to contain basically every file on master so it can be demonstrable. I was even considering using JSbin until I stumbled upon github pages.
So, is there any way to ha... | merging github gh-pages into master |
How to implement mutual TLS in AWS Lambda?First big applause for Hakky54 for this good tutorial on mutual TLS.https://github.com/Hakky54/mutual-tls-sslI followed his tutorial to understand and implement MTLS for AWS Lambdas. You can also test your implementation locally before deploying to AWS by just running the sprin... | I am building an AWS Lambda service for a small PoC. The flow in PoC is :take a (text) input via POST,performs a small string manipulation +store the manipulated value into DynamoDB, and thensend the same (manipulated) value to a particular URL via HTTP POSTSeems like a simple lambda tutorial example, but the tricky pa... | Mutual Authentication (2-way SSL) in AWS Lambda |
There are actually lots of threads about this issue, which are quite confusing. I write the way that works for me.I have finally followed this page to generate the fileshttp://blog.mgechev.com/2014/02/19/create-https-tls-ssl-application-with-express-nodejs/. Note that I setlocalhostasCommon Name(not sure if it's really... | I use Chrome in macOS Sierra 10.12.3. I guess I have already set upsslforlocalhostlong time ago. Now, bothhttp://localhost/andhttps://localhost/in Chrome return the list of folders underlocalhost. I have created a nodejs app. So after typingnpm startin a command line to run the server, we could openhttp://localhost:300... | Trust https://localhost:3000/ of MEAN stack in Chrome & Mac |
But I do not understand why Session Manager would require the instance to have internet access?The SSM usespublic endpointsto connect to the SSM service. The endpoints areused to" connect programmatically to an AWS service". The only way to access them (without VPC interface endpoints) is using the Internet.Also SSM ag... | I have created an EC2 instance in a private subnet (i.e. the route table has no Internet Gateway attached).The route table attached to the private subnet routes 0.0.0.0/0 to a NAT Gateway.The EC2 instance has the correct SSM Role and appears in the SSM Managed Instance list.I can initiate a session onto the instance vi... | AWS SSM Session Manager and Nat Gatway |
You can use the HttpContext (the one exposed by the static Current property). It has an Items property which is meant to be used specifically to shuttle data between modules and handlers, as indicated by the documentation:Gets a key/value collection that can
be used to organize and share data
between an IHttpModul... | From an HTTP module, is there a way to persist something in the Request to be accessed by a mater module or the eventual handler? Can you "stick" something on the Request as it passes through that will still be there later in the pipeline? | How do you persist data from one HTTP module to another and to the eventual handler? |
In general, this is implementation-dependent.
The way this is usually implemented is that new/malloc will allocate slightly more bytes than you asked for, and will use the extra bytes for some book-keeping: many times the allocated blocks will also be maintained in a linked-list, and so the extra bytes will be used t... |
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
C programming : How does free know how much to free?
How does delete know how many bytes it has to free?
I read that there is some block before the actual poin... | How does delete work? [duplicate] |
You need to push that deletion:git push origin --delete hotfix(anygit branchcommand would only have an effect on your local repo, not the GitHub remote one)See more at "How to delete a Git branch both locally and remotely?".Agit branch -d -ronly deletes aremote tracking branch, that is branches existing in theremotes/o... | I have a local branch, sayhotfix. I put it up on GitHub using$ git push -u origin hotfixThen after merging the branch, I want to delete it. So I type$ git branch -d hotfixwhich deletes the branch locally. However, the remote branch is still on GitHub. Of course when I look at my remote branches,$ git branch -r
origin... | deleting remote branch does not remove from GitHub |
I don't think there's any way to do this through Github; however, you could always use something like the Stylish add-on for Firefox to change Github's css locally.\
Since this only changes the css locally, you will see the different style but everyone else who visits your project will still see the standard Github st... |
I tried using GitHub to host a gist of Perl code, but I don't think there is enough contrast in colors. Can I modify them? I've tried searching Google, GitHub, and Stackoverflow.
| How can I change the colors for my source code on GitHub? |
I found that you have to restart the server for it to take these changes into consideration.I spent ages changing and tweaking these options and nothing worked. Then when I went to the EB console and restarted the environment it worked. | I practice set up Django under Elastic Beanstalk from there document.
But There is error.ERROR Your WSGIPath refers to a file that does not exist.My directory like this:-djangoenv (where I use git)
- mysite
-manage.py
-mysite
-__init__.py
-settings.py
... | Amazon Elastic Beanstalk : how to set the wsgi path? |
version: '2'
volumes:
staticfiles: {}
services:
django:
[...]
volumes:
- staticfiles:/app/server/staticfiles
[...]
nginx:
[...]
volumes:
- staticfiles:/app/server/staticfiles
[...]
|
How to share one folder between two containers using docker-compose v2?
I am trying to share a file between 2 containers, but it doesn't work. I have tried using volumes but it didn't worked also. Does anyone have any suggestions on how to do this?
api:
build:
context: searcher/
dockerfile: Dockerfile... | Share folder between two containers using docker-compose |
(Answer rewrite)
**NOTE **, the paginator contains a bug that doesn't tally with the documentation (or vice versa). MaxItems doesn't return the Marker or NextToken when total items exceed MaxItems number. Indeed PageSize is the one that controlling return of Marker/NextToken indictator.
import sys
import boto3
iam = b... |
BACKGROUND:
The AWS operation to list IAM users returns a max of 50 by default.
Reading the docs (links) below I ran following code and returned a complete set data by setting the "MaxItems" to 1000.
paginator = client.get_paginator('list_users')
response_iterator = paginator.paginate(
PaginationConfig={
'MaxIte... | How to use Boto3 pagination |
By "kernel caching," they are referring to caching done by the HTTP driver, http.sys.With kernel caching enabled (which happens when you enable OutputCaching with default parameters and don't use a query string in your URLs), the content is returned to the user without any callbacks into user mode. You might want to di... | When working in ASP.NET, HttpResponse objects have aDisableKernelCache()method. E.g., a HttpHandler could:public void ProcessRequest(HttpContext context)
{
context.Response.DisableKernelCache();
...MSDNhelpfully describes this method as:Disables kernel caching for the current response.Why would I want to use th... | Use of HttpResponse.DisableKernelCache |
Try out the following:Try to specify the log types as follows:RDSCluster:
Type: AWS::RDS::DBCluster
Properties:
EnableCloudwatchLogsExports:
- "error"
- "general"
- "slowquery"
- "audit"Make sure the DB Cluster Parameter Group used has advanced auditing enabled. For examp... | I've got CloudFormation template that I'm using to create RDS aurora-mysql5.7 cluster.I'm trying to add EnableCloudwatchLogsExports parameter to it:RDSCluster:
Type: AWS::RDS::DBCluster
Properties:
EnableCloudwatchLogsExports:
- StringAnd there is a question... All my attempts with 'error', 'err... | Create RDS aurora-mysql5.7 via CloudFormation with EnableCloudwatchLogsExports parameter |
1
Try this:
subs_filter '(<link.*?href=(.))[^"']+\.css([^"']+\2[^>]*?>)' '$1new.css$3' irg;
DESCRIPTION
DEMO
https://regex101.com/r/aF2aU9/1
Share
Improve this answer
Follow
edited Nov 23, 2015 at 11:02
... |
I'm using nginx with module HttpSubsModule to replace a few css stylesheets for another. My regex is
subs_filter '<link(.*)href="(.+\.css)([\?.]?[^"]*)(".*)>' '<link href="new.css" rel="stylesheet" type="text/css">' irg;
It seems valid but subs_filter doesn't work with it. Simpler forms, such as
subs_filter (.*)css... | Making nginx replace a css stylesheet |
2
RAM is directly mapped into the processor's address/data bus. Hard drives are not. They interface to a disk controller (IDE, SATA, SCSI, etc). The disk controller copies data to/from RAM in smaller blocks where the CPU works with it.
There are various addressing schemes f... |
How does the CPU manage to address the distant memory locations on a several hundred giga bytes of hard disk with registers and data bus of 32 bits only.
| Accessing hard disk |
+25The methodsetHttpOnlyof thejavax.servlet.http.Cookieclass was added in Servlet 3.0 specification.Tomcat 7 implements Servlet 3.0 spec but in order to compile your code, you need to add appropriate Maven dependencies.Make sure you have a dependency on Servlet 3.0 API with scopeprovided:<dependency>
<groupId>javax... | Below is my Java code for creatingjavax.servlet.http.Cookiefrom Tomcat 7 APICookie c = new Cookie("code", code.trim());
c.setPath("/public");
response.addCookie(c);
response.setStatus(200);Am trying to addc.setHttpOnly(true);to make the above code sonar compliant but Eclipse is throwing a compiler error sayinghe met... | Tomcat 7: Sonar compliant setHttpOnly(true) for Cookie |
This sort of error i have seen in two scenario's
1. Code unable to locate Truststore properly
2. Truststore does not have valid chainShareFollowansweredJul 22, 2015 at 4:55kanakmohankkanakmohank6188 bronze badgesAdd a comment| | I downloaded the current microsoft dynamics crm SDK, and was trying to run the 'Main' class which is in the Walkthrough -> java2crmpack folder. I imported all the classes in eclipse and also generated stubs using wsdl.So, while running this class I am facing certificate issues as the url is 'https'.While making an auth... | Certificate error while making a POST call for authenticating microsoft dynamics crm |
Firstly, you need to remove default S3 encryption on your bucket.Then, you can use this AWS CLI command that will copy all objects and remove encryption:aws s3 cp s3://BUCKET_NAME/ s3://BUCKET_NAME/ --recursive | I am looking ats3apiand trying to remove encryption on all my S3 objects. Looks like there is no easy way to remove from CLI. From the console I can do select few (multiple) files but it is tedious.Suggestions please.. thank you. | Remove encryption from all s3 objects using CLI |
Each mapping between anAWS Kinesisstream and anAWS Lambdafunction is a dedicated entity resulting from a call toCreateEventSourceMappingand comprised of theEventSourceArnand theFunctionName, for which you also specify a dedicatedBatch Sizeaccordingly:POST /2015-03-31/event-source-mappings/ HTTP/1.1
Content-type: applic... | The title might be a bit confusing. I'll try my best to make it clearer.Suppose I have a AWS Lambda function that has two different Kinesis streams A and B as input event sources.So, for the below, since a KinesisEvent instance contains a batch of records, will the batch contain records from a single stream, or essenti... | If a AWS Lambda function has event sources from multiple Kinesis streams, will the batch of incoming records be from a single Kinesis stream or a mix? |
A PVC can be used on any number of pods so this model does not match how Kubernetes works. You could of course write your own script that ignores that possibility.ShareFollowansweredMar 12, 2020 at 7:28coderangercoderanger53.1k44 gold badges5454 silver badges7777 bronze badgesAdd a comment| | I am trying to get pvc and it's volume and in which pod it is mounted and the node it is hosted.There are separate commands are there like belowTo get PVC and it's volumekubectl get pvc <pvcname>then from PVC i am getting where it is mountedkubectl describe pvc <pvcname> | grep MountedThen getting the pod , i am find i... | Is there kubectl filter command to get the PVC - it's volume - mounted in pod -hosted in node fields? |
Blocking directory access can be done by simply putting aindex.htmlfile in the folder you want to block directory access to.This is the way the standard CodeIgniter install does it. The belowindex.htmlfile can be found in theapplication\controllersfolder.<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
... | my file format likeapplication
- controllers
- views etc...
assetes
- Images
- Css etc...and my .htaccess file are below:#Deny from all
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]My problem is that assets folder access to every one ... | Codeigniter .htaccess: Give public access to all files but not the folder |
RewriteEngine On
RewriteRule ^google149e37e6d0ddce9a.html$ - [L]
RewriteRule ^([^/]*)\.html$ /index.php?page=$1 [L]The dash is a special value meaning nothing will be rewritten. The [L] stops evaluation upon a successful match. | I have a very simple mod rewrite script taking my php variables and making them into .html files. It works however, I would like to confirm my google webmaster tools url, and it is not working because the url structure is being rewritten. How can i exclude a specific item?RewriteEngine On
RewriteRule ^([^/]*)\.html$ /i... | Mod-Rewrite exclude a specific link from rewrite |
There's an openissueingrafana/plugin-toolsrelated to this bug.The@swc/coreis bugged in version 1.3.76 (there's a fix that has been merged but not released yet).On my side downgrading this package to 1.3.75 fixed this errorIn thepackage.jsonyou can downgrade the@swc/coreto version to 1.3.75 like this:"@swc/core": "1.3.7... | I am currently in the process of creating a new panel plugin by following the tutorial located here:Create Pluginand hereBuild your first plugin.Steps I followed in accordance with the tutorial:npm init @grafana/pluginselected panel type, name, description and so on...npm i
npm run devI got an error by npm run dev:ERR... | Grafana - Build a Panel Plugin from Template - Error |
Switched to TLS 1.3 and I was able to above shave off extra 50-150ms!I wrote a detailed blog post too:https://wpspeedmatters.com/tls-1-3-in-wordpress/With TLS 1.3: | Right after enabling cert-manager inIngress Controllerby TTFB (time to first byte) increased by 200+ms in most of the regions. Without SSL, it was <200ms to 80% of the regions. After enabling SSL only 30% have TTFB <200mswithout SSLwith SSLMy Ingress definition:apiVersion: extensions/v1beta1
kind: Ingress
metadata:
n... | TTFB increated by 200+ ms after enabling SSL via Nginx Ingress controller & cert-manager |
From git push
git push <repository> [<refspec>…]
The "remote" repository that is destination of a push operation.
This parameter can be either a URL (see the section GIT URLS below) or the name of a remote (see the section REMOTES below).
So yes, git push can take a URL
But the order is important:
where you push (... |
I am trying to push my files using git bash to online git repository using this command.
$ git push -u origin master https://github.com/SMAmmar/git-test.git
But after using it i am getting this error
fatal: invalid refspec 'https://github.com/SMAmmar/git-test.git'
How can I solve this problem? I am a newbie when us... | Unable to push files in git repository |
You have to read the data out of the block before it will be completed. Since noöne is readingsaveBlock, it will never be completed.If you don't need the data, the easiest solution is to useActionBlockinstead ofTransformBlock. Otherwise, just keep reading the data until the block is completed.ShareFollowansweredAug 10,... | This code never reaches the last line because the completion doesn't propagate from the saveBlock to the sendBlock. What am I doing wrong?var readGenerateBlock = new TransformBlock<int, int>(n =>
{
Console.WriteLine("Read " + n);
Thread.Sleep(15);
return n;
});
var groupingBlock = new B... | C# TPL Dataflow - Completion not working |
If you want to persist your data beyond the lifetime of your container, you need to create the volume outside of the container. One option is to create a "data volume container", as described in the documentation:
docker create -v /data --name my-data busybox /bin/true
This creates a container (named my-data). It's... |
I have a Dockerfile that states at the end a Volume like so
VOLUME /data
Now when I build and run this container I indeed get a new volume created and mounted at /data.
That's very good but I would like to be able to stop this container and then run it again and make sure the very same volume with its data is mounted... | How to reuse the same volume in Docker when restarting a container? |
The site is 85% the database. No database backup, no site.You must backup both your public_html files and your Magento database to fully back up your Magento e-commerce installation.Basically all you have is the application, code changes, skin and templates from the previous version.Configuration, CMS pages, categories... | I have a situation where I had to restore my magento site from an FTP backup which I made earlier of all the files and folders of thepublic_htmldirectory. Note that I don't have a mySql backup.Now when I try to visit mywww.domainname.comsite, it just displays an error number. Note that I can no longer go towww.domainna... | Magento site restoration |
try this (mod_proxy and mod_rewrite should be enabled):RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.domain.com$
RewriteCond %{HTTP_HOST} ^([^\.]+).domain.com$
RewriteCond %{DOCUMENT_ROOT}/%1 -d
RewriteRule ^ http://www.domain.com/%1%{REQUEST_URI} [P]
RewriteCond %{HTTP_HOST} !^www.domain.com$
RewriteCond %{HTTP_HO... | I am trying to point random sub domain to the folder named as sub domain...For example if i have sub domainrandom123.domain.comit should point to the folderrandom123.If folder not found it must throw 404 error . I tried below code but its not working,some one please guide me.RewriteEngine on
RewriteCond %{HTTP_HOST} !^... | htaccess : virtual subdomain mapping to folder |
This can be done with a bucket policy (click bucket policy in your screenshot). e.g.,
{
"Version":"2012-10-17",
"Statement":[
{
"Sid":"AddPerm",
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::examplebucket/*"]
}
]
}
(see "Granting R... |
I am uploading documents via the AWS API to an S3 bucket. Works fine.
The items that are uploaded are marked as private though, so cannot be viewed online. I can get around this by right-clicking the file in the Console and clicking 'Make Public', or by using the API to make it public.
Is it possible to make all fil... | Why are items in my S3 bucket 403ing? |
1
You could try using boost smart pointers.
https://www.boost.org/doc/libs/1_71_0/libs/smart_ptr/doc/html/smart_ptr.html
They are very similar to the C++ 11 smart pointers, but available as a library which should work in pre C++ 11 environments. If you decide to go this wa... |
Lately, I learned there is a consensus among C++ programmers that the new, delete and delete[] operators should be avoided as often as possible, as already discussed here, here or here. While searching, I even stumbled upon an April Fools' joke stating that these operators would become deprecated in C++20.
I happen to... | Dynamic allocation and large data structures in C++ |
In youroverlays/development/kustomization.yamlyou can add:resources:
- volume.yaml | Usingkubectl apply -k, you can overlayResourceconfigs (that you have already defined). Can you create resources as well?In my specific case I want to create alocal Volumefor the development environment. I do not have this Resource in the base folder though.My folder structure is like this:~/someApp
├── base
│ ├── dep... | Is there a way to add new Resources with Kustomize (as opposed to overlaying them)? |
Here is thelist of errorsyou may get from reconciler'sGet()method.If the error is not nil, that meansyou most probably did not get the resource correctly, so you shouldn't update it. Say that your error isTooManyRequests. In this case,errors.IsTooManyRequests(err)returnstruewhileerrors.IsNotFound(err)returnsfalse. The ... | Under which conditions will client.Client return a non-nil error and the client object will be also filled (or at least the namespace and name object meta)? The Kubernetes operator framework book suggests toset a status conditionin case of getting resource errors in a similar fashion:myResource := &v1alpha1.MyResource{... | Setting status conditions for controller-runtime's client Get errors |
Not really. A StatefulSet (and any workload controller for that matter) allows only a single pod definition template (it could have multiple containers). The issue with this is that a StatefulSet is designed to have N replicas so can you have an N number of secrets. It would have to be a SecretStatefulSet: a different ... | I have 3 different Kubernetes Secrets and I want to mount each one into its own Pod managed by a StatefulSet with 3 replicas.Is it possible to configure the StatefulSet such that each Secret is mounted into its own Pod? | How can I mount a single distinct Secret into each Pod managed by a StatefulSet? |
The Sonar Eclipse plugin is designed to centralise the configuration of the source code analysis tools you are running.A question one must ask is why do you want to run a different analysis locally? Normally users want to execute the same analysis on the files in the local Eclipse workspace, before committing them into... | We have a central Sonar server for scanning and reporting on all the code within the organization. We also have the Sonar plugin for Eclipse (RTC) so that we can run local analysis as we edit code.The problem I've got is that I need to set exclusions on 3rd party libraries so they don't get parsed when running a local... | Can Sonar plugin exclusions be configured for local analysis without a local server? |
If you declare dateCreated and lastUpdated as Date they wil be maintained automatically by grails.
You can use theGrails Audit Logging Pluginto log the authenticated user under different security systems. | Is there a grails plugin or standard way of managing thecreated_by,created_on,updated_by,updated_onfields for a domain object? | Is there a standard way of audit tracking in grails? |
PHP doesn't run cron jobs, your server (or operating system) is doing this. There are two ways to put your cron job to work:#1Using the shell commandcrontab. The commandcrontab -lwill list all existing cronjobs for your user (most likely there are none yet).crontab -ewill open an editor window where you can put in a yo... | I have php function that I wnat to run every 15 minutes. I found some questions like this:How can I make a cron to execute a php script?and in my case I should use this:*/15 * * * * /usr/local/bin/php -q /path/to/my/file.pBut should I run this command in terminal or put it in my file? And once, it is executed, will it ... | How to run cron job in php |
A call to autorelease will cause release to be sent to the object the next time through the event loop. That will account for the alloc call you make in tableCellButton. The only other time the object is retained is inside of addSubview, which will also handle its own release of the same object. Based on the code abov... |
I know a similar question has been answered before here, but I just want to make sure I understand it a little bit better. Here is my scenario...
I have a helper class method that is returning an allocated UIImageView, as seen below.
+(UIImageView *)tableCellButton{
return [[[UIImageView alloc] initWithImage:[UIImag... | Clarification on IPhone Memory management(autorelease) |
Make sure, that your"*.nocache.*"files and your start page (usually "index.html") are served with the correct HTTP caching headers. SeeIdeal HTTP cache control headers for different types of resourcesfor a discussion on this (somewhat difficult) topic. Basically, you'll probably want to setCache-Control: no-cachefor th... | I have written application using GWT. It works perfectly for the client. But when I'm changing something in my application, recompiling and then deploying to the server and client access my application his browser is not picking up the new version of the application but uses previously cached version of it. This trigge... | Refreshing GWT application on client's side |
Looks like you are already handing your mails for .com on Google Apps. In this case, you add another domain (and emails) to this without additional payment. They charge you only for inboxes and not for email ids.See this doc on how to set this up.Add domains and domain aliases - Google Apps Administrator Help | I have two domains:mydomain.fi using AWS Route 53 DNSmydomain.com hosted on hostmonsterI am trying to set up an email address for mydomain.fi. Instead of installing a email server on EC2 or purchasing a Google Apps account my idea was to redirect mail to mydomain.fi to my other domain on hostmonster.From hostmonster's ... | Redirect mail with AWS route 53 mx records |
There are two problems here.
First is that nginx considers headers which contain underscores as invalid, so SCRIPT_NAME header is not being accepted by nginx in the container because it's invalid from nginx point of view. Luckily, nginx directive underscores_in_headers is here to help.
Just add underscores_in_headers ... |
I'm trying to make my web app (Django/wsgi-based) available from some subfolder of the main domain.
I'm using docker for my app, and static files, so I have main nginx on my server as reverse proxy, another nginx in "nginx" container which routes the stuff for my app and uWSGI in the second container which serves actu... | uwsgi_pass does not forward SCRIPT_NAME header |
Simply...Create and check out a throwaway branch, namedfoo2, say, that points to the same commit asfoodoes:git checkout -b foo2 fooDo whatever you want with branchfoo2(rebase it, etc.).When you're done, removefoo2:git branch -d foo2This approach is simpler and safer than manipulatingfoo(and its reflog) directly. | Oftentimes, in our workflow we have a branch which tracks a remote pending pull request and I want to see preemptively what that PR will do to my PR before it's merged into master. For example, let's say there's a PR branchbarthat hasn't been merged intomasterbut I want to see how my PR branchfoowhich is being develope... | Checking out branch and rebasing/merging temporarily to see impact? |
From Amazon.Lambda.SNSEvents:
public class Function
{
public string Handler(SNSEvent snsEvent)
{
foreach (var record in snsEvent.Records)
{
var snsRecord = record.Sns;
Console.WriteLine($"[{record.EventSource} {snsRecord.Timestamp}] Message = {snsRecord.Message}");
... |
I have a lambda function at AWS written in c#. This lambda function would read an incoming SNS message. Below is my lambda code.
public void FunctionHandler(Amazon.Lambda.SNSEvents.SNSEvent.SNSMessage message, ILambdaContext context)
{
if (message.Message == null)
{
... | Read a SNS message at AWS Lambda Function written in C# |
There's no API to perform batch requests (which seems to be what you're looking for). Since you can't use Git or SVN, you're limited to requesting each individual file using the Contents API. | TheGitHub Webhooks APIallows a server to be informed whenever an event occurs on a repo. On push events, the webhook payload (a big, JSON hash) includes an array of modified files.I need to copy each of the modified files from GitHub to the server, but want to avoid iteratively making HTTP requests. Is there some kind ... | How to copy multiple files from GitHub in a single request |
The Docker cli uses the Golang CLI manager spf13/cobra to handle its flags such as --entrypoint.
This is where the entrypoint is extracted:
flags.StringVar(&copts.entrypoint, "entrypoint", "", "Overwrite the default ENTRYPOINT of the image")
StringVar from the spf13/pflag library will only extract the first string af... |
I'm trying to understand a discrepancy between ENTRYPOINT in Dockerfile and docker run --entrypoint. The exec form of ENTRYPOINT allows multiple parameters,
# Source: https://docs.docker.com/engine/reference/builder/#entrypoint
ENTRYPOINT ["executable", "param1", "param2"]
but docker run --entrypoint=executable accep... | Docker run --entrypoint with multiple parameters |
su manpage says:-, -l, --loginProvide an environment similar to what the user would expect had
the user logged in directlyIt spawns another shell from where youexitto comeback to parentcontainershell.So changingsu - -c "python <path_to_script>/myscript.py" $USERtosu "$USER" -c "python <path_to_script>/mysc... | I've got a container which I run asdocker run -it --rm --name <container_name> <image>:<tag>normally, I fall into the container terminal from which I can exit with theexitcommand. Now, I have a DockerFile which ends with an entrypoint that runs a simple bash script:#!/usr/bin/env bash
# Add new user
groupadd -r $GROUP... | Cannot exit from Docker container |
You probably have a hidden character or two at the very beginning of your thumbprint. I've made this mistake many times before when copying the thumbprint from the certificate manager in MMC. Here is a link for more information on this issue.http://support.microsoft.com/kb/2023835 | I am trying to add a certificate to a web request to connect to Azure services.My code looks like this:string certThumbprint = "thumbprint";
X509Store certStore = new X509Store(StoreName.My, StoreLocation.CurrentUser);
X509Certificate2Collection certCollection = certStore.Certificates.Find(
X509FindType.FindByTh... | FindByThumbprint - certificate exists but not found |
It sounds to me like you may have a configuration problem.The output ofgit config --list --localshould contain thisremote.origin.url=https://github.com/myname/repo.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/masterYou should definitely have the... | I'm really sorry if this has been asked before, my searching skills are bad.So I want to update my github repo with my local code, but it always says "Everything up-to-date"
So I have one file I modified, and I trygit add Main.csgit commit -m 'Commit'git push origin masterBut it still says Up-To-Date even though the fi... | Update files on github from bash |
You could setup repoA as upstream and repoB as origin. To prevent pushes to repoA, set push url to a dummy one usinggit remote set-url --push upstream dummy_urlThis allows you to pull the code from repoA and push to repoB.
In repoB, leavemasterbranch as it is and have anintegrated-masterbranch that can be used to merge... | This one is a little complicated in what I'm trying to ask, so please bear with me.There exists a public git repo, let's call it 'repoA'. It has a branch 'master'.
I have my own copy of the code (not forked, just downloaded and copied). I have set up my own separate repo using this code, call it 'repoB' (a non-public r... | Best way to set up a git repo using another git repo |
The behavior you're asking for is the default behavior for git. When you create a new branch, you're effectively saying that you want to fork the development history from the point where you create the branch. Once youcheckouta branch, all work done on files will happen in that branch.To make this more concrete, imagin... | I am using the GitHub application for Windows, and it's working great. However, I'm confused how I can work on multiple branches at the same time on my local files.Let's say that I cloned a repository to C:\github, if I create a new branch nothing changes in my file structure. Meaning that whenever I change a file, it ... | GitHub: Working on two branches locally |
5
You need to first clone the repository in order to query its history:
git clone https://github.com/Homebrew/homebrew-core.git && cd homebrew-core
git log master -- Formula/postgis.rb
Alternatively, if you already have Homebrew on your computer, you can directly go in its... |
Subsequent to a failed install of postgis
CREATE EXTENSION PostGIS WITH SCHEMA postgis;
ERROR: could not open extension control file "/usr/local/Cellar/[email protected]/9.5.12/share/[email protected]/extension/postgis.control": No such file or directory
searching for an appropriate version for a Mavericks set-up wi... | github history taking too long to generate |
Finally I fixed, just update Visual Studio. under tools/Extension and Updates/ visual studio update. | I was confused, when I click and select Microsoft Git Provider, the select option does not accept my selection, but if I select other option it's fine, I need to select Microsoft Git Provider to fix my error in team explorer. I tried to clear cache and restart but still the problem was there, I am using Visual Studio c... | I can't select Microsoft Git Provider |
tryehcache. JDBC does not have caching by itself, but ehcache is pretty good. if you want a more robust cluster safe cache, try oracle coherence. I typically do not put a cache at first and run some performance tests, only if tests indicate a need for a cache is when I put one. | Closed. This question needs to be morefocused. It is not currently accepting answers.Want to improve this question?Update the question so it focuses on one problem only byediting this post.Closed6 years ago.Improve this questionI want to usecaching with JDBC.How can I achieve that?Are there any built-in mechanisms or d... | Caching in JDBC [closed] |
It will work, if you remove variables from the host part of yourproxy_pass. I hope it will helps. | I'm running a php app behind nginx on dokku. I got a location with a proxy_pass directive defined like this:location ~* ^/cdn/(.*?)/(.*) {
resolver 8.8.8.8;
proxy_set_header HOST $1;
proxy_pass https://$1/$2?$args;
}I'd like to use this location to redirect files from S3.In the error logs I have the following err... | nginx proxy_pass with https protocol leads to "invalid URL prefix" error |
10
From AWS documentation:
By default, Spring Boot applications will listen on port 8080. Elastic
Beanstalk assumes that the application will listen on port 5000. There
are two ways to fix this discrepancy: change the port Elastic
Beanstalk is configured to use, o... |
Hi I am new AWS and trying to deploy spring boot application in Elastic Beanstalk . Deployment is successful but not able to access application .Getting 502 Bad Request Gateway nginx/1.10.1 error. Deployment is done on Configuration
64bit Amazon Linux 2016.09 v2.2.0 running Java 8 (nginx proxy server). Is thier any wa... | 502 bad request on AWS Spring boot application |
Kindly confirm your current branch is master.git branchIf the pointer is not pointing the master, then check out to master branchgit checkout masterCommit your changes and try to push to herokugit commit -am "xxxyyzzz"
git push heroku master | I have an app on Heroku that is running old code. I've made a small change and committed the change. I then rangit push heroku masterIt'll sayFetching repository, done.
Everything up-to-dateBut if I go and look at the app, it's all old code. I did revert the site back to another version in Heroku about 15 days ago, ... | git push heroku master says "Everything up-to-date", but the app is not current |
Good user experience and good remote VCS:GitHub(git): for learning that DVCS, seeGit Immersion(andGitHub Help pages).BitBucket(mercurial): for learning that DVCS, seeHgInit. | I've been writing code for a few years now and our backup strategy has been to zip the entire code directory up every few days and put it somewhere else on your hard drive, or occasionally upload it to some online file hosting service.Unfortunately the file hosting service got canceled without telling me and we lost ye... | Version Control for developers new to source control |
Try the followingpattern. Replace the entire match, withgroup 1.(?<=node=\")([^.]+).+(?=\") | I want to transform thekube_node_info{node="ip-10-1-15-18.ap-south-1.compute.internal"}using the transform by regex but unable to do the same. I want to have node value likeip-10-1-15-18Have tried the regex like above but seems it's not giving the expected results. | Regex for Grafana PromQL |
You should definitely hash the key. You would maybe say "Why should i risk getting collisons when i can concatenate at every point of time a unique key?". The easy answer is if you generate cache keys via string concatenation you have to calculate always with the worst case of space requirements to estimate ram usage.S... | I'm working on a method that, due to the expense of it's operation and frequency which it is called with identical arguments, would benefit from caching the return values.I'll beserialize()-ing the arguments together for cache keys, but this can result in very long keys, due to the lengthy array arguments.Does PHP arra... | Array lookup speed in PHP; long cache keys |
Metrics are sent to Prometheus if this property is set to true:management:
metrics:
export:
prometheus:
enabled: trueFor more details check documentation forSpring Boot ActuatorandSpring Metrics. You'll find the name of all metrics exported to Prometheus/Grafana.Logs and metrics are 2 different thin... | I running a gateway and a microservice using jhipster docker compose and i have chosen to generate metrics with prometheus but i couldn't visualize what's in the grafana because the gateway failed to run?Can anyone tell me what application metrics are normally provided to prometheus+grafana? And does logs are also prov... | What are the metrics sent to Prometheus + Grafana in a generated jhipster project? |
Theidle timeoutof the application pool was set to 20 minutes (as per default). And because it was a test instance, there was no user keeping the website alive. | I'm using the HttpContext.Current.Cache to cache expensive data queries with a CacheItemUpdateCallback.The idea is that the user has to load the data once and then the updatecallback keeps the object updated every 30 minutes.This is how I insert / overwrite the cache:HttpContext.Current.Cache.Insert(cacheID, cachedObj... | Caching Expiration not working as expected |
v.push_back increases the size, so i<v.size() is never false.
Since your vector is already size in length, you need to fill it with
for (std::vector<int>::size_type i=0; i < v.size(); i++)
v[i] = std::rand()%(2*size);
or use reserve instead:
std::vector<int> v;
v.reserve(size);
keep the push_back and check again... |
While trying to generate a vector of random numbers I stumble across a std::bad_alloc error. Here's my code:
#include "search.h"
#include "gtest/gtest.h"
int _size = 100;
std::vector<int> GetSortedVector(int size){
//init vector
std::vector<int> v(size);
//fill with random numbers
for (std::vector<in... | bad_alloc while initializing and filling a vector? |
This is becauseCER(or BER or DER) andPEMare different formats. PEM is base64-encoded DER with extra header/footer.To convert between the former and PEM, useopenssl:openssl x509 -inform der -in certificate.cer -out certificate.pem | certificate.cerWhen I usecatcommand to readcertificate.cerin my Linux RH server. It come out with thoseunknown symbolas mentioned in attached picture instead of human readable language such as:-----BEGIN CERTICATE-----uiocudcnysyndw77e3fo7nfdslaccu...-----END CERTIFICATE----- | Error: failed to find any PEM data in certificate input when start to run fleet server |
Are you sure your authenticationDatabase is "manager"?
In anyway, you don't need to stop mongo proces to interact with database but authenticate a user with necessary privileges using mongo shell.
Get access to running mongo container:
$ docker exec -it «container_name» bash
Authenticate using mongo shell:
$ mongo -u... |
This is my situation. I have a mongodb docker container instance and i need to change the admin password. Now, I have the credentials to connect to the mongodb just fine, using the host and ip and the credentials. I have access to the server via ssh and I need to change the admin password. But if i do,
mongo manager -... | Mongodb authentication inside a docker container |
GitHub only knows about the code that was pushed to the repository. It's not able to verify anything that's available only on your local copy.The action is invoked only on the code that is available in the GitHub repository – the code that was pushed there.In other words doing exactly what you want is not possible.You ... | I have a yaml file for github action :name : "Integration"
on :
push :
branches : [master]
jobs :
test-code :
runs-on : ubuntu-latest
steps :
- uses : actions/checkout@v2
- uses : actions/setup-node@v1
- run : npm run test
- run : npm run buildI want to run t... | How to decline git push when ci workflow file has an error? |
Same issue with bitnami/kafka. But then I realized that I need to enable accessing Kafka with external clients in docker-commpose.yml. For more info seehttps://hub.docker.com/r/bitnami/kafka/'Accessing Kafka with internal and external clients' part.To do so, add the following environment variables to your docker-compos... | I expose the port 9092 then i run the kafka broker inside docker.
But When I run the python script i get the errorsERROR:kafka.conn:DNS lookup failed for b5c5b06f6761:9092 (AddressFamily.AF_UNSPEC)I tried docker ip and machine ip instead of localhost but gives same error.Here is my code.producer = KafkaProducer(bootstr... | why kafka producer is showing me error kafka.conn:DNS lookup failed for <container id>:9092? |
Both GitLab and GitHub offer API which can help you creating projects without using the browser. Though you need the browser only once to get the token. You can find more info about GitLab here and GitHub here
|
How can I create a GitHub project for my organization without using a browser?
I need to use the command line.
| How can I create a GitHub project for my organization without using a browser? |
You can't make a CNAME on domain root ie.domain.combecause it's zone apex.To be able to do what you're looking for you need to make a CNAMEexample.domain.compointing toCloudFrontendpoint generated byAPI Gateway.You can follow more detailedAPI Gateway domain setup instructions. | I want to route my.domain.com to the url of my lambda function (which I setup and working via the API Gateway). I can't seem to be able to do this. I also can't seem to be able to to CNAME to anything (so my.domain.com results in a dns error when I CNAME it to domain.com).
The normal url (domain.com) is routed to a sta... | Route53 route subdomain to AWS Lambda? |
Definitely the dependency as mentioned inAmazon documentationdid
not work. The path to the dependency does not exist, in Maven central repository."software.amazon.awssdk" % "aws-java-sdk" % "2.0.0"The following too, did not resolve com.amazonaws.services.s3.AmazonS3ClientBuilder, though the JAR path is correct in Maven... | I am trying to access my s3 buckets from my java application, trying to implement thishttps://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/examples-s3-buckets.htmlI've added the lib/aws-java-sdk-1.8.6.jar to my lib folder and added the dependency in my pom.xml as well.I still get this import error"The import com... | The import com.amazonaws.services.s3.AmazonS3ClientBuilder cannot be resolved |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.