Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
+50Yes, it's correct.When your app starts reading withLATESTiterator type it will start reading from the next record coming. So all the data that has already been in the queue will be ignored. Which means that if your app has a downtime - every message during that downtime will be skipped.You can overcome this by savin... | We are trying to determine the bestshard-iterator-typefor our lambda but I'm getting mixed information about the functionality of the shard iterator typeAFTERa lambda has been deployed for the first time.I have been told that if we use ashard-iterator-typeofLATESTthat when we go to deploy a updated version of the lambd... | Does setting a kinesis shard-iterator-type to LATEST risk losing messages in lambda? |
The Crunz\Schedule::run() method registers and returns a new event each time you call it, so you can create many tasks with many calls to run(). A rough example probably looks like:<?php
// tasks/backupTasks.php
use Crunz\Schedule;
$schedule = new Schedule();
// Register your first task
$schedule->run('cp project p... | I'm usinghttps://github.com/lavary/crunzto make my CakePHP 3.0 cronjob calls.The readme says: "The idea is very simple: instead of a installing cron jobs in a crontab file, we define them in one or several PHP files, by using the Crunz interface."I want to define all my cronjobs in only one PHP file, but all the exampl... | Multiple Jobs in One PHP file with Crunz |
I think the simplest solution is to have the application that uses this file check for a differently named XML file (e.g. suffixed with.local.xmlinstead) that takes precedence over the one in the default location. The one in the default location should be commited, while the path of the optional local override should ... | We have a .xml config file in a public Github repository, and we want to include a basic, default version of that .xml file available for new users.However, the package maintainers want to be able to edit their personal .xml file without having to commit around it.What's the cleanest way of keeping a default config fil... | How to keep a default config file in Git repository while allowing maintainers to use a custom version? |
It's the other way around.reduce(L,f) = fold(first(L), rest(L), f), so there's no special need forreduce-- it's just a short form for a commonfoldpattern.foldhas lots of use cases of its own, though.The example you gave for string concatenation is one of them -- you can fold items into a special string accumulator much... | When accumulating a collection (just collection, not list) of values into a single value, there are two options.reduce(). Which takes aList<T>, and a function(T, T) -> T, and applies that function iteratively until the whole list is reduced into a single value.fold(). Which takes aList<T>, an initial valueV, and a func... | Is there a particular use case for fold() function |
The following example should comply with Prometheus API format:$ echo 'elapsed_scantime_count{Subject="DEV-Product-1"} 0.563' | ./promtool check metrics
elapsed_scantime_count no help textRemove camel case, remove whitespace and end each line with a\nAlso, don't use hyphens or periods in metric names, numbers at the st... | I have attached the Prometheus with my metrics rest endpoint but I am receiving the error "expected timestamp or new record, got "MNAME". My endpoint produces the response body which looksElapsedScanTime_count {Subject="DEV-Product-1"} 0.563
LiveActivities_count {Subject="DEV-Product-1"} 53
LogEvents_count {Subject="... | Prometheus scraping error "expected timestamp or new record, got "MNAME" |
With kubeadm It's possible to join worker node to a cluster by using the public IP of master node. When you do kubeadm init on the master node you need to give the public IP of master node as parameter so that correct certs are generated by kubeadm because by default kubeadm will generate cert for private IP.kubeadm in... | Consider the following scenario:I have a master node with public ip: 13.82.237.240
The master is on a private network with ip 10.0.0.4(This node is on a completely different network, but still connected to the internet)I have a worker node with public ip 13.94.152.128
The worker node is on a private network with ip 10.... | Is it possible to join a worker node that is in a different network? |
+50If I am understanding it correctly, you just need the succesful and failed login information, but instead you are stuck with a giant audit file.Have you tried just turning on the native SQL Server 2008 R2 Security Connection logging? Simplest way that could do the trick as explained here:https://stackoverflow.com/a/... | I use SQL Server 2008 R2 and have an activeSuccessful_Login_Groupaudit on it. The output audit file saves about 20000 rows in 10 minute.I just want to audit user login start time and session duration.I have usually 40 active session each time.What should I do?Thanks in advance | SQL Server Successful login audit |
If you're using signed URLs, which you say you are in the comments, and not reusing those signed URLs then there is no way to cache these requests.
Amazon Web Services cannot override your Web browser's internal cache system. When two URIs are unique, as they are with signed URLs, then your Web browser treats them as ... |
I have created new music application and I store all mp3 files on Amazon S3. Before moving to S3 I used store them on server file system itself. It used to cache files and on consecutive reload of page files weren't downloaded from server. But after moving to S3 everytime I load page it downloads files from S3. This n... | Amazon S3 cache audio files |
The only reasons I have ever used thewhilesolution is if either I needed my code to be run more than once a minute or if it needed to respond immediately to an external event, neither of which appear to be the case here.My thinking is usually along the lines of:cronhas been tested by millions and millions of people ove... | I havethis Perl scriptfor monitoring a folder in Linux.To continuously check for any updates to the directory, I have a while loop that sleeps for 5 minutes in-between successive loops :while(1) {
...
sleep 300;
}Nobody onmy other questionsuggested usingcronfor scheduling instead of a for loop.Thiswhileconstru... | How can I run my program code after fixed intervals? |
well, the problem was withgith({
repo: 'username/autodeploy'
}).on( 'all', function( payload ) {....i changed that forgith({
repo: 'username/autodeploy'
}).on( 'file:all', function( payload ) {....and that solved my problem. thanks @mscdex and @alandarev for tell me to test. | i am trying to make a autodeploy with github, i execute this js to have a "server" to receive the hook from github, that work amazing, but i need then to execute a script to download the repository, but this code don't execute my hook.sh. I don't have experience with node earlier, so, i am lost here.// Listen on port 9... | nodejs and gith doesn't work |
1
nginx is pretty good for mass connections, check these answer.
https://stackoverflow.com/a/16289251/2325522
there you can see how to use Nginx as load balacer.
The only problem that you can have is the mass band-width needed to serve 1000's of simultaneous connections.
Ex... |
I want to add a load balancer infront of my nodejs websockets server. The plan is to add another node on another physical machine and have a load balancer in front. The load balancer will also be on its own physical machine.
The requirement is that several 1000s of simultaneous connections could be handled and I'm a b... | Bouncy or nginx for load balancing websockets? |
You can redirect them to the newLocationwithheader('Location: /blog' . $_SERVER['PHP_SELF']);If you use PHP version >= 5.4.0, you can also send a proper HTTP status code 301 (moved permanently) withhttp_response_code(301);When you want to use.htaccessyou can redirect withRewriteCondandRewriteRule.RewriteEngine On
Rewri... | This question already has answers here:Closed11 years ago.Possible Duplicate:.htaccess rewrite to redirect root URL to subdirectoryI need to change all the links(2455) in my site.There will be a problem when visitors come from Google (using the old links) as the page will be404 page not foundI want to redirect the old ... | Changing all my website links: what is the best way? [duplicate] |
CouchDB supports replication, so just replicate to another instance of CouchDB and backup from there, avoiding disturbing where you write changes to.https://docs.couchdb.org/en/latest/maintenance/backups.htmlYou literally send a POST request to your CouchDB instance telling it where to replicate to, and it Works(tm)EDI... | We're looking at CouchdDB for a CMS-ish application. What are some common patterns, best practices and workflow advice surrounding backing up our production database?I'm particularly interested in the process of cloning the database for use in development and testing.Is it sufficient to just copy the files on disk out ... | CouchDB backups and cloning the database |
You can click the 'info' icon to get the git commands you need to run.
You can also get any pull request as a patch by appending .patch to the url. For instance:
https://github.com/github/github-services/pull/146.patch
|
How do I get the files from a public repo pull request on my local computer?
A developer submitted a pull request to a public repo (to which I don't have write access).
I want to test his code before I acknowledge the pull request.
How do I get the master of the public repo + his pull request on my local in order to c... | How do I get the files from a public github repo pull request on my local computer? |
To list commits that are not onmasterbut only only onbranch:git log master..branchIt does not matter which branch is checked out, as you specify the range. Git will find the shortest route frommastertobranch, first going back onmaster, not printing the commits, and then listing commits when going forward in history tow... | Looking for a git command which displays commits in a branch that are not merged to master yet, preferably with hash, date, author name and comment.(This probably is a duplicate question but I couldn't find it on SO) | Git command to find commits made in branch that are not present in master |
Most likely they want to setup NAT so that incoming requests coming to NAT:443 are routed to :443 , and for this they do need an IP of the server within the local network.ShareFollowansweredNov 26, 2013 at 13:02Eugene Mayevski 'CallbackEugene Mayevski 'Callback45.5k88 gold badges7373 silver badges122122 bronze badgesAd... | Closed.This question does not meetStack Overflow guidelines. It is not currently accepting answers.This question does not appear to be abouta specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic onanother Stack Exchange site, ... | Destination IP for port 443 (HTTPs) [closed] |
create a pi.php file with just the code:<?php phpinfo();in it and save it in the same folder as your Magento, then access via browser.The value that will be displayed for max_input_vars (local column) is your run-time value. If it differs from your setting in php.ini, you're probably changing the wrong INI file.Mod_FCG... | I'm running Magento, and I am receiving "mod_fcgid: stderr: PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0" when trying to save Related Products with 5000+ products in the DB.Most people recommend trying to fix this by updating the max_... | Receiving "Input Variables Exceeded 1000" error even after updating max_input_vars |
After a number of hours trying out different things, the reason was in fact the uwsgi buffer-size just not being high enough even though I had quadrupled it. For those that don't know, you need to add:buffer-size=32768Where the number is some number of bytes that works for your use case. The default is 4096. | I have a Django REST Framework app running behind an Nginx proxy, we have a third party service that redirects to one of the urls in the app. I'm getting 502s from this endpoint when the redirect happens and have narrowed it down to the Referer header being too large. My logic is as follows:Received 502 when the redire... | How do I fix Nginx 502 Bad Gateway on large headers? |
I finally find the answer onthis.I had to allow the forwarding oniptables.iptables -P FORWARD ACCEPTBest regards.ShareFollowansweredNov 20, 2019 at 8:15ArgonArgon6388 bronze badgesAdd a comment| | I created a cluster with several Raspberry Pi following thistutorialI'm stuck with a problem.I have a master node and a slave. I create deployment and a service for Nginx (for testing purpose).Here is the deployment fileapiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
labels:
app: nginx
spec:
replicas: 1
... | Pods not accessible from another host |
Test first if thealternative using filterwould work better:on:
push:
branches:
- 'feat/**'That way, no need to testgithub.event_nameandgithub.ref_name. | I have a job that I want to trigger for branches namedfeat/<something>, but I can't make it work.If I name a branchfeatand remove the/it works, but if I usefeat/testit won't triggerjobs:
deploy_dev:
if: github.event_name == 'push' && contains(github.ref_name, 'feat/')
name: Deploy dev
uses: ./.github/work... | Github workflow not triggering on conditional branch name |
There are often more efficient ways than IP bans. For example, hidden fields in a form only bots will fill out, or requiring javascript or cookies for submitting forms.For IP banning, I wouldn’t use .htaccess files. Depending on your webserver it may read the htaccess files for each request. I’d definitely add the IP-b... | I run a large forum and like everyone else have issues with spammers/bots. There are huge lists of known spam IP's that you can download and use in htaccess form, but my only concern is the file size. So I suppose the question is how big is too big, given it's going to be loading in for every user. Adding all the IP's ... | IP Banning - most efficient way? |
Find the merge-base of C and B.base=$(git merge-base C B)Create a temporary branch from$base.git checkout -b temp $baseSquash mergeBtotemp.git merge B --squash
git commitCherry-pick the squashed commit toCwith-n.git checkout C
git cherry-pick temp -n
# commit X only
git commit -m 'blah blah' -- path_to_X
# discard the ... | I have a master branch 'A' and a feature branch 'B'.Now a file called 'X' has evolved with some changes in both 'A' and 'B' branches.How do I create a third branch 'C' ( From Master 'A') where I can get the file 'X', having both the changes from branch 'A' and branch 'B'. And also I don't need other commit changes from... | Git Selective merge |
This was reported inomniauth/omniauth issue 960and discussed inPR 809 "Protect request phase against CSRF when Rails is used. "It includes:So we have implemented theomniauth-rails_csrf_protectionsolution, but previously we had our 3rd party OAuth provider log people in after they had verified the registration and redir... | I am using gemomniauthand when I push my code to Github, it shows me a security warning because of the gem.CVE-2015-9284
high severity
Vulnerable versions: <= 1.9.0
Patched version: No fix
The request phase of the OmniAuth Ruby gem is vulnerable to Cross-Site Request Forgery when used as part of the Ruby on Rails fram... | Github warns security problem about Omniauth gem |
SOME KEY TIPS TO NOTE WHEN TRYING TO ACHIEVE USER INSTANCE BACKUP
a.) Connecting
Your connection string should look like this:
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\MyDatabase.mdf;Integrated Security=True;User Instance=True;Database=MyDatabaseAlias
It is essential that your connection string gives... |
I wouldn't describe myself as afraid of change - but afraid of new technologies? YES INDEED! Technologies from operating systems, to database servers just seem to become bugged, inefficient and backward the further they "progress"
MSDE 2000 (what they might call "SQL 2000 Express" in today's world)
BACKUP [MyDatabase]... | Why is it such a mission to backup a SQL Server 2008 Express database? |
git rm --cached dirToignore
echo dirToignore >>.gitignore
From there, a new commit will record that:
dirToignore is no longer par of versioned data
dirToIgnore won't show up anymore in git status
See this SO question for similar advices.
If you want to amend previous commit in order to remove said subdirectory f... |
I have an Xcode project that uses git for version control. I have a .gitignore file to ignore the build subdirectory:
build/*
I recently added a subdirectory that contains an Xcode project and forgot to update the .gitignore file before checking it in.
Is there any way to make git ignore the build subdirctory now,... | Github. How do I make changes to what is ignored via .gitignore? |
0
This is only for all database backup
DECLARE @name VARCHAR(50) -- database name
DECLARE @path VARCHAR(256) -- path for backup files
DECLARE @fileName VARCHAR(256) -- filename for backup
DECLARE @fileDate VARCHAR(20) -- used for file name
SET @path = 'C:\Backup\' ... |
I am running into this error when trying to Backup a database:
"The media set has 2 media families but only 1 are provided. All
members must be provided."
Please note this is on BACKUP not on restore.
There are a lot of topics on this error for RESTORE, but I didn't find any for BACKUP.
I am using this T.SQL on Sq... | SQL Server Backup (not restore!) error: The media set has 2 media families but only 1 are provided. All members must be provided |
That's not a valid endpoint.ADFS is expecting protocol parameters after that.Try the metadata endpoint:https://myserver.domain.com/FederationMetadata/2007-06/FederationMetadata.xml | I set up an ADFS environment Windows Server 2012 R2 by the following steps:creating a certificate file;Install ADFS through Server management;Configure ADFS with the certificate file created in #1the above 3 steps runs successfully but I cannot access the endpointhttps://[DomainControllerName]/adfs/ls. Sometimes it sho... | Cannot access ADFS end point /adfs/ls/ |
Currently postgres docker images will run shell scripts found in /docker-entrypoint-initdb.d/ as well as SQL scripts. You could write something like this:#!/bin/bash
psql -U ${POSTGRES_USER} <<-END
create schema crm;
alter schema crm owner to ${CRM_SCHEMA_OWNER};
ENDin a file calledcreate_crm_schema.shfor exam... | I'd like to have my basic database built using*.sqlscript placed in/docker-entrypoint-initdb.d/My SQL files look like this:create schema crm;
alter schema crm owner to ${CRM_SCHEMA_OWNER};
....Of course, importing using psql does not resolve the variable.
My question is now, how could I use environment variables like t... | Use environment variables in docker-compose for initdb of postgres |
how can I cause this .js file be cached client side?
It would be more reliable to cache it on the server by decorating the action with the [OutputCache] attribute. If you want to cache it on the client you could configure the cache cache location on the client when using this attribute which will send the proper Cac... |
Context: ASP.NET MVC 3.0, .NET 4.0, C#, IIS 7
I have a long list of names (of game realms/servers). The realms are stored in a database.
I have an Action that returns the list as a JSON code.
I reference the list in my .aspx as following:
<script type="text/javascript" src='<%= Url.Action("Realms", "Data") %>'></scrip... | Enable client side caching for "dynamic" content (asp.net mvc 3.0) |
Remove the TODO,stop using themfor anything that's not short term (for the length of a ticket or fork) and move them into tickets on your ticket tracking system.TODO comments have multiple problems:-they can be hard to find if you are using an IDE which doesn't auto locate them. (I know Devs who use sublime or even Ema... | We have an application which is big and we have added the TODO rule to the quality gates which gives error if TODO comments are found.
If we just removing the TODO comment (which is scary) it works but the whol purpose of adding TODO comment is lost. Is there still a way to keep the TODO comment by adding anything ext... | How to handle TODO comments when sonar error is encountered |
The whole idea of DMA controller is that it works in parallel with the processor. So the processor can queue a long IO operation to DMA controller and happily continue running code. Even though the DMA controller is slower it will only affect the IO operation, not the overall performance. This ie very important when i... |
I read this in a book:
If the DMA controller in a system functions at a maximum rate of 5 MHz
and we still use 100 ns memory, the maximum transfer rate is 5 MHz
because the DMA controller is slower than the memory. In many cases,
the DMA controller slows the speed of the system when DMA transfers
occur.
I th... | Why use a DMA controller if it slows down the system? |
0
GitHub support answered my query as follows:
Q: What happened?
A: The feature was discontinued while still in Preview(beta) and those testing/using the beta feature as I understand were reached directly via emails.
Q: Are there equivalent options?
A: No, there is no eq... |
This GitHub blog https://github.blog/2018-12-10-introducing-content-attachments-api/
announces (includes the link) https://developer.github.com/apps/using-content-attachments/
This link is a 404 and searching your docs for "Content Attachments API" does not produce useful results.
There are several other links:
https... | What happened to the GitHub "Content Attachments API"? |
kubectl top node: It displays resource (CPU/Memory/Storage) usage of nodes.Basically, reserve a portion of the CPU and memory resources for use by the underlying node components such as kubelet, kube-proxy, and the container engine. And it reserves that portion in the first time when you configured the node, then that ... | I noticed that the amount of consumed resources claimed by thetop pods -Acommand does not match the one shown by thetop nodeone (intended as the sum of pods on a specific node).In the specific, for a single node I see a difference of about 1Gi in memory consumption, which to me it is quite a lot.
I also tried to query ... | Kubectl top delivers different results between node and pods |
9
No, it is not possible currently. As per the updated CreateUserPool API, a new VerificationMessageTemplate parameter will allow us to do this but cloudformation has yet to support this. AWS Support told that there is an existing feature request for the same. You can loo... |
I'm trying to figure out how I can set the verification type from Code (default) to Link in my CloudFormation template.
In the website I can set it here:
If I take a look at the docs there is nothing mentioned.
My CloudFormation looks like
SomeUserPoolResourceName:
Type: AWS::Cognito::UserPool
Properties:
Us... | Set Cognito Verification Type to Link in CloudFormation |
Looks like you have set a password while taking the backup and while restoring the backup, you have unselected the option:
https://docs.plesk.com/en-US/onyx/administrator-guide/backing-up-and-restoration/restoring-data-from-backup-archives.59263/
Backup security settings. If the backup was protected with a password,
... |
I recently crashed my dedicated server and had to format it and reinstall a clean Ubuntu/Plesk/Apache...
Thankfully I had a full Plesk backup which I was able to restore without issue, and now all of the files, databases, users and settings seem to be back correctly.
Problem is for some reason, all of the passwords ar... | All users/database passwords changed after Plesk backup restore |
For dynamic memory analysis definitelyValgrind.ShareFollowansweredJun 23, 2010 at 10:42tur1ngtur1ng3,22955 gold badges2525 silver badges3131 bronze badges2+1 Yes, I second that. Valgrind is a grand tool for memory analysis.–daramarakJun 23, 2010 at 11:06I see that there are no commercial options listed here...so I gues... | What's the best tool (commercial/open source) you've used for dynamic review/memory analysis of a C++ application?EDIT: removed 'static' as there is already agreat questionon this topic (thanks Iulian!) | C++ dynamic review tools |
No. Neither the GitHub UI (https://github.com) nor the GitHub API (https://api.github.com) expose that data currently. | Is there a way to get clone statistics of a github repository for any given month?We have a Clones tab with stats for last 14 dayshttps://help.github.com/articles/about-repository-graphs/#trafficbut it would be interesting to look at the historical data. | Get Github total clone statistics |
Dynamic allocation of memory uses the heap of the application/module/process (but not thread). The heap can only handle one allocation request at a time. If you try to allocate memory in "parallel" threads, they will be handled in due order by the heap. You will not get a behaviour like: one thread is waiting to get it... | I'm working with an 8 core processor, and am using Boost threads to run a large program.
Logically, the program can be split into groups, where each group is run by a thread.
Inside each group, some classes invoke the 'new' operator a total of 10000 times.
Rational Quantify shows that the 'new' memory allocation is tak... | Can multithreading speed up memory allocation? |
You can:Get the latest version of the branch the pull request is about.Create a new branch for this branchMake necessary changes in the new branchPush the new branchCreate a new pull request in your name from the new branch. | My co-worker has raised a pull request to a repo to which I'm also a member.For this PR he has to make changes.Unfortunately my co-worker is no more in my project and now I need to make changes and commit the changes to this PR(The PR which is raised by co-worker).I know this could be done by pulling his branch and rai... | Contributing to others pull request by pulling their branch |
2
You can install XAMPP and run your pages locally. This package has PHP, Sendmail and Apache server in it. As well as MySQL if you need it.
XAMPP Installer
Share
Improve this answer
Follow
edited Mar 20, ... |
I'm trying to make a basic contact form (using HTML and PHP). I usually host my websites as gh-pages on GitHub. However, the form won't work on GitHub as GitHub doesn't allow PHP because "GitHub Pages is a static site hosting service and doesn't support server-side code such as, PHP, Ruby, or Python."
My question is: ... | How can I try my PHP code to see whether it works? |
0
So Vivek Kumar his line will work, but there is one important note, that why i'm posting it as an answer and not as a comment.
This will work but be careful, if you cut/paste an old file, the creationdate will be pasted as well. So say you cut and paste a file that has be... |
I'm deleting files manually on my system which are more than 6 months old, want to automate the process, is it possible via powershell? Pretty new to it!
I want to delete files more than 6 months old.
Any help would be much invited!
| powershell script to delete old backup files more than 6 months old |
Unfortunately sounds that like your backup didn't work correctly...furthermore if you get messages during svn co -r1999 ..there is something wrong...Have you tried to do asvn list -r 1999 file:///SVNReposRoot/ | I have a backup of an SVN repository with the following dirs and a readme:conf dav db format hooks locks README.txtI'm trying to extract the files from it.If I dosvn co file:///path/to/dir/I get:svn: No such revision 19755If I runsvnadmin verify file:///path/to/dir/, the SVN client runs through verifying all the ... | Getting files out from an SVN backup with "no such revision" error |
When you look in your "bin" directory, the .config file should be named yourprogram.exe.config. It won't find the configuration values otherwise, and it should be a content file, not an embedded resource. The .config file must always be present and in the same directory as the EXE.
|
So I have a C# console application that uploads files to s3 storage.
It works fine when I debug it from inside Visual Studio, however, when I build the .exe and run it off my server, I get errors saying that it couldn't find the Access Key inside the App.config file.
System.ArgumentException: Access Key could not be f... | AWS sdk for C#, where to put the App.config file? |
In kops 1.8.0-beta.1, master node requires you to tag the AWS volume with:KubernetesCluster: <clustername-here>If you have created the k8s cluster using kops like so:kops create cluster --name=k8s.yourdomain.com [other-args-here]your tag on the EBS volume needs to beKubernetesCluster: k8s.yourdomain.comAnd the policy o... | I have RBAC enabled kubernetes cluster created using
kops version1.8.0-beta.1, I am trying to run a nginx pod which should attach pre-created EBS volume and pod should start. But getting issue as not authorized even though i am aadminuser. Any help would be highly appreciated.kubectl version Client Version: version.In... | Need help on volume mount issue with kubernetes |
If you work on the same branch you simply have to pull the code from Github.If you use different branches, you will need to merge your changes. You can do it locally with Webstorm.Here is a screenshot where to find the git command under webstorm. | I am new to github.I want to share code with my teammates.Suppose i have a js file having code {previous code};i pushed this to github remote.now my friend pulled the remote repository and made some changes .let it be{previous code} + {new code 1}.Now i made some changes. let{previous code} + {new code 2}.
now how to g... | How to merge code in github? |
You created a LimitRange namedmem-min-max-demo-lr1in the default namespace. To verify runkubectl get LimitRange -n default, then deletekubectl delete LimitRange mem-min-max-demo-lr1. To further understand this scenario please check thishttps://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-constrai... | For one of requirements , i created a new pod on my default name space using below yaml fileapiVersion: v1
kind: LimitRange
metadata:
name: mem-min-max-demo-lr1
spec:
limits:
- max:
memory: 5Gi
min:
memory: 900Mi
type: ContainerNow i need to remove these LimitRange from default namespace in kubernetes? | How to remove LimitRange from default namespace in kubernetes? |
You need two separate conditions. And you want to return a 404 response.RewriteCond %{REQUEST_URI} ^/flv/.*\.flv$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* %{DOCUMENT_ROOT}/flv/404.flv [L,R=404] | Using .htaccess, how do I permanently redirect all not found *.flv files in one directory to a 404.flv file in the same directory. For example:If this file is not found:example.com/flv/*.flvUse this file:example.com/flv/404.flvHere's what I have so far (I'm very bad):RewriteCond /flv/(.*).flv !-f
RewriteRule ^ /flv/404... | How do I redirect a not found FLV file to a 404 FLV file, using .htaccess? |
Apparently El Capitan has something callSystem Integrity Protectionthat prevents any user (even root) to modify certain OS resources. Such as the /usr/bin directory in this case, where you have the python executable. To self sign the python binary you can disable SIP by rebooting your mac in recovery mode (reboot while... | When I run a python application on Mac, it shows many dialogs about want "Python.app" to accept incoming network connections.Even I Allow it many times, it shows again and again.How to allow it one time and not show any more?EditI found this question:Add Python to OS X Firewall Options?I followed the accepted answer to... | How to allow Python.app to firewall on Mac OS X? |
I think you could try configuring an Azure Application gateway, but as far as I'm aware, you need to do it when creating your cluster using an ARM template.ShareFollowansweredJul 7, 2016 at 13:01Nick RandellNick Randell18k1818 gold badges6060 silver badges7474 bronze badgesAdd a comment| | is there any way to configure Barracuda WAF or any other WAF tool for Service Fabric? I've been trying to do this using the documentation for AppService (https://azure.microsoft.com/en-us/documentation/articles/app-service-app-service-environment-web-application-firewall/) but i can get it to work.Any suggestion? I cou... | Barracuda WAF on Service Fabric |
Forking the repo won't duplicate those pull requests, but nothing prevents you to merge the branches from which those pull requests are done.For instance, thispull requestshows:DveMac wants to merge 1 commit into Semantic-Org:master from DveMac:masterYou can add a remote 'DevMac' to your local clone of your fork:git re... | I've come across a useful repo, but it's unmaintained and there are some good pull requests with bug fixes etc. that haven't been implemented. Is there anyway I can fork the repo and implement the pull requests into my forked repo? | GitHub - Fork a repo and implement its pull requests |
One way to do it would be to have a kustomization file in/overlays/, including patches and configurations fromdev/andstaging/. Eg:$> cat ./overlays/kustomization.yaml
resources:
- ./dev/foo.yaml
- ./staging/bar.yaml
patchesJson6902:
- target:
version: v1
groups: apps
kind: Deployment
name: my-app
pat... | I have an application with different versions. The base resource file for each version is slightly different. But the patch which needs to be applied to the base file is same. What should be the best structure to apply the same patch to different base resource and have different output files respectively./base1/
/... | Kustomize best practice to apply the same patch to multiple base files |
6
According to these tutorials:
https://www.digitalocean.com/community/tutorials/how-to-host-a-website-with-caddy-on-ubuntu-16-04
https://www.booleanworld.com/host-website-caddy-web-server-linux/
https://caddyserver.com/docs/caddyfile-tutorial
your Caddy server should serve... |
I have a website with docker and I use caddy for production. This is my configuration on my Caddyfile
mydomain.com {
proxy / django:5000 {
header_upstream Host {host}
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-Proto {scheme}
header_upstream X-CSRFToken {~csrftoke... | Access a Caddy server by IP |
Try this one:location / {
proxy_pass http://frontends;
proxy_pass_header Server;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header REMOTE_ADDR $remote_addr;
}Just addproxy_set_header REMOTE_ADDRa... | So I got a simple setup with nginx for static media and load balancing and tornado as webserver for django (4 servers running). My problem is remote_addr not getting passed on to django so I'm getting a KeyError:article.ip = request.META['REMOTE_ADDR']The remote address is getting sent through as X-Real-IP (HTTP_X_REAL... | REMOTE_ADDR not getting sent to Django using nginx & tornado |
Inhttp://jenkinsInstance/configureI had setup SonarQube only in "SonarQube servers" but not in "Quality Gates" as well.ShareFollowansweredFeb 12, 2017 at 17:47bskybsky19.7k5252 gold badges160160 silver badges275275 bronze badgesAdd a comment| | I'm trying to user Sonarqube with Jenkins.I've added the Quality Gates Plugin, to fail the build in Jenkins if the Quality Gates are not respected in Sonarqube.However, as you can see below, there is noProject Keyfield for Quality Gates.Also, if I try to save the configuration, I get:JSONObject["projectKey"] not found.... | Can't fill in Project Key for quality gates plugin |
I also faced this issue and after connecting with GitHub support they replied:Restrictions were placed on this account because you have registered
multiple free user accounts. Our Terms of Service state that an
individual may not maintain more than one:https://docs.github.com/github/site-policy/github-terms-of-service#... | After I created a Repository on Github and tried to invite collaborators, I am shown the message 'User could not be added' .This is the screenshot of the error message I get when trying to invite or add collaborators to my Repository.I tried changing the Repository from Private to Public, however it is not working. I a... | User could not be added in a Repository |
Azure DevOps doesn't provide triggers for this level of control. You should control this not with your build server, but with your source control. You should prevent certain stages/jobs/tasks from running by using branch filters. I always build PRs and make them part for the approval process. Waiting for approvals is a... | I have a pipeline that builds a docker image & push to ACR. My Requirement is to prevent the pipeline Build policy from triggering until two people approve the pull Request.Currently when the pull request is created the build automatically start running, without waiting for pull request to be approved. | Prevent Azure Devops CI Pipeline From Triggering until Two People Approve the Pull Request |
but what exactly am I suppose to
cache?
You're supposed to cache the data that doesn't change often and is read many times. For example, let's take a forum - you'd cache the initial page of the forum that displays forums available, forum description and forum IDs that allow you to see topics under various forum ca... |
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to ... | A beginners guide to caching using memcacheD [closed] |
You are converting Image into String so you are getting a OutOfMemory exception.
You have to use inputStream reader insted of this.
For more information click here
http://sree.cc/google/storing-and-retriving-images-in-sqlite-database-in-android
|
I read a String from Cursor:
String image = c.getString(c.getColumnIndex(image));
It's crash with OutOfMemory exception. My "image" colum use to store image data which encoded by base64 (http://www.sveinbjorn.org/news/2005-11-28-02-39-23). Anybody can help me?
| How to fix OutOfMemory with Cursor.getString()? |
Since you want to persist thewww(or lackthereof), you likely do need to usemod_rewritefor this. The following should work:RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?technif\.de$
RewriteRule ^shop/(.*)$ http://%1holzwerkstatt-osel.de/$1 [R=301,L]Edit: If you don't care about the wholewwwthing, just usingmod_ali... | I am creating a website which is located in /shop/ on my webserver. It has a seperate domain.Now, I want to change every request that comes in.http://techinf.de/shop/shall becomehttp://holzwerkstatt-osel.de/andhttp://www.techinf.de/shop/shall becomehttp://www.holzwerkstatt-osel.de/the actual request, like product.php?i... | replace host in htaccess |
This is becausemutiprocessing.Arrayis a wrapper around python'sarraytype, notnumpy.ndarrayand python'sarraytype doesn't support multiple dimensionality. Specifically, look at the documentation for theinitializer:A new array whose items are restricted by typecode, and initialized from the optional initializer value, wh... | I would like to store a 2-d array as shared memory array, so each process created by multiprocessing module can access the 2-d array. But it seems only vector is allowed. If I change the shape in the following example from (6,1) to (2,3), the example won't work and it says "TypeError: only length-1 arrays can be conver... | python multiprocessing shared memory array doesn't allow 2-d array |
Got it.
I needed to switch around the ordering of the includes and excludes
duplicity \
--include='/home/MINE/Shareable' \
--include='/home/MINE/Pictures' \
--exclude='**' \
--volsize 10 \
--s3-multipart-chunk-size 5 \
--s3-use-new-style \
--asynchronous-upload \
/home/MINE/webapps/weba... |
I am running across an error happening when I decide to include other folders in my backup, and I am wondering how I can correct it.
My full duplicity command is
duplicity \
--include='/home/MINE/Shareable**' \
--include='/home/MINE/Pictures**' \
--volsize 10 \
--s3-multipart-chunk-size 5 \
--s3-us... | Duplicity FilePrefixError When Including Absolute Path |
TheGitHub repository networkis for:displaying the branch history of the entire repository network, including branches of the root repository and branches of forks that contain commits unique to the network.That means, foronerepo, the branch view is "flattened": you won't see branches on multiple lines:only one line per... | I recently started a new project but it feels like github network is wrong, workflow went like this:From master create new branch developFrom develop create new branch menuSome commits on menu branchMerge menu into develop using --no-ffNetwork graph looks like this:By using --no-ff I was expecting something like this:W... | Github network graph not displaying correctly merge --no-ff |
2
This is what I've decided to do for now for our Neo4j Docker image:
I've written a shell script around docker run that accepts command-line arguments for the port, database persistence directory on the host, log file persistence directory on the host. It executes a dock... |
I'm dockerizing some of our services. For our dev environment, I'd like to make things as easy as possible for our developers and so I'm writing some scripts to manage the dockerized components. I want developers to be able to start and stop these services just as if they were non-dockerized. I don't want them to hav... | Strategies for deciding when to use 'docker run' vs 'docker start' and using the latest version of a given image |
The message you got tends to say that your Sonar install is corrupted: no language plugin has been installed, whereas the Sonar distribution (= the ZIP file) comes with the Java ecosystem by default. (you can have a look at the "/extensions/plugin" folder and check that you have the Java plugins installed)To make it si... | I'm attempting to run static analysis on my project using sonar runner but I'm getting the following error:Exception in thread "main" org.sonar.runner.RunnerException: org.picocontainer.i
njectors.AbstractInjector$UnsatisfiableDependenciesException: org.sonar.api.reso
urces.Languages has unsatisfied dependency 'class [... | Sonar not finding dependencies in sonar.api.resources |
AWS blocks outbound traffic on port 25 by default for EC2 instances and Lambda functions (source:AWS support page).You can place a request for removing restriction on port 25 for your EC2 instance following this link:https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request. You ... | I'm trying to test an email validation service on AWS EC2 instance, where my program would query the SMTP server (Mail Transfer Agent on port 25). For testing purposes, I replicated the program using Telnet connection, which works fine on my local machine:telnet gmail-smtp-in.l.google.com 25
Trying 66.102.1.27...
Conne... | Cannot telnet via AWS EC2 to SMTP(MTA) server on port 25 |
There are few things to consider:Instead of using the Terraform, try resizing the PVC by editing it manually. After that wait for the underlying volume to be expanded by the storage provider and verify if theFileSystemResizePendingcondition is present by executingkubectl get pvc <pvc_name> -o yaml. Than, make sure that... | i have a persistent volume claim for a kubernetes pod which shows the message "Waiting for user to (re-)start a pod to finish file system resize of volume on node." if i check it with 'kubectl describe pvc ...'The rezising itself worked which was done with terraform in our deployments but this message still shows up he... | Kubernetes Persistent Volume Claim FileSystemResizePending |
Your anonymous inner class for the event handler is holding a reference to the label, and your button is holding a reference to the event handler.The anonymous inner class is going to have two synthetically generated fields, created by the compiler, like:final Label val$label;
final MemoryTestApplication this$0;Since t... | I've been struggling for weeks to resolve the memory leaks within our JavaFX application, and thought today I was at a complete loss with it so decided to write the simplest application application I could think of to prove JavaFX could in fact release memory and therefore proving I was doing something wrong. To my sur... | JavaFX GUI doesn't release memory |
There are two ways you can use:
Option 1: protect master branch in github
Even you committed on master branch by mistake, git will stop you to push your local master branch to github.
The way to protect master as: in your github repo -> settiings -> branches -> choose master -> Require pull request reviews before merg... |
This question already has answers here:
Is there a way to lock a branch in GIT
(4 answers)
Closed 6 years ago.
I am working on a git repository for which I have full permissions.
I... | Is it possible to exclusively make a local copy of a git branch read-only, in order to avoid mistakes? [duplicate] |
IMO it's because that could get confusing. Consider below, read the comment:class Child extends Super{
public void myMethod() {
System.out.println("in child");
}
}
class Super{
public static void main(String[] args) {
Super s = new Child();
s.myMethod(); // At this point you might expect myMet... | Sonar complaining about private method name in a class when we using the same name of parent private method. In code quality what is the disadvantage of defining a private method with the same name of parent private method?Or do we need to categorize this as false positive | Sonar Rename this method; there is a "private" method in the parent class with the same name |
you can edit your hdfview.bat and add more memory on the switch
this is the line on .bat file:
start "HDFView" "%JAVABIN%\javaw.exe" %JAVAOPTS% -Xmx1024M -Djava.library.path="%INSTALLDIR%\lib;%INSTALLDIR%\lib\ext" -Dhdfview.root="%INSTALLDIR%" -cp "%INSTALLDIR%\lib\fits.jar;%INSTALLDIR%\lib\netcdf.jar;%INSTALLDIR%\lib... |
I have a very large HDF5 file created using Python/ h5py. I cannot open the file on HDFView 2.14, when I try to open the file nothing happens. Any suggestions on how I can open/ view the file? It contains just 5 datasets, but each dataset has 778 million rows.. hence the problem.
Thank you!
| Viewing a large (12.5GB) HDF5 file written using h5py on HDFView 2.14 |
Per the comments below, the intent is to have user-visible URLs like /foo/bar/ that actually run php scripts like /foo/bar.php. In addition, you probably want users who try to load /foo/bar.php directly to be redirected to /foo/bar/ for consistency.#Redirect users loading /foo/bar.php to /foo/bar/
RewriteRule ^(.*)\.ph... | I'm looking to set rules in my .htaccess file so that all files with a .php extension can be accessed by replacing the extension with just a slash (/foo/bar/would silently load/foo/bar.php). Previously, I foundthis, which is kind of what I'm looking for, except it only changes/foo/bar.phpto/foo/bar(notice there is no e... | .htaccess rewrite /foo/bar/ to /foo/bar.php |
I would probably do the following:
Catch the RichTextBox.TextChanged event
In the handler, check the number of lines (RichTextBox.Lines.Length)
If this exceeds your maximum, remove the first.
Good luck!
|
I have written an app that reads incoming chat(somewhat like an instant messenger), formats it and inserts it into a richtextbox. If you leave the program running long enough you will get an out of memory error. After looking at my code i think this is because i am never trimming the richtextbox. The problem that i... | c# richtextbox outofmemory |
Your example is mixing two steps, image creation and running an image, that can't be mixed that way (with a Dockerfile).
Image creation
A Dockerfileis used to create an image. Let's take this alpine3.8 docker file as a minimal example
FROM scratch
ADD rootfs.tar.xz /
CMD ["/bin/sh"]
It's a base image, it's not based ... |
I've certain basic docker command which i run in my terminal. Now what i want is to use all the basic docker commands into one docker file and then, build that docker file.
For eg.
Consider two docker files
File - Docker1, Docker2
Docker1 contains list of commands to run
And inside Docker2 i want to build Docker1 and ... | How to run docker commands using a docker file |
Create a .htaccess file at the root of your website and add this line:[Apache2 @ Ubuntu/Debian: use this directive]AddType application/x-httpd-php .html .htmOr, from comment below:AddType application/x-httpd-php5 .html .htmIf your are running PHP as CGI (probably not the case), you should write instead:AddHandler appli... | I need to run all of my .html files as .php files and I don't have time to change all of the links before our presentation tomorrow. Is there any way to "hack" this with my Apache server? | Using .htaccess to make all .html pages to run as .php files? |
create activity (for example post to Twitter) in given time in the futureIf this is in response to an event/user action, then a background task would be ideal, as it's not a regular schedule.Ruby toolboxseems to be favouring Resque and Sidekiq over delayed job though, so have a look at those before settling.periodicall... | My application (in Rails) should provide two main tasks:create activity (for example post to Twitter) in given time in the futureperiodically crawler some site or download TweetsI'm thinking about using DelayedJob gem or Whenever gem for cron tasks. Which is better in these situations?Thanks for any advice. | Delayed Job vs. Cron in Rails |
If Prometheus is bound to the host's network and you're trying to accessspeedteston the host's network too, then you should referencespeedtestaslocalhostnotspeedtest:static_configs:
- targets: ['localhost:9798']NOTEDocker (Compose) only provides DNS resolution for e.g. services (i.e.speedtest) within the process.... | I used thisdocker-compose(kinda basic), however after configuring it and building it I got after enteringhttp://[server-ip]:9090/targetsinformation that:speedtest (0/1 up)
Error: Get "http://speedtest:9798/metrics": dial tcp: lookup speedtest on 127.0.0.11:53: no such hostAnd I understand that it can't find that host, ... | Speedtest is found down in Prometheus |
Most likely you have multiple Python versions installed in your machine. Change your cron line to include the full path:0 * * * * /usr/local/bin/python /Users/jamesrusso/Documents/TorMeasure/TorMeasurementProject/getConsensus.py | I am trying to run a python script every hour with cron.
This is everything I have in my crontab.0 * * * * python /Users/jamesrusso/Documents/TorMeasure/TorMeasurementProject/getConsensus.pyBut I get an error when it tries to run sayingImportError: No module named stem.descriptor. I have included#!/usr/local/bin/python... | Python script error with cron |
Yes, partition key design is just as important. That aspect has not changed.Since you mentioned adaptive capacity in a comment, one thing to make sure is clear. Once it is on for a table, it is on and DynamoDB is monitoring your table. | I read the following announcement with great interest.https://aws.amazon.com/about-aws/whats-new/2018/11/announcing-amazon-dynamodb-on-demand/The new "on-demand" feature really helps with capacity planning. Reading the documentation, I can't really see if they do some "magic" to resolve the problem of hot partitions, a... | Hot partition problem in DynamoDB gone with the new on-demand feature? |
You're just misreading the graph, nothing to worry about.Despite its name, a graph (concept) isn't something that has a graphical representation. But we do like to render it in some way to help us understanding.Alas, there's un unlimited different ways to render the same graph (concept), which is often misleading for t... | I'm just trying to understand if there's something strange in what I see on GitHub.In my project there's the defaultmasterbranch and adevlocal branch with upstream counterpart nameddevelopment. After some modification in the working directory I decided it would have been too difficult to proceed that way, so I decided ... | After git push -u origin exp:experimental is represented as master branch in the network graph |
You're experiencing this for the same reason that you can'tgithub forkthe same project twice from the same account. It has to do with how github actually defines a fork and how it treats it. When you fork ala Github, your personal repo resulting from the fork actually shares the same identifier as the parent project. T... | I have a project on GitHub calledAand my user isuser1. Later, another user,user2forked my projectAto his new projectB. Now he changed enough my original project (and the name of the project) and I want to fork his projectBto another project in my account. I expected that when I pushed fork button, aCproject was created... | fork a forked project with the original acount |
You can specify either at service account level or pod level, if both specify then pod take precedence.apiVersion: v1
kind: Pod
metadata:
name: my-pod
spec:
serviceAccountName: build-robot
automountServiceAccountToken: falseor at the service account levelapiVersion: v1
kind: ServiceAccount
metadata:
name: build... | We are using Azure AKS cluster and as per the Azure Advisor recommendations, we have to disable Automounting of api credentials from the Pods. but when we tried to enable this property in jobs template, the template is not accepting the value.How to add automountServiceAccountToken: false | How to disable automountServiceAccountToken in Kubernetes job template? |
You can useX509Certificate Classand maybeX509Certificate2 ClassExample;using System;
using System.Security.Cryptography.X509Certificates;
public class X509
{
public static void Main()
{
// The path to the certificate.
string Certificate = "Certificate.cer";
// Load the certificate ... | Is there a programatic way of disabling a client app's certificate trust in C#? | Disable client certificate trust in C# |
This is probably close to what you are looking for:RewriteEngine on
RewriteCond %{REQUEST_URI} ^/([^/]+)/
RewriteCond %{DOCUMENT_ROOT}/%1.php -f
RewriteRule ^/?([^/]+)/([0-9]+)/?$ $1.php?page=$2 [END]That setup will work in the http servers host configuration and in dynamic configuration files (.htaccessstyle files), p... | i have about 100 php files and i want to rewrite their urls.
They way i know to rewrite url for php file is something likewww.domain.com/article1/2
RewriteRule ^article1/([0-9]+)/?$ article1.php?page=$1 [NC,L] # Handle page requestsso like that for other files i have to write separate htaccess rules which ... | .htaccess url rewriting rule for multiple php files |
6
Is there any reason why you need unmanaged memory for your application?
Otherwise the normal way to do it would be
ThreadID = new float*[Nthreads];
That will allocate a new Array for you. If you use this kind of statement in a function that is called a lot, you might wan... |
float **ThreadID;
int Nthreads;
How to perform below task in C#?
ThreadID = (float **)malloc( Nthreads* sizeof(float *) );
| How to implement malloc operation in C# |
0
Unlikely.
For the git object database ("core git") a module link is just a special directory entry conaining only a SHA1. Only "external" tools like git submodule may interpret such entries and assign a valuable meaning to that SHA1. git archive in turn works directly wit... |
I am using git submodules extensively in my projects, eg. when I use some library that is located in different repository, instead of copy pasting the code from library, I just add git submodule (reference to that repository itself).
The problem I am facing with this is that if you download the zip file using GitHub's... | Is there a way to include submodules in GitHub download |
It's possible with the nuget packageKubernetesClientit includes a yaml parser,samplevar typeMap = new Dictionary<String, Type>();
typeMap.Add("v1/Pod", typeof(V1Pod));
typeMap.Add("v1/Service", typeof(V1Service));
typeMap.Add("apps/v1beta1/Deployment", typeof(Appsv1beta1Deployment));
var objects = await Yaml.LoadAllFr... | I have yaml fileapiVersion: batch/v1beta1
kind: CronJob
metadata:
name: ct-cron
spec:
schedule: "*/1 * * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
metadata:
labels:
app: your-periodic-batch-job
aadpodidb... | How to Deploy Kubernetes yaml using C# |
Calling the Flush method on the Package object in between creating a new package should probably solve the problem as that would cause the memory buffer to be flushed to disk.
|
I am trying to debug an OutOfMemoryException that occurs when creating a fairly large ZIP file using System.IO.Packaging.ZipPackage.
The code is iterating through a large list of objects, doing the following for each object.
Serializing the object data to a temporary file.
Creating a PackagePart for the file.
Copy fr... | OutOfMemoryException when creating large ZIP file using System.IO.Packaging |
Yes, you can tell nodemailer to not check the certificate trust.This is the option:tls: {rejectUnauthorized: false}use it on the initial transport object:var transporter = nodemailer.createTransport(smtpTransport('SMTP',{
host: 'mail.mailserver.com',
port: 587,
auth: {
user: '[email ... | I am trying to send an email with nodemailer. I already managed to send it from another host but now I want to send emails from another address. These are the versions of nodemailer I am using (from mypackage.json):"nodemailer": "1.3.4",
"nodemailer-smtp-transport": "1.0.2",This is the information I have about my webma... | How to solve CERT_UNTRUSTED error in nodemailer |
Great question!No, Both forms will be (can be) GC'd because the GC does not directly look for references in other references. It only looks for what are called "Root" references ... This includes reference variables on the stack, (Variable is on the stack, actual object is of course on the heap), references variables... | I'm trying to run down a memory leak in a windows forms application. I'm looking now at a form which contains several embedded forms. What worries me is that the child forms, in their constructor, take a reference to the parent form, and keep it in a private member field. So it seems to me that come garbage-collecti... | Circular References Cause Memory Leak? |
I found the offending piece of code :)
Beware both libgit2 and libgit2sharp are works in progress. They're not git feature complete. And, as far as I know, submodules are not implemented yet.
Should libgit2 provide status for submodule folders? Do they have status at all? At the moment I'm just skipping querying of t... |
I'm having difficulties making libgit2sharp / libgit2 work with git submodules.
I have git repository with several items linked as submodules to folder within repository. Git and GitHub recognizes them fine, however when I'm trying to retrieve these folders status via libgit2sharp / libgit2 an exception raises. It say... | How to retrieve the status of a submodule? |
You can certainly use both.
The resource method actually uses the client method behind-the-scenes, so AWS only sees client-like calls.
In fact, the resource even contains a client. You can access it like this:
import boto3
s3 = boto3.resource('s3')
copy_source = {
'Bucket': 'mybucket',
'Key': 'mykey'
}
s3.meta... |
So I have an API that makes calls to AWS services and I am using Boto3 in order to do this within my python application. The question I have deals with Boto3's client vs resource access levels. I think I understand the difference between them (one is low-level access the other is higher-level object-oriented service a... | What is the convention when using Boto3 clients vs resources? |
One solution that I thought is to make a method Clear() that deletes all pointers whenever I want, and leave the default destructor.
Possible but why create a new function that the user of the class should be aware of instead of making the destructor take care of de-allocating dynamic memory? I wouldn't do that.
You... |
I'm trying to make the Thompson's construction algorithm in c++ (I'm somewhat new to the language). But I'm having some difficulties on implementing a destructor for my class NFiniteAutomaton. In some part of the constructor of NFiniteAutomaton I have:
NFiniteAutomaton() = default;
NFiniteAutomaton(std::string regex){... | c++ - How to implement a destructor of an object that uses itself in the constructor |
0
You need to do the git commands you mention when the current directory is ~/myname/projects/mygreatproject, to create the local repository there.
Then you just do git add . and git commit to commit all your files and git push to get it to github.
So:
cd ~/myname/projects/... |
I come from a windows background trying to move to a mac/github environment. So please if this is basic stuff please forgive me.
I have developed an application and its sitting with in my projects folder location
~/myname/projects/mygreatproject
I have opened the github site and created the repository. Within termin... | A windows user - dummy guide to get a repository deployed from a mac |
Yes, hignmem is required, some of the 1GiB address space is required for memory mapped IO and non-linear mappings of physical RAM.
|
High memory (highmem) is used when the size of physical memory approaches or exceeds the maximum size of virtual memory.
The traditional split for architectures using this approach is 3:1, 3GiB for userspace and the top 1GiB for kernel space. This means kernel can at most map 1 GiB of physical memory.
In mobile devic... | High mem in arm Architecture |
Each commit has both a committer and an author. The author made the original change, the committer is the one who made the commit. These areusuallythe same, but can be different if the commit was rebased. The original author is also often added as a courtesy when committing someone else's work via a patch file, or an i... | I pushed / updated a document in github. It shows my username twice (red blocks). | Why does Github show the username twice? |
Uninstall just grafana:sudo apt-get remove grafanaUninstall grafana and its dependencies:sudo apt-get remove --auto-remove grafanaFor More details refer:http://installion.co.uk/ubuntu/xenial/universe/g/grafana/uninstall/index.html | In Ubuntu 14.04, I installed grafana like below:dpkg -i grafana_4.1.2-1486989747_amd64.debI am trying to uninstall it.I tried:sudo apt-get remove --auto-remove grafana
sudo apt-get purge --auto-remove grafana
sudo apt-get autoclean
sudo apt-get autoremove
locate grafana and manually remove files and folderBut still whi... | How to completely uninstall grafana? |
1
You can't do this. A Docker container (as a core Docker feature) has a filesystem that's isolated from the host system, so the host can't directly access the container's files, and vice versa. A symlink just provides a pointer to another file by name, and it can't help ... |
I have a docker container that contains a GitHub repository with code that I work on.
The code is just inside the container and I connect via VSCode WSL extension to it.
Now I want to use GitHub Desktop (to for example cherry pick), is there a way to create a symbolic link on the host machine to the container folder, ... | Symbolic link to docker container on host machine |
Ingress can be used to expose many services depending on the path or even multiple applications depending on the host or domain in the request.A load balancer always exposes one service only. | Kubernetes has bothIngress(in front of a Service) and Service with type:LoadBalancer. These seem to do identical things: allow public traffic into the pods matching the service's selector. What are the benefits and drawbacks of each? In what scenarios would I choose one over the other? | Ingress or Service with type: LoadBalancer |
I have other metrics requirements, however, the principle and function are the same and can be applied to any other queues under monitoring.
My case here is to notify a queue owner in case the queue has more than 1000 unconsumed messages and is not decreasing within 1h:sum by (queue) (min_over_time(messages_ready[1h]) ... | I am looking for an option in Prometheus to give me the opposite of increase(). I can see increase(), change(), delta() but none of them specifically mentions reduction in count over time. I have used increase many times for checking if number of errors have increased over a period of time:increase(http_request_failure... | Calculate Decrease of count in Prometheus |
You have regexp location that matches your request /app/css/app.css and intercepts request from proxy. That's how regexp locations works. To prevent this use ^~ modifier for your app location:
location ^~ /app/ {
proxy_pass ...;
}
This will prevent regexp location from matching.
Documentation: http://nginx.org/r/... |
I have an Nginx server hosting a web app which works fine when directly accessed. Its config is below
server {
listen 8000 default_server;
listen [::]:8000 default_server ipv6only=on;
root /data/www/ ;
server_name server1.com;
location / {
try_files $uri $uri/ =404;
}
location /... | Nginx reverse proxy to another nginx server serving static files |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.