Response
stringlengths
15
2k
Instruction
stringlengths
37
2k
Prompt
stringlengths
14
160
It looks like you didn't stage the changes made to db/schema.rb after doing the reset and before doing the commit. So after you do git reset 'HEAD^1' db/schema.rb, stage the file with git add db/schema.rb, then do the commit. Alternatively, you can reset the file to the previous state and keep it staged in the index ...
I have a private repo with a single commit on Github -- specifically for a Rails project. My schema file was changed along with migrations, and a fellow dev wants me to remove the schema changes from the commit (and the private repo). I thought I had it figured out but it doesn't seem to be sticking, what am I doing w...
Removing changes from one file in a commit
This is how I did.Open Filevi /etc/ssh/sshd_configNow Add or comment Banner in this file.And provide valid path LikeBanner /etc/bannerNow create file at given pathvim /etc/bannerAnd Add message here.Then restart ssh service./etc/init.d/sshd restart
I know that we can block incoming ssh using firewall rules from different ips but, is there a way to block any incoming ssh and send a reply like saying: "You are not allowed to access this machine. Contact the admin for appropriate access....".
Block ssh with a reply message
A Network Access Control List (NACL) isstateless. This means the rules are enforced in both directions. Thus, in your scenario, traffic would be blocked inboth directions.In general, there should be no need to use a NACL. There are some appropriate uses (such as creating a DMZ), but these are rare.You could, if you wis...
I read about aws VPC and try to find any sense to use NAT. If I understand correctly, NAT is used when we have VPC with two subnets: public and private. And if we want to allow private subnet make requests to global network (for example for software updates), but block all inbound traffic - we can setup NAT in public s...
what is the difference between NAT gateway and ACL with blocked inbound traffic
So I'm a newbie to nginx, and had this same question. Turns out the syntax of the language as mentioned above is both custom and actually quite simple. The syntax iscaptured in a sectionin the NGINX docs, and repeated here for convenience:nginx consists of modules which are controlled by directives specified in the c...
I want to write some more complex conditions in my Nginx configuration files but I'm not sure of the syntax and can't find docs describing what you can do beyond the basics in the examples and I can't seem to find this on the Nginx forums or on the mailing list.For example, is it possible for me to have anunlessconditi...
What language are nginx conf files?
82 Using pandas 0.20.3 import boto3 import pandas as pd import sys if sys.version_info[0] < 3: from StringIO import StringIO # Python 2.x else: from io import StringIO # Python 3.x client = boto3.client('s3') bucket_name = 'my_bucket' object_key = 'my_file.cs...
I am trying to read a CSV file located in an AWS S3 bucket into memory as a pandas dataframe using the following code: import pandas as pd import boto data = pd.read_csv('s3:/example_bucket.s3-website-ap-southeast-2.amazonaws.com/data_1.csv') In order to give complete access I have set the bucket policy on the S3 bu...
How to read a csv file from an s3 bucket using Pandas in Python
In general, on the platforms I have used including OSX, the OS built in functions to do host lookups do not allow bypassing of the system DNS configuration. If you really want to do this, you either need to try and hack the OS settings (like some windows apps unfortunately do) or connect directly to the DNS servers us...
From a Mac OS X app, I want to resolve some domain names using a specific DNS server (that has not been set in System Preferences), and easily retrieve the resolved addresses.I can do this in Terminal withnslookup google.com DNS_SERVERbut can't find a simple way to accomplish it in Objective-C. I thoughNSHostwould have...
DNS lookup with custom DNS server in Objective-C
To summarize, you want:There is a special case: If an url starts with /basic/api, you want it to go to the router.php pageBy default, an url that isn't a file should be searched for in public.In addition you can redirect requests that go to /basic/public/something to /basic/somethingPut this in a file .htaccess in the ...
I have following directory structure on my local LAMP:wwwbasicapprouter.phppublicindex.html.htaccessand i can access my index page withlocalhost/basic/public/and i am not using any virtual hosts.Now i am trying to do two things:1: instead oflocalhost/basic/public/URL should look likelocalhost/basic/to access homepage.2...
URL rewrite to another folder and file for specific requests
I'm just gonna give you a literal answer for that specific example. Not sure if that will actually help you:RewriteCond %{QUERY_STRING} ^([+])$ RewriteRule /index3.php$ index3.php?=(%1) [R,L]You cannot repleace each+in the QS, as you do need a separate condition to match it first.Also about your original rule:Re...
I want to convert every url which contains "+" to "=+"for example that url:http://www.bedavaemlaksitesi.com/mersinemlakrehberi210/index3.php?+should be like this:http://www.bedavaemlaksitesi.com/mersinemlakrehberi210/index3.php?=+tried that and few other lines but doesn't work so far, i'm guessing it causes a loop or s...
How to convert plus (+) sign to "=+" with htaccess?
1 I kinda found the answer that is working for me on my 3070 laptop. Turns out my WSL is using my Laptop nvidia gpu. I dont do anything in it thats GPU heavy , but still its using. And the second WSL is started it captures GPU directly. So the way to solve is is by creating...
There is a program called "System" that is continuously running on my dedicated GPU inside my laptop.: What does this program do and how I can make sure it runs on the integrated graphics card, instead of the dedicated Nvidia card?
NVIDIA GPU Activity shows application called "System"
-1You can accessxyzwith{{ .Release.Name }}and need to update the resource names with{{ .Release.Name }}so that the names are picked up dynamically every time:apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Release.Name }} labels: app.kubernetes.io/name: {{ .Values.app.dbName }} app.kubernetes.io/in...
I have created a helm chart named "abc" with the commandhelm create abcNow when I install this chart, all the kuberenets resources created will have a name containing "abc".Now I have to rename the chart "abc" to "xyz". If i usehelm install --name xyz ./abconly the chart name is changed to xyz. The resources inside it...
How can i rename a helm chart once created?
Try reading the file in as binary and using it directlyvar p12 = fs.readFileSync('file.p12', 'binary'); var p12Asn1 = forge.asn1.fromDer(p12, false); var p12Parsed = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, 'password');also addagentOptionsin request likerequest({ method: 'GET', url: 'https://myxml', reje...
There is a service which provides a XML under a certain URL (for example:https://myxml). The organisation from that service send me a p12 certificate with the password. In the Browser it works correct. On my local machine I'm running a Node JS server. I want to send a request from my node server and get the response fr...
Error by Node JS request to external service with required p12 certificat
Unfortunately unitys WebGL is not supported for mobile devices. See here:https://docs.unity3d.com/Manual/webgl-browsercompatibility.htmlFor some highend mobile devices it could work however.I can see the errorunityFramework is not defined. As a solution you should try to build without compression.
When I made The WebGl Link it showed this error WebGL builds are not supported on mobile devices. Cube Runner You can check it out by going to this link below and clicking on Run Gamehttps://atharv-radhey.itch.io/cuberunnerPlease Tell me Solution I have wasted 30hours for solving that error and now I am asking it here.
When I made The WebGl Link it showed this error WebGL builds are not supported on mobile devices. Cube Runner
The only problem you are facing is that you lack the use of quotes, so :curl -k --silent 'https://sito.com/en/?option=com_invitex&tmpl=component&task=mailto&pkey=welovemoda'If you don't do this, the shell take each&as a background job =)
I'm tring to get curl cronjobs works on a joomla site./usr/bin/curl -k --silenthttps://sito.com/en/?option=com_invitex&tmpl=component&task=mailto&pkey=welovemoda>/dev/nullI added the -k param because googling I see few users found problems with curl command and SSL. But it doesn't work either.
Cronjob issue (on SSL)
What this book is describing is an example of how memory allocation can work. It's a very common example, but there are platforms that work differently. It describes a multitasking platform with virtual memory. There are two aspects to memory allocation on a multitasking platform: first the task receives some memory f...
I have read in the book: A dynamic memory allocator maintains an area of a process's virtual memory known as the heap. Details vary from system to system, but without loss of generality, we will assume that the heap is an area of demand-zero memory that begins immediately after the uninitialized bss area and...
Why memory isn't zero out from malloc?
There are many ways to collect logs, are you writing to the console, or using some logging tool. Here are some ideas: If you are using Amazon ECS or Fargate with ECS then you can use the AWS Log driver. If you are using Amazon EKS or Fargate with EKS then you can configure FluentD to log to cloudwatch. CloudWatch Agen...
I am developing an app with Nodejs/Express and I am planning to run the app on AWS Fargate. For logging, I want to have the app logs available in AWS Cloudwatch. What is the best way to log Nodejs/Express to Cloudwatch? Is there a library which I can use?
Logging for Nodejs Express on AWS Fargate
You should create a named container by running the following command:docker run --name dtest ubuntu /bin/bash -c "echo Starting;sleep 20;echo Stopping"Then create the following upstart script (pay attention to the-aflag) which will manage the lifecycle of this container as you expectstart on runlevel [2345] stop on run...
I have an upstart script (say,/etc/init/dtest.conf)start on runlevel [2345] stop on runlevel [!2345] respawn script DID=$(docker.io run -d ubuntu /bin/bash -c "echo Starting;sleep 20;echo Stopping") docker.io attach $DID end scriptWhen issuingstart dtest, the upstart logs show the proper cycle of "Starting ... Stop...
Upstart script to run container won't manage lifecycle
Ideally, monitoring is the best option here if you are using theAKS monitoringorPrometheusfor checking the queue size and scaling the number of PODs using the HPA.Here is one nice example of same scenario with the RabbitMQ queue and using thePrometheuswith custom metrics.https://ryanbaker.io/2019-10-07-scaling-rabbitmq...
How could I get the number of unprocessed message count from Azure service bus Queues and based on the count, auto scale the nodes deployed on Azure Kubernetes Services?I was able to get one of the links which uses Azure Monitor to get the count of messages in the queue and using HPA configuration scale up/down.https:/...
Autoscale AKS deployed nodes based on the count of messages in the Azure service bus
Unfortunately it is not currently possible to have multiple SSL certificates issued to multiple domains on a single IP address. There has to be a one to one relationship between SSL certificate, domain and IP. So you only option is to get additional IP address for the server.You can use Host Headers to partially solv...
We searched about this topic here and found lot of posts that cover different parts from this topic but we didn't find and answer for our solution.Problem:We have Windows 2008 Server with IIS7 and we would like to install more then one SSL on this server.We have one IP address for this server but maybe we could get mor...
How to install more then one SSL on Windows 2008/IIS7?
If you want to start fresh with what is on github, the simplest route is to just make a new clone.
I'm using Git and want to get rid of all my current changes and make my files look exactly like they do in my repo on GitHub. How do I do this? I've been searching around and found things but I want to be careful not to mess anything up.
How can I revert my local git repository to the state it has on GitHub?
deny allwas not working for me because the traffic was being forwarded internally through a proxy.Here is what ended up working for me:upstream backend_solr { ip_hash; server ip_address:port; } server { listen 80; server_name www.example.com; index /example/admin.html; charset utf-8; a...
i create a new conf file to block all public ip to access and give only one public ip address(office public IP) to access. but when i try to access its shows the "403 Forbidden nginx"upstream backend_solr { ip_hash; server ip_address:port; } server { listen 80; server_name www.exa...
Nginx configuration for allow ip is not working deny all is working fine
I would recommend using nginx as your static file server. I run nginx for this and it works great, and I could vouch for alot of other people I know that uses it. It's fast and reliable.ShareFollowansweredNov 30, 2010 at 20:28drewrocksharddrewrockshard2,0531010 gold badges3535 silver badges4848 bronze badges3So it wi...
I am suggested by a friend to use nginx for my sitehttp://www.imgzzz.com. its an image hosting site with loads of traffic.Currently im on a vps ..CentOS 5.4 x64 , ApacheMost views are on image pages. So far to decrease the load on server i have done cache of almost all data like user details, image name, path, category...
Should i use nginx for my image hosting site with high traffic?
6 I believe you should use COPY ./nginx/default.conf /etc/nginx/nginx.conf If you want to organise things in conf.d/, add include /etc/nginx/conf.d/* in /etc/nginx/nginx.conf before adding things in conf.d/ Complete config file: worker_processes 4; events { worker_c...
I have an app which is using React router, and I created a docker image for it. I am using nginx server and it works. But, refreshing a page gives me nginx 404 error. I know that I need to overwrite nginx config file to make it work, but don't know why it doesn't work. I tried to add some kind of redirect to nginx.con...
How to overwrite nginx default config with docker file?
No. If you want more automatic memory management, use vectors. struct A { string name; vector<float> data; vector<vector<int>> image; }
Suppose if I have an array of structures which in turn has dynamically allocated arrays in them, does delete[] deep deletes everything I said above? For example, Consider I have this structure: struct A { char* name; float* data; int** image; }; some place in my code I create A** array = new A[n]; and I alloca...
does delete[ ] deep deletes a structure in C++?
It sounds like you just want to merge multiple repos and branches into your current branch.First, add all the other repos as remotes:git remote add official url_to_OpenCart_official_repo git remote add themes url_to_private_repo git remote add modules url_to_modules_repoThen each time you need to do a release:git check...
I have many OpenCart-based e-shops and want to create deployment system for them. My idea is to pull github repositories step-by-step into one directory, for example:OpenCart from official repoTheme from my private repoModules (can add or update files in /admin, /vqmod, /catalog dirs)Other changes...and deploy it to pr...
Merge many github repositories into one directory
One cause of this problem is that the enumeration defined in enum.jar is in runtime not found on the classpath by the entity.There are atleast two ways to solve this.In META-INF/MANIFEST.MH of entity.jarclasspath: enum.jarOr to specify the enum.jar as part of the EAR if you use maven.
I use for an JPA entity one field of enum type :@Enumerated(value=EnumType.STRING) private Temperament temperament = Temperament.MINEUR_PUR;My enum is declared inside my entity :@Entity public class Joueur implements Serializable { ..... public enum Temperament{ MINEUR_PUR(30), MINEUR(10), ...
JPA and enum type
If you are in a company network which intercepts traffic, get the public certificate and try setting this env variable first.export CURL_CA_BUNDLE="/usr/local/etc/openssl/cert.pem
sorry for any formatting errors. Am new to this. I am currently trying to get into the habit of using pyenv. I am not able to install 3.9.0 via '''pyenv install 3.9.0'''I keep getting BUILD FAILED (OS X 12.4 using python-build 20180424)Results logged to /var/folders/q6/k3f34wm54ns_n2q_vx0n6xt80000gn/T/python-build.2...
How to fix SSL certification error when downloading python 3.9.0 with pyenv on macOS Monterey?
3 I would rather use pipenv to replace virtualenv at local development environment, and docker without virtual environment at production. Here is my Dockerfile(run django with gunicorn): FROM python:3.6 ENV PYTHONUNBUFFERED 1 # switch system download source RUN python -c ...
I didn't know what is the benefit of Docker over virtual environment. Is it necessary to use virtual environment and docker at the same time. Before today, Basically I used virtual environment to crate Django project. But today My friend recommended me to use docker. I'm confused what should i use ? I used this comman...
Do I need to use virtual environment while using docker?
You should either specify the namespace with your kubectl delete command or set the namespace context before executing the command.kubectl config set-context --current --namespace=kube-system kubectl delete pod kubernetes-dashboard-7d75c474bb-b2lwdShareFollowansweredSep 6, 2019 at 15:45CharlieCharlie23.2k1212 gold badg...
I installed kubernetes dashboard ui , but the status is aways pending. Now I want to delete the pending pod . Query current pod:[root@iZuf63refzweg1d9dh94t8Z ~]# kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system kubernetes-dashboard-7d...
How to delete kubernetes dashboard ui pod using kubectl
64 By default, when you upload the file with same name. It will overwrite the existing file. In case you want to have the previous file available, you need to enable versioning in the bucket. Share Improve this answer Follow ...
s3.putObject({ Bucket: bucketName, Key: fileName, Body: file, ACL: 'bucket-owner-full-control' }, function(err, data) { if (err) { console.log(err); } console.log(data) } ); I use this code to upload image to my Amazon S3 cloud storage. But I...
How to upload a file with the same name to Amazon S3 and overwrite existing file?
If you really want a one liner: aws ec2 create-vpc --cidr-block 10.0.0.0/16 --output text | awk '{print $NF}' | xargs aws ec2 create-tags --tags Key=Name,Value=MyVPC --resources It is a concatenation of two commands explained below. Adding a tag while creating a VPC is not supported yet. Create a VPC like the follow...
I am trying to streamline the process for creating VPC/EC2 environments without using the gui. I also want to automate it by telling a script what I want created with what properties. I decided that the best place to start is to create a VPC and create an EC2 instance with in it. I am using aws ec2 create-vpc --cidr-b...
EC2 CLI. Help creating VPCs with name
I had the same issue and I solved it by adding the following line todocker-compose.yml, under the webserver service- volumes: - ./config/airflow.cfg:/opt/airflow/airflow.cfgI have my config file in a folder calledconfigwhere thedocker-compose.ymlfile is.ShareFolloweditedJun 29, 2022 at 14:45answeredDec 7, 2020 at 21:...
I'm running airflow in a docker container and want to mount myairflow.cfgas a volume so I can quickly edit the configuration without rebuilding my image or editing directly in the running container. I'm able to mount myairflow.cfgas a volume and my airflow webserver successfully reads the configuration from it on start...
Airflow how to mount airflow.cfg in docker container
Yes, it is possible.However, since git is a versioning tool and was not actually made to change the history and permanently remove files, it can be implemented.But be aware, the selected file will be removed from the Git history, and you can no longer access a previous version of that file, it will be removed from the....
Is it possible to delete a file from github.com and also erase all evidence that it ever existed?When I click on history, I can see all modifications of the github project, including deletion of files and directories. Is it possible to put a data file, then delete it, and then delete the evidence of its existence from ...
Is it possible to delete a file from GitHub and also erase all evidence of its existence
Let's show that the formula quoted from the Prometheus manual, making use of the function namedrate(), computes the exact value you are looking for.According to the way a counter works, we know that each time the counter namedhttp_request_duration_seconds_sumtakes into account a new value, that is the sum of durations ...
Quote from PrometheusCount and sum of observationsdoc:To calculate the average request duration during the last 5 minutes from a histogram or summary called http_request_duration_seconds, use the following expression:rate(http_request_duration_seconds_sum[5m]) / rate(http_request_duration_seconds_count[5m])I should men...
How can rate() function average request duration?
I noticed this:int size = is.available();and thought it was a little strange. So I went and looked atthe JavaDoc for InputStream.availableand this is what it had to say:Note that while some implementations of InputStream will return the total number of bytes in the stream, many will not. It is never correct to use the...
public String loadJSONFromAsset(String path) { String json = null; try { InputStream is = this.getAssets().open(path); int size = is.available(); Log.d("Size: ", "" +size); byte[] buffer = new byte[size]; is.read(buffer); is.close(); json = new String(buff...
InputStream and OutOfMemory Error
I figured it out. The content type is NOT animage/png... the content type ismultipart/form-dataShareFollowansweredOct 9, 2018 at 16:33Andrew WeiAndrew Wei2,05011 gold badge1717 silver badges2929 bronze badges2Thank you! I don't know how, but this does indeed do the trick for PNG images. It also explains whyimage/*was...
I have a ruby on rails app that takes an image file, "attaches it to a member", and uploads it to s3. When I use insomnia and POST directly to the app ...it works, however when I use the exact same endpoint behind AWS Api Gateway, the image is corrupt and not viewable.Here is the comparison of the requests.LEFT = direc...
AWS Api Gateway as a HTTP Proxy is currupting binary uploaded image files
git reset HEADwon't touch the working tree, just the index. Effectively, it'll just unstage staged files becauseHEADis where your current branch is already anyway (that's the definition of HEAD).git reset --hard HEADwill fix the working tree to reflectHEAD.If agit popdoesn't apply cleanly, the stash should have been ke...
I have two branches master and development. I stashed on master e.g.git stash git checkout developmentNow, I was on development branch but by mistake I popped the stashgit stash popAnd now it shows conflicts. I reset the git using this:git reset HEADBut it is still showing conflicts. I need my stash back in master bran...
Git stash pop on master branch
If you've gotmod_expiresinstalled on your apache server you can put something like this in your.htaccessfile. This example is PHP orientated (actually grabbed from the Drupal 7.htaccessfile) but should serve as a good starting point.FileETag MTime Size <IfModule mod_expires.c> # Enable expirations. ExpiresActive On...
Was wondering is this possible in .htaccess?I'm currently caching .js, .css and all image files via PHP (and providing the cached only if the file has not been modified by checking the filemtime()).However someone suggested it's possible via .htaccess and much faster, so was hoping maybe someone can shed some light...I...
.htaccess cache static content (unless modified)?
1 This is the pause time or latency time for the application when Java garbage collector is trying to free memory. But seems garbage collector also is not able to run as memory is full. So application is hanged. There are numbers of new garbage collectors like zgc, shenando...
Due to some bug, my app is consuming too much memory and heap space is running out. However, instead of requests failing, I'm getting an infinite hang and only following error in console: *** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message can't create name string at JPLISAgent.c line: 826 ...
Spring boot requests hang when getting OutOfMemoryError in web server threads
Here is a list of Nginx Core Directives:http://wiki.nginx.org/NginxHttpCoreModuleBy skimming through these I can see there's probably more than one way to achieve this. I can't test it, but here's something that may work:error_page 403 /forbidden.html; location ^~ /upload/ { deny all; }However, I would advise again...
in nginx conf file,i use:location ~ \.jsp { proxy_pass http://127.0.0.1:86; }to parse my jsp file, now,i want excluded directory/upload/this directory is user upload file directory ,don't need parse JSP file.(http://example.com/upload/)how to change mylocation ~ \.jsp {?i need parse JSP*.jspbut excluded/upload/an...
how to excluded directory from nginx conf?
This happens when at least 1 of the labels that are attached to the metric changes. Theratefunction keeps all the original labels from the underline time series. In Prometheus, each time series is uniquely identified by the metric namecontainer_cpu_usage_seconds_totaland any labels (key-value pairs) attached to the met...
I want to monitor the cpu usage of kafka container, but the graph is chopped up into different pieces. There seem to be gaps in the graph and after each gap a different colored line follows. The time range islast 30 days. For the exporter we usedanielqsj/kafka-exporter:v1.4.2The promql query used to create this graph i...
Dashboard visualizing CPU usage of kafka container chopped up
A PersistentVolume with Kubernetes in Azure will not give you the same exact functionality as Key Vault in Azure.PesistentVolume:Store locally on a mounted volume on a serverVolume can be encryptedVolume moves with the pod.If the pod starts on a different server, the volume moves.Accessing volume from other pods is not...
To resolve a few issues we are running into with docker and running multiple instances of some services, we need to be able to share values between running instances of the same docker image. The original solution I found was to create a storage account in Azure (where we are running our kubernetes instance that house...
Using Kubernetes Persistent Volume for Data Protection
Here is what I did to fix this:Moved the entrypoint to the docker-compose file instead of the DockerfileChanged the port to8000from8050I have no idea why this matters but it fixed it.ShareFollowansweredJul 16, 2018 at 7:05Jahongir RahmonovJahongir Rahmonov13.4k1010 gold badges4848 silver badges9595 bronze badgesAdd a c...
I am trying to debug docker-compose containers in PyCharm.Here is how my run configuration looks like:Note that it is a Django app. When I try to start the debugger it is successfully starting all containers and I can access the app on the browser for a short amount of time. Also there is a background task running "Wai...
PyCharm debugger stopping containers after "Waiting for connection" ends
RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} protected [NC,OR] RewriteCond %{REQUEST_URI} protected2 [NC,OR] RewriteCond %{REQUEST_URI} protected3 [NC] RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301] RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} !protected [NC] RewriteCond %{REQUEST_URI} !protected2 [...
I have the following:RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} protected [NC] RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301] RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} !protected [NC] RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [L,R=301]If the directory is called "protected", make sure that the u...
htaccess: force http on all pages and https on select directories
Check out thisarticleInclude in your pom.xml schedlock dependencies:<dependency> <groupId>net.javacrumbs.shedlock</groupId> <artifactId>shedlock-spring</artifactId> <version>2.2.0</version> </dependency> <dependency> <groupId>net.javacrumbs.shedlock</groupId> <artifactId>shedlock-provider-jdbc-temp...
Have a spring Boot application through which i am able to create a cron and schedule the tasks . However when the multiple instances of the app are deployed , the cron gets triggered in all the instances and results in duplication. Is there any configuration which needs to be done in spring level?We are using redis and...
How to avoid duplication of scheduler tasks when deployed in multiple instances
Since you have Fortran 2003, the easy way to interface Fortran and C is to use the ISO C Binding. (Most Fortran 95 compilers now support the ISO C Binding, even if they aren't full Fortran 2003 compilers.) This is far, far better than the complicated methods suggested in an earlier answer, which were necessary in a...
I have a C function,double* foofunc() { /* Function Body */ }I don't know how to declare an interface inFortranto call thisCfunction.Also if a pointer is supposed to be pointing toGPU device memory, how could I define that in theFortraninterface? Do I need to useDEVICEattribute.Please use features supported byFortra...
Fortran interface to call a C function that return a pointer
I wouldn't worry about the speed of ConcurrentHashMap Map<Integer, Integer> map = new ConcurrentHashMap<>(); long start = System.nanoTime(); int runs = 200*1000*1000; for (int r = 0; r < runs; r++) { map.put(r & 127, r & 127); map.get((~r) & 127); } long time = System.nanoTime() - start; System.out.printf("Thr...
I wrote a stock market simulator which uses a ConcurrentHashMap as a cache. The cache holds about 75 elements but they are updated and retrieved very quickly (~ 500 times a second). Here is what I did: Thread 1: Connected to an outside system which provides me with streaming quotes for a given stock symbol. Thread 2 (...
Writing a highly performant Cache
1 There is a resource you can use aws_db_instance_automated_backups_replication Link to TF Docs. Share Improve this answer Follow answered Jul 28, 2023 at 9:27 Hans HomanHans Homan 5144 ...
Need to enable backup replication feature in AWS RDS - oracle through terraform. So do we have any attributes from terraform side for that particular feature?
Need to enable backup replication feature in AWS RDS through Terraform
It's safest not to have any access beyond that which is strictly necessary. Access to secret and private keys is very important in key management. To make sure you are not introducing vulnerabilities, it is also pretty important not to use private keys outside their use case (e.g. authentication in SSL is different fro...
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened,visit the help ...
Access to private key of SSL cert [closed]
Solved it, It was all due to a wrong setup in my production.rb in rails, which made the default behavior fail, so the hack of putting the assets into /public manually isn't necessary anyways.I had:config.action_dispatch.x_sendfile_header = "X-Sendfile"Which instead for nginx should be:config.action_dispatch.x_sendfile_...
I'm on rails 3.2 and my production setup is using nginx and unicorn.I have a problem with some assets that a ruby gem called sidekiq uses. However those assets are not being served properly when I request them. My nginx config looks like this:upstream unicorn { server unix:/tmp/unicorn.myapp.sock fail_timeout=0; } s...
Why can't nginx find my assets?
I have not tried this, but perhaps this might be help: https://hub.docker.com/r/clinstid/i386-python It's referred to as 32-bit with Python 3.5 but the architecture is stated for linux/amd64, which is confusing.
I have a python code that works in a 32-bit python environment. I want to run it in a Docker container. How can I create a 32-bit python environment in a Docker container? Or does exist a Docker image with 32-bit python env?
Docker Python 32-bit
It is indeed possible to restore a database using innobackup/xtrabackup to a running MySQL server.Instead of using--copy-backuse--exportandimport each tablespace one at a time. This is easily scripted.xtrabackup --exportwill create .exp, .ibd, and .cfg files.
I am trying to migrate a large MySQL database using Percona XtraBackup (15 Gb).The default innobackupex command to restore a backup requires moving or deleting the mysql datadir (/var/lib/mysql) :mkdir /tmp/mysql cd /var/lib/mysql/; mv * /tmp/mysql/ innobackupex --user=user --password=password --copy-back /data/backups...
Percona XtraBackup - restoring a database backup into a MySQL server containing other databases
You are right, all directives from the ngx_http_rewrite_module are executed before the location selection mechanism took its place. Using the break directive means breaking the execution of those directives from the rewrite module and immediately force the request execution according to the best matching location. Thi...
I'm confused why nginx is executing my If statement "before" the location statement. More precise, why is nginx not executing the return statement and then stops processing? I would expect if I open /xyz to get a 200 with "hello world" even if $http_x_forwarded_host is not www.acme.com because the if statement is loca...
Nginx If statement executed before location?
The problem is your data only container. You make your volume with path/mongodb_datawhich doesn't store any mongo db data. By default, the mongo db storage path is/data/db(according tothis#Where to Store Data Section)As the result, your mongodb data is not saved in your data only container. So here is a workaround:copy...
Create data only container:docker create -v /mongodb_data --name mongodb_data mongoCreate monogdb container:docker run --volumes-from mongodb_data --name mongo_db --restart always -d mongoThen to use mongodb in my own container I use the link command:--link mongo_db:mongoSo everything works fine. Now I want to backup t...
docker backup and restore mongodb
In place of first getting all excluded ids by looping, I would suggest you to directly check meta key. Like thisfunction wwp_exclude_products($query) { $hide_products = get_option('wwo_hide_wholesale_prices'); $key = '_'.woo_get_user_role().'_price'; if ( $hide_products && $query->is_main_query() ) { $query-...
I have a function which checks the current user role, and displays posts with certain meta keys that match the user role. Here is my code:function wwp_exclude_products($query) { $exclude = array(); $hide_products = get_option('wwo_hide_wholesale_prices'); if ( $query->is_main_query() ) { $featured =...
wordpress pre_get_posts causing memory issue
I figured out the problem. Apparently, GitLab has a certain naming convention for the variables. I added a user defined variable in the gitlab-ci config calledSAMPLE-VARIABLE. Turns out you cannot use-in the name of the variable. Renaming it toSAMPLE_VARIABLEdid the trick.However, it would be good for GitLab to give cl...
I've been stuck on trying to run a GitLab pipeline from a branch in my repo and its driving me crazy. I have a sample branch calledtest-branch, but every time I try to run the pipeline manually GitLab shows an error message sayingPipeline cannot be run Failed to build pipeline!I am the owner of the group hence by inhe...
Running GitLab pipeline from a branch other than main
1 I wrote an application to do this, it is available on github: https://github.com/freedev/solr-import-export-json The idea behind the code is simple, when you query a collection using the Solrj, even an entire collection, it returns a stream documents (i.e. SolrDocument). ...
I am trying to restore backup (migrate) index from Solr 6.0 to Solr 6.1. However, when I follow the steps on https://cwiki.apache.org/confluence/display/solr/Making+and+Restoring+Backups , I get an Exception Error saying it failed when I use curl -XGET http://localhost:8983/solr/mycollection/replication?command=resto...
Is it possible to restore backup from Solr 6.0 to Solr 6.1?
GIT does not track empty folders. There are multiple approaches to handle this. The easiest is to create an empty file (example name :.gitkeep) in each empty directory so they'll be tracked. There are other solutions to this as well. Some of them are listed below.https://bytefreaks.net/gnulinux/bash/how-to-add-automati...
I'm trying to save all changes I make both in the .html files and in the .css and .js files which are inside folders (for a better esthetic)Let's assume I have in my local repository the following files and folders:index.html, about.html, contact.html, and the following folders: CSS, js and fonts. When I type in the t...
I can not upload subfolders inside my folder repository using git push
There are always a leak or two in Apple's frameworks if you really look for them (which is a part of my day job). But generally nothing severe, nor leaks that occur in relatively common / standard code. The first step is to use Build and Analyze to do a basic sanity check of your code. It will catch many potential l...
In Xcode I run the program I wrote with the leaks instrument It says leaks are discovered and the total leaked bytes keeps rising. I look at leaked objects and none of them seem to be from my program. For example QuartzCore OpenGLES libLLVMContainer.dyl libCoreVMClient.dylib libGFXShared.dylib Is it my fault that the ...
Am I really leaking memory?
The choice of ciphers depends in part on the certificates, i.e. ciphers with RSA authentication need an RSA certificate, ciphers with ECDSA authentication an ECDSA certificate etc.But another possibility is that the key and the certificate you load do not match each other. In this case no certificate can be used and it...
I'm running a test with client and server using openssl. In my test, the server uses one pair (certificate, key) or other based on a parametermode.void configure_context(SSL_CTX *ctx, int mode) { if (mode == 0) { /* Set the key and cert */ if (SSL_CTX_use_certificate_file(ctx, "./test/certs/testcert...
"ssl3_get_client_hello:no shared cipher" in server depending on server certificate and key
If you have such rigorous memory needs, then you're going to have to abandon std::string. The best alternative is to find or write an implementation of basic_string_ref (a proposal for the next C++ standard library), which is really just a char* coupled with a size. But it has all of the (non-mutating) functions of st...
I'm working on a program that stores a vital data structure as an unstructured string with program-defined delimiters (so we need to walk the string and extract the information we need as we go) and we'd like to convert it to a more structured data type. In essence, this will require a struct with a field describing w...
Allocate a struct containing a string in a single allocation
If you are concerned about using up space for the repository on the remote system, then I would suggest not using Git on the remote system at all. Maybe consider using rsync to sync between the local and remote systems. For keeping a history on the local system, you can then commit to a Git repository on the local sys...
I have a remote device which I access over a wireless and intermittent link. The device logs daily data, and I'd like to be able to get all updates in a robust way. I thought of using git for the purpose: I'd have a periodic job which would git commit all the logs on the remote At the local server, I'd git pull any n...
Git as a remote backup and update system
It appears this is a common question in Stackoverflow and a common issue in GitHub. The answer is No, it's not possible.As ilyaf said in his answer the usual workaround is to add multiple build status badges to the README, one for each branch.References:GitHub issues:https://github.com/github/markup/issues/472https://...
I've just started using AppVeyor for continuous integration with GitHub. I've been able to add a status badge to my README.md that displays the status of the most recent AppVeyor build. However, I've only been able to display either:1) The status of the most recent build for a particular branch, say master; or2) The ...
Show AppVeyor build status for current branch selected in GitHub
If you looking specifically for in JVM memory: Runtime runtime = Runtime.getRuntime(); NumberFormat format = NumberFormat.getInstance(); StringBuilder sb = new StringBuilder(); long maxMemory = runtime.maxMemory(); long allocatedMemory = runtime.totalMemory(); long freeMemory = runtime.freeMemory(); sb.append("fre...
This question already has answers here: How do I check CPU and Memory Usage in Java? (16 answers) Closed 4 years ago. I am working on an application written solely in Java which wi...
How to find exactly how much memory a Java application uses from within the application [duplicate]
By doing a "mv gitrepo/* .",you did not move the gitrepo/.git directory with the rest of your directory structure. The * wildcard will not match against .* on the command line so it would not have seen the .git directory (or any other .files inside gitrepo/. If you still have the original directory you moved stuff fro...
I cloned a repo and then moved it up a directory and that somehow removed it from being a repo. How do I fix this so that I can push the once repo back up to where I got it from?
git clone no longer a repo, how do I fix this?
Might as well use v2 fordocker-compose file.version: "2.4" services: web: image: myimage:1.2.3 volumes: - 'delle:/home/rh' cpu_count: 1 cpus: 0.6 cpu_percent: 30 mem_limit: 500m networks: - mynetwork - internal networks: mynetwork: external: true inte...
I have to use a memory limit of 500MB and CPU set to 0.6 for a service and I also need to use version 3 in the docker-compose file.I try:$ docker-compose docker_compose.yml --compatibility upand I get:WARNING: The following deploy sub-keys are not supported in compatibility mode and have been ignored: resources.reserva...
The following deploy sub-keys are not supported in compatibility mode
According to thedocker documentation about bridge networking:In terms of Docker, a bridge network uses a software bridge which allows containers connected to the same bridge network to communicate, while providing isolation from containers which are not connected to that bridge network.According to thedocker documentat...
Can you give me one guide or graph to understand the difference?The reason why I ask this question is I can't open website with the following method:docker network create -d bridge mybridge docker run -d --net mybridge --name db redis docker run -d --net mybridge -e DB=db -p 8000:5000 --name web chrch/webBut I can op...
difference between docker BRIDGE and HOST driver?
For such a hook to belocally executed, be sure to have your hook in apre-commitfile in.git/hooksIt will work forthisparticular repo, but should be introduced in each involved repo where you want this to be effective.In addition to your hook you might want to configure github with branch protection rules so that even if...
I have this code below in my Github Repository, i want to prevent anyone in my repo from committing directly to master, but it isnt working, what a, i doping wrong?I have searched through stack overflow and youtube trying to find tutorials for this issue and i havent had any luck9 lines (6 sloc) 154 Bytes #!/bin/sh b...
Why wont my pre-commit hook run when i commit
0 Since I can't comment to ask for clarification due to my low reputation score, I'll try helping with a "guessing what you try to accomplish" answer. It's not clear to me why are you trying to record from X11, I'll try guessing you want to record some desktop or app sessio...
I have created a docker image that has LXDE and TightVNCServer. # Pull base image. FROM ubuntu # Install LXDE and VNC server. RUN apt-get update RUN apt-get install -y xvfb RUN DEBIAN_FRONTEND=noninteractive apt-get install -y lxde-core lxterminal tightvncserver RUN rm -rf /var/lib/apt/lists/* RUN touch /root/.Xresou...
getting black screen while trying to record dockerized lxde using ffmpeg
FromAmazon RDS for MySQL Pricing – Amazon Web Services:T3 CPU CreditsAmazon RDS T3 DB instances run inUnlimitedmode, which means that you will be charged if your average CPU utilization over a rolling 24-hour period exceeds the baseline of the instance. CPU Credits are charged at $0.075 per vCPU-Hour. The CPU Credit pr...
When I launch an EC2 instance, I have the choice to launch T2/T3 instances with the "unlimited" flag to prevent CPU throttling, but possibly paying a higher cost when I use it over baseline capacity.Will AWS RDS T3 instances be launched with the "unlimited" flag enabled automatically? I did not find any flag in the UI ...
Are AWS RDS T3 instances launched with or without the "unlimited" flag?
2 It is much better in this case to use the proxy. Rewrites are meant for URLs within the same domain or to redirect the client (which would show in the url). Try this: location / { proxy_pass http://internal.example.com/; proxy_set_header Host $host; } Sha...
I am totally newbie on NGINX reverse proxy solution and its seems to getting hard to understand all the terminology. I am looking for a solution as follows. I would really appreciate anybody's help to configure the same. We have an internal web server which we would like to publish at WWW site but don't want customer ...
Nginx rewrite rule guide
Just check your code:ImageView viewBitmap = (ImageView) findViewById(R.id.icon2); viewBitmap.setImageBitmap(bitmap); setContentView(R.layout.open_pic_layout);You have written findViewById() before setting Content View. Its wrong.public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layo...
I have i bitmap that needs to show in a new activity, so i cahe it and in the opened activity i try to load it but i get a nullPointerException. Here i save the image :File cacheDir = getBaseContext().getCacheDir(); File f = new File(cacheDir, "pic"); try { FileOutputStream out = new FileOutputStream( ...
Android, Saving and loading a bitmap in cache from different activities
Unless you are the maintainer of lvh.me, you can not be sure it will not disappear or change its RRs for lvh.me.You can uselocalhost.localdomaininstead oflocalhost, by adding the following lines in yourhostsfile:127.0.0.1 localhost localhost.localdomain ::1 localhost localhost.localdomainThis is better than using lvh.m...
I wonder whether is safe to uselvh.meinstead oflocalhostwhen developing locally, sincelvh.memust be resolved and the IP may change over time.The goal of usinglvh.meis to be able to handle subdomains, sincelocalhostdoes not have top level domain.
It is safe to use lvh.me instead of localhost for testing?
0 If you want to create a bitmap inside the method you have to use the using block outside of the method, I mean where you call the method something like this: using (var myNewBitmap = Crop(imgPhoto, xy, width, height) ) { // do whatever you want with the bitmap } aft...
In my aplication I am working with about 30 - 70 large images. By working I mean loading, cropping, resizing and adding to aviStream. Each image can have up to 4500p and 10MB (working with such large images gives me most of the out of memory exceptions). While testing I sometimes use smaller ones (2500p ~ 500kB each) ...
g.DrawImage throws out of memory exception
What you are describing is exactly how Luigi is set up to run. When you specify which tasks to run (inluigi.buildor the cli), you are specifying which tasks need to be completed for Luigi to consider its job done. Luigi will not care about your pipeline unless you tell it to. One way to do this would be to inform Luigi...
I have a pipeline built with Luigi in which some taks require other tasks and each task creates a file. Something like:TaskA-------->TaskB---------> TaskC-------->TaskD (fileA) (fileB) (fileC) (fileD)The first time I run the pipeline, everything runs well and gets created.If I run the pipeline again,...
A luigi task fails if the next file is already completed
You have an issue with your path. Your CSS file is in the folder assets. And your absolute CSS path after resolution points tohttps://ruth9403.github.io/pricing-toggle-hamburger.github.io/assets/assets/images/bg-bottom.svgwhich doubles theassetsfolder.Hence you have to change the image path for the background toimages/...
I've included 2 svg images for my background, one is at top and other at bottom. With my local host (live server) they show up without any problem, but now that is uploaded at github it doesn't show at all. I don't know what's wrong since all the assets (folder with images) are correctly uploaded. Chrome shows this err...
Why my Background-image is not showing up on my github.io?
You are almost there, you just need to change the paths' order.Ingress Path Matchingpaths: - path: /service1/query pathType: Prefix - path: /service1(/|$)(.*) pathType: Prefix backend: service: name: service1 port: number: 80When you add/service1(/|$)(.*)to the first line...
I have a kubernetes ingress that has a service taking advantage ofnginx.ingress.kubernetes.io/rewrite-target. I have another path,service1/querythat needs to redirect somewhere other than what therewrite-targetis pointing to. Let's say it should act as a proxy and forward the request to google.com and return the result...
Kubernetes Ingress with mixed locations
If the base (the branch against which your PR is compared remains the same), you your PR branch must change its content, you simply can force push a new content:git checkout B git push --force B:AThe PR will update its content (new list of commits)However, the branch A on the fork will keep its original name (A), beca...
Is there any way to change head fork of existing pull request?I have earlier created a pull request with branch A, now I want that PR to take commits from branch B.
Change head fork of existing Pull request
1 The user account you are connecting with doesn't have the permission to do a backup. (That's what the error says) Only users who are members of db_owner or db_backupoperator have the backup database permission by default. Your hosting provider will probably provide some o...
I can't run SQL backup script on shared hosting through asp.net website This is the error message: BACKUP DATABASE permission denied in database 'TestDB'. BACKUP DATABASE is terminating abnormally. This is the code: sqlcon.Open(); //query to take backup database sqlcmd = new SqlCommand("backup database TestDB to di...
can't run sql backup script on shared hosting
It's hard to say whether a large number will affect system performance, since it depends an aweful lot on what they're doing and how they're doing it, as well as how many end up hitting at one time, etc.That said, my opinion is that using this sort of thing for managing the sorts of things you're describing will severe...
I want to use cron module (later,node-cronetc.) in my node server to schedule jobs. The jobs are notifications (eg. email) sent to a user to update his profile picture if he hasen't done so after 1 hour of signup. I am usinglatermodule to schedule tasks when user signs up, to be executed 1 hour after to check whether h...
Does node.js cron affect system performance
To be honest, this is an ideal situation for a cronjob. Theoretically, you could create cronjobs on the fly...That is edit the crontab with php and create an entry for each auction with their end time to execute a generic script that has some variables passed to it.A cronjob every minute seems a bit extreme, but if you...
Closed. This question needs to be morefocused. It is not currently accepting answers.Want to improve this question?Update the question so it focuses on one problem only byediting this post.Closed8 years ago.Improve this questionWhat is the best way to send e-mails or perform functions on a small, non-real money auction...
PHP Auction Expiry Tracking [closed]
In schedule.rb, replaced rake 'send_digest_email' with command 'cd /home/username/repository && RAILS_ENV=development bundle exec rake send_digest_email --silent':)
I am newbie on Ruby on rails. I have to implement auto-generate mail functionality withcronjobsusingwhenever gemand I have followed this linkhttp://www.sitepoint.com/schedule-cron-jobs-whenever-gem/What I have done---1. Addeduser_notifier.rbfile and set all mail actions asclass UserNotifier < ActionMailer::Base defa...
Ruby on Rails 4 Whenever cron job working but not sure about output
Confirmed with GitHub support that, as of 2018-10-13, repos can only be pruned by contacting GitHub support.
I forked a repo on GitHub.I pushed commits (whose commit messages contain references to issues in the original repo) to my fork.I pushed the same commits multiple times while rebasing, rewording, etc.Thus, I've pushed different versions of the same code changes to my fork, but only the newest version is in any branch, ...
Pruning dangling commits from GitHub fork
You have three memory regions, eden, survivor and tenured space. What I suspect is happenings is that either the tenured or eden spaces are not growing as you increase the maximum size. The reason these two regions matters is that when the tenured space fills a Full GC is triggered (I suspect this size is growing) Wh...
I see that with -Xmx2g, the peak memory reaches 1G and does major collections (marksweep collector). With -Xmx3g, it reaches 1.5G and does a major collections. With -Xmg4g, it reaches 2G and does major collections. But, from here I tried increasing max memory to 6G, 8G, 12G and all the times the peak memory reaches 2G...
Peak memory usage does not go beyond a limit
Please learn to actually read the words in the error message. The problem is very clear.The path atApp.Path & "C:\Users\bea\Desktop\symptoms.sql"isn't there. IfApp.PathisC:\VB6Apps, and you concatenate (add)"C:\Users\bea" to it, you end up with"C:\VB6AppsC:\Users\bea", which obviously isn't a valid location.
I'm trying to do backup on VB6.This is my code:Private Sub Command1_Click()Me.CommonDialog1.Filter = "*.sql"Me.CommonDialog1.ShowSaveIf Me.CommonDialog1.FileName <> "" ThenFileCopy App.Path & "C:\Users\Bea\Desktop\symptoms.sql", Me.CommonDialog1.FileName & ".sql"MsgBox "Database had been successfully Saved on " & Me.Co...
Path Not Found VB6
I was wondering if it is possible to save it locally and compare it against the data in the collection to prevent it from reading all of the documents in the collection on every refresh? While saving the data locally, is indeed a good solution, remember that also Firestore has its own caching mechanism: For the web...
I currently have a really small web app in which users can make song requests. In Firestore I have a collection called songRequests and every request is a document. For the admin, I created a dashboard in which he can see the incoming song requests. To try it out I used a onSnapshot listener which correctly shows all ...
Reduce firestore reads by saving data locally and comparing it against the data in Firestore?
You have to provide SonarQube with a single JaCoCo report aggregating data from all the modules.In the parent POM, define a location for this aggregated JaCoCo report:<properties> <sonar.jacoco.reportPath>${project.basedir}/../target/jacoco.exec</sonar.jacoco.reportPath> </properties>and configure JaCoCo (especially<...
I have a Java project consisting on multiple modules. Some functions for a common package are tested within the other modules. Sonar only shows the code coverage tested inside each package, how can I tell it to search in all the modules?I am using SonarQube 4.5.4, Java 8 and JUnit 4.12
SonarQube - Show code coverage considering multiple projects
I had the same problem and solved it by addingnginx.ingress.kubernetes.io/force-ssl-redirect: "true"as described inthe ingress-nginx documentation
I am trying to disable all HTTP ingress traffic for a specific API. I tried deleting the ingress and recreating after adding this annotationkubernetes.io/ingress.allow-http: "false", but that doesn't work too. I can still hit the API and get a response on http://<ingress-dns-name/shipping-address/apiBoth Nginx Controll...
Force only HTTPs Traffic on Kubernetes Nginx Ingress
I guess you're trying to automate something on a web application. It clearly goes beyond the simple fact of your server crashing. What if you want to add another front-end server for example ?People in the ruby community came out with a pretty nice tool, "whenever" (https://github.com/javan/whenever) to solve this issu...
I would like to version control my server's configuration, in case something happens to my server.I think crontab files themselves are not intended to be edited directly (only through crontab commands), so how would I go about versioning them? Should I version the files anyway? Is there something else I should be looki...
How should I version control (with SVN, for instance) a crontab?
4 So the answer was quite simple: From the gist here, we need to simply tell juypter to add the --packages line to the SPARK_SUBMIT with something like this to the top of my notebook. Spark goes out and installs the package when grabbing the context: import os os.environ['P...
Been playing with pyspark on juypter all day with no issues. Just by simply using the docker image juypter/pyspark-notebook, 90% of everything I need is packaged (YAY!) I would like to start exploring using GraphFrames, which sits on top of GraphX which sits on top of Spark. Has anyone gotten this combination to work?...
How to start graphframes on spark on pyspark on juypter on docker?
I don't know any direct way to do this. The way I can think is add a PowerShell step to call "git log" command and read the information from the log. Since the commit information for pull request usually has a format like "Merge pull request #6 from XXX". We can use RegEx to get the pull request number. git log -1 >lo...
Is it somehow possible to get the pull request number in a Visual Studio Team Service (vNext) build which is linked to a GitHub repository for builds run for pull requests? I would like to do some code anylsis using sonar and write the finding back as comment to the pull request using Sonar GitHub Plugin.
Get GitHub pull request number in VSTS build
The commandgit rm --cached <file>is used to untrack files in a Git branch. This command will remove thefilefrom the staging area andalsowill remove the file from the repository next time you commit.The commandgit update-index --assume-unchanged <file>will also make thefiledisappear from the staging area. However, thi...
I do not understand the difference betweengit rm --cachedandgit update-index --assume-unchanged.I'm aware thatgit rm --cached <file>will remove a file from the staging area.And, I know thatgit update-index --assume-unchanged <file>also does this.I've also seen both commands offered as suggestions to similar questions...
Difference between `git rm --cached` and `git update-index --assume-unchanged`?
Something similar to WeakHash will do it. Here's a more complete implementation that can handle Fixnums, Symbols, and Floats (and other immutable types if you add them to the list):class WeakHash < Hash def []=(k, v) if(![Fixnum, Symbol, Float].include? k.class) k = WeakRef.new(k) end if(![Fixnum, S...
I have a number of Ruby objects with unique IDs that I am currently caching in a Hash. When an object is assigned an ID, it goes into the Hash. The cache is complete, i.e. every object with an ID that exists in the Ruby scope should also be in the cache.However, I am having trouble finding a way to delete objects from ...
Ruby object cache
AuditQueryis built on top of Hibernate Criteria, so it doesn't support window functions, in which case you need to write a native SQL.
I haveAuditQueryand I want to addorder bywithpartition by.like I have :final AuditReader reader = AuditReaderFactory.get(em); final List<Test> result = new ArrayList<Test>(); final AuditQuery query = reader.createQuery().forRevisionsOfEntity(Test.class, false, true);and I would like to do something like :ORDER by...
AuditQuery Hibernate add order by partition
Once you have created an empty BitBucket repo, you can git clone https://github.com/user/yourRepo cd repo git remote rename origin upstream git remote add origin https://[email protected]/yourAccount/yourRepo git push --mirror Then make sure master will pull from the bitbucket repo (upstream being the name of the rem...
I'm not a GIT expert so I need some help on this setup for a project I'm working on. So basically this is what I need: Create a fork from Github to Bitbucket, how? this guarantees made git pull all the time to mantain CORE updated with latest changes from Github main project? Allow to PUSH only to Bitbuket repository...
Complex setup for GIT: fork from Github to Bitbucket, PUSH to Bitbucket only
As far as I know (I am still new to our ADO solutions), we have to fully run/schedule the pipeline to see that it runs and then wait a day or so for the scheduler to complete the auto executions. At this point I do have some failing pipelines for a couple of days that I need o fix.I do get emails when a pipeline fails ...
When changing the pipelines for my company I often see the pipeline breaking under some specific condition that we did not anticipate. We use yaml files to describe the pipelines (Azure Devops)We have multiple scenarios, such as:Pipelines are run by automatic triggers, by other pipelines and manuallyPipelines share the...
How to test my pipeline before changing it?
You should be able to use the ipv4 address listed undervboxnet0. Look for thevboxnet0interface in the list of outputs forifconfig. Alternatively the address10.0.2.2will also map back to the host from the guest.This IP address will be accessible from within the guest but not directly from within a pod. To make it acc...
I am running minikube on my Mac laptop. I am using VirtualBox to host the minikube virtual machine, following theofficial instructions.I would like a pod that I am going to deploy into the cluster to be able to ping a server I will be running on my laptop. Assuming (for now) that I am not defining a Kubernetes Servic...
On a Mac, what IP will represent my laptop from within a minikube cluster?
Try this way in CDVPlugin.m - (void)onMemoryWarning { // override to remove caches, etc NSLog(@"onMemoryWarning"); NSString * javascriptString = @"yourJSFunctionToManageMemoryWarnings();"; [self.webView stringByEvaluatingJavaScriptFromString:javascriptString]; }
Can anyone please tell me how to handle memory management in iOS Cordova based project with "Received memory warning" I am getting this warning in iOS Cordova project when running on my iPhone or iPad (version 8.1).I am using CDVlocation for geolocation in my app. I am mainly receiving this message while loading map b...
Handling memory Management and in iOS Cordova project?
You don't have a copy constructor. When you push 'a' into the list, it gets copied. Because you don't have a copy constructor (to allocate memory for c and copy from old c to new c) c is the same pointer in a and the copy of a in the list. The destructor for both a's gets called, the first will succeed, the second wil...
typedef struct temp { int a,b; char *c; temp(){ c = (char*)malloc(10);}; ~temp(){free(c);}; }temp; int main() { temp a; list<temp> l1; l1.push_back(a); l1.clear(); return 0; } giving segmentation fault.
Seg fault after is item pushed onto STL container
Since your endpoints are On-Prem and most likely have private ip address, they are not reachable to AWS health checkers from AWS data centers around the world.So HTTP/HTTPS based health checks are not possible:HTTP and HTTPS health checks- Amazon Route 53 must be able to establish a TCP connection with the endpoint wit...
We have VPN connected from AWS VPC to On Prem Server Farm. We would like to create Health Check for the servers from Amazon Route 53 to the endpoint (OnPrem IP via VPN) to enable to DNS Failover.
How to perform health check on local/private IPs (on Prem) in Amazon Route 53?
you can modify your backup command to include the WITH INIT option REM Backup each database, prepending the date to the filename FOR /F "tokens=*" %%I IN (%DBList%) DO ( ECHO Backing up database: %%I SqlCmd -E -S ERP2 -Q "BACKUP DATABASE [%%I] TO Disk='D:\SQL ERP2_Backup\%%I.bak' WITH INIT" ECHO. ) any existing...
I use a bat file to backup databases to destination folder as below. @ECHO OFF SETLOCAL REM Get date in format YYYY-MM-DD (assumes the locale is the United States) FOR /F "tokens=1,2,3,4 delims=/ " %%A IN ('Date /T') DO SET NowDate=%%D-%%B-%%C REM Build a list of databases to backup SET DBList=D:\SQLDBList.txt SqlCmd...
Question of SQL backup database to destination folder by bat file