Response
stringlengths
15
2k
Instruction
stringlengths
37
2k
Prompt
stringlengths
14
160
1 I solved the problem by talking to other developers and making sure that all development branches uses a prefix, in this case XAAI- then in my VCS root settings for triggers in each build configuration I make sure it only is triggered when that branch is checked in. fo...
I want to accomplish following via teamcity in my CI box. Master branch commit : Build and Release Beta branch commit: Build and Release to Crashlytics All other commits to any other branch: Build (side note since most of our development branches may or may not contain a prefix, it makes it difficult to use "featur...
Select Git branch for TeamCity Build Configuration
char *pmessage = "now is the time";Creates a string literal, the memory for the string is allocated somewhere in a read only location, it is implementation dependent detail of compilers to be specific.Modifying it will lead to anUndefined Behavior. So If you are using string literal it is your responsibility to ensure ...
#include<stdio.h> int main(void) { /* in this amessage is an array big enough to * hold the sequence of character and '\0' */ char amessage[] = "now is the time"; /* in this case a character pointer is * pointing to a string constant */ char *pmessage = "now is the time"; return 0; }I ...
how is memory allocated when a character pointer points to a string?
There's a nice documentation on how to integrate Spring-Boot with Docker:https://spring.io/guides/gs/spring-boot-docker/Basically you define your dockerfile insrc/main/docker/Dockerfileand configure the docker-maven-plugin like this: com.spotify docker-maven-plugin 0.4.11 ${docker.image.prefix}/${project.artifactId}...
What Docker base image (FROM) for Java Spring Boot application?I am just starting with docker, and I see thatFROMinsideDockerfilecan define image for Java likeFROM java:8If I am building using Gradle (or Maven) is the better base image to start to avoid configuring later what is common for Gradle/Maven project?And of c...
What Docker base image (`FROM`) for Java Spring Boot?
Consider using eager execution. It is perfectly tailored for this kind of dynamic tempering with your network.import random import tensorflow as tf tf.enable_eager_execution() x = tf.constant(1) for _ in range(10): dev = random.choice(['/cpu:0', '/gpu:0']) with tf.device(dev): x = x + 1 print('res {} comp...
One can use the environment variableCUDA_VISIBLE_DEVICESto specify which GPU (s) may TensorFlow use before the TensorFlow program starts, e.g.CUDA_VISIBLE_DEVICES=1 python my_script.py.How can I change which GPU (s) a TensorFlow program may use while it is running?I know that one could change the program to have checkp...
How can I change which GPU (s) a TensorFlow program may use while the TensorFlow program is running?
You may want to usekubectlin order to interact with your GKE cluster. Method of image update depends on how the Pod / Container was created.For some example commands, seehttps://kubernetes.io/docs/reference/kubectl/cheatsheet/#updating-resourcesFor example,kubectl set image deployment/frontend www=image:v2will do a rol...
I have created a new docker image that I want to use to replace the current docker image. The application is on the kubernetes engine on google cloud platform.I believe I am supposed to use the gcloud container clusters update command. Although, I struggle to see how it works and how I'm supposed to replace the old doc...
How do I update a service in the cluster to use a new docker image
I have found installing certain Tools to be troublesome when I have used Nuget either by using the CLI or the package manager. In the past I have had to directly install a tool in the csproj file. Check your csproj file and see if the installation of the SqlConfig took hold. If it has not just add it and run a dotnet r...
I'm trying to generate the Distributed SQL Server Cache for ASP.NET Core 2.0, using the CLI, but I only get an error. The instructions say to executedotnet sql-cache create <connection string> <schema> <table name>but when I do, it simply responds withNo executable found matching command "dotnet-sql-cache".I have ins...
Creating ASP.NET Core SQL Cache table
1 Issue resolved. Just replace the io.alterac blurkit library in your build.gradle dependencies with wonderkiln blurkit. implementation 'io.alterac.blurkit:blurkit:1.1.1' with this implementation 'com.github.wonderkiln:blurkit-android:1.1.1' Sync project and it will work ...
I'm working on a project and I have some problems with connecting "blurkit" library. I took implementation from GitHub and passed it to dependencies in build.gradle, but when I rebuild the project I have this message:
I can't add "blurkit" library to my android studio project
1 The rate determines how fast requests are processed. If you set the rate to 10r/s, that means 1 request will get processed every 0.1 seconds. If you get 5 requests all at once, it doesn't mean that they'll all go through because there're less than 10 requests. They'll...
As per my understanding, in limit_req in nginx, we set the limit as max req/sec. On breaching that limit, further requests are put in the burst queue and delivered/executed at a delay. If burst is also breached, user get 503 error.( If delay is not required then noday can be set ) What I am not able to find is setting...
NGINX: SETTING DELAY TIME IN BURST
This is a false positive that is already fixed and soon to be released with SonarQube Java 3.14.For further reference, please checkSONARJAVA-1478.ShareFollowansweredApr 30, 2016 at 6:52Fabrice - SonarSource TeamFabrice - SonarSource Team26.6k33 gold badges6363 silver badges5858 bronze badges2Uh? Link is not dead.–Fabri...
This question already has an answer here:When is an IntStream actually closed? Is SonarQube S2095 a false positive for IntStream?(1 answer)Closed6 years ago.I have a next code:private Stream<Field> getStreamWithAccessibleFields(final Object object) { return Arrays.stream(object.getClass() .getDeclaredFi...
How to close an Arrays.stream? [duplicate]
I had a problem with pull request. I found this answer on the Internet and it helped me. It implies a simple deletion of this file from the computer and a new commit.find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch git add .gitignore git commit -m '.DS_Store banished!'ShareFolloweditedFeb 9, 2022 at...
I'm fairly new to Git and Github and also gotten very confused at Git's vast array of command line. Today I push my commit like usual and create a pull request. But when my coworker tries to merge, it shows:This branch has conflicts that must be resolvedUse command line to resolve conflicts before continuing.Conflictin...
How to resolve merge pull request conflict for .DS_Store the easiest way?
The way ELF program loading (and memory mapping in general from files) is on a page basis. So the addresses involved, the offsets in the files, and the size must all be multiples of the page size. However, the program loader is smart enough to deal with sections that do not begin or end exactly on a page boundary by ...
I see the process image through pmap under linux: 08048000 0 4 0 r-x-- [my program] 08049000 0 4 4 rw--- [my program] The three segments above are code, rodata and data segments, which are all aligned to the PAGESIZE(4K),but when I put the command objdump -h, the ELF headers are...
Different addresses in ELF header and process virtual memory
I thought exporting theFLASK_APPenvironment variable was a permanent export. Apparently not.Changing the command to:@reboot cd /home/debian/io_server && . venv/bin/activate && export FLASK_APP=io_server.py && flask run --host=0.0.0.0has solved the problem.
I have a simple Flask app (calledio_server) within a virtualenv. This directory structure looks like this:root@beaglebone:/home/debian/io_serverI want to automatically start the Flask app on reboot of the Beagle Bone.To do this I created a crontab with the following line:@reboot cd /home/debian/io_server && . venv/bin/...
Starting cron job to run Flask app in venv on Beagle Bone
From what I can see:Defaultis used when the cache control headers do not provide a caching durationMaximumcan override the cache control headers by enforcing a shorter caching durationFor example, if the application sets the caching duration to 90 minutes via the headers, but the Maximum TTL is set to 60 minutes, then ...
AWS CloudFront default cache behavior allows customizing Min TTL, Max TTL and Default TTL value. I repeatedly went through the documentation but could not understand what is actual difference between Default TTL and Maximum TTL. For example, if I give 24 hours (in seconds) in Default TTL then what happens to a differen...
Difference in AWS CloudFront Maximum TTL and Default TTL cache behavior
Looks fine for me. Not sure if you need run this job once or every time, when a new pod is up?If it is running before Django service pod started every time, maybe you can get help withInit ContainersExample:apiVersion: v1 kind: Pod metadata: name: myapp-pod labels: app: myapp spec: containers: - name: myapp...
Is the best approach to make migrations and migrate models using a Job and a Persistent Volume Claim on Kubernetes Django deployed app?Persistent VolumeapiVersion: v1 kind: PersistentVolumeClaim metadata: name: csi-pvc spec: accessModes: - ReadWriteOnce resources: requests: storage: 5Gi storageClass...
Django migrations by Kubernetes Job and persistent Volume Claim
I haven't tested UDP but for TCP as soon as the SYN packet was sent the connection become ESTABLISHED soclient1 -SYN-> client2 NEWclient1 <-SYN-ACK- client2 ESTABLISHEDShareFollowansweredApr 8, 2013 at 2:12CatFishCatFish5711 silver badge55 bronze badgesAdd a comment|
I am trying to block external networks from initiating a connection to my internal networks for both TCP and UDP. My thought is to use --state. I am uncertain about what man page for different states mean."NEW meaning that the packet has started a new connection, or otherwise associated with a connection which has not...
Iptables States
So first you should exclude thenode_modulesfolder from your git and use a proper deployment where you run the npm commands on your server. That folder will be very big. Or run your script for combining your script and then add only that files to your repo.When you try to add a folder to git you have to do it recursivl...
As mentioned in the title, I can't add my node_modules file to my repo. I added all the other files. Then I did git commit -m "Initial Commit". Finally, I did git push origin master and was able to push all the other changes for my other files. However when I do git add node_modules, it does not work. I don't get any r...
git add node modules no response
Try to add this at the beginning of your script:chdir(dirname(__FILE__));
I have a cron that's set to run every ten minutes that works fine if I execute the file manually by enteringphp register.phpBut, my cron will not execute this file once it includes anythingcURLrelated. My cron is as follows*/10 * * * * /usr/bin/php /var/www/html/register.phpI know that the cron is getting the correct f...
Crontab not executing script with cURL
It looks like the default auth plugin for GKE might be buggy on windows. kubectl is trying to run gcloud to get a token to authenticate to your cluster. If you run kubectl config view you can see the command it tried to run, and run it yourself to see if/why it fails.As Alexandru said, a workaround is to use Google App...
I was successfully able to connect to the kubernetes cluster and work with the services and pods. At one point this changed and everytime I try to connect to the cluster I get the following error:PS C:\Users\xxx> kubectl get pods Unable to connect to the server: error parsing output for access token command "C:\\Progra...
Kubernetes suddenly stopped being able to connect to server
The master copy is available at /etc/rancher/k3s/k3s.yaml. So, copy it back to ~/.kube/configcp /etc/rancher/k3s/k3s.yaml ~/.kube/configReference:https://rancher.com/docs/k3s/latest/en/cluster-access/
I accidentally deleted the config file from ~/.kube/config. Every kubectl command fails due to config missing.Example:kubectl get nodesThe connection to the server localhost:8080 was refused - did you specify the right host or port?I have already install k3s using:export K3S_KUBECONFIG_MODE="644" curl -sfL https://get....
Deleted ~/.kube/config
You can create an .htaccess in each directory that you want a different directory index in. The .htaccess in theexdirectory should contain:DirectoryIndex index_file.htmlBut the on inex2should contain:DirectoryIndex index_file2.htmlYou can also use<Directory>in the .htaccess in your web root as long as you are allowed t...
I know that you can useDirectoryIndex example.htmlin .htaccess, but what I need is to change the index for specific directories, like so:DirectoryIndex /ex/index_file.htmlorDirectoryIndex /ex2/index_file2.htmlIs there a way that you can accomplish this? I don't want to rename the file I'm trying to do this for to index...
Can you change the DirectoryIndex of specific directories?
You could overload operator new: #include <vector> void *operator new(size_t pAmount) // throw (std::bad_alloc) { // just forward to the default no-throwing version. return ::operator new(pAmount, std::nothrow); } int main(void) { typedef std::vector<int> container; container v; v.reserve(v.max_...
I port a middle-sized application from C to C++. It doesn't deal anywhere with exceptions, and that shouldn't change. My (wrong!) understanding of C++ was (until I learned it the hard way yesterday) that the (default) new operator returns a NULL pointer in case of an allocation problem. However, that was only true unt...
Avoid std::bad_alloc. new should return a NULL pointer
Kubernetes does not use SSH that I know of. It's possible your deployer tool could require it, but I don't know of any that works that way. It's generally recommended you have some process for logging in to the underlying machines in case you need to debug very low-level failures, but this is usually very rare. For my ...
I am trying to create k8s cluster. Is it necessary to establish ssh connection between hosts ?If so, should we make them passwordless ssh enabled ?
Is ssh connection between hosts necessary to create kubernetes cluster?
I think you need to do something like that:@Grab('org.yaml:snakeyaml:1.17') import org.yaml.snakeyaml.DumperOptions import org.yaml.snakeyaml.Yaml def options = new DumperOptions() options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK) Yaml yaml = new Yaml(options) // load existing structure def structure = yam...
I have a yaml file(config.yaml) with tags/structure similar to what is mentioned below. I need to add a new tenant(tenant3) to the list of the existing tenants. How do I achieve it using the pipeline/groovy script? Any help/lead would be appreciated.consumer_services: - security - token id: 10000 tenants: tenant_1: ...
How to append the new tag to the list of existing tag in the yaml file using groovy/pipeline script
To solve this issue I had to run an oldermongo-dbdocker image version (4.4.6), as follows:image: mongo:4.4.6Reference:Mongo 5.0.0 crashes but 4.4.6 works #485
I am trying to deploy amongo dbdeployment together with service, as follows:apiVersion: apps/v1 kind: Deployment metadata: name: mongo-deployment labels: app: mongo spec: replicas: 1 selector: matchLabels: app: mongo template: metadata: labels: app: mongo spec: contai...
Mongo DB deployment not working in kubernetes because processor doesn't have AVX support
I faced similar issue and deleting.nextfolder solved it for meShareFollowansweredMay 14, 2023 at 12:21Akshay Vijay JainAkshay Vijay Jain14.5k88 gold badges6969 silver badges7878 bronze badgesAdd a comment|
I have cleaned1: Chrome all cache 2: yarn cache clean 3: remove the whole node_modules and yarn-ed againDespite still when I am running app in Chrome I can see a parameter, was renamed before. How?
How to clean cache in Next.js / React / Chrome?
The output shows two things that are currently untracked:../index.html– theindex.htmlfile in the parent folder./– the current folder, including all its contentsSo it does detect that you have an untracked file, but because it does know nothing about its folder as well, it just shows the folder to accumulate all its con...
I have setup GIT on AIX 6.1 and am facing problems.The sequence of steps I followed are as shown:I create a folder.Go into the folder and initialise the non-bare repositoryInitialise the username and user emailCreate a file named index.html with some data in the file.Create a subfolder named newfolderGo into the newly ...
GIT not tracking files
You can use the WMI for that, there is a c# code generator for WMI that helps a lot when creating WMI quires as it is not documented that well.The WMI code generator can be found here:http://www.microsoft.com/en-us/download/details.aspx?id=8572a quick try generates something like this:public static void Main() { ...
I'm in the process of creating a personal monitoring program for system performance, and I'm having issues figuring out how C# retrieves CPU and GPU Temperature information.I already have the program retrieve the CPU Load and Frequency information(as well as various other things) through PerformanceCounter, but I haven...
C# CPU and GPU Temp
AFAIK the Xml disassembler always extractsall child nodesof the specifiedbody_xpathelement - it would have been a nice feature to be able to specify Item Xpath instead :(.You can workaround this limitation by either:Creating a schema for the undesirable<BatchID>element, and then just eat instances of it, e.g. creating ...
I'm trying to split an incoming message in the following form:<Items> <BatchID>123</BatchID> <Item>...</Item> <Item>...</Item> <Item>...</Item> </Items>I've a pipeline with a XML disassembler which takes the Items schema and outputs the Item schema. On the Items schema, the Envelope property is set to...
In Biztalk, how do I split an envelope with an extra element?
Its inepel. To install it on AL2:# setup epel sudo amazon-linux-extras install epel # and sudo yum install openvpn
When I try to runsudo yum install openvpnon an Amazon Linux 2 instance that I just created, I receive the messageNo package openvpn availableDo I need to add a package repository? I don't find mention of needing to do so anywhere.
Amazon Linux 2 OpenVPN client package unavailable?
As documented in https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact, if you combine the "shell form" of CMD and ENTRYPOINT, the CMD specification is ignored: So you should rather use the "exec form" and write something like this: … ENTRYPOINT ["/usr/bin/chamber", "exec", "${E...
So I have a docker file which does this: ENV ENV ${ENV} ENV SERVICE_NAME ${SERVICE_NAME} USER app ENV HOME=/home/app COPY target /home/app/target COPY entrypoint.sh /home/app WORKDIR /home/app ENTRYPOINT /usr/bin/chamber exec ${ENV}_${SERVICE_NAME} -r 1 -- ./entrypoint.sh CMD java -jar -Dspring.profiles.active=docker ...
CMD doesn't run after ENTRYPOINT in Dockerfile
Kubernetes uses themetrics serverfor resource monitoring. The metrics server will show you the CPU and Memory but it won't store it anywhere.So You won't be able to store & get the historical data in the metrics server.Installation :https://docs.aws.amazon.com/eks/latest/userguide/metrics-server.htmlRepo :https://githu...
I'm trying to find all the ways that I can get the CPU and memory usage info in kubernetes. And based on that decide as to which one is the most efficient way of doing it. Collecting this stats during the orchestrator survey phase, using kube/container primitives. Any pointers will be appreciated. Thank you.
Ways to get CPU and memory info in k8s
Clear the Linux file cache sync && echo 1 > /proc/sys/vm/drop_caches Create a large file that uses all your RAM dd if=/dev/zero of=dummyfile bs=1024 count=LARGE_NUMBER (don't forget to remove dummyfile when done).
My java program spends most time by reading some files and I want to optimize it, e.g., by using concurrency, prefetching, memory mapped files, or whatever. Optimizing without benchmarking is a non-sense, so I benchmark. However, during the benchmark the whole file content gets cached in RAM, unlike in the real run. T...
How to measure file read speed without caching?
I checked with myDigitalOceantechnical support and found out the reason: I restarted Nginx, but haven't restarted php-fpm which is the PHP process for Nginx.After I triedservice php7.0-fpm restart, phpMyAdmin is showing (Max: 150MiB) for importing limit now. And the importing works!
I was using phpmyadmin (Version information: 4.0.10deb1) on php 7.0.7 & nginx 1.4.6 . When I was trying to import a csv file to one of tables, I saw the max size allowed indicated on the phpmyadmin screen is 2,048KiB . Then I changed settings in php.ini (both /etc/php/7.0/fpm/php.ini & /etc/php/7.0/cli/php.ini):upload_...
phpMyAdmin import file size 2M limit
My preferred method of doing something like this is passing the client as a parameter to the function that will use it. Something likeimport boto3 def function(param1, param2, client=None): if client is None: client = boto3.client('elb') # use default client return client.do_stuff(param1, param2) def...
So let's say I have a long running web server that makes calls to the aws api? Is it safe to have a long running client object, or will that object possibly get corrupted and mess up my web server? For concreteness is it better to do something like thisimport boto3 client = boto3.client('elb') def function(): do ...
When using boto is it safe to have a long running client object?
-1I did it by another way for people that want to do it. It's some tricky thing but i did a template that rendered ci variable, and include it with an artifact for the trigger pipeline child. That job trigger the remote pipeline with the dynamic path.
I have a question about triggering a child pipeline.In my case I generate multiple projects with each project having a different pipeline. On my main build pipeline I need to launch the child pipeline dynamically with the new project created by the same pipeline (so the project name is different each time).My purpose h...
Gitlab ci Multiple trigger pipeline dynamic project name
Assuming that you've added your github fork as a repo namedoriginand that you care about the master branch:git push -f origin master:masterRepeat for each branch you want to replace.If you have any branches on your old fork you want to delete,git push origin :branch_name
This is the situation:Someone else has the "main" project on github, which I forked (on github) long ago, then made changes, eventually ending up with with my own mess which I do not want to keep any more.Now, I pulled the main's latest version to my local repository and make a few changes. I like to share this new ver...
github: discard my own fork, start over with fork from original, preserving my local changes
The answer is related to such performance metrics aslatencyandthroughput:Latency is a time interval between sending request and receiving response.Throughput is a request processing rate (requests per second).Latency has influence on throughput: bigger latency = less throughput.If a business transaction consists of mul...
Horizontal scaling means that we scale by adding more machines into the pool of resources. Still, there is a choice of how much power (CPU, RAM) each node in the cluster will have.When cluster managed with Kubernetes it is extremely easy to set any CPU and memory limit for Pods. How to choose the optimal CPU and memory...
Choosing the compute resources of the nodes in the cluster with horizontal scaling
Let's see whatRewriteRule ^(.*)$ http://www.example.com/wp_sub/$1means:You rewrite everything (^(.*)$) tohttp://www.example.com/wp_sub/$1.Well, you don't want to rewrite everything, do you? :)So we have to restrict this to only affect thewp-contentfolder:RewriteRule ^(wp-content/.*)$ http://www.example.com/wp_sub/$1 [R...
I moved wordpress files from root to a subdirectory. There are some files uploaded in wp-content/uploads folder. When accessing those files directly, I get a 404 error.I need to rewrite the url only for the wp-content/uploads through .htaccessWhat I need is to redirect fromhttp://example.com/wp-content/uploads/2012/09/...
Rewrite url for subdirectory in .htaccess
When trying to run multiple commands with background process you have to group the command and & using (). so The run statement should look as follows. RUN set -ex \ && apt-get update -yqq \ && apt-get upgrade -yqq \ && apt-get install -yqq --no-install-recommends \ python3-pip \ python3-requests \ softwar...
I have the following command in a Dockerfile. Which is executed everytime I create a new image. The issue is that this command fails because I have a & in Xvfb :99 &. What is a good way around it? Adding quotes did not help. RUN set -ex \ && apt-get update -yqq \ && apt-get upgrade -yqq \ && apt-get install -yqq --no-...
How do you create Dockerfile to RUN command with "&"?
The best advice I can think of is: don't bother. Statically declared String's will be in the constant pool any how so unless you are dynamically creating a String that is...errr no I can't think of a reason. I've been programming using Java since 97 and I've never actually used String.intern(). EDIT: After seeing your...
I want to make sure I don't pummel the permgen space, so I'm carefully interning my strings. Are these two statements equivalent ? String s1 = ( "hello" + "world" ).intern(); String s2 = "hello".intern() + "world".intern(); UPDATE How I framed my question was totally different from the actual application. Here's th...
Am I correctly interning my Strings?
Download the zip bundle. Extract it into your workspace. The library is inside the libraryproject folder. You need to import that one. and if you are directly importing from github, again you need to navigate to the libraryproject and import it.
I want to make pull to refresh listview for my application using this library: https://github.com/erikwt/PullToRefresh-ListView but I don't know how to import it in my android project. then say there is no project How can I do?
How we can use git hub list view library
You should addPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binin crontab.
I wrote a simple bash script that makes backups with rdiff-backup on Mac OS X Yosemite. Here it is:#!/bin/bash MODIF=`stat -f '%m' backup-data.txt` NOW=`date +%s` DIFF=$(($NOW-$MODIF)) BACKTIME=$((3600*8)) # EVERY BACKTIME/3600 HOURS SHOULD BE BACKUP if (($DIFF < $BACKTIME)) ; then echo "Last sync was not a long tim...
Why rdiff-backup doesn't execute from bash as cron on Mac Os X
While looking into 'ChoiceStatePre', I didn't see Default state. It seems the root cause of this failure. Please add Default state and try again. Something like this:"DefaultState": { "Type": "Fail", "Cause": "No Matches!" }
I have the following step function. The Execution is failing in the Choice State."States": { "Process": { "Type": "Task", "Resource": "arn:aws:lambda:us-east-1:123:function:dummy1", "OutputPath": "$", "Next": "ChoiceStatePre" }, "ChoiceStatePre": { "Type": "Choice", ...
Choice State not pointing to Next State - AWS
Try this in your .htaccess file :<FilesMatch "info\.php$"> Order Allow,Deny Deny from all </FilesMatch>ShareFolloweditedJul 12, 2015 at 12:18answeredJul 12, 2015 at 12:04Amit VermaAmit Verma41k2121 gold badges9595 silver badges115115 bronze badgesAdd a comment|
I have a website that has multiple PHP files with the same name, like this:martin/info.phpdavid/info.phppeter/info.phpHow can I disable opening info.php files?
How can I disable opening info.php files?
Yes, you shouldn't ever return addresses of temporary variables exactly for the reasons you give. The second variant is okay. However using dynamic memory allocation for built-in types will be very expensive. In case of built-in types it'll much cheaper to just return by value: int function() { return 5; } and it...
i want to ask about the following situation int * foo() { int fooint = 5; return &fooint; } int myint = *foo(); its based on http://www.functionx.com/cpp/examples/returnpointer.htm but i want to ask, if it is safe, because what i think will happen fooint gets initialized in the scope of foo() the address of...
C++ Memory management by returning a pointer to a simple type
2 If the data volumes are small enough, I'd go with the following CREATE DATABASE LINK A CONNECT TO ... IDENTIFIED BY ... USING ....; INSERT INTO COPY SELECT * FROM table@A MINUS SELECT * FROM COPY; You say there are about 20,000 to copy, but not how many in the entire dat...
I have a table ( A ) in a database that doesn't have PK's it has about 300 k records. I have a subset copy ( B ) of that table in other database, this has only 50k and contains a backup for a given time range ( july data ). I want to copy from the table B the missing records into table A without duplicating existing...
Copy data between tables in different databases without PK's ( like synchronizing )
__CUDA_ARCH__ when used in device code will carry a number defined to it that reflects the code architecture currently being compiled. It is not intended to be used in host code. From the nvcc manual: This macro can be used in the implementation of GPU functions for determining the virtual architecture for which it ...
In the host code, it seems that the __CUDA_ARCH__ macro wont generate different code path, instead, it will generate code for exact the code path for the current device. However, if __CUDA_ARCH__ were within device code, it will generate different code path for different devices specified in compiliation options (/ar...
The behavior of __CUDA_ARCH__ macro
You need to use the bridge network in both the ES container so that they can discover each other and than use the internal port in order to connect to another container using curl. Create a bridge network named as my-bridge-network docker network create -d bridge my-bridge-network use above created my-bridge-networ...
I deploy 2 container of Elasticsearch by the next commands: docker run --network host -p 9201:9200 -p 9301:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.8.1 docker run --network host -p 9202:9200 -p 9302:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/el...
Is there a way to communicate between 2 Elasticsearch containers on the same host?
The second developer should pull first the GitHub repo into his local repo, solving any conflict there.And then he can make pull requests.no need to re-fork (which doesn't make sense anyway: a "fork" is a clone on the GitHub side)no need for an extra-branch (if you both are working for the same set of feature, you can ...
So currently I've been coding rails apps using git and github. I usually work alone, but in my latest project I'm working with a second developer. I'm trying to figure out the standard methods for working with another user.Currently, I had him fork my gitrepo, and then just submit pull requests when he has changes read...
Proper workflow using git and github
Just like everything else in a Docker Container, your libraries are inside the container. Unless you mount a host volume, or a volume from another container of course. On the plus side, though, they're copy-on-write, so if you're not making changes to the libraries in your container (why would you do that anyway?) the...
In an environment where Docker Containers are used for each application, where are Python's shared libraries stored? Are they stored separately within each Docker Container, or shared by the host O/S? Additionally I'm wondering if it would be best practice to use a virtual environment regardless?
When using Docker Containers, where are shared Python libraries stored?
You have to commit the deletion before pushing: rm file git commit -a git push
I recently added a repo on https://github.com/me/myRepo. Then locally (on my computer) I removed a file rm ~/myDir/myFile I am trying now to make it disappear on github without success. I did: cd ~/myDir git rm myFile (I had already remove the file physically) git add -A git push But the file is still there... When...
how to delete a file on github (remote)
Problem is in prometheus.yml. If a json file is specified then the wildcard will work. I had to add the entire filename for the yml file for it to workglobal: scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. evaluation_interval: 15s # Evaluate rules every 15 seconds...
Getting errorlevel=error ts=2020-08-23T17:24:34.036Z caller=file.go:323 component="discovery manager scrape" discovery=file msg="Error reading file" path=/etc/prometheus/prometheus.yml err="yaml: unmarshal errors:\n line 1: cannot unmarshal !!map into []*targetgroup.Group"when trying to load a yml file_sd config.Prome...
Prometheus file_sd_config yml unmarshal error
1 My application doesn't need the complexity of extra tools, I just want to send a HTTP request in the same way I do with the public registry. I expect that the JSON access key file contains all the pieces I need, even if there is a ritual exchange with Google firs...
We've started migrating to Google Container Registry, from previously using our own in-house Docker Registry to host our images. As part of this, I'm creating an application that can query the available tags in the registry and return the list of results. For a public registry, this is trivial. I simply send a HTTP re...
Read from Google Container Registry using the API and Service Account JSON file
There is a download button labeled "ZIP" when you're in the root of the project. That will download the entire project. There's no simple way that I know of to download a single directory.
I'm going through a book with links telling me to download stuff from github. for instance look at https://dl.dropbox.com/u/39662979/githubShot.png. for the life of me I can't figure out how to download the contents of that ActionBarSherlock directory. I'm used to having a "download" button where you just get your ...
Getting started with github
You can use two independent metrics for your data. For the sake of this answer let's call themmetricXandmetricY.To showcase them at Grafana's XY Chart you'll need to do the following:Add panel, select type "XY Chart",add querymetricXas first query,under query expandOptions. SelectTablein Format dropdown,repeat 2-3 for ...
In the positioning system, a (x,y) position is generated every second. Can the (x,y) coordinates be saved to the Prometheus and displayed using the XY Chart in Grafana? Please show me the code.I think it's impossible because no metric can express two value at the same time, but it's possible with MySQL, can anyone find...
Prometheus data for Grafana XY chart [duplicate]
See this answer on a Reddit post I made:https://old.reddit.com/r/rust/comments/n2jasd/question_copy_big_value_from_box_into_vec_without/gwmrcxp/You can do this withvec.extend_from_slice(std::slice_from_ref(&big_value));. This performs no allocations, and just copies thebig_valuefrom the heap into a new slot in the vec....
I want to copy (not move) a very big value from a box into a vec. The normal way of doing this (dereferencing the box) means the value is copied onto the stack temporarily, which blows it. Here's an example and a Playground link where it can be reproduced.fn main() { let big_value = Box::new([0u8; 8 * 1024 * 1024])...
Copy big value from Box into Vec in Rust without blowing the stack
Here you go: - name: pull images from registry docker_image: name: hostname:5000/{{ item }} pull: true state: present tag: "{{RCD_VERSION_CURRENT}}" with_items: "{{ RCD_APIS.split(',') }}"
I have a string variable like this RCD_APIS=backend,api-alerting,api-tracking,api-versioning that contains the name of my docker images. I need to split it into an array and loop over it so I can pull each docker image I have tried the with_sequence loop but i get just the index (1,2,3,..) - name: pull images from reg...
how to split string to array and loop over it?
Use full path:php -q /home/username/public_html/myfolder/directory/admin/cron.phpOr simply usegetthe URL :GET http://example.com/myfolder/directory/admin/cron.php
I have put this command line in Cpanel cronjob/usr/local/bin/php -q /public_html/myfolder/directory/admin/cron.phpand got this errorCould not open input file: /public_html/myfolder/directory/admin/cron.phpI have checked, the file is there in the folder. This is basically a script that sends a login reminder to every m...
cron job does not work in cpanel
+25Do you have ssh access to the box? Personally I'd implement this outside of phpmyadmin, as phpmyadmin is just intended for manual operations via the interface. Why not write a simple script to export the db?Something likemysqldump database table.
I want to export some tables in my DB to an Excel/Spreadsheet every month. In PHPMyAdmin there is a direct option of exporting the result of a query to the desired filetype. How do I make use of this export feature without another script to run a cronjob on a monthly basis?Basically on a CPanel (the DB is hosted in the...
How do I make a CRON job to use the export feature of phpmyadmin to export DB
I've just come across another thread on StackOverflow which seems to have resolved my issue. I can leave the import statements as I indicated above in my question, and by setting the PYTHONPATH in the docker container correctly, I am able to get the imports working correctly in docker.How do you add a path to PYTHONPAT...
When importing python modules locally, I am able to successfully do so, however I'm having difficulty doing so when dockerising the app. It seems as though I get the opposite behaviour locally to how I get in the docker app... any thoughts?I have the following directory structure| app | |api.py | |settings.py...
ModuleNotFoundError and import errors in Docker container
Are scoped_ptr<> and auto_ptr<> effectively obsolete?auto_ptris deprecated in C++11, so there's your answer.scoped_ptrdoesn't exist in C++11 and never did. The main reason to useboost::scoped_ptris toensurethat ownership is never transferred (unless you cheat, of course). Then again, if you useunique_ptr, ownership can...
As I understand it, in the current specification of C++11, one should use:std::unique_ptr<>for one owner (most of the time)std::shared_ptr<>only when there are multiple owners in acyclic structurestd::weak_ptr<>sparingly only when there are cycles that need to be brokenA raw pointer as a handle to memory (no ownership)...
C++11 Smart Pointer Policies
48 Calling Auth.currentSession() should solve your problem. Amplify-js abstracts the refresh logic away from you. Under the hood currentSession() gets the CognitoUser object, and invokes its class method called getSession(). It's this method, that does the following: Get...
In my react project I am using AWS Cognito user pool for user management, for user authentication, I am using AWS Cognito idToken. after 90min the session will expire, then I need to refresh with new idToken. how to handle the refresh token service in AWS Cognito using amplify-js. I tried with Auth.currentSession() I ...
how handle refresh token service in AWS amplify-js
Among the directives of the Dockerfile, you have SHELL https://docs.docker.com/engine/reference/builder/#shell from this doc The SHELL instruction can also be used on Linux should an alternate shell be required such as zsh, csh, tcsh and others.
I want to update GCC from 4.4.7 to 4.7.2 in a container(CentOS 6.9) following this tutorial How to upgrade GCC on CentOS. In the end of the tutorial, the author uses scl enable devtoolset-1.1 bash to launch a new shell where all the environments are updated. I write the following Dockerfile: Run ... \ && yum insta...
How to start another bash in Dockerfile
1 A possible solution would be to use docker-compose and have a docker_compose.yml file composed only of volumes but no services: version: "3.8" volumes: logvolume01: {} logvolume02: {} logvolume03: {} When run, this creates the volumes accordingly: $ docker-compose ...
In my Docker environment I have always to run the command to create volumes manually like docker volume create --name= ... I would like a way to speed up this process with a script shell which could help me to run at once. If I could see a possible solution would be great as I have many volumes to create manually
How to write a script which can run the creation of Docker volumes in one command
I'll start with the easiest part, which I think is a common misconception:Ideally I'd be able to pass environment variables to docker build, but that's not possible (I can't understand why).A docker build is meant to be reproducible. Given the same context (the files under the same directory as theDockerfile) the resul...
I'm trying to build an image in Docker that requires a few secret files to do things like pulling from a private git repo. I've seen a lot of people with code like this:ADD id_rsa /root/.ssh/id_rsa RUN chmod 700 /root/.ssh/id_rsa RUN touch /root/.ssh/known_hosts RUN ssh-keyscan github.com >> /root/.ssh/known_hosts RUN ...
Accessing Secrets/Private Files Needed for Building in Dockerfile?
You can't have a node pool with VMs that are not managed by Azure with AKS. You'll need to run your own k8s cluster if you want to do something like this. The closest you can get to something managed in Azure like AKS is to build your ownAzure Arc enabledKubernetes Cluster, but you'll need some skills with tools likeRa...
In the context of Azure Kubernetes Service (AKS), I would like to deploy some pods to a region not currently supported by Azure (in my case, Mexico). Is it possible to provision a non-Azure VM here in Mexico and attach it as a worker node to my AKS cluster?Just to be clear, I want Azure to host the Kubernetes control p...
Attaching non-azure VMs to Azure Kubernetes Service (AKS)
38 i would suggest creating your functionality as django-management-command and run it via crontab if your command is send_newsletter then simply 0 0 * * * python /path/to/project/manage.py send_newsletter and you don't need to take care of setting the settings module in t...
This question already has answers here: Set up a scheduled job? (26 answers) Closed 10 years ago. I need to create a function for sending newsletters everyday from crontab. I've fo...
Using crontab with django [duplicate]
Redis supports multiple datatypes. For your case you can use aHashessince a hash can have another nested hash in it.Since Redis doesn't support nested data structure, you can store it this way by storing the inner hash reference in outer hash which will have difficulty while retrieving the data back. Else, you can crea...
So I'm using redis cache in my c# webapi and being able to implement a similar hierarchy would make my life much easier (something like this:a-> key1 b-> c ->key2 key3 d ->...)My other option is to make a tree like approach with keys where a would give me 2 other keys one for key and another for...
Is there a way to make a folder-like hierarchy in redis cache?
First check out branch you already havegit checkout $your_branchif you are happy with the name of $your_branch, then proceed to the rebase operation. If you want a different name themgit branch $better_name git checkout $better_namenow usegit rebase --onto 1.0 XXYou might not need to specify XX, but if you do need do ...
i made a branch in 1.1 branch and pushed some code inside it by mistake.it had to be made in 1.0 branch but i made it in 1.1.so i want to move the branch like this pic.what kind of commands do i have to put in?
How can i rebase my branch like this?
Is it reasonable to infer that they could be in the same cache line?This is possible, but it's fairly unlikely unless both objects happen to be quite small and allocated right after each other. I would not assume that they would lie on the same cache line, however, as this isn't something that you could control or enf...
I have been reading about garbage collection and memory management in .NET. I would like to ask the following to check my understanding:Suppose I have a singleton that is created at the start of the application and is in generation 0 of the GC. Then imagine I have another class that references this singleton and is als...
Are .NET singletons made less performant as the application runs for longer?
0 "(111: Connection refused) while connecting to upstream" this error means that something goes wrong with Apache or PHP-FPM(if you have using it), check apache logs of site where it happens: /var/www/vhosts/examples.com/logs/error_log Share ...
I'm facing with this error from few days, maybe weeks. I've tried and tried and tried all kind of solutions over the internet but with no success, so: I have a dedicated server with Plesk 12 and Ubuntu 14.04 LTS. This error appear daily, 1-2 times per day and I have to restart whole server and then all websites are wo...
Plesk - 502 bad gateway frequently
In the first and second part of the blog he explains how to use keras models with tensorflow. Also I found this example of keras with distributed training. And here is another with horovod.
I have two GPU installed on two different machines. I want to build a cluster that allows me to learn a Keras model by using the two GPUs together. Keras blog shows two slices of code in Distributed training section and link official Tensorflow documentation. My problem is that I don't know how to learn my model and p...
Learning Keras model by using Distributed Tensorflow
Check if you having any large file in your repo. For instance, a config like this one can help: git config --global pack.windowMemory "32m" It represents the maximum size of memory that is consumed by each thread in git-pack-objects for pack window memory. You also have (as I mentioned before): git config http.postBu...
I'm trying to push a build in Github and I keep on getting "Aborting" status and i have tried multiple times and I experience the same error.Not sure,how to solve this issue ? Any help or advice on this would be really great. Commit successful Username for 'https://github.com': ######## Password for 'https://######@gi...
Github Status : Error in Pushing...!! Aborting?
When using the Prometheus client with flask, you don't need to start the http server on your own but you can enable the wsgi middleware and specify the route you want to serve your metrics on your existing app.app = Flask(__name__) app_dispatch = DispatcherMiddleware(app, { '/metrics': make_wsgi_app() })For the full ...
I'm building a Flask application and I would like to know if there is an arg on modulestart_http_server(from prometheus_client) that allow me to set a specific metrics endpoint instead /.Thanks!
Is there an arg to set other endpoint in start_http_server (prometheus_client) instead of /?
I'm not familiar with the specific service that you are using, but5cb44ec6-fe67-4783-a7ec-827ce5787ea7looks like a service principal ID.The error says that it's a permission matter over the/subscriptions/subs_id/resourceGroups/rg/providers/Microsoft.Compute/disks/kubernetes-dynamic-pvc-693766c2-24d1-46df-8f3b-6e61e4771...
I have a hyperledger fabric blockchain network (v2.2.0) deployed using blockchain-automation-framework (BAF) in AKS. I am trying to execute a DR Scenario to recover a complete network using Velero. I have taken a backup of a namespace using velero (installed with restic) by annotating the volumes of all the pods in the...
Authorization failed and the pods are stalled in "Init:0/1" status during restoration from Velero Backup
3 This is normal don't worry, You have to set username and email after First-Time Git Setup. See here for more https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup From DOC: The first thing you should do when you install Git is to set your user name and em...
I recently started HTML,CSS AND JAVASCRIPT course on Coursera.com.. I am facing some errors. I hope you people can help me out.. Whenever I use the git commit -m "WHATEVER" command I get a error like this.. C:\Windows\System32\coursetest>git commit -m "Page" *** Please tell me who you are. Run git config --global u...
Git Github.com HTML
With your shown samples/attempts, please try following htaccess rules. These rules are for internal rewrite ones.Please make sure to clear your browser cache before testing your URLs.RewriteEngine ON RewriteRule ^(templates/shaper_helix3/fonts/fontawesome-webfont\.woff2)%3F(v=4\.3\.0\.html)/?$ $1?$2 [QSA,NC,L]ORif it c...
I have to redirect a domain to a subfolder using .htaccess. I have done this withRewriteCond %{HTTP_HOST} ^(www\.)?domain\.de$ [NC] RewriteRule !^domain\.de/ /domain.de%{REQUEST_URI} [L,NC]This works for 90% of my site.But I also have file reference like:domain.de/templates/shaper_helix3/fonts/fontawesome-webfont.woff2...
Redirect to Subdir and preserve query string as is as part of filename
TL;DR - Observing a TTBRx switch on a system can be difficult due to ASID/DACR/pid facilities on the ARM CPU. Ie, the page tables are annotated with 'process information' and a single register accessible from priveledge mode updates on a context switch for a majority of the cases. This keeps cache entries and TLB fr...
In ARMv8 Linux, TTBR0_EL1 and TTBR1_EL1 are used by MMU to do virtual memory management. So where is the PGD of a process saved in ARMv8 Linux? In X86, CR3 is used to hold the root of a process page table, it is switched during process context switch, so is there a similar register in ARMv8 ? I wrote a kernel module t...
In ARMv8, where is a process's root page table is saved?
Are you sure that your CUDA device supports the SM_20 architecture? Remove the arch= option from your nvcc command line and rebuild everything. This compiles for the 1.0 CUDA architecture, which will be supported on all CUDA devices. If it still doesn't run, do a build clean and make sure there are no object files lef...
My problem is very much like this one. I run the simplest CUDA program but the kernel doesn't launch. However, I am sure that my CUDA installation is ok, since I can run complicated CUDA projects consisting of several files (which I took from someone else) with no problems. In these projects, compilation and linking i...
CUDA kernel doesn't launch
Sadly there is no mecanism to stop a job if it fail at image pulling or container creating. I alsotried to dowhat you are trying to achieve.You can set abackoffLimitinside your template. But it won't handle the number of retries duringcontainerCreating, only while running.What you can do is a script that makesdescribes...
I'm running AWS EKS, running on Fargate, and using Kubernetes to orchestrate multiple cron jobs. I spin roughly 1000 pods up and down over the course of a day.Very seldomly(once every 3 weeks) one of the pods gets stuck in ContainerCreating and just hangs there and because I have concurrency disabled that particular jo...
How to prevent or fix Kubernetes pod getting stuck in containerCreating occasionally
You can follow the link to use the rewrite-target annotation correctly and keep the right key nginx.ingress.kubernetes.io/rewrite-target. apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: annotations: nginx.ingress.kubernetes.io/rewrite-target: /$2 name: rewrite namespace: default spec: rules: ...
I have one service and a single ingress resource with kubenetes nginx ingress controller. I want the /student path of my url to go to the root of the application and match any other url segments which follow the student. For example: http://example.com/student/ver should match the /ver route of my application. Howev...
Another nginx ingress rewrite-target problem
By design, authentication with GitHub uses the email that GitHub returns after authentication. As noted by Alexander, The returned email is the user's publicly visible email address (or null if the user has not specified a public email address in their profile). Based on the next image, you can see that in my case i...
Recently integrated GitHub authentication in my Django website and noticed that Python Social Auth is registering the users using a non-primary email address. How can that behaviour be modified?
Authentication using GitHub is not using the primary email
When you runeb init, it creates a folder in your current directory called.elasticbeanstalk. In it there will be aconfigfile which will have all of the info that you need for your current environment/application. It also has a value calledAwsCredentialFilewhich points to a file that contains your Access Key ID as well a...
I managed to get a rails app running throw Elastic Beanstalk using the EB CLI and instructions outlined here:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.htmlI then set up a second application going through the "eb init" process a second time and using a different application name...
How do you switch between applications using EB CLI?
Kinesis Firehose support is available in the AWS API Gateway Console as of yesterday.
Can anyone tell me if there is currently an option to bind the Kinesis Firehose delivery stream to an API Gateway Endpoint via Service Proxy. I attempting to do it using the Kinesis service type with the Firehose PutRecord action and the new PutRecordRequest json but the gateway failed specifying errors that it was t...
AWS API Gateway Service Proxy to Kinesis Firehose
Your ReactJS frontend is running in user's browser. So you need to connect to backend using external IP. You cannot use private cluster ip from outside the cluster.ShareFolloweditedJan 9, 2020 at 11:20answeredJan 9, 2020 at 10:19Shashank VShashank V10.6k33 gold badges2929 silver badges4444 bronze badges4thanks for your...
I am working on project with microservices, and i have some issues. I have a ReactJS frontend, and a ASP.NET API, and i am working on docker/kubernetes environment. I try to fetch data on my front from API like this :const https = require("https"); const agent = new https.Agent({ mode: "cors", metho...
How make fetch requests on API with private ip?
OK, I did. It is really bad but it works. I used both boto3 and aws-cliimport subprocess import boto3 folders = [] with open('folders_list.txt', 'r', newline='') as f: for line in f: line = line.rstrip() folders.append(line) def download(bucket_name): s3_client = boto3.client("s3") result ...
I have a list of folder names in a txt file like:folder_B folder_CThere is a path in S3 bucket where I have folders like:folder_A folder_B folder_C folder_DEach of this folder has subfolders like:0 1 2 3For every folder in the text file I have to find folder in S3 and download content of its subfolder with the highest ...
Download from Amazon S3, AWS CLI or Boto3?
Whennum_workers>0, only these workers will retrieve data, main process won't. So whennum_workers=2you have at most 2 workers simultaneously putting data into RAM, not 3.Well our CPU can usually run like 100 processes without trouble and these worker processes aren't special in anyway, so having more workers than cpu co...
Ifnum_workersis 2, Does that mean that it will put 2 batches in the RAM and send 1 of them to the GPU or Does it put 3 batches in the RAM then sends 1 of them to the GPU?What does actually happen when the number of workers is higher than the number of CPU cores? I tried it and it worked fine but How does it work? (I th...
How does the "number of workers" parameter in PyTorch dataloader actually work?
Do you refer to the Camel routes as you want some kind of analysis of those? As Apache Camel is just regular Java code, then any regular SCA tools you can useThere is a good list on wikipediahttps://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysisThat said we are working on a "code/route coverage" tool that...
Iam trying to implement static code analysis for Apache Camel not only for java but also XML based DSL.Is there any SCA Tool available?
Static code analysis apache camel Spring dsl
Have you got a destination rule setup also, as an example:apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: dr-test.example.com spec: host: test.example.com trafficPolicy: # Apply to all ports portLevelSettings: - port: number: 443 loadBalancer: simple: L...
How can I configure Istio VirtualService to route traffic to a destination backend that listens on HTTPS?configuringprotocol: HTTPSorscheme: HTTPSdidn't work.apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: api-rpi-access spec: hosts: - "test.example.com" gateways: - api-gateway ...
How to configure Istio Virtual Service destination protocol
1 You should set only Strong properties to nil in viewDidUnload. Weak Properties are automatically set to Nil if the destination object is deallocated. IBOutlet can be set to strong or weak based on the requirement. For the warning issue you are facing can you provide more ...
I have a table view as an IBOutlet, and by default XCode sets its property to be strong rather than weak. Sometimes I get a "recieved memory warning" message. So I tried to change many properties from strong to weak, but it doesn't seem to affect the process and things work smoothly. Should I set the outlets to weak, ...
When to use strong or weak for properties
You can do it using three filters: rsync -av --filter="+ /home" \ --filter="+ /home/*" \ --filter="+ /home/*/public_html" \ --filter="+ /home/*/public_html/**" \ --filter="- *" / [email protected]:mirror It is important to add a "+" filter for all the directories in the tree b...
Alright so my web server has the following file structure / /home /home/username /home/username/public_html /home/username/mail /home/username/etc ... /home/username2 ...
Rsync syntax to copy specific subfolders
If you're using Windows and running this in a bash emulator (like ConEmu), that might be the source of the issue.The issue is resolved when running the command in PowerShell.ShareFollowansweredFeb 16, 2021 at 15:13KuranesKuranes6211 silver badge77 bronze badgesAdd a comment|
Can someone show me an example of using the AWS CLI commandaws logs list-tags-log-group?I could use it with a log group whose name has no slash (e.g.fooTestLogGroup) but when I used the same command with any log group whose name has forward slashes (e.g./aws/codebuild/logGroup1or/ecs/logGroup2then I got this errorAn er...
Error when `aws logs list-tags-log-group`
Try the following query:(bound{cfstack=~".*Blue.*"} and on() (count(bound{cfstack=~".*Blue.*"}) == 1)) or (bound{cfstack=~".*Green.*"} and on() (count(bound{cfstack=~".*Green.*"}) == 1))This query works in the following way:It selects a time series matching thebound{cfstack=~".*Blue.*"}only if there is only a single ...
I'm making a Grafana dashboard to display the performance of the canary application. My problem is I need to find out which instance is the canary one (blue or green).Canary stack will always create one instance either blue or green so I can see the count of the instance using the below query but can't make to display...
Count the labels value and use it in another query - PromQL
environment: - SYMFONY__ENV__DOMAIN_NAME=http://A.B.C.D:8012 - SYMFONY__ENV__SERVER_NAME="My Wallabag Instance" ports: - 8012:80 this should work
I am trying to run the Wallabag instance on the Free-Oracle-Cloud tier. Oracle cloud VM gave me an IP-Address: A.B.C.D My docker-compose.yml looks like: version: "3" services: app: image: wallabag/wallabag container_name: wallabag restart: unless-stopped healthcheck: test: [ "...
Use Wallabag instance running on Oracle cloud from anywhere
By extending to @jordanm comment, I prefer towatchdocker pswhere container keeps restarting as ECS agent automatically remove stop container if the interval is still low thendocker ps -amight not show because of removing old container by ECS.watch docker psECS_ENGINE_TASK_CLEANUP_WAIT_DURATIONThis variable specifies th...
I have a cluster as well as a task on ECS.I can see that the task is running:And the service is active:And the associated EC2 instance is active:Butdocker pson this instance prints only one container - the ECS agent. Where is my task??$ docker ps CONTAINER ID IMAGE COMMAND ...
ECS: docker ps doesn't print the running task
As documented in "Statuses with vigilant mode enabled" Unverified means any of the following is true: The commit is signed but the signature could not be verified. The commit is not signed and the committer has enabled vigilant mode. The commit is not signed and an author has enabled vigilant mode. Double-check...
I'm currently seeing this message near my Git commits, even though I'm signing them using "git commit -S": When I check Settings > SSH and GPG Keys, I see the same GPG key Id (see below). When I run $git config --global user.signingkey, I get the following result. I've added Xs and Ys to hide the actual value, but ...
Seeing "this user has not yet uploaded their public key" in git commits, but my gpg key is uploaded
Easy solution It sounds like you're using a 32-bit version of Python (I also assume you're running on Windows). From the numpy.memmap docs: Memory-mapped files cannot be larger than 2GB on 32-bit systems. So the simple solution to your problem is to just upgrade your Python install to 64-bit. If your CPU was manufa...
I need to hold a very large vector in memory, about 10**8 in size, and I need a fast random access to it. I tried to use numpy.memmap, but encountered the following error: RuntimeWarning: overflow encountered in int_scalars bytes = long(offset + size*_dbytes) fid.seek(bytes - 1, 0): [Errno 22] Invalid argument It se...
numpy.memmap not able to handle very big data
I hate answering my own questions but this is what worked for me:brew install bfs bfg --convert-to-git-lfs '*.{conf,log}' --no-blob-protection new-bare.git cd new-bare.git git reflog expire --expire=now --all && git gc --prune=now --aggressive git push origin master
I'm converting SVN repo to a Git one. This finished succesfully and now I have a bare Git repo tham I'm trying to push to GitHub:git push -u origin masterBut this produces an error:remote: error: File root/data/big_file.conf is 187.98 MB; this exceeds GitHub's file size limit of 100.00 MBOK, so I decided to use lfs:bre...
git lfs track fails on bare git repo
IF your header has an underscore in it then its invalid. We faced this issue with our header which we named as app_token
As of 2019-11-13, the ELBLoadBalancerAttributedocumentation readsThe following attributes are supported by only Application Load Balancers....routing.http.drop_invalid_header_fields.enabled - Indicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false). ...
What does ALB consider a "valid" header field
2 You say that you didn't commit it. Unfortunately git only saves commits and not undone work. So, as sorry as I am, there is no way to use git to get your work back. But you could try to restore the deleted files. You might also want to have a look at this coding horror p...
I am so confused and I think I've lost hours of work. I was editing a file in Git earlier, and I saved it, but did not commit. I did do a few other file changes, and commited and pushed them. However, one file was messed up, so I clicked on the last successful commit, and pressed "roll back to this commit." To my horr...
Using Git for Windows - Accidentally lost a ton of work. Can I get it back?