Response
stringlengths
15
2k
Instruction
stringlengths
37
2k
Prompt
stringlengths
14
160
The answer is that you cannot replace the AMI for an existing EC2 instance. However, you can replace the root volume with a new volume which is basically the same thing. That new root volume can come from another EC2 instance. I just repeated the steps to verify that this actually can be done.Create a snapshot of the r...
I'm running an EC2 AMI instance with LAMP stack and Laravel. I need to update my LAMP stack version as well as the Laravel version.I was thinking of running a new EC2 instance as my sandbox for the update process and install a brand new LAMP stack + Laravel and then make changes on my Laravel code base to make all my c...
Is it possible to replace the AMI on an EC2 instance with a different AMI?
16 Have a look at: http://www.php.net/manual/en/function.memory-get-usage.php and http://www.php.net/manual/en/function.memory-get-peak-usage.php maybe, these can help you. Share Follow answered ...
I've written a very big PHP file with lots of variables and equations. Now I'm going to host it on my college website, but with our hosting there is a memory consumption limit. There will be thousands of hits to that page as soon as we link it. So I want to know the consumed memory of my PHP file when it is requested ...
How to calculate memory usage in PHP
9 All variable declarations with an initializer are also definitions; that's an overriding rule. Regardless of extern. There are even cases where you need an extern on a definition: you can only instantiate a template using a variable which has external linkage. And con...
I am very very sorry. I didn't know my incomplete code attachment would create such a mess. I am very glad to see so many sincere helps. This code will compile: int myadd(int, int); static int main_stat = 5; int main() { int i, j; main_stat = 13; j = myadd(-1,7); i = main_stat; cout << j << i; ...
Under what circumstances can an extern variable be used in definition?
You've already committed the file. Therefore, it's in your history, andgit rmwon't remove the file from it.Luckily, you didn't push your commits yet, which enables you to usegit filter-branch. The Git Pro book contains asection on this command, andfilter-branch's documentationgot the right example:git filter-branch --i...
I have a file that for some reason got installed in my project qt-linux-opensource-5.0.2-x86-offline.run. This file is super big so i removed it in git with:git rm qt-linux-opensource-5.0.2-x86-offline.runThe problem is when i push the file still is trying to be pushed... how do I completely remove this file. I already...
Git removed file yet still is pushed
Remove the file withdocker execandrm, and then export the container withdocker export. When you restore the container withdocker importthe file will not be there.When you usedocker commityou are creating another layer over the previous ones, and the file will still exist in the previous layer tarballs because Docker i...
I'm trying to remove a file from a docker image and then export the docker image for use on another server.I've done the following steps:docker exec -it <name> sh rm <file> exit docker commit <id> <newImageName> docker save <newImageName> > newImageName.tarWhen I untar the newImageName.tar, it still contains the file I...
How to remove a file in a running docker image and then save the image to load later?
OnlyGit LFSwould allow you to upload and reference such a file, but you need to do it from a local clone (instead of directly with the GitHub Web UI)See for instance "Git Large File Storage Tutorial" fromLei Mao, togit lfs installandgit lfs trackthat file.But the best practice remains:either to have smaller sets, as in...
Closed.This question is seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. It does not meetStack Overflow guidelines. It is not currently accepting answers.We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-si...
how to upload a file in github with size greater than 25 mb [closed]
The question has been asked exactly a year ago but, if someone bumps to this question, like me. Here's what worked for me (on Mac OS Catalina 10.15.6):Executedbrew services listin the terminal, which gave following output:Name Status User Plist nginx started foo /Users/foo/Library/LaunchAgents/homebrew.m...
I have a small problem with my local server running with php-fpm and nginx.I can't run php-fpm it returns an error (the title).And when I type the commandsudo lsof -i :9000I get this (server/network is not my cup of tea):php-fpm 47 root 8u IPv4 0x619bafbaac199241 0t0 TCP localhost:cslistener (LISTEN) php-fp...
php-fpm: ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (48)
I finally solved it pressing the "Clear Runner Caches" button and running it again.
I'm getting this error after pipeline runs:Preparing to unpack .../git-ftp_1.3.1-1_all.deb ... Unpacking git-ftp (1.3.1-1) ... Setting up libcurl3:amd64 (7.52.1-5+deb9u6) ... Processing triggers for libc-bin (2.24-11+deb9u3) ... Setting up curl (7.52.1-5+deb9u6) ... Setting up git-ftp (1.3.1-1) ... $ git ftp push --use...
git-ftp fatal: Remote host not set
Search in Google by keywordssonarqubekotlinjacocoandis out of range in the filereveals following pagehttps://community.sonarsource.com/t/sonar-kotlin-coverage-fails-due-to-line-is-out-of-range-errors/3201/18, which states that problem was fixed in JaCoCo version0.8.3And which contains link to pagehttps://github.com/jac...
I'm having some issues when trying to import Jacoco code coverage to SonarQube.I am using SonarQube with Jacoco for importing test coverage results (https://docs.sonarqube.org/display/PLUG/Java+Unit+Tests+and+Coverage+Results+Import). Everything has worked well until i haveforEachblock in some method.ERROR: Cannot impo...
Issue when trying to import Jacoco code coverage to SonarQube: Cannot import coverage information for file, coverage data is invalid
mcr.microsoft.com/dotnet/runtime:6.0 is a Linux container based on Debian 11 - check out info at docker hub: 6.0.16-bullseye-slim-amd64, 6.0-bullseye-slim-amd64, 6.0.16-bullseye-slim, 6.0-bullseye-slim, 6.0.16, 6.0 Dockerfile Debian 11 05/03/2023 So it can't run .exe files which are build for Windows. You need to...
I've already managed to create a working container using Node and React. I'm now trying to create a docker container to operate a simple C# executable which will listen on port 8000 and send back "hello world". It works if I run it locally by visiting http://localhost:8000/ Here is the code: using System; using System...
How to create a working Docker Container With .NET 6.0?
It is not related with docker, it can be enabled by follow configurationecho "%_binary_filedigest_algorithm 8" >> $HOME/.rpmmacrosThe reason for it is ok in standard alone RHEL 6.4 is because it has theredhat-rpm-configpackages.bash-4.1# yum install redhat-rpm-configIn the package, this configuration exists in/usr/lib...
In standard alone RHEL 6.4 rpm build environment, the rpm packages is generated with SHA-256 check sum, which is gotten by commandrpm -qp --dump xxx.rpm[user@redhat64 abc]$ rpm -qp --dump package/rpm/abc-1.0.1-1.x86_64.rpm .. /opt/company/abc/abc/1.0.1-1/bin/start.sh 507 1398338016 d8820685b6446ee36a85cc1f7387d14537d6f...
How to build the rpm package with SHA-256 checksum for files?
You need to install nodejs as above gem has an dependancy of it. you will get the list of installation repository links herehttps://github.com/sstephenson/execjsbut as you mentioned nodjs is already installed. you can give the lib and include path while installing gem into your system.and if you are unbuntu user you c...
first,gem 'libv8', '~> 3.11.8'===libv8 (~> 3.11.8.12) gem 'execjs'==========execjs (>= 0.3.0) gem 'therubyracer'====therubyracer (0.11.4)is exists in GemfileGemfile.lock show (libv8 (~> 3.11.8.12),execjs (>= 0.3.0),therubyracer (0.11.4))centos5.7 already have nodejs Myproject no problem when i use rake but crontab is e...
rails crontab rake javascript runtime not find
The problem with that kind of approach is that it is error prone. I would tell yout to wrap the allocation and access to individual elements os your 2D array in a class. class Array2D { private: /* Pointer necessary for the choosen implementation */ public: Array2D(unsigned int dim1, unsigned int dim2); ~A...
I have something I need a 2D array for, but for better cache performance, I'd rather have it actually be a normal array. Here's the idea I had but I don't know if it's a terrible idea: const int XWIDTH = 10, YWIDTH = 10; int main(){ int * tempInts = new int[XWIDTH * YWIDTH]; int ** ints = new int*[XWIDTH]; ...
Is this 2D array initialization a bad idea?
You can download the sonar-scanner tool fromsonarand run it in the project folder:sonar-scanner \ -Dsonar.projectKey=your-project \ -Dsonar.organization=your-org \ -Dsonar.sources=. \ -Dsonar.host.url=https://sonarcloud.io \ -Dsonar.login=8ed524debb4f53489e99bd66eb5110a3e8c2958ePersonally, I used my repositor...
We have migrated our frontend project fromionic/es6/angulartoionic2/typescript/angular2. Everything is good except we don't know how to run sonar report on the project.Previously we are using gulp and rungulp sonarcommand to generate the sonar report (on an local sonar server).We don't use gulp in the new ionic2 projec...
How to run sonar scanner on an Ionic 2 project
Agreeing with the comments to your question I would also suggest, with that many rows, you are likely limiting the returns on your auto-complete? (i.e. taking the top 10). The round trip to the DB for this should not be a major bottleneck unless you are trying to return all the results on each keystroke.If it is a bott...
Using MYSQL, with EF 5.x and MVC3. I have a table with around 3.2 million rows which has city, country combo. I have a autocomplete textbox on the client side that takes city's search term and sends back suggestions using jQuery/ajax.The challenge that I am facing is that I cache this table into my memory when its used...
Cache Static Tables Mysql
I won't give you fully working example on how to specify rules in ingress resource to meet your requirements, I would rather like to share with you some hints:Yes, you will need regular expressions to achieve it, andhereis the example of doing it directly with NGINX directives based on example of wordpress multi-langua...
I have a cluster in Azure AKS with 1 node.On that cluster I have two back-end services.Each back-end service is a web app.I have a domain mydomain.com.Each app will need to be configured with its own path rule in the ingress object.Web app 1s (let's call this one the homepage app) target URL needs to be either of the f...
How to configure localized URLs in kubernetes nginx ingress controller API object
If you want wireless connection then you can use your adopter ip address. To get ip address go cmd and type ipconfig then copy ip4 which is like 194.98.68.1.replace it with 0.0.0.0Or if you want to connect world wide then you can use tunnels. These are popular tunnels: ngrok, Vortex, serveo etc. first step local host y...
I am trying to access my js server from different devices on the same internet. I got my Ipv4 address and typed that into my browser with :8080 because that is the port but it does not find the page.var http = require("http"); http.createServer(function(request, response) { response.writeHead(200, {"Content-Type": "...
When I start a local server I cannot access it from different devices connected to the same network
1 The connection being closed was the problem, and so this looks to be a problem with Docker.DotNet. Hopefully I'll get chance to create a pull request and fix this in the coming weeks, as apart from BuildFromDockerfile I've found the library very useful. For the time being...
I am trying to build an image on a remote linux vm using Docker.DotNet (a c# wrapper for the Docker Rest Api), but only the first line of my Dockerfile is being read: FROM ubuntu:14.04 RUN apt-get update && apt-get install -y php5-cli Consequently, only the base Ubuntu image has been created, and php has not been ins...
Only first line being read in Dockerfile
1 Yes, today it is a limitation with Get Metadata activity that it cannot return results > 4MB. One possible approach is to modify source files to load into separate folders each with < 5000 files and they can be accessed by Get Metadata activities separately. Since this ...
I am facing some issue and hoping that some of you have solved this before and can help me. :) I have a pipeline in ADF which uses get metadata activity to get list of files and then it iterates each items and based on certain values derived from filename, it unzips file and saves it to another folder. Now the thing i...
Azure Data factory - get metadata activity - The length of execution output is over limit (around 4MB currently)
--field-selector does not allow OR logic.Try this using grepkubectl get pod | grep "Running\|Completed"Or with awkkubectl get po | awk '{ if ($3 == "Running" || $3 == "Completed") { print } }'
I am applying below command to get the pods which are in running state:oc get pods --field-selector=status.phase=RunningI can get pods which are in running state. But I want to pods which are in Running and Completed stateHow can we apply OR logic on status of the POD?
How to filter pod which are in running & completed status using field selector
Don't look at the activity monitor, use Instruments (Profile, allocations).ShareFollowansweredSep 19, 2011 at 17:54zaphzaph112k2121 gold badges190190 silver badges229229 bronze badgesAdd a comment|
If I put a breakpoint on my first line of code from main function, I see in the activity monitor 17MB of memory for my app. Do you have any idea why the memory usage is so high without anything loaded? (Maybe the OS is loading many things, but not me)This memory usage has almost the same size as the app executable. Is ...
iPhone App has large memory footprint on startup
If you are using Unity 2019 or later, there is also Package Manager option. Basically you can keep all your code in a package project and make that project accessible by only developers. And keep all design assets in a separate project, that depends on your code project. So in that manner designers won't be able to mo...
We are using unity to develop games and I set up linux server and running gitlab on the server. I have created the repository for our game. But I want to separate design and code side. I don't want designers to reach code only developers should have access to the codes. at least is it possible to only let designers pu...
are there any possibility to prevent designers to reach code?
You're looking for AppFabric Cache. It's a Windows Server technology from Microsoft. It's free. I should also say that if you like memcached, you can use that on Windows as well, and in fact Microsoft Azure team members used to recommend it, before the AppFabric caching was available on Windows Azure.
I am trying to implement caching in .Net such that the cached data is accessible not just by an application that may run multiple times on the same machine but by other types of applications that may run on the machine. They could be windows services, web services, win forms etc. I have looked at System.Runtime.Cachin...
Caching across Applications in .Net on a Windows Machine
You can use the command to delete all previously installed versions of cypress. cypress cache prune
I'm running Cypress on Github CI. I upgraded from version 7 to 8 but tests are still runs on the 7 on. Can someone told me how do deleting this version?
Clean Cypress cache in GitHub CI
Branching For each class, run within the repository git checkout --orphan <classname>, and you can get a new parentless branch for that class's content. When getting local copies of your repository, run git clone --single-branch --branch <classname> <url> <localdir>, and it will only clone and later fetch that class's...
I was fortunate enough to obtain a free micro-plan Github account to use for my schoolwork through Github's EDU program. However, I am not sure how best to structure this for my CS classes. Ideally, I would have a different repository for each class -- CS101, CS102, etc. However, the micro-plan only allows up to 5 rep...
Having multiple 'sub-repositories' in one git repository?
You need to use reset and rebase to do this. Assuming you have repo.url git clone repo.url git remote add neworigin newrepo.url Now create branch on local copy git checkout -b myworkbranch 1) First time commit by single account At this moment master and myworkbranch are in sync Now see the log of all changes done on...
I have a odd assignment and I'm not sure how to do this... I need to look at a public repo and once a day take all the pushes that happened on that repo and re-push them via a single account to another repo. Kind of like a mirror but more of a re-committing all pushes
Recreating git pushes
Kubernetes supports multiple Ingress Controllers which are different from each other. For example, you are trying to use theIngress GCEand there is also a popularNginx Ingress.The main problem in your use case is that theIngress GCEis not supporting rewrites. An on-going feature request regarding that can be foundhere....
I’m setting up an environment in Google Cloud with an ingress and load balancers.I know how to setup hosts and paths to it but I can't figure out how to setup when a user goes to a specific sitehttp://example.com/I want him to redirect tohttp://example.com/en.Note:http=>https/=>/enUPDATEDI added app-root:/en(but it doe...
how to setup yaml ingress in google cloud with redirect
You could do something like this. Spring will automatically find the collector registry and wire it.@Component public class CustomeCounter { Counter mycounter; public CustomCounter(CollectorRegistry registry) { mycounter = Counter.build().name("test").help("test").register(registry); } public void incrementCounter(...
I am trying to add custom metrics in my spring-boot application. I have looked at numerous examples and still, I'm failing to add a custom Counter.application.propertiesmanagement.endpoint.metrics.enabled=true management.endpoints.web.exposure.include=* management.endpoint.prometheus.enabled=true management.metrics.exp...
Custom counter using prometheus not visible on /actuator/prometheus
Change the VS Code settings so you can run with your Docker virtual environment:Setpython.pythonPath": "path_to_your_docker_virtual_environment\python.exe"at the JSON settings file and save it.After you can configure you VS Code to run within your docker virtual environment. Install the package withpip install apache-a...
I am trying to write script for DAG. I have run docker-airflow and is running well up on browser through localhost. But, whenever i try to open a dag file in vscode, it shows the import error.I have installed and setup airflow using docker and activated docker using celery executor.Docker Container for airflow is runni...
VScode shows import error , can't import DAG
This seems to be an issue to docker users on Mac have ran into previously, as can be seen in this docker thread, https://github.com/docker/docker/issues/5113 While there is no clear fix, a slightly better workaround is to restart docker machine rather than your computer each time. You can run docker-machine restart de...
When I try to push new docker images to gcr.io using gcloud docker push, it frequently makes some progress before stalling out: $ gcloud docker push gcr.io/foo-bar-1225/baz-quux:2016-03-23 The push refers to a repository [gcr.io/foo-bar-1225/baz-quux] 762ab2ceaa70: Pushing [> ...
gcloud docker push hanging
For the AWS CLI, you need to provide the --no-sign-request flag to skip signing. Example: > aws s3 ls landsat-pds Unable to locate credentials. You can configure credentials by running "aws configure". > aws s3 ls landsat-pds --no-sign-request PRE L8/ PRE landsat-p...
I am trying to download data from one of Amazon's public buckets. Here is a description of the bucket in question The bucket has web accessible folders for example. I would want to download say all the listed files in that folder. There will a long list of suitable tiles identified, and the goal would be to get all fi...
Access aws s3 public bucket
This is the guide from Tableau I use whenever I need to setup SSL for my servers. It includes obtaining an SSL Certificate from a certificate authoritySteps for SSL CertTo configure Tableau Server to use SSL, you must have an SSL certificate. To obtain the SSL certificate, complete the steps:Set the OpenSSL configurati...
I can't connect with my Tableau Server from Tableau Desktop because it shows me that error:SSL certificate is not valid. I'm searching for a solution, but I'm only reading how to change the certificate with another, beacause I do not have any other certificate.My question goes before that: how can I get a certificate? ...
Get SSL certificate for Tableau
You appear to be connecting to your remote git repo using SSH. In your case, you won't be needing to usegit-credential-helper.Note that in the Github doc that you linked, it says:If you clone GitHub repositories using SSH, then you authenticate using SSH keys instead of a username and password.This applies to git repos...
All my credentials are in .gitconfig -─[$] cat .gitconfig 1 [user] 2 name = Shirish Agarwal 3 email =[email protected]4 [core] 5 editor = leafpad 6 excludesfiles = /home/shirish/.gitignore 7 gitproxy = \"ssh\" for gitorious.org 8 [merge] 9 tool =...
What's the difference between using .gitconfig and git-credential-helper?
The easiest way is to decompose your project into different git repo, and asking your team to fork the repo they need to work on.With theforking workflow, you are in control of the pull requests, so even if they are working on the wrong repo, they won't be able to integrate their modification to the actual original rep...
I'm new to version control so my team's project is divide into multiple parts.Is there a way to give my team members access to modify and upload their contribution to their individual section of the project using access token?I don't want to give them access to Edit anything outside of their scope, if you know what I m...
How to give team members permission to upload their contrinbution on specific part of project on Github?
2 +50 This is definitely not a complete answer, but hopefully can help. You can integrate your CUDA routine to TensorFlow by writing a custom op. There is currently no other way in TensorFlow to interact with other CUDA routines. As for wr...
Assume we generate our own training data (by sampling from some diffusion process and computing some quantities of interest on it for example) and that we have our own CUDA routine called generate_data which generates labels in GPU memory for a given set of inputs. Hence, we are in a special setting where we can gener...
Make TensorFlow use training data generated on-the-fly by custom CUDA routine
Alright false alarm guys, guava is not actually broken (surprise surprise). The reason is cause the code that was instantiating the DAO was instantiating a new object every time, so a new cache was also instantiated every time. I made the cache a static variable and it now works.
I'm using the Guava LoadingCache to store results from database queries. However, despite not setting an eviction policy, doing a get on the cache through getFromCache() results in my debug point in the CacheLoader load() method being hit every time, therefore also resulting a debug point in the database query method g...
Guava LoadingCache loads new value everytime for same key
You are being scanned for directory traversal vulnerabilities. It is very likely that these scans will return nothing, but it could also be the precursor to a compromise.Without a doubt the best method to defend against this attack is using aWeb Application FirewalllikeMod_Securitywhich I know for a fact has a rule ...
My server is attacked like this188.165.198.65 ./../../../../../../../../../etc/passwd%00 HTTP/1.1" 200 28114 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1"How can I defend it with .htaccess file?
Protect Apache server
Not sure if this is your case, but I had the same message when running any commands such as checking logs and for me it was because I was executing commands on the Heroku client that was not in the same directory as the one I created the app. From their docs "a git remote (called heroku) is also created and associated ...
I am trying to deploy my project build in angular 6 and CI to GitHub and deploy to the heroku. I have successfully deploy but when I try to open to link I get following error:Application error An error occurred in the application and your page could not be served. If you are the application owner, check your logs for d...
Missing flags issue after deploy to heroku
I found out what was the problem. It was my Apple M1 chip doing its incompatibility magic. For those who has the same problem, just adding the platform --platform=linux/amd64 in your Dockerfile seems to solve the problem: FROM --platform=linux/amd64 node:lts-alpine # more instructions...
I am pretty new to this Docker world and I am trying to deploy an image (nodejs-typescript service) from aws ECR to aws ECS but when I create the service inside the cluster this error appears and the taks never gets running: exec /usr/local/bin/docker-entrypoint.sh: exec format error My Dockerfile looks like this: FR...
AWS ECS exec /usr/local/bin/docker-entrypoint.sh: exec format error
Cron would definately be the preferred way to automate tasks, and not a php script in an infinite loop.see :http://en.wikipedia.org/wiki/CronYou many also want to consider using Zend Server which includes a component called Zend Job Queue which provides offline asynchronous processing of tasks and activities.see :http:...
Our system based on Zend 1 has a background process running as daemon to check hourly whether user has expired or not, if yes, the system will send verification email to these expired users.The code is really simple:while(1) { $worker = ... //get verification worker $worker->run(); sleep(3600); //run hourl...
Task/Job scheduling on PHP
Assuming all resource constraints are met all blocks/warps will be resident on a SM 3.0-7.0 at the same time and the each SM warp scheduler (4 per SM) will be allocated 1/4 the warps. On each cycle the warp schedulers will pick the most eligible active warp and execute 1-2 instructions (depending on the architecture). ...
Let's say your GPU has 8 SMs. So if you execute a CUDA kernel with enough blocks(let's say 200), will all 8 SMs be used for the execution?Now consider only a single SM. Let's assume there are 8 active blocks with 256 threads/block(8 warps/block). Max active warps=64.Will the 8 active blocks process in parallel once the...
How do SM(streaming multiprocessors), active blocks and active warps behave in GPU?
All you need is to add the following code to your root.htaccessfile:RewriteEngine on RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]ShareFolloweditedFeb 4, 2015 at 17:07CommunityBot111 silver badgeansweredJul 25, 2013 at 16:31Digital siteDigital site4,4271212 gold badges4949 sil...
When I type in my domain name like without thewww(likehttp://example.com), it doesn't work and gives error message. However, when I add thewwwto it (likehttp://www.example.com), it works.Isn't it supposed to work both ways (with and without thewww)?
Domain doesn't work without `www`
Change your Influx Service type toLoadBalancertype would give you an external IP for your Influx instance, then you can connect to Influx with that IP from your Python code. You can take a lookhereandhere.ShareFolloweditedDec 2, 2019 at 15:46Wytrzymały Wiktor12.5k55 gold badges2929 silver badges4242 bronze badgesanswer...
So, I have myInfluxdatabase deployed at myAWS Kubernetes Cluster(EKS).What I want is to be able to connect with the database with mypythonproject and be able to query the database.I can see that I can use the Influx API ,like theseexamples, but I cannot configure the database since it is not deployed locally. How am I ...
How can I connect with a database deployed at Kubernetes
The value of success here issuccessThreshold. It isnot a counter fieldkubectl explain pod.spec.containers.livenessProbe.successThresholdDESCRIPTION: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.simi...
I have implemented spring actuator health endpoints and added this in the Livelines probe - http-gethttp://:8080/actuator/healthwhen i describe the pod I don't see the #success counter is increasinghttp-gethttp://:8080/actuator/healthdelay=60s timeout=20s period=10s #success=1 #failure=3How to know if the liveliness p...
Openshift/Kubernetes liveliness probe Spring actuator
Anything that is delivered over an insecure channel.What this generally means is that the developer of the web page is combining HTTP-based URLs with HTTPS-based URLs in the same page. The URLs could be for images as well as JavaScript, CSS, or anything else that can be referenced from a web page. As a user, there's no...
I use the browser Firefox, and sometimes, on certain webpages, the SSL icon says "Some parts of this page are not secure, such as images." What, exactly, counts as an insecure element?Thanks!
Firefox: "Some parts of this page are not secure, such as images." What counts as insecure?
hg unbundleis used to apply the backup file:hg unbundle .hg/strip-backup/e64394fd5837-backup.hgHowever, this does not remove the new changesets that have been created by the rebase; it is probably a good idea to callhg unbundlefrom a repo that does not have the rebased changesets (i.e. clone latest version from server)...
I've accidentally pulled some changes from the main repo with --rebase parameter.How do I restore the original repository state from the backup which was created during the rebase?
Mercurial: How to restore after rebase
<div class="s-prose js-post-body" itemprop="text"> <p>Docker only allows adding files to the image from the context, which is by default the directory containing the Dockerfile. You can specify a different context when you build, but again, it won't let you include files outside that context:</p> <pre><code>docker buil...
<div class="s-prose js-post-body" itemprop="text"> <p>I have a monorepo that has holds various Go services and libraries. The directory structure is like the following:</p> <pre><code>monorepo services service-a - Dockerfile go.mod go.sum </code></pre> <p>This <code>go.mod</code> file resides in the root of the...
COPY failed: Forbidden path outside the build context
I have fixed it by removing all__pycache__pkg under test/ directory, the issue was when I was creating docker image its picking all my__pycache__and*.pycfiles too, at the time when test are running its using my local machine path instead of the path in docker container.Conclusion: Clear your*.pycand__pycache__files bef...
When I am running tests locally its working fine, but after creating the docker and running inside the container I am getting below error./usr/local/lib/python3.5/site-packages/_pytest/config.py:325: in _getconftestmodules return self._path2confmods[path] E KeyError: local('/apis/db/tests') During handling of th...
Getting error ImportMismatchError while running py.test
You must test https and www separately. Use:RewriteCond %{HTTP_HOST} !^www\. [OR,NC] RewriteCond %{HTTPS} off RewriteRule ^ https://www.mysite.am%{REQUEST_URI} [NE,R=301,L]
I have websiteհttps://www. mysite.amwhen I write in browser mysite.am, it works normally and openհttps://www.mysite .amwhen I delete firstwww. it opensհttps://mysite.amand don't work properly. What write in.htaccess fileto automated redirect allmysite.amdomain towww.mysite.am..htaccess:RewriteCond %{HTTPS} !on RewriteR...
Add www. when i delete www
This turned out to be easy, and I did it through editing the csproj file: ChangedWindowstoLinuxand reload.I am still not sure where you would do this from Visual Studio (if it possible).
I have a .NET Core Web Application project where I chose the incorrect OS under the "Enable Docker Support" checkbox:How do I change this for an existing project? And to be clear, I want to target linux, not "Switch to Windows Containers..." in docker.
How do you change Docker OS Support for a .Net Core Web Application Project?
Use an internal loadbalancer.apiVersion: v1 kind: Service metadata: name: cluster2-service namespace: test annotations: service.beta.kubernetes.io/aws-load-balancer-internal: "true"That will instruct the CNI to allocate the elb on a private subnet, which should make services behind it in the cluster reachab...
I have two Kubernetes clusters in AWS, each in it's own VPC.Cluster1 in VPC1Cluster2 in VPC2I want to do http(s) requests from cluster1 into cluster2 through a VPC peering. The VPC peering is setup and I can ping hosts from Cluster1 to hosts in Cluster2 currently.How can I create a service that I can connect to from Cl...
Connecting to Kubernetes cluster on AWS internal network
There are MYSQL functions you can use. Like this one that resolves the user:SELECT USER();This will return something likeroot@localhostso you get the host and the user.To get the current database run this statement:SELECT DATABASE();Other useful functions can be found here:http://dev.mysql.com/doc/refman/5.0/en/inform...
I am in a MySQL terminal session but I don't know what server I am connected to, or what database I am connected to.Is there a MySQL command that will tell me the host, port, and username and database I am using now?
Can a MYSQL trigger access the name of connection's user? [duplicate]
It's called MVC.You need to construct a data model for you application, write some sort of Record objects, and then you can determine their status. So your application would have some sort ofCalendarEventmodel, and when you load data from the server, you would instantiate instances.So when changing views, you would fi...
I have a calendar application and it loads all of the event data using ajax and json results. the issue is that i have different view and right now i have to re call the server when i change views.Is there any recommendation for ways i can cache this data on the client side and check if i have loaded these events alre...
How to avoid too many ajax calls and cache json data on the client side
Found a solution:There are 3 steps needed: 1) add 'reversion.middleware.RevisionMiddleware' to MIDDLEWARE_CLASSES in settings.py 2) create a pre_delete signal function to look up the SysApp object 3) explicit call save() for the SysApp objSome explaination: 1) By adding the middleware any changes to your models will be...
I have 2 classes:class ContactInternal(models.Model): name = models.CharField(max_length=80) SysAppApp = apps.get_app_config('SysApp') SysAppModel = SysAppApp.models reversion.register(ContactInternal, follow=["fk_contactinternal_sysapp"]) reversion.register(SysAppModel) # SysApp from another app called 'SysApp' c...
Model does not create a verion after deleting a foreign key model object (django-reversion)
you need to update package cache before install, and don't miss -y for apt-get install. FROM jenkins/jenkins:lts RUN apt-get update && apt-get install -y maven
I'm using the jenkins/jenkins:lts image at the moment. It runs fine and does everything I want to expect one thing. I want it to run Maven goals in the build steps. The problem is that there is not maven installed in the jenkins container environment. So I want to extend the mentioned image to run an apt-get install m...
extend jenkins image to install maven
Yes in both cases. String types are immutable. Therefore converting them to a mutable slice type will allocate a new slice. See also http://blog.golang.org/go-slices-usage-and-internals The same with the inverse. Otherwise mutating the slice would change the string, which would contradict the spec.
Is it true that converting from string to []byte allocates new memory? Also, does converting from []byte to string allocates new memory? s := "a very long string" b := []byte(s) // does this doubled the memory requirement? b := []byte{1,2,3,4,5, ...very long bytes..} s := string(b) // does this doubled the memory...
Technical things about conversion from []byte and string in Golang
Use themapdirective:map $cache $control { 1 "public, no-transform"; } map $cache $expires { 1 1d; default off; # or some other default value } map $uri $cache { ~*\.(js|css|png|jpe?g|gif|ico)$ 1; } server { ... expires $expires; add_header Cache-Control $control; ... }(...
I like add cache control header with nginx for some extensions such as .jpg, etc but so far some of the solutions I found on the net, I couldn't get it to work. I will tell you what I have tried.I have tried variations of the following in different place in the .conf file of my site and when I tried the site become bla...
how to add cache control header with proxy pass in nginx for some file extensions
7 docker-compose.yml supports a user directive under services. The docs only mention it in the run command, but it works the same. I have a similar setup and this is how I do it: # file : docker-compose-prod.yml version: '2' services: web: image: "private/web" p...
I'm trying to deploy a very simple Symfony application using nginx & php-fpm via Docker. Two docker services : 1. web : running nginx 2. php : running php-fpm; containing application source. I want to build images that can be deployed without any external dependency. That's why I'm copying source code within the php c...
How to deal with permissions using docker - nginx / php-fpm
Currently, You cannot delete all the items just by passing the Hash key, to delete an item it requires Hash + Range because that's what makes it unique. You have to know both your (hash + range) to delete the item. Edit: Here is the reference link from DynamoDB documentation http://docs.aws.amazon.com/amazondynamodb...
Consider the following table: Table (documentId : Hash Key, userId: Range Key) How can I write a code to delete all the items having the same documentId and preferably without retrieving the items.
DynamoDb: Delete all items having same Hash Key
The R9 290 does indicate support for Tiled Resources Tier 2 in the caps viewer on the latest Catalyst beta driver. It should also be enabled on the latest retail one as well. The R7 should have the same level of support.
I develop an application utilizing D3D11.2 Tiled Resources feature. I have GeForce 780 and some Radeon 7900 series graphics cards, but both support only Tier 1 set.A year ago, AMD claimed to have a hardware fully supporting Tiled Resources, but Direct3D caps reporting, that only Tier 1 can be used, determined that was ...
D3D11.2 Tiled Resources Tier support in AMD Radeon
So, I found a solution, I can specify the redirect as follows:rewrite ^ $scheme://$http_host/foobar.html redirect;This will preserve the port.
I have an Nginx server listening on80ran inside a Docker container.Inside the Nginx config I need to perform a redirect to a static page in specific situations.rewrite ^ /foobar.html redirect;The user can run the container specifying any port using the docker command line (for reference, she can expose the container on...
Nginx: preserve port during redirect
The Build Breaker stopped working in SonarQube 5.2. You now have 2 ways to implement the Build Breaker functionality:thecommunity supported plugintheapi/qualitygates/project_statusweb service (developed in 5.3). You can then easily create your own script to check the quality gate status of a given projectFor a bit of c...
I am usingJenkins Continuous Integrationserver andSonarqubefor code coverage. I want to make sure that if the issues in the project reach athresholdvalue ofQuality Gate, the project build should fail. I have installedBuild Breakerplugin inSonarqube. I read somewhere that it applies on each and every project by default ...
How to use the Build Breaker on sonarqube 5.1+ if a project quality gate fails
Reading "GitHub Behaviors with [AWS] CodeDeploy", it may be a permission issue:After you give CodeDeploy permission to interact with GitHub, the association between that GitHub account and application is stored in CodeDeploy.You can link the application to a different GitHub account. You can also revoke permission for ...
I wanted to deploy my code in github using codedeploy but the option "My application is stored in GitHub" is disabled. why is it disabled? and how can I enable it?
aws code deploy disables github revision option
Update: There's now an automated solutionSeehttps://stackoverflow.com/a/66470086/151312Original PostAs of nowGithubdoesn't have an unfork option, so the only solution is to delete the forked repo.Warning: The following solution will delete your cloned repo. If you want unfork without your repo is being deleted try this...
How can I un-fork a GitHub repository?I have never seenunforkoption - is it possible to do that?
how to un fork the github repository?
First check the taint present or not with nodenamekubectl describe node <nodename> | grep Taintsand you will get something like this (master or worker_node)node-role.kubernetes.io/master:NoScheduleTo remove taint from node just run like this (here in my case it is master node)kubectl taint node master node-role.kuberne...
In my Kubernetes Dashboard i see, that one node has the Labelnode-role.kubernetes.io/master:The result is, that all my pods are deployed on the cluster except this node. ( When i increase the replica no pod will be deployed on the master node) How can i remove the label, i tried theKubernetes Trouble Shooting GuideFoll...
Master tainted - no pods can be deployed
I had the same problem in ubuntu 14.04. It was necessary to install both postgresql-client-common (which contains pg_dump and pg_restore)andpostgresql-client packages.
I have to take backup of my database but when I right click DB and then backup The button for backup is disabled. Similarly in existing database ,not able to restore because the Restore button too disabled. I was working fine till the time I created a new database.How do they get enabled?
Backup and Restore option not available in pgAdmin III
I think you've been hacked, possibly by someone using a downloadable rootkit. They're available to any moron with a modem, many of whom won't even know what to do with the system once they've successfully hacked in.The safest thing you can do is re-install the OS from scratch, and this time employmuchstronger passwords...
I am trying to figure out if my /var/spool/crontab/root is getting overwritten by a virus or malicious code:I woke up this morning and my /var/spool/crontab/root file was empty, except for this line, which was not written by me:* * * * * /usr/home/.bash_history/update > /dev/null 2>&1I looked for thisupdatefile that is...
centos: root user's crontab gets deleted and replaced - malicious code?
Below approach works for me which is from MemoryError with python/pandas and large left outer joins import csv def gen_chunks(reader, chunksize=1000000): chunk = [] for i, line in enumerate(reader): if (i % chunksize == 0 and i > 0): yield chunk del chunk[:] chunk.appen...
I try to merge two large size dataframes. One dataframe (patent_id) has 5,271,459 of rows and the others have more than 10,000 of columns. To combine these two big dataframes, I use "merge" and separate right dataframe into chunks. (similar with MemoryError with python/pandas and large left outer joins) But it still m...
How do we use "left outer join" for large size pandas dataframes (larger than 5~20GB)?
Usedocker logincommand. (Official doc)Enter your credentials, and then you can pull private image, only if you have an access.If you want to login to a self-hosted registry you can specify this by adding the server name.docker login localhost:8080Thanks to@herm'scomment, if you want to use swarm, use :--with-registry-a...
I'm using docker-compose command to run multiple containers. The problem is my docker-compose has to pull some images from the public repository and some from a private repository. What I'm planning to do is push all required images to the private repository but how can I make docker-compose pull the images from the pr...
Use docker-compose to pull images from private repository
See http://blog.tsul.net/2008/04/ossystem-and-its-return-value.html On windows it seems that system() and wait() both always return 0. On unix or mac, system() will return "a tuple containing its pid and exit status indication: a 16-bit number, whose low byte is the signal number that killed the process, and whose hig...
I'm currently setting up and running a number of commands with os.fork and os.system commands. I set the time and memory limits through resource.setrlimit, and that seems to be working fine. However, each program has it's own way of crashing because of a memory cap -- a python program throws a MemoryError, a c++ progr...
How to detect memory limit of os.system
SQLite3is a great fit for what you are trying to do. It's used by a lot ofcompaniesas their embedded app database because it's flexible, fast, well tested, and has a small footprint. It's easy to create and blow away tables so it plays well with testing or single-application-use data stores.The SQL language it uses is ...
I need a database with low memory requirements for a small virtual server with few memory. At the moment I'm stuck with SQLite and Kyoto Cabinet or Tokyo Cabinet. The database should have a Ruby interface.Ideally I want to avoid key-value-stores, because I have “complex” queries (more complex than looking up a single k...
Database with low memory requirements and Ruby interface
"/sys/class/thermal/thermal_zone10/temp" Took me a lot of time to figure out because I was unable to find any help online regarding this. I was able to find out that sensor10 belongs to GPU but I am unable to find that file again which contains the value because digging is too deep and complicated.
I'm developing an Android application to manage GPU temperature. In the same way I read CPU temperatura (/sys/devices/virtual/thermal/thermal_zone0/temp) I was searching something to get the temperature for GPU in Android but coouldn't find anything. My question is: It is possible get temperature from GPU in Android? ...
Get GPU temperature in Android
information of the authenticated userWhen you seeDefine clusters, users, and contexts, you realize you need to get the information associated with a definedcontext.kubectl config --kubeconfig=config-demo use-context dev-frontend kubectl config --kubeconfig=config-demo view --minifyThe output shows configuration informa...
I'd like to confirm information of the authenticated user and assigned role and assigned cluster role. How can I do it?
How to show information of myself using kubectl?
3 Terraform doesn't support interactive prompts during module installation, including from Git, so to use a git source for a Terraform module will require you to specify the credentials in a different way, which will probably be one of the various options described in the g...
I am trying to download a Terraform module using GitHub as source. The module source is given below: source = "github.com/my-org/tf-modules//azure/func-app/v1?ref=v2.0.0-major-1" However, when I do terraform init I get the following error: │ Could not download module "planner" (main.tf:15) source code from "github....
Specifying repository username while working with remote modules
i think you are using BuildKit, if the variable DOCKER_VARIABLE is DOCKER_BUILDKIT=1? then you are using the Buildkit. To use what was used previously to view the output of a build, then set, DOCKER_BUILDKIT=0 docker build -t sometag . The BuildKit offers many improvements compared to the previous builder. More inform...
When a build failed in a previous version of Docker, I could count on output like this: ---> 8f9941c285e2 Removing intermediate container 9a543227b6b8 Step 6/21 : RUN adduser -s /bin/sh -h /home/user -D user && mkdir -p /whl && chown -R user:user /srv /whl ---> Running in 93a90935664d ---> 7f700d063b68 Removing i...
How to determine the last successful layer in failing docker builds
If you have CTZ then just invert the value and count trailing zeroes: if (x == -1ULL) return /* failure? */; int index = __builtin_ctz(~x); E.g. v x = 0000 1111 0000 1111 0000 1111 0000 1111 ~x = 1111 0000 1111 0000 1111 0000 1111 0000 index = __builtin_ctz(~x) = 4
I'm writing a small slab allocator for my program, however instead of using lists with locking mechanism, After reading a paper on lockless heaps by IBM, i decided to implement something like that. However which GCC intrinsic (ffs/ffz/ctz etc..) would be most efficient and why ? My most likely target will be ARMv7 and...
Find first zero bit in a word from right (LSB)
I have had this exact same problem so I tried using the epel-release-9package. This solved it for me:sudo dnf installhttps://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
I am trying to get SSL certificate with let's encrypt nginx. First, I added epel using the commands$ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpmand$ sudo rpm -ihv --nodeps ./epel-release-latest-8.noarch.rpmand it installed with no problem then I triedsudo yum install python3-certbot-ngin...
Installing let's encrypt on Amazon Linux2023
1 You can create a pull request from the main repo to your fork (just create a new pull request, click on "Compare across forks" and select the branches you want). Share Improve this answer Follow ...
I have only seen this question asked about pull requests, but I have not made a pull request. Normally if I have this issue with a PR, I go to the PR and it tells me exactly what files are creating the conflict and it gives me the option to resolve. But I just have a forked repo that I'm trying to update because the o...
"This branch has conflicts that must be resolved" but no option to resolve
+dictionaryWithObjects: returns an autoreleased dictionary -initWithObjects: you must release yourself if you want the dictionary to persist as a instance variable, you should create it with an init method or retain an autoreleased version, either way you should be sure to release it in your dealloc method An excellen...
Still learning Objective-C / iPhone SDK here. I think I know why this wasn't working but I just wanted to confirm. In awakeFromNib, if I use [[NSMutableDictionary alloc] initWithObjects:...] it actually allocates (iPhone) system memory with this NSMutableDictionary data, but when I use [NSMutableDictionary dictionaryW...
Difference between [[NSMutableDictionary alloc] initWithObjects:...] and [NSMutableDictionary dictionaryWithObjects:...]?
i have seen/syswent read-only when the container is using host networking.While sometimeskube-proxycontainer inkube-systemalso running in privileges mode.you can try running yourPODorcontainerin priveledges mode.Forpod, you can update thesecurityContext: privileged: trueAlso, you can try changing the user in the dock...
I want to startRAID integrity checkfrom pod. For that, I need to write some data in /sys/block/mdX/md/sync_action file. I don't want to use privileged container. So, far I have tried below things.Set access control for user and set below securityContextsecurityContext: runAsUser: some-user-id runAsGroup: so...
How to write to a file under sysfs from Kubernetes pod?
Try this:(?=^.{1,254}$)(^(?:(?!\d+\.|-)[a-zA-Z0-9_\-]{1,63}(?<!-)\.)+(?:[a-zA-Z]{2,})$)The question mark after the period which ends the "subdomain" section of the regex has been removed, making it mandatory rather than optional.
I found this regex athttp://gskinner.com/RegExr/to validate a FQDN domain:(?=^.{1,254}$)(^(?:(?!\d+\.|-)[a-zA-Z0-9_\-]{1,63}(?<!-)\.?)+(?:[a-zA-Z]{2,})$)it basically works but I want to modify it to not allow hostnames of three or more chars and no domain. For example, currently this is valid:wwwThis isn't:wwThis is to...
Validate a FQDN
It's not possible to embed videos directly, but you can put an image which links to a YouTube video:[![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](https://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)For more information about Markdown look atthis Markdown cheatsheeton GitHub.For more...
I am fairly new to markup (though it's extremely easy to pickup). I am working on a package and am trying to get the wiki pages looking nice as a help manual. I can insert a YouTube video link into the wiki page pretty easily but how do I embed a YouTube video. I know this may not be possible.I have read you can use HT...
How can I embed a YouTube video on GitHub wiki pages?
I had the same problem in the AWS web interface after AWS Command Line (CLI)-deleting a "recursive" folder in a bucket. Some objects randomly reappeared (not files, but in fact "folders") in the web interface. Even though i tried to delete these folders in the web interface, they were still there (The interface said t...
I'm using the web interface of Amazon's S3, and when I right-click a folder X and choose Delete, X seems to be deleted. Then when I refresh the interface, X may either disappear or remain; if I keep clicking refresh, the folder is either missing or present. Is this a bug, or am I doing something wrong? The folder is s...
Can't delete directory from Amazon S3
Your username or password may have spaces after it.The problem from your script is the authentication - that's the first three lines of the txt file.
I can connect successfully to my ftp server from cmd but when i execute the .bat script to connect to ftp server it gives me:503 Login authentication failed identification failure.I'm sure my password and username are correct so could be any other reason that gives that error? My .bat script is:ftp -s:ftp.txtAnd my ftp...
failed to connect to FTP server from batch script
I your commit is on your branch and it has not merged into other branch, you can do reset and force push it with:git reset --hard HEAD~1 git push -fIf above not satisfied, you can revert with:git revert your-commit-hash git push
This question already has answers here:Remove last commit from remote Git repository(2 answers)Closed4 months ago.I'm a working on git and github... I did a commit (git) and also a push (github), but I want to undo both changes.How I can do it ?I didn't nothing yet. I hope some one here help me, for example with a tuto...
How I can undo a commit on git and push at gihub? [duplicate]
You do not need to usealiasin this scheme, but if you wish to run PHP with two separate roots, you will need to use a nestedlocationblock.For example:root /home/domain/public_html/www/prod; location / { try_files $uri $uri/ /index.php?q=$uri&$args; } location ~* \.php$ { fastcgi_pass 127.0.0.1:9000; includ...
I'm having trouble setting up two locations in my Nginx conf file.I had no problem having two locations before adding one with an alias.Location / with alias doesn't work. Location /dev without alias works. I would like to use two aliases because I have two folders :prodanddev.Here is my current conf :server { list...
No input file specified : Can't config NGINX Alias
Use grafnaplugin 3.1.4, you can download it fromhttps://github.com/taosdata/grafanaplugin/releases/tag/v3.1.4. Then follow the installation instructions in READMEhttps://github.com/taosdata/grafanaplugin#installation.Join the community here indiscordfor help.
My TDengine graph works fine, but the alert rule can not run. I got this detailed error message "tsdb.HandleRequest() error Could not find executor for data source type: tdengine-datasource".version info: system 14.04.1-Ubuntu, grafana v7.3.5, grafanaplugin 3.1.3
TDengine alert rule can not run
Only the statistics about number of pulls can be retrieved, at the moment. Then you can use Google Apps Script to record the number of pulls periodically and store it in a google sheet. You can find more about that herehttps://www.gasimof.com/blog/track_docker_image_pulls
I have a docker image on hub.docker.com. Is there a way to find out who is using my docker image or who is pulling it? Any statistics that hub.docker.com can provide.
Docker image statistics from hub.docker.com
<div class="s-prose js-post-body" itemprop="text"> <p><code>cPickle</code> comes with the standard library… in python 2.x. You are on python 3.x, so if you want <code>cPickle</code>, you can do this:</p> <pre><code>&gt;&gt;&gt; import _pickle as cPickle </code></pre> <p>However, in 3.x, it's easier just to use <code>p...
<div class="s-prose js-post-body" itemprop="text"> <p>This might be silly but I am unable to install <code>cPickle</code> with python 3.5 docker image</p> <p><strong>Dockerfile</strong></p> <pre><code>FROM python:3.5-onbuild </code></pre> <p><strong>requirements.txt</strong></p> <pre><code>cpickle </code></pre> <p>When...
installing cPickle with python 3.5
This solved my problem, although this might not be the solution in every case. Some ideas in the comments that might work for someone with more PHP knowledge than I have.I used @Igor's idea (in comments). Noticed that I could add a startdate (in milliseconds) and a count to the API call. One of the fields for each obje...
I use curl to get a big chunk of data from a web service. I find myself exhausting the memory limit when I use json_decode() on that data. I know I could increase the limit, but that is not a good solution since the data keeps increasing.The real problem is that I only need a small portion of the json that I am fetchin...
Can I remove data from json before using json_decode() in PHP?
If you installeddocker-enginefrom official repositories on your linux, it should be installed in/var/lib/docker, for your own configuration, find the respective path.There is/var/lib/docker/image/aufs/repositories.jsonfile where docker stores images with theirsha256values.cat /var/lib/docker/image/aufs/repositories.jso...
I want to know when I pulled a certain image, when you rundocker imagesThe Created field appear but the date that the image was pulled don't.
How can I check when was a docker image pulled?
-1 Although the settings in Nuget.config file will normally be reflected/shown in VS’s NuGet Package Manager – Package Source settings, please kindly try to add the package sources manually in VS > Tools > Options > NuGet Package Manager > Package Sources and see if VS will...
In Visual Studio 2019, I'm trying to connect to our private GitHub Package Registry but keep getting unauhorized error. Here's what I've done: Created a Personal Access Token (PAT) on GitHub with Write access to packages. I then created a nuget.config file with following code and placed it in c:\Users\My_User_Name\Ap...
Can't connect to GitHub Package Registry from Visual Studio
So after an Year, this is what I have came up withWe can register custom post_save register to the models in the app.py for each app where you want to update your cache or add the post_save listener for all the models while the project is initializing.These two post's helped to come up with receiver function which will...
Is there any way to notify django to refresh the cache if there were any changes made on the database related to the cache data ? I have found thispost, there is no latest answer and the django version mentioned was 1.6. I looked into the cachedocumentationand haven't found anything that directly relates to the questio...
Django Cache (Redis) auto refresh when data is changed
The-Xmsand-Xmxparameters refer toheapmemory, whereas the PermGen space is a separate memory pool.In other words, the total memory size available to your Java application will be 1.5 GiB rather than 1 GiB, and you'll get the full gigabyte of space for heap-allocated objects.
This question already has answers here:Is permgen included in -Xmx?(2 answers)Closed3 years ago.Assuming I start my java VM with the following parameters:-Xms1024m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512mDo the 512m PermGen spaceaddto the 1024m memory or are theypart of it? Or in other words, do I have a total ...
Is java PermGen space part of the total VM memory? [duplicate]
You may close it in a method annotated by@PreDestroyor@Bean(destroyMethod = "close"). But Sonar is not able to detect this fix, so provide// NOSONARhint.@Bean(destroyMethod = "close") public RestHighLevelClient restHighLevelClient() { return new RestHighLevelClient( RestClient.builder(new HttpHost(addre...
Sonar complains because RestHighLevelClient is not closed explicitly, but I am using spring-data and client is used by the repository transparenty for me.I have a configuration class@Configuration @EnableElasticsearchRepositories(basePackages = "foo.package.repository") public class RestClientESConfig extends AbstractE...
How to close ElasticSearch RestHighLevelClient in spring-data in order to avoid sonar blocking issue Resources should be closed
First of all, congratulations on your first push to Elastic Beanstalk! Now, about repositories. There are few options for you to continue your work on the second workstation, all depends on your future needs: Copy entire project directory from "workstation A" to "workstation B". Acceptable if you are going to continu...
I just discovered the amazing possibilities of AWS. So here is what I did yesterday: - I have created an EB stack (PHP) - Created a git repository on my workstation - Downloaded AWS tools for windows, - Did eb.init (the AWS config stuff) - Wrote some code - Finally git committed and aws.push-ed it to my EB stack Ev...
Elastic Beanstalk, Git and AWS Tools: How to clone repository to another workstation
You could just usefunctools.lru_cacheto do the caching. I accepts amaxsizeparameter to control how much it caches:from functools import lru_cache @lru_cache(maxsize=2) def test(n): print("calling function") return n * 2 print(test(2)) print(test(2)) print(test(3)) print(test(3)) print(test(4)) print(test(4)) ...
I want to write a function that accepts a single-argument function f, and an integer k, and returns a function that behaves the same as f except it caches the last k results of f.For instance, if memoize is the function we're after, and let mem_f = memoize(f, 2), then:mem_f(arg1) -> f(arg1) is computed and cached ...
caching last k results of a function in python
Most of your assumptions are correct except the following ones: saveOrUpdate is not used to propagate update changes but to: persist a transient entity (e.g. save) reattach a detached entity (e.g. update) When you load an entity in a Session, it's loaded into 1st level cache and any change you make to the entity w...
I'm new in Hibernate, I know that level1 cache is session-scope and level2 cache is cross-sessions, suppose I have an entity Person which contains fields Id and Name. create session1 and load a person, Id=1, Name="AAA" create session2, update this person, session.saveOrUpdate(person), Id=1, Name="BBB" back to session...
How does Hibernate 1st and 2nd Level cache work with multiple sessions
Use bash (or your preferred shell if not bash) in the entrypoint: ENTRYPOINT [ "bash", "-c", "./entrypoint.sh" ] This will run the entrypoint script even if you haven't set the script as executable (which I see you have) You an also use this similarly with other scripts, for example with Python: ENTRYPOINT [ "python"...
I have a multistage dockerfile which I'm deploying in k8s with script as ENTRYPOINT ["./entrypoint.sh"]. Deployment is done though helm and env is Azure. While creating the container it errors out "./entrypoint.sh": permission denied: unknown Warning Failed 14s (x3 over 31s) kubelet Error: failed to c...
Permission denied while executing script entrypoint.sh from dockerfile in Kubernetes
count( col )-- counts number ofROWSwhere colis not null. It's not about CH, it's ANSI SQL.You actually should use countIfStatusRes, countIf(StatusRes != '200'), countIf(StatusRes == '200'), ProviderOr sumsum(StatusRes != '200'), sum(StatusRes == '200'),create table XX(a Int64, StatusRes String) Engine=M...
Good day everyone, I ran into such a problem while adding monitors to grafana with metrics on the status of requests from our suppliers to the clickhouse database. I need suppliers whose status = 200 or! = 200 to return to the schedule.We want that when the condition - count (CASE WHEN StatusRes! = '200' THEN 1 END) is...
Vendor metrics from Clikhouse to grafana