Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
In Git a branch that tracks (or has an upstream) has the an entry similar to the following in the repository config file (/.git/config)[branch "feature"]
remote = origin
merge = refs/heads/featureThe "--set-upstream" option you have been using has been directly replaced with "--track"sogit branch --trac... | Recently, I tried to set my local branchfeatureto track changes on my remote branch like this:$ git branch --set-upstream feature origin/featureEverything went well, but I got that message saying:The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-toMy question is how to ... | What is the difference between git "set-upstream-to" and "track" options |
You need to increase in Docker the RAM assigned to VMs on Linux, if I remember correctly the mem_limit isn't the one you need to set. Also the Swap needs to be increased. | I am running docker on windows server 2019 that uses windows containers and I enabled linux containers.
It works perfectly except SQL server.version: "3.7"
services:
sql-server-db:
image: microsoft/mssql-server-linux
container_name: sql-server-db
mem_limit: 4GB
environment:
- SA_PASSWORD=${dbPa... | Windows server 2019 microsoft/mssql-server-linux - machine with at least 2000 megabytes of memory |
Raymond covers ithere. Positive numbers are resource indices. Negative numbers (once you've removed the minus sign) are resource identifiers. | I almost have an answer tomy last question, but I need help.The Windows Firewall Rules (Vista and up) are stored in the RegistryHKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRulesExample rule:v2.0|Action=Allow|Active=TRUE|Dir=Out|Protocol=6|Profile=Domain|RPort=5722|App=%SystemRo... | Understanding a negative offset of a registry data reference to a dll file |
Since thenode_modulesdirectory is already tracked as part of the repository, the.gitignorerule will not apply to it.You need to untrack the directory from git usinggit rm -r --cached node_modules
git commit -m "removing node_modules"You can run the above 2 ingit-bash.After this, the.gitignorerule will ignore the direct... | What I did:I think there were some weird configurations from the github gui that caused this issue and prevented me from being able to easily use git from command line or even git-bash.I ended up just uninstalling github and git then reinstalling just git for windows. I now have everything running off the command line(... | .gitignore is not ignoring directories |
Did you try
shell_exec("git clone https://username:[email protected]/username/repo.git");
Source
|
Here's possibility for cloning git private repository:
$ git clone https://github.com/username/repo.git
Username: your_username #the username
Password: your_token #the string that can be found by generating here https://github.com/settings/tokens
How to use in php
shell_exec("git clone https://github.com/username/r... | php, shell and git clone |
About Sonar side:yes, theScala Sonar Plugindevelopment is currently stalled. It was initiated by the community, but nobody has offered to take it over yet. If there are some volunteers, we'll be glad to guide and help them.concerning the support of several languages inside a single project, support will be coming in So... | I'm trying to set up simple code coverage reports for a team coding in mixed Scala/Java at approx. a 90/10 ratio and running into some serious roadblocks. I've previously set up & administrated Sonar to great success with a Java-only team, but it doesn't appear to be an option.Sonar w/Scala plugin is buggy and appears ... | Is there a Sonar-level code coverage equivalent for Scala? |
Kubernetes also has "Volumes", see here:https://kubernetes.io/docs/concepts/storage/volumes/ | I am using kubernetes as an orchestration tool for docker and have the below use case:I have two containers say container-1 and container-2I am exposing VOLUME (say /app/data) in container-1 image and would like to access this volume in container-2. This is very similar to --volumes-from in docker I am looking for.How ... | Kubernetes volume map suggestion |
Use the following in the legend:{{location}}-{{instance_ip}} | Making a Grafana dashboard to view the performance of our application and it deployed in the various regions (not all regions). My dropdown variable(location) has all the region data so it'll substitute in my query and shows the result.I'm using the following querysum(rate(container_cpu_usage_seconds_total{aws_cloudfor... | How to show the exact variable value in the result - PromQL/ Grafana? |
You need to update the scopes of your access token to get github user data.
You can set it in your github settings page.https://github.com/settings/tokensScope name to set: user/read:user | I'm trying to access the userData for a github user that logs into this website which is a react app using OAuth, and am facing a bad credentials error. I have the accessToken saved in local storage and have made sure that is correct before calling my getUserData() function.Here's my code:// Server Side Code
// Get use... | GitHub API, getting 'Bad Credentials' when trying to request user data |
Do the following steps:Select "Table" visualizationSelect "Label to fields" transformationClick in the "sequenceID" column name to change the order. | Scenario:
The logs are in following format:<SequenceID> <Level> <Message>I have a requirement to sort the logs based on the SequenceID at Grafana.Background: I am using promtail to ship logs where I create labels for SequenceID and Level.
However, I am unable to find any valid visualization/transformation option (panel... | Sorting logs (from Loki) on Grafana |
The multiple cache names means that both/every cache is checked and if the required key is found in any of caches, the cached value is returned and the method body is not called.One possible use case is when you have caches that are populated from different sources(e.g. database load and online/rest service calls) and ... | I'm going through Spring's Cache Abstraction features andthisline has caught my eyeWhile in most cases, only one cache is declared, the annotation allows
multiple names to be specified so that more than one cache are being
used.The above line is referring to this snippet that follows the above statements in their d... | Spring: Why have more than a single cache |
Due to the instance being reserved and not the database (or a database), all databases on the instance will be backed-up.
Watch out, only InnoDB tables will be backed-up on the Automatic backups.
|
Is it safe to connect to my MySQL RDS Amazon instance and run a DROP and CREATE on the database (Basically re-create the database)?
Example:
DROP DATABASE <db_name>;
CREATE DATABASE <db_name>;
I am just worried that there are some background "fingerprints" that will be wiped, like the database backup etc.
| DROP and CREATE on Amazon RDS MySQL Instance |
Update: this is a really old method. We now have much better tools to backup k8s clusters, likeveleroI'm using a bash script from CoreOS team, with small adjustments, that works pretty good. I'm using it more for cluster migration, but at some level can be used for backups too.for ns in $(kubectl get ns --no-headers | ... | I would like to be able to get a description of my current state of the cluster so that in the future I would be able to recover from a failure. Aside from recreating all of the services from source/cli individually, what solutions are available? | Backup/Recover Kubernetes' current state (Namespaces/Pods/Controllers/etc) |
By default for desktops if you have dedicated GPU, integrated GPU is disabled in bios and will not show as a device in system.
Each bios vendor calls it differently, but try to look for "IGP ENABLE" or "Multi-monitor support".
|
In C++ I am checking the number of available devices like this:
uint32_t deviceCount = 0;
vkEnumeratePhysicalDevices(instance, &deviceCount, nullptr);
cout << deviceCount << endl;
vkGetPhysicalDeviceProperties(device, &deviceProperties);
vkGetPhysicalDeviceFeatures(device, &deviceFeatures);
cout << deviceProperties.... | Why does vulkan report a single device in a system with an integrated graphics card and a GPU? |
My question is that do I need to reconnect every 15 minutes?
No you don't. The token is required to establish connection, and does not determine how long the existing connection can last for. The default value for connection to be alive without activity is 28800s (8 hours) as explained here.
This means that if you t... |
I am using RDS postgresql with IAM authentication. In my application, it generates the token at runtime before it connects to RDS cluster. Based on AWS document,
An authentication token is a string of characters that you use instead of a password. After you generate an authentication token, it's valid for 15 minutes b... | Do I need to reconnect every 15 minutes with RDS IAM authentication |
Do this:
-(NSString*)getString{
return [[[NSString alloc] initWithFormat:@"test"] autorelease];
}
-(void)printTestString{
NSString *testStr = self.getString;
NSLog(@"%@",testStr);
}
Your getString method autoreleases the NSString, which means printTestString doesn't need to retain or release it. Autorel... |
For example look at the following example:
Code1
-(NSString*)getString{
return [[[NSString alloc] initWithFormat:@"test"] autorelease];
}
-(void)printTestString{
NSString *testStr = self.getString;
[testStr retain]
NSLog(@"%@",testStr);
[testStr release]
}
Code2
-(NSString*)getString{
return ... | What's the recommended approach for allocating an object in an instance methode, which will later on be returned? |
Have you tried dpkg?sudo dpkg --remove --force-remove-reinstreq <packagename>If apt won't remove it try using dpkg.You could also try and clean up your apt utility.sudo rm -rf /var/cache/apt/archives/<package_name.deb>
sudo apt-get autoclean
sudo apt-get update
sudo apt-get upgrade | I'm trying to un-install grafana 4.6.3 from Ubuntu 17.10, but is not possible. So far i have triedsudo apt-get remove grafana , sudo apt-get remove --auto-remove grafanaand says Unable to locate package grafana.
Also tried to install it again from ubuntu software in order to unistall it properly but then pops me up a... | Remove grafana from ubuntu 17.10 |
Ok that was simply related to the index mapping defined in elasticsearch for the related index. The fields that will appear in the dropdown list are the fields that are defined in the index mapping with a compatible numeric type (like "integer"). | I created an elasticsearch datasource in Grafana connected to an index of my elasticsearch instance.When playing with it in Grafana Explore:I correctly see the events on the graph if I plot the Count. But if I add an aggregation metric like min, avg, max etc, then in the text box where I'm supposed to select the event ... | No metrics available in Grafana with Elasticsearch data source |
Based on what I have read here:http://wiki.nginx.org/X-accelyou need to turn off X-Accel-Buffering. Here is some example code:public ActionResult Stream(string id)
{
Response.ContentType = "text/event-stream";
Response.Buffer = false;
Response.BufferOutput = false;
Response.Headers["X-Accel-Buffering"] ... | I am trying to set up an event stream using MVC.NET, Nginx and Fastcgi. The streaming works fine for me using xsp4, but I have not been able to get it to work through Nginx and Fastcgi. My goal is to open an EventSource stream and to downstream data to my website.I have tried adding the 'ngx_http_upstream_keepalive' ... | Trying to stream using eventsource through nginx/fastcgi |
sonarqube {
properties {
property "sonar.sourceEncoding", "UTF-8"
property "sonar.host.url", "https://a.com/"
property "sonar.login", "abc"
property "sonar.password", "abc"
property "sonar.projectKey", "abcd"
property "sonar.projectName", "ABCD"
property "sonar.projectVersion", android.defau... | I am trying to integratelizardto track the code complexity of an android app on sonarqube. The command used to get the complexity report from lizard is:lizard src/main -x"./test/*" -x"./androidTest" --xml >lizard/lizardReport.xmlIn thebuild.gradlefile of the app, the sonarqube properties are configured as follows:sonar... | Sonar integration with lizard to track code complexity failing in android studio |
The RewriteCond directive only applies to the next RewriteRule. (Only one.)So your rewrite conditions apply only to your first RewriteRule. The other rewrite rules are unconditional.You have to repeat the RewriteCond's for each RewriteRule, or set an environment variable:RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond ... | my htaccess file is that:RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} .*
RewriteCond %{QUERY_STRING} .* [NC]
RewriteRule .*\.php cms/index.php?request=$0&%{QUERY_STRING} [L]
RewriteRule ^(?:(?!website).).*\.(?:(?!php).)+$ cms/website/... | htaccess redirects even if there is a file |
As mentioned in the official registry image
The tags >= 2 refer to the new registry.
Older tags refer to the deprecated registry.
The Deploying a registry server page uses the new registry server (with a simpler mapping):
docker run -d -p 5000:5000 --restart=always --name registry registry:2
This is for localhost a... |
Is the interpretation of the below command correct?
My Interpretation: Create a registry with name "registry" that listens on port 5002 of container which is mapped to port 5001 of host .
Also, I do not understand what the "registry:2" is required for? Looks like it is "repository_name:tag" which is equivalent to imag... | How to interpret this docker registry creation command? |
Moving a repository to a different directory should have no effect on the repository. Simply move everything as you would with any other kind of files, taking care to move the .git directory along with it. That .git directory is what git looks at and compares against other stuff in the project directory (wherever that... |
I want to move a git repository to a sub-directory which is there in its present root folder.
Let me explain the things first.
I have Git repository testing in $HOME/repos/ (contains PHP code-base).
Now i want to move testing into $HOME/repos/php/ where php will be sub-directory which i want to create (anyway php dire... | Move a Git repository to another directory |
Try adding 2>&1 to redirect System.err to the file too:30 12 * * * java -jar test.jar > test.log 2>&1ShareFollowansweredSep 2, 2015 at 12:57PalaminoPalamino79133 silver badges1010 bronze badges2Thank you, good point. However, please check my last comment under a question. It says unable to access jar file.–Ondrej Tokar... | I have scheduled myjarfile by saving this line at the end of thecrontab:30 12 * * * java -jar test.jar > test.log (I have also tried test.txt)Cron has started the job, also created the log file, but there is nothing in that file. Any idea why is that? I am doingSystem.out.println()in my program.I have added write permi... | Redirect all output of the java program to log file |
If we deep dive into all three stacks are Elastic Search, Logstash and KibanaLOGSTASHLogstash’s biggest con or “Achille’s heel” has always been performance and resource consumption (the default heap size is 1GB).Though performance improved a lot over the years, it’s still a lot slower than the alternativesBest alternat... | Our project has requirement for log aggregation of different micro-services, and ELK is great tool to do that. However our project has requirement of privatization deployment, which means we need to deploy the whole solution into customers' own servers. Based on this video(https://www.youtube.com/watch?v=cC4GGJ0JsSE), ... | How much cpu/memory/storage at least I need to use ELK |
To auto commit every one hour you can create a batch file (.bat) with this content:cd C:\path\to\your\git\project
git add --all
git commit -m "autoCommit %date:~-4%%date:~3,2%%date:~0,2%.%time:~0,2%%time:~3,2%%time:~6,2%"
git push
exitCreate a task on the Task Scheduler and run this file every one hour.(You can also ru... | I am using windows and i am completely new to github. I have installed desktop client. I wanted a single txt file to automatically uploaded to my github repository when it's changed or updated locally. I want this to completely automatic process as file is also getting updated automatically every hour and as soon as fi... | How to auto commit and push on github? |
Looks like someone committed, pushed, rebased, committed, and then did a force push to rewrite the history.A symptom of Brian Campbell's answer:Git non-fast-forward rejectedI believe what you are running into is that someone rewrote history in the repo. Not a great situation to be in. Have you pulled? You may need t... | Has anyone seen this error before while doing a git push?any tips to debug or overcome the rror?mkdir opensource && cd opensource
git clone git://git.qinc.com/platform/vendor/q-opensource/wcn/prime.git
cd prime
git checkout -b jb_2.5 origin/jb_2.5
git cherry-pick -x ..7174961054435d3ae9d233c81227b0715cfc1715
git push s... | git push error while uploading |
I am able to fix the issue, and here is the solution explained:I removed the admin console internal connection configuration to dig moreI was using Bitnami chart for keycloak in the Bitnami chart there is a config like thatcontainerSecurityContext:
enabled: true
runAsUser: 1001
runAsNonRoot: falseas keycloak n... | I am having keycloak installed and working in Prod and we are currently migrating to Kubernetes(EKS) so I used Bitnami chart and used the same config as in Prod but admin console not working internally I tried version 19.0.0 and 20.0.0here is the keycloak configKC_HTTPS_KEY_STORE_FILE: **
KC_PROXY: edge
KC_DB: pos... | Keycloak admin console not working internal it gives "Loading the admin console" |
In yourdefault.confreplacehttps://app:3000byhttp://app:3000as SSL termination is happening at Nginx itself, app is still using http.Update yourdocker-compose.yamlUsedepends_oninstead oflinks, it has deprecated.version: "3.8"
services:
app:
build: roundmap/
container_name: app
command: [ "nod... | Trying to run nginx and web application via docker composedockerfileFROM node:12.16.2 as build
RUN mkdir /app
COPY package*.json ./
RUN npm install
COPY . /app
RUN npm run-script build
COPY --from=build /app/build /var/www/roundmap.app
EXPOSE 3000nginx config defauls.confserver {
listen 80;
listen 443 ssl;
l... | Docker compose error: nginx: [emerg] host not found in upstream "app" in /etc/nginx/conf.d/default.conf:21 |
Normally I would follow a pattern to debug such issues starting with:Check all the certificate files are rotated bykubeadmusingsudo cat /etc/kubernetes/ssl/apiserver.crt | openssl x509 -text.Make sure all the control plane services (api-server,controller,scheduleretc) have been restarted to use the new certificates.If ... | I did akubeadm alpha certs renewbut after that, no pods get started. When starting from a Deployment,kubectl get poddoesn't even list the pod, when explicitly starting a pod, it is stuck onPending.What am I missing? | No pods started after "kubeadm alpha certs renew" |
Q: Can I use certificates on Amazon EC2 instances or on my own servers?
No. At this time, certificates provided by ACM can only be used with specific AWS services.
Q: With which AWS services can I use certificates provided by ACM?
You can use ACM with the following AWS services:
• Elastic Load Balancing
• Amazon Clo... |
AWS has come up with a new service AWS Certificate Manager. One thing I got from the description is that if we are using this service we don't have to pay for the certificate anymore.
They are providing certificates for Elastic Load Balancer (ELB) and CloudFront, but I didn't find EC2 anywhere.
Is there any way to use... | How to add SSL certificate to AWS EC2 with the help of new AWS Certificate Manager service |
You'll need to change the origin of your repo to the new location:https://www.ethode.com/blog/git-change-remote-originWith that everything including the git log will be pushed to the new location.$ git remote rm origin
$ git remote add origin[email protected]:username/repositoryName.git
$ git config master.remote origi... | the situation is that I have a local copy of one repository which has all commit history in its git log. It was the course repository that I used for last semester, and now the instructor has cleaned up that repository online - so it only exists on my computer.I would love to keep all the commit history and move its co... | How to keep all commit history in an old repo and move its content into a new one if the old repository doesn't exist online? |
0
OK, this can be closed now, EaseUS Free allows me to do this ... Trial & Error it was !!
Share
Follow
answered Mar 15, 2018 at 9:29
Gary HeathGary Heath
31311 gold badge33 silver badges151... |
I am running Windows 10 on 2 PCs.
They are both connected to a BT Home Hub which has a USB drive plugged in and the shared data that they use is on that drive.
I want to run a daily backup of that data from one or both PCs to backup the data onto a USB drive attached to the PC(s).
Is there an easy / reliable way to do... | How to backup data from a USB drive attached to a BT HomeHub |
git push origin :experimentalAs seenhere, a site which was the first link for "git delete remote branch" | I created a new branch locally called experimentalgit checkout -b experimentalI made my changes, committed them, and pushed them to GitHub. I could see the experimental branch on GitHub.I then did:git checkout master
git merge experimentalIt showed the files it had mergedUpdating 3811ea5..617606f
Fast forward
file1.py ... | GitHub: Deleted local branch how do I delete the GitHub branch |
I test this with busybox crond. By Looking at source code, It seem
that busybox version not check cron.allow/cron.deny at all.Can anyone confirm that?I confirm. Neithercrond.cnorcrontab.ccontains "cron.allow" or "cron.deny". And this reflects the promises ofBusyBox(emphasisby me):BusyBox combinestiny versionsof many ... | As I know that we can setting to grant access for users to cron facility also can revoke access for some users.But I dont know where to put my setting for cron read those. I've tried with
(/etc/cron.allow, /ect/cron.deny), (/var/spool/cron/cron.allow, /var/spool/cron/cron.deny) but It not work. The user added to cron.... | Linux how to determine cron config files location? |
You can either use:
Memcache
Ehcache
As you can see above, both support GAE well.
|
I need cache for my web application, it stores some small/medium size objects to cache and possibly some max 1-2mb files to cache. What open source solution would be good for this usage? Cache should be easy as Google App Engine cache (example. cache.put("key", "value"); cache.get("key");). I use Google Guice and Serv... | Open source cache for Servlet |
I think it is not possible to gain the power of gpu computing freely without doing any additional programming now. But the gpuR package is a good starting point. As you point out, the gpuR can only handle some specific R functions such as matrix operations and linear algebra, it is restricted but useful, for example, ... |
I would like to do a large analysis using bootstrapping. I saw that the speed of bootstrapping is increased using parallel computing as in the following code:
Parallel computing
# detect number of cpu
library(parallel)
detectCores()
library(boot)
# boot function --> mean
bt.mean <- function(dat, d){
x <- dat[d]
m... | GPU computing for bootstrapping using "boot" package |
5
You can try to do memory dumps with jmap (in tags you mentioned java 5 so this should be possible). Do several dumps when the server still works (like every hour or so).
Then analyze them in Eclipse MAT. Search for objects, or collections of objects that grow bigger on ev... |
We are using JBoss_4_0_4_GA with JDK 1.5.0 (no updates) on a Windows
The JBoss server is run within a Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org.
Since the JVM is so old I cannot even use the -XX:+HeapDumpOnOutOfMemoryError option on the JVM.
What are my option to find out the issue?
As usual the Out of... | How to troubleshoot Out Of Memory error on Production system |
Doing so in PHP will lead to the loading of, parsing of and execution of more PHP scripts/code. If you do go this way, don't get to the right page with external redirects. Remember that PHP scripts are essentially compiled every time they're hit (opcode caching notwithstanding).mod_rewrite will be much more efficient... | I'm studying how to do url rewriting in a LAMP framework. I began my research by studying wordpress code. I looked at wordpress's .htaccess and saw this:# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /inde... | Manage url-writing in .htaccess or in PHP code? |
If I understand correctly you are trying to avoid pushing unfinished local changes to the repo. No problem.
Git repos are self-contained. Just copy the repo directories from one machine to the other. Nothing fancy required.
|
I have a new PC and need to copy my local github for windows repos to the new computer.
All repositories are on github, but I do not want to download them all again to the new computer.
Is there any way to add this local files to the new computer using github for windows (or shell) and then just push/pull/sync the cha... | How to copy a github local repo to another computer? |
Add an extra RewriteCond to exclude the conditions that you don't want rewritten. Use a!before the regular expression to indicate that any files matching should fail the condition. The RewriteCond below is untested, but should give you an idea of what you need:RewriteCond %{REQUEST_URI} !\.(jpg|png|css|js|php)$ShareFol... | How can I look for an instance for certain file extensions, like .(jpg|png|css|js|php), and if there is NOT a match send it to index.php?route=$1.I would like to be able to allow period's for custom usernames.So, rewritehttp://example.com/my.nameto index.php?route=my.nameCurrent setup:.htaccess:<IfModule mod_rewrite.c>... | rewriterule in htaccess to match certain file extensions |
Kibana is working withhttpURL only.
But in order to make elasticsearch master and node communicate with each other I've to put port9300in exclude list of Istio. | I've Istio 1.4.0 running on Kubernetes 1.15.9. I'm trying to achieve below but the more I read Istio documentation the more I'm getting confused. Let me put it in a simple way.First thing is, I want to have mTLS for maximum services (if possible).I've one elasticsearch-master pod with service exposed on 9300. I've one ... | Is selective Istio mTLS possible? |
This should work for your "also cool if" case: example.com/news/345/hitachi.jpgRequests for jpg images in/newsare rewritten. The parameterireceives the image number. The parameterpreceives the rest of the image filename.RewriteEngine On
RewriteRule ^(news)/([0-9]+)/(.*)\.jpg$ /image.php?i=$2&p=$3 [L,QSA]ShareFollowans... | I would like to redirect certain calls for images on a folder to a PHP file. For example, calls that come for:example.com/news/123-hitachi.jpgshould go to:example.com/image.php?i=123-hitachi.jpgor something similar like that. It would also be cool if I would add some more variables in the URI like:example.com/news/345/... | htaccess redirect image calls for a certain folder to a PHP file |
Routes are http, HTTPS, or TCP wrapped with TLS. You can use a service with a "node port", which load balances your app instances over TCP or udp at a high port exposed on each node.Routes point to services to get their source data, but since routes expect to be able to identify which backend service to route traffic ... | I am going through the Openshift V3 documentation and got confused by services and routes details.The description inservicesays that:Each node also runs a simple network proxy that reflects the services defined in the API on that node. This allows the node to do simple TCP and UDP stream forwarding across a set of back... | Openshift V3: Confusion on Services and Routes |
I saw answers to a similar question onCan GitHub automatically merge branches?. I think it will solve your problem. It seems Github has introduced a new auto merge feature in 2020 december. | We recently switch from Bitbucket to Github. One feature we're missing is the ability to create PRs or Auto-merge commits made onto a "release" branch directly to our development branch. We had it set so if a bug was fixed in the "release" branch, which was branched off of development just prior to release, it would au... | Github: How to auto-merge to development branch from release branch? |
Request templatecurl \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/search/issues\?q\=repo:{repo_owner}/{repo}+is:pr+is:mergedExplanation:You can't get merged pull requests by std Github API/pullsroute. But you can do this using Search API.More info in docs:Use Search API:https://docs.github.com... | I am trying to get all theclosed and mergedcommits on a certain repository using the github API (https://api.github.com/), and the only way I have found to do this is to check for commits that are closed (api.github.com/repos/user/repo/pulls?state=closed), then make sure themerged_atis not equal tonull, but this is a s... | Use the public GitHub API to get all merged pull requests in a JSON format |
There's no magic involved. Simply put, a QObject automatically deletes its children in its destructor. So, as long as your widget has a parent and that you destroy that parent, you don't have to worry about the children. So if you wondered what was thatQObject * parentparameter, well, that's what it's there for.Also, f... | I heard that the widgets should be allocated on the heap (using new), and then there are no needs to delete them (it is done automatically).Can someone explain why?What happens if a widget is not allocated that way, but on a stack?I am not sure if it matters, but all widgets I am creating have a parent.Thissays :If par... | Creating and deallocating a Qt widget object |
User space memory shouldn't be used directly in any case.If your task can be expressed as astream processingof user data, there is no need to allocate kernel memory for accomodate whole user dataat once.It is sufficient to allocate memory of smaller size (e.g., 4KB), read the first chunk of user data into it (usingcopy... | I have a Linux filesystem with an implementation of the function:ssize_t (*write) (struct file *file, const char __user *buffer, size_t count, loff_t *pos);Now let's say I want to use the data of the buffer to calculate parity (within the function handling).
I could usecopy_from_user(void *to, const void __user *from, ... | Save memory by using user space buffer of write function in function-handler directly (Linux, Kernel)? |
I see that you are trying to build a redis-server, the image of redis is already available on docker hub - have you tried that out?https://hub.docker.com/_/redisCheck this link - the same issue is discussed and resolved.It seems on windows - if you trydocker build -f <name of your dockerfile> .it should work fine. | I am new to docker, and I'm creating new custom alpine docker image using VSCode. Below is the set of commands I have mentioned on my file(Dockerfile):# Step1 specify the base image
FROM alpine
# Download and install dependencies
RUN apk add --update redis
# Setup the startup command
CMD ["redis-server"]Now, when I a... | How to create custom image in docker using VSCode? |
If you implemented HPA or resource limit, new pods could be scheduled. For resource limit, if memory limit has been breached kubernetes kills the pod and if it has RS creates new one. You can check it with:kubectl get eventsOr checking logs of kube-scheduler with:kubectl logs $kube-scheduler-pod-name -n kube-system | I have a kubernetes 1.11 cluster that has been running for weeks. Today I noticed this:tooluser$ kubectl get po --sort-by=.status.startTime -o custom-columns=NAME:.metadata.name,CREATED:.status.startTime,RESTARTS:.status.containerStatuses[0].restartCount
NAME CREATED RESTARTS
pod1-86b8b... | Cannot find cause for new pod |
I was having the same issue -- going tohttps://github.com/[your account]/[repository]/pull/newand creating a PR from that page worked for me. | I always get "500 error " whenever I try to create a pull request on my fork in github, I just keep on trying it, at some point the page loads(it is . Is there any update or something that I have to do.?My fork is uptodate with the branch I forked from. No clue how to fix it. | 500 error while creating a pull request |
1
How it should work:
To add support for Carthage for your existing CocoaPods library you need to share the scheme of your CocoaPods project. To do that you have to:
Open the workspace that contains your pod (it should contain example and Pods projects).
Go to Produc... |
I've created and published a Cocoapod using pod lib create. Now I also want to support Carthage, but after adding the path to the GitHub project to my Cartfile and running carthage update --platform iOS I'm getting the following error:
Dependency "" has no shared framework schemes for any of the platforms: iOS
Any ide... | Support CocoaPod and Carthage |
May be can you export and filter your files one by one and append result into your output file like this :$inputFolder = "C:\Change\2019\October"
$outputFile = "C:\Change\2019\output.csv"
Remove-Item $outputFile -Force -ErrorAction SilentlyContinue
Get-ChildItem $inputFolder -Filter "*.csv" -file | %{import-csv $_.Fu... | getting memory exception while running this code. Is there a way to filter one file at a time and write output and append after processing each file. Seems the below code loads everything to memory.$inputFolder = "C:\Change\2019\October"
$outputFile = "C:\Change\2019\output.csv"
Get-ChildItem $inputFolder -File -Filter... | Memory exception while filtering large CSV files |
I'm afraid you cannot accomplish that using PowerShell without the commanddocker login. Let's take a look at the command for the ACR credential.When you use the CLI commandaz acr loginwith the ACR directly without a docker daemon running, then you will get the error similar with this:Cannot connect to the Docker daemon... | I am trying to push docker image into azure container registries repository using power-shell command as follows:-docker push containerregone.azurecr.io/azure-vote-front:V1it gives me following errorunauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.I have tried to find h... | Push docker image into azure container registries repository using powershell |
1
The ngx_http_hls_module, which is available with a commercial subscription, provides HLS support for MP4 and MOV files. You already seem to have a HLS stream available so you don't need to pass trough this module at all. Just output your segments/playlist directly into a ... |
I stream video in a RaspberryPi into /run/shm/hls/index.m3u8. and i want stream them to http. I use Nginx and configured it accourding to nginx.org:
location /hls {
hls;
hls_fragment 5s;
hls_buffers 10 10m;
hls_mp4_buffer_size 1m;
hls_mp4_max_buffer_size 5m;
root /run... | how to HLS(Http Live Strem) with Nginx |
Edit:Kubernetes also gotinit containersas a beta feature (as of now) -http://kubernetes.io/docs/user-guide/production-pods/#handling-initializationYou should probably leverage Kubernetes PostStart hook. Something like below:lifecycle:
postStart:
exec:
command:
- "npm"
- "run"
- "migrate"ht... | There's a similar questionhere, but I think I want different thing.
For those who familiar with docker-compose, there's a brilliant command which runs command in container just once, this insanely helps for launching migrations before each deploy:docker-compose -f docker-compose.prod.yml run web npm run migrateAlso bec... | Kubectl run using yaml file config |
I finally got it to work!
When restoring, in the files tab I ticked the box "Relocate all files" and specified the location to relocate the data and log files to /var/opt/mssql/data and that worked.
|
I'm extremely new to databases so please bear with me.
I've set up local SQL Server running on a Docker container (using a Mac). I'm trying to restore SQL database using Azure Data Studio (v1.14.0) but it's not working.
I used the guide on database.guide but keep getting errors. I have no clue what it means.
Restor... | Error "collection was modified enumeration operation may not execute" when restoring database backup in Azure Data Studio |
Ahh! You're looking at the wrong counter!
Mem Usage doesn't tell you that memory is being freed. Only that the working set is being purged! This could mean some other application needs memory, or the VMM decided to mark some of your process's pages as Stand By for some other process to quickly use. It does not mean th... |
An application I am working with is exhibiting the following behaviour:
During a particular high-memory operation, the memory usage of the process under Task Manager (Mem Usage stat) reaches a peak of approximately 2.5GB (Note: A registry key has been set to allow this, as usually there is a maximum of 2GB for a proc... | Any useful suggestions to figure out where memory is being free'd in a Win32 process? |
One 32 byte leak is not going to cause a memory consumption jetsam.First, post the backtrace of the crash(es). Secondly, use the Allocations instrument to see if memory is accreting over time.If memory is accreting and you have some repeated action (say, visiting a bit of UI and returning to the main screen of your a... | I have a memory leak in my iOS app which sometimes causes it to crash. The Leak is found here. Would anyone know how i would debug this?0 0x269760 Malloc 32 Bytes Malloc 1 00:03.718.759 32 libsystem_info.dylib si_item_to_addrinfo | Memory Leak in iOS |
Check your current account (id -aon Linux, orset usernameon Windows), from a Visual Studio Code shell.Check also HOME (echo $HOMEorecho %HOME%), since Git/SSH will look for your key in~/.sshMake sure you are pushing to your own repository (or fork that you own), and not to the remote upstream original repository (that ... | I triedssh -T[email protected]and was successfully authenticated.this is the error I get when trying to push.[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists. | I cloned a repo using ssh, yet when im trying to push now im getting as public key denied warning |
1
I'm using Google Cloud App Engine (GAE) which also uses Nginx to host my Nuxt.js app and had the same problem as yours - I can access my sitemap.xml unlike robots.txt.
For GAE configuration I use an app.yaml file where among all configurations you can set handlers for sta... |
I'm using nginx and pm2 to serve a nuxt app (SSR).
I tried to use the sitemap module and the robot.txt module.
The sitemap module works fine and is accessible at /sitemap.xml.
However the robots.txt file is not accessible through nginx. Using nuxt build and nuxt start in local it works fine and I have access to /robot... | Nuxt robots.txt using nginx & pm2 |
0
Have you considered using Jenkins (or any other CI tool) to hook into your Git repository, build the repository on push and then upload the packaged lambda with all dependencies to S3 before running it?
Within AWS Lambdas, you can only download files to the /tmp folde... |
I'm attempting to use AWS Lambda to do some python package introspection.
What I'm trying to do is, on a git push, checkout a package, install its dependencies (the package dependencies are required for introspection), and run the tooling. AWS does not by default have pip installed (you're supposed to bundle your own ... | Setuptools never found on AWS Lambda |
Absolutely! With the assumption that you're performing a multipart (per best practices), you'll want to carve out a special case for zero-byte files:AmazonS3 s3Client = /* your S3 client builder technique */
if ( contentLength == 0 ) {
s3Client.putObject( bucketName, targetKeyName,
new FileInputStream( file... | Getting error when I try to stream empty data into S3.Below is the error:java.lang.RuntimeException:java.lang.RuntimeException:java.lang.RuntimeException:shaded.com.amazonaws.services.s3.model.AmazonS3Exception:The XML you provided was not well-formed or did not validate against our published schema
(Service: Amazon... | Uploading an empty file to S3 with Java |
The most common error is that the environment-variables not bound andjava is not in pathJAVA_HOME is not set.Try*/5 * * * * java -jar /var/www/java/executable.jar > /var/log/javacron.log 2> /var/log/javacron-err.logand inspect the/var/log/javacron.log-file for more informations. | I have a .jar which I can run perfectly via the command line.I need this to be running continuosly every 5 mins, so i did crontab -e where I added this line*/5 * * * * java -jar /var/www/java/executable.jarif I gogrep CRON /var/log/syslogI do see where the job was executed, but it never was since I have a logger inside... | crontab not running java |
update-deploymentis used to update the metadata of an existing deployment. For example, to update the description of a deployment:aws apigateway update-deployment \
--rest-api-id <value> \
--deployment-id <value> \
--patch-operations 'op=replace,path=/description,value=<val... | How do I update a apigateway deployment using the cli? I can find theupdate-deploymentcommand, but I do not know what to put in for the values it needs in this skeleton (taken from thedocumentation):{
"op": "add"|"remove"|"replace"|"move"|"copy"|"test",
"path": "string",
"value": "string",
"from": "string"
} | Update apigateway deployment with cli |
oracle is not planning to submit such an image. They hide behind legal terms that disallow them to distribute windows binaries, seehttps://github.com/oracle/docker-images/issues/208So unless somebody from community creates one, there is none. | I got my Docker up and running on windows,Now I am looking for an oracle container for my application that needs an oracle database.Is there an image of oracle 12 that I can use inwindows docker?I looked indockerhubbut I only found images that are built for Linux docker. | Docker image for windows with oracle12 |
I'd recommend passing it as property from CI sever itself whose job it is to deal with VCS, that way devs can use the same script against ordinary folder that isn't a git repo, e.g. a dumb copy/paste for hacking around by providing it from CLI. That said, there might be proper api-based community task but I did it with... | I am usingGit+MSBuild. I need to get the Git Long Hash number fromMSBuildso that I can tie a build to the hash number (and find out what files made up that "revision")Is there a built in task inMSBuildI can use to get the hash number?Any help is appreciated. Thanks. | Getting the Git Long Hash from MSBuild |
0
So changing the instance types only won't always help, we need to play with spark configurations as well. I followed something like mentioned here and the job is successful on EMR.
Share
Improve this answer
Follow
... |
I have a Spark job which I am trying to execute on EMR. It is giving me the below error:
java.lang.OutOfMemoryError: Java heap space
-XX:OnOutOfMemoryError="kill -9 %p"
Executing /bin/sh -c "kill -9 22611"...
I have tried it with even 10 core instances of type m5.12xlarge but still the same issue. My code is working ... | How to resolve EMR Spark Out Of Memory Error |
4
I defer with @austince, the Client IP will be the first entry in the list for Elastic Beanstalk.
Example:
X-Forwarded-For: 182.12.12.123, 78.13.13.123
In case anyone, come looking for example code, here is what I have used in my project.
const _ = require('lodash');
c... |
I am using elastic beanstalk with ngnix proxy server. my application code was on node.js express framework. I am trying to access client ip via following code
var ip = event.headers['x-forwarded-for'] ||
event.connection.remoteAddress ||
event.socket.remoteAddress ||
event.connection.socket.remote... | How to get client ip from node.js express application deployed on AWS Elastic beanstalk? |
In the Storyboard, select the UINavigationController that you want to change. Open the Identity Inspector panel (3rd of the righthand sidepanels). Under "Custom Class" you should be able to see BufferedNavigationController (or your subclass, CPNMenuController) in the list. Select it.
|
I want to implement a custom menu based on UINavigationController, but standard Cocoa class can't automatically queue up transitions between view controllers, so I decided to use this simple NavController implementation https://github.com/Plasma/BufferedNavigationController without this problem.But I can't use it in m... | Can't use a github library in my iOS application correctly |
If you're out of memory, the engine will raise the error 1114 with the following error message:
The table 'table_name' is full
You should catch this error on the client side and delete some data from the table.
|
I'm using a mysql memory table as a way to cache data rows which are read several times. I chose this alternative because I'm not able to use xcache or memcache in my solution.
After reading the mysql manual and forum about this topic I have concluded that an error will be raised when the table reaches its maximum mem... | Mysql: what to do when memory tables reach max_heap_table_size? |
RDS postgreSQL 13.2 isnot supportedby RDS proxy. Fromdocs:RDS for PostgreSQL – version 10.10 and higher minor versions, version 11.5 and higher minor versions, and version 12.5 and higher minor versions | While creating an aws RDS proxy, when i go to database dropdown it remains empty, i want to use the latest version of RDS postgreSQL 13.2. How to do this? | RDS proxy gives empty dropdown for database, when using RDS postgreSQL 13.2 |
No, unfortunately, the v2 registry does not support any CORS options as of this question and answer. The v2 registry is a brand new project written in a completely different language (Go versus v1's Python), and so many of the features available for v1 have not yet been implemented for v2. Actually the flag you used (-... | for a project i need to communicate with a privat Docker Registry via AJAX Requests, but I get an error because of the "Same Origin Rule" and I should enable CORS.
I managed to start the Docker Remote API with CORS enabled (flag: --api-enable-cors) is there any equivalent way to do this with a private Registry?
Or is ... | Docker Registry 2.0 enable CORS |
Open root's crontab for editing in default editor:sudo crontab -eThen add this line:*/10 * * * * echo '' > /var/log/httpd/access_log | Closed.This question does not meetStack Overflow guidelines. It is not currently accepting answers.Closed10 years ago.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 St... | how to set crontab every 10 minutes delete content of log file on linux [closed] |
The array on the stack works just like an array on the heap, i.e. its index increases as the memory address increases.
The stack grows downwards (towards lower addresses) instead of upwards, which is the reason for the array going in the opposite direction of the stack. There is some historic reason for that, probably... |
Though the actual implementation is platform specific, this idea is the cause for potentially dangerous buffer overflows. For example,
-------------
| arr[0] | \
------------- \
| arr[1] | -> arr[3] is local to a function
------------- /
| arr[2] | /
-------------
| frame ptr |
-------------
| ret val |... | Is there a reason why arrays in memory 'go' down while the function stack usually 'goes' up? |
2
The entire query string is present in the $args variable or at the end of the $request_uri variable. You will need to construct a regular expression to capture everything before and after the part you wish to delete.
For example:
if ($request_uri ~ ^(/something\?.*)\bunwa... |
I have a URL such as:
http://www.example.com/something?abc=one&def=two&unwanted=three
I want to remove the URL parameter unwanted and keep the rest of the URL in tact and it should look like:
http://www.example.com/something?abc=one&def=two
This specific parameter can be anywhere in the URL with respect to other par... | Remove a specific query parameter from URL |
You canExpose Pod Information to Containers Through Environment Variablesusingpod fields:apiVersion: v1
kind: Pod
metadata:
name: dapi-envars-fieldref
spec:
containers:
- name: test-container
...
...
env:
- name: MY_NODE_NAME
valueFrom:
fieldRef:
fie... | I am using go-client to access k8s resources in my environment. There are APIs to get/list pods, namespaces, etc.How do I access the pod that I am currently running on? | How to access my pod in k8s using go-client |
You can not create "sub-certificate" out of a given certificate.You need either to request a new separate certificate from some CA for your second name or you should create a new certificate that covers both names, which means putting the second name in thesubjectAlternateNamepart of the certificate (your CA should hel... | I created a certificate in my server for the hostnamexxx.lol.example. I want to know if it is possible to create a sub-certificate for the hostnamexxx.lmfao.lol.examplethanks to the initial certificate? | How to create a sub-certificate out of an existing certificate? |
You can use :docker rm -f CONTAINER_IDIt will remove the container even if it is still running.https://docs.docker.com/engine/reference/commandline/rm/You can also run your containers with--rmoption (e.g.docker run --rm -it alpine), it will be automatically removed when stopped.https://docs.docker.com/engine/reference/... | Is there any command which can combine thedocker stopanddocker rmcommand together ? Each time I want to delete a running container, I need to execute 2 commands sequentially, I wonder if there is a combined command can simplify this process.docker stop CONTAINER_ID
docker rm CONTATINER_ID | single command to stop and remove docker container |
No. In C, arrays cannot be passed as parameters to functions.
What you actually do is creating a pointer pointing the array. So the extra memory you use it only the size of that pointer created.
|
I was writing a code that involves handling a 2D array of dimensions [101]X[101] in C. However I am constrained in terms of memory being used at a given point of time.
void manipulate(int grid_recv[101][101])
{
//Something
}
void main()
{
int grid[101][101];
manipulate(grid);
}
So lets say I create an arr... | Memory management during function call |
Kubernetes doesn't provide this facility in the API.You can do this at deploy time withhelmor kubectl'skustomization features.Depending on your use case, this can also be done at runtime in a containerentry pointbefore the app starts up or in a Kubernetes specificinit container. Avoid the init container unless you are ... | I have this ConfigMap where I am constructing aapp-config.jsonfile that I pass into Angular. This file is how I get environment variables into Angular as they must be served.Below is how I thought passing variables into the JSON would work in ConfiMap:apiVersion: v1
kind: ConfigMap
metadata:
name: frontend-settings
d... | How do I interpolate Kubernetes variables into JSON in the ConfigMap YAML file? |
You should pass the--noninteractiveflag to letsencrypt. According to the document that you linked to, that will produce an error telling you which other flags are necessary. | The following command leads to a series of reasonable prompts for information such as company information, contact info, etc... I'd like to be able to run it but pass that information as either parameters or a config file but I can't find out how from the docs (https://certbot.eff.org/docs/using.html#command-line-optio... | Generating new (not renewed) SSL Certificates with "letsencrypt certonly" in non-interactive mode |
You can use the WebView cache to enable caching in WebView.In the properties of the WebView add the following line:webView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); | I am using WebView to load ASP.Net MVC website but loading page isvery slowbecause of loading many.js filesBut when I load page in browser e.g. Google Chrome then page loading almost 8 timesfasterbecause browsercachethe resource files,I think page is loading slower in WebView because it does not load files from cache. ... | Android WebView resource files like js and css files caching |
The .NET garbage collector is an highly optimized, complicated beast of software. It is optimized to make your program run as fast as possible and usingnot too much memoryin doing so.Because the process of freeing memory takes some time, the garbage collector often waits to run it until your program usesa whole lotof m... | I have tried a simple experiment to verify the functionality of the garbage collector. Referencing3.9 Automatic memory management(MSDN) about automatic memory management in.NET. To me, it sounded like a shared pointer equivalent in C++. If the reference counter of an object becomes zero, it will be deallocated by the g... | Garbage collection in C# not carried out. Why? |
+50Thetag-filtersoption does not seem to support negation. As a workaround, you can use the--queryclient side filtering option with thenot_nullfunction.So for the condition"When SV tag exists but DM does not"you can use:$ aws resourcegroupstaggingapi get-resources --tags-per-page 100 --query \
'ResourceTagMappingList[?... | I am trying to find resources in my AWS based on certain tag conditions. I have been usingjqto achieve it but is there way of usingresourcegroupstaggingapiso they provide a direct way to filter resources where any of the specified tags is missing.I have 2 use cases and this is how I've been filtering them using jq :Whe... | Filtering resources when using resourcegroupstaggingapi CLI |
Nginx container is using port 80 by default and you are trying to connect to port 8080 where nothing is listening and thus getting connection refused.Take a look here atnginx conateiner Dockerfile. What port do you see?All you need to do to make it work is to change target port like following:apiVersion: v1
kind: Serv... | I have created small nginx deployment and type as LoadBalancer in Azure Kubernetes service, but I was unable to access the application using LoadBalaner service. Can some one provide the solutionI have already updated security group to allow all traffic, but no use.Do I need to update any security group to access the a... | Not able to access the application using Load Balancer service in Azure Kubernetes Service |
How does C++ know I deallocated that memory.When you use adeleteexpression, "C++ knows" that you deallocated that memory.If it just turns it to arbitrary garbage binary numbersC++ doesn't "turn [deallocated memory] to arbitrary garbage binary numbers". C++ merely makes the memory available for other allocations. Changi... | I understand pointer allocation of memory fully, but deallocation of memory only on a higher level. What I'm most curious about is how C++ keeps track of what memory has already been deallocated?int* ptr = new int;
cout << ptr;
delete ptr;
cout << ptr;
// still pointing to the same place however it knows you can't acce... | How is memory deallocated in c++ |
As mentioned in this discussion:
You wont get the exact full command including volumes, port mappings and other options passed to docker run from docker inspect in a single line.
You will have to extract this information from the json returned from docker inspect and frame the full docker run command used.
For ins... |
In my setup, we launch docker containers using Amazon ECS Infrastructure. I know the EC2 Machine (host) where the docker is running and can see the container id.
With this information, is there anyway I can figure how the docker command that was used to run the container?
For e.g.
$ sudo docker ps
CONTAINER ID ... | docker command from the running docker / process |
6
Actual quote from https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#substitution-definitions says:
The |biohazard| symbol must be used on containers used to
dispose of medical waste.
.. |biohazard| image:: biohazard.png
This should be actually this way:... |
I am trying to insert an inline image into an .rst file, with no success. I've tried replicating the syntax used by the previous tech writer, as follows:
|icon-copy|
The name of the image file referenced by the above syntax is studio_icon_copy. However, creating an image file called studio_icon_additional, and using t... | Inserting an inline icon in an .rst file |
I assume thatZuuloffers a lots of features as an edge service for traffic management, routing and security functions. It has to declare API Gateway the main point of accessing microservices by the external clients as per Microservice Architecture patternDesign. However, Zuul needs to somehow discover underlying microse... | We've used Zuul as API gateway for a while in Microservices scene, recently we decided to move to Kubernetes and choose a more cloud native way.After some investigation and going through the Istio docs, we have some questions about API gateway selection in Kubernetes:Which aspects should be considered when choosing an ... | How to choose an API gateway in Kubernetes? |
emalloc() uses php's own memory allocator (which is optimized for php's workload, and enforces maximum memory usage).
You should use emalloc() where possible, and you must use it if PHP may free or reallocate the memory region.
The 3rd argument of RETURN_STRINGL() specifies whether it should return a copy of the strin... |
I made a php extension which looks like:
PHP_FUNCTION(function_name)
{
...
proc_data = ( char * )malloc(length);
...
RETURN_STRINGL( proc_data, length, 1 );
}
function_name is the function which will be available in php code and it returns a string. But this string is allocated memory using malloc, w... | Memory leak with malloc in php extension |
1
I made it work with the help of my friend.
My manager-osx XAMPP was running in the background that's why mysql mariaDB on docker won't start.
Also, I forgot to change the server name on my localhost. Instead of db it should be mysql
Share
Improve this answer
... |
Can someone please help me.
I'm new to creating docker containers. I tried to run docker compose up on my first laravel project and while the adminer port 8080 is working mysql mariadb is not. there is an arm64 error
this is my docker-compose.yml
version: "3.9"
services:
mysql:
image: mariadb:10.8.3
# Uncomm... | Localhost 8080 php_network_getaddresses: getaddrinfo failed: Name or service not known |
My questions is: why did the speed of the tests did not change? And what can I do about it ?If the table is so small that it already fits into ram, tmpfs doesn't gain you much except a few flushes to the disk. And, if that disk is an SSD it's not much at all. Typically you can make your testing suite go faster by turni... | I have a Postgres database inside a docker container against which I run django tests. I want to improve the speed of the tests. The easiest way to do this (it seems to me) is to move postgres data into tmpfs volume.Here's what I did:docker run --name my_tfmps_test -d -p 5432:5432 \
-e POSTGRES_USER=postgres \
-e POSTG... | docker tmpfs seems to have no effect on postgresql |
Apache docsare pretty clear:The configuration directives found in a .htaccess file are applied to the directory in which the .htaccess file is found, and to all subdirectories thereof. However, it is important to also remember that there may have been .htaccess files in directories higher up. Directives are applied in ... | When you have cPanel hosting and you use addon domains, the domains are "housed" in a folder within thepublic_htmlfolder (by default), for example:A) public_html/.htaccess
B) public_html/addondomain_1/.htaccess
C) public_html/addondomain_2/.htaccessIt's my understanding that anything I put in the htaccess file A) appli... | How does htaccess work when using cPanel and addon domains |
Define a KubernetesServicewith noselector. Then you need to define aEndpoint. You can put the IP and port in the Endpoint. Normally you do not define Endpoints for Services but because the Service will not have aSelectoryou will need to provide an Endpoint with the same name as the Service.Then you point the Ingress to... | Is it possible to configure k8s nginx-ingress as a LB to have a K8s Service actively connect to external backend hosted on external hosts/ports (where one will be enabled at a time, connecting back to the cluster service)?Similar to envoy proxy? This is on vanilla K8s, on-prem.So rather than balance load fromclient -> ... | K8s service LB to external services w/ nginx-ingress controller |
You don't usually stop processes in a container, separately from stopping the whole container itself. In this situation it's pretty common to delete and recreate the container, in fact. Correspondingly, you shouldn't use docker exec to edit files inside a container; that would get lost on a routine restart.
If you d... |
I have a docker container running Couchbase, and I need to perform an operation on it that requires the couchbase-server service to temporarily stop.
This is required to overwrite some configuration files within the container. Operation steps are described below.
docker exec -it "bumblebase" bash -c "systemctl stop co... | Stop service running inside a docker container without stopping the whole container |
That was seen only with older versions of docker (issue 22343), but also more recently with 16.04.1 LTS, Docker version 1.12.1, buildIt depends on which docker you are using, and on which host OS.If you are on Ubuntu for instance, try removing docker completely (if you don't have any local work that you would want to k... | I have done this command and now docker don't work...How can I repair (or reintall) docker properly?sudo rm -rf /var/lib/docker/aufsI have try to doapt-get install --reinstall dockerbut it didn't workthis is my error message:docker: Error response from daemon: open /var/lib/docker/aufs/layers/c14f6c4750a2a3fcfa33e6f330... | How to repair docker or reinstall it? |
If you want your new branch to be the new master, rungit checkout 6monthBranch
git merge -s ours master
# if you want the merged branch be called master, then
git checkout master
git merge 6monthBranchthe merged branch will beexactly6monthBranch, actually it just mark the formermasterbranch as a parent of merged branc... | I have a project where I created a new branch (i.e. not master, but off master) about 6 months ago. I forgot and now I want to merge the new branch with Master, but I want master to accept all my changes, in from my new branch, with any conflicts.Master should just take, shut up and accept everything.Here is my current... | In Git how do make my current branch master or merge it to master but force it to accept all my changes |
I'm not positive, but my speculation is that the small delta in z values between primitives allows the zcull hardware to work. This will cull out the fragments before they get to the fragment shader. Besides avoiding the fragment shader work, this culling can happen at a faster rate than normal z-testing when the fr... |
I'm making a 2d game involving drawing huge numbers of overlapping quads to the screen. What goes in front of what doesn't really matter.
If I draw each of my quads with z values from 0 upwards and have glDepthFunc(GL_LESS) set I get quite a nice speed boost as you would expect.
This is to avoid having to draw quads w... | opengl depth buffer slow when points have same depth |
0
I would propose to try installing Bacula Community open source product (www.bacula.org) and follow the guide from here. You only need to create a script that exports the DIT in a single file. Then you just need to create a job that backups this file with Bacula. The benef... |
We have an openLDAP cluster running with 2 Master(producers) and 1 consumer. I read the below guides and got a good enough idea about using slapcat/ldapsearch with slapadd/ldapadd to backup & restore the data.
How do I clone an OpenLDAP database
https://serverfault.com/questions/577356/ldap-backup-with-slapcat-vs-lda... | Backup & Restore OpenLDAP 2.4 with multi-master replication enabled |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.