Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
2
A website lite Umbraco consists of many different parts that consumes memory, the most typical except the iis service itself would be
Logging
Web Services
Search service (that it self may be a web service)
Scheduled jobs
Data caching
Custom asp.net code, ie if you have a... |
We are running Umbraco in an virtual environment with 8GB Ram on a Windows 2008 R2 OS.
Regardless of Version (we have 4.X and 6.x running) we see memory consumption of about 600MB per App Pool and Website.
The sites have 20 to 40 pages and maybe 500 page servs per Day.
The memory consumption seems excessive as soon af... | Optimizing Umbraco memory footprint |
I have used a new grafana plugin infinity,and it works well. | I am new user for this plugin,not sure is it some configure issue.I want to explore the ado agent task work time in grafana.I can get the json data according offical document:https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/pool-consumption-report?view=azure-devopsand the ado agent api:https://analytics.... | Explore the ado agent task time, Simplejson plugin encounter error:Authentication to data source failed |
The best thing is to use HTTP only services (not HTTPS) on Nginx nodes and configure SSL on balancer.Options:Traefik. Can be configured toauto updateLetsEncrypt certs.Fabio. Also can be configured to use SSL certs. (I've used Hashicorp Vault to store them). Need to configure updates myself.Those 2 integrate well with s... | So I want to have this:/ Nginx1 (SSL)
HAProxy-- Nginx2 (SSL)
\ Nginx3 (SSL)But I have questions:How do I update Letsencrypt certs on all nodes?If I can't do this withcertbot(+some config) - how do you do this? Maybe some distributed k/v storages? | What is the recommended way to update SSL certs in a Nginx cluster behind HAProxy? |
Why those files from my local branch A copied/remained to/in origin/B?
Because they aren't files from branch A. They're files in your working directory that aren't managed by git. You didn't add them to any commit in branch A or anywhere else. And git doesn't do anything to files that it hasn't been told to manage. ... |
Consider I have a local branch A and two remote branches A and B.
The local branch A contains some files which are not in remote B.
then, I do as follows:
git fetch
git checkout origin/B
then, those files from local A remains there, I removed those files and commit with my required changes in some files which wer... | What happens actually when I do git fetch and git checkout origin/branch from a local branch where new files are there? |
It is basically because "geometry shader" was a pretty stupid choice of words on Microsoft's part. It should have been called"primitive shader."Geometry shaders make the primitive assembly stage programmable, and you cannot assemble primitives before you have an input stream of vertices computed. There is some overlap ... | In both theOpenGLandDirect3Drendering pipelines, the geometry shader is processed after the vertex shader and before the fragment/pixel shader. Now obviously processing the geometry shader after the fragment/pixel shader makes no sense, but what I'm wondering is why not put it before the vertex shader?From a software/... | Why is the geometry shader processed after the vertex shader? |
That depends.Are we talking about multi-bet solving? Essentially running the solver in N clones simultaneously, and picking the best single result out of them? If so, that's where the Operator can help as well.If we're talking about solving the same problem in a distributed manner, with different machines executing di... | I'm interested in deploying an optaplanner solution on a Kubernetes cluster. The main interest would be to scale horizontaly the solving of a specific dataset.I have seen an example of optaplanner with a cluster (implemented thanks to an Optaplanner operator) but in my understanding it scales when multiple problems are... | optaplanner solving of one dataset with multiple nodes |
Please see the comments for the full solution.There are multiple approaches to circumvent the 10 minutes rule (which is prevalent in the serverless code) but here's something that can help you. I suggest separating the task into three:A cloud function that close the tab when called.A schedule function that calls it (ht... | I am trying to create an app that simulates opening a tab at a bar. I am running into one issue that I can't seem to figure out - it goes as follows:When someone opens a bar tab, dynamically create a scheduled task that executes code to close the tab after 24 hours.If the tab gets closed before the 24 hours, cancel the... | How to create a dynamically scheduled task? |
I was able to get the Host ID by callingAmazonS3Exception.getErrorResponseXml(). We're still working with Amazon to determine the root cause. | We have some Scala code running in Elastic Beanstalk (using Tomcat) that accesses S3 using the Java AWS SDK. It was working perfectly for months. Then, a few days ago, we started seeing some strange errors. It can read and write to S3 about a third of the time. The other two thirds of the time, it gets an access de... | Intermittent Access Denied error from AWS S3 |
A Dockerfile cannot have multiple FROMs.
This type of functionality to essentially merge two images together cannot be done in a single Dockerfile. All that's really happening here is that it will pull the jenkins:latest image, pull the ruby:2.3.0 image and then tag the ruby image with jenkins_ruby. There is no mergin... |
After a previous post it was suggested to create my own Docker image, I wanted to have jenkins with ruby, so my dockerfile looks like
FROM jenkins
FROM ruby:2.3.0
I run docker build -t jenkins_ruby .
It builds correctly and i can see the image when i do docker images
REPOSITORY TAG IMAGE ID ... | Run docker after building own image |
You will need a valid DISPLAY and XAUTHORITY to use X-Programms in Cron!To set DISPLAY is very easy, type in the Bash:export DISPLAY=":0.0"In order to get a valid XAUTHORITY you have to look for it.
Under Debian/Gnome/gdm3 they are saved in var/run/gdm3/*/database
I used the following script:export DISPLAY=":0.0"
[ -z ... | I want to set up a cron job to run a python script, but it gives me this error:RuntimeError: could not open displayThis is because I import a module that requires me to open display (pylab, for example). Even though my script does not generates any pictures to display on the monitor.Is there any way to let crontab run ... | Cron job: how to run a script that requires to open display? |
From within the instance, you can query for metadata about the instance by sending requests tohttp://169.254.169.254.More information can be found here:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html | How can I get the IP address (elastic IP) of the current Node.js host/server on Amazon EC2?Calling req.connection.address() is useless because EC2 uses an elastic IP. In fact, the IP that shows up using the ifconfig command is not the same as the IP which was used to access the server from outside (which is what I need... | Node.js - Getting the host IP address while on Amazon EC2 |
Announcing Hologram!Hologram: a system for bringing EC2 Role-like key management to non-EC2 hosts. Hologram exposes an imitation of the EC2 instance metadata service on developer workstations that supports the temporary credentials workflow. | On an EC2 instance, you can get meta data from a 'local' web server by doing things like:GET http://169.254.169.254/latest/meta-data/EC2 also does API key cycling and other magic here. Has anyone built a webserver to duplicate/mock this on development VM's? My Google keywords are failing me here.Thanks. | EC2 Instance Meta Data on Development Machines |
1
This question isn't really a good fit for SO (which is for development and programming questions); however, Apple has a good videoon the basics of Time Machine. It really is as simple as you've described it: Time Machine will take a backup each hour and keep that backup f... |
I am really sorry for this type of question, but can you please explain to me in a better way the statement below so I can understand better the type of back up that TIME MACHINE does. Thank you
"Time Machine keeps hourly backups for the past 24 hours, daily backups for the past month, and weekly backups until your ba... | Time Machine Back Up |
1
The GITHUB_TOKEN only gives you access to the current repository. You need to generate a PAT and grant it access to your organization: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
Then add the PAT as a s... |
Our GitHub organization is private and is developing multiple private R packages within multiple different repositories in our organization. Some of these packages have dependencies on other repositories in our private organization. How can I set up GitHub actions to be able to install these private dependencies? My d... | R packages in private organization - how to install private dependencies within organization? |
Try using find. Something like this:
find . -ctime -10
That will give you a list of files and directories, starting from within your current directory, that has had its state changed within the last 10 days.
Example:
My Downloads directory looks like this:
kobus@akira:~/Downloads$ ll
total 2025284
drwxr-xr-x 4 kobus... |
I am trying to obtain a backup of 'newly' added files to a Fedora system. Files can be copied through a Windows Samba share and appear to retain the original created timestamp. However, because it retains this timestamp I am having issues identifying which files were newly added to the system.
Currently, the only way ... | Linux: Finding Newly Added Files |
From comments at the top of the SonarQube.Analysis.xml file:Note that the following properties cannot be set through an MSBuild project file or an SonarQube.Analysis.xml file:sonar.projectName, sonar.projectKey, sonar.projectVersionThe following flags need to be used to set their value:/n:[SonarQube Project Name] /k:[S... | I am using SonarQube 5.6.1 and I have a few interdependent projects. I have them building and analyzing separately and cleanly, so that's not an issue.I've got a global SonarQube.Analysis.xml with the sonar.host.url, sonar.user, and sonar.password (since they don't change).I'd like to set the ProjectName, ProjectKey, a... | SonarQube Analysis Parameters: setting per project parameters |
0
vicenet,
You should do this differently. A UBI filesystem is not like the other images (MLO, barebox, kernel) on your nand flash, or even a hard disk image. So it can't be just copied by using cp on the nand0.root.bb partition. That's the reason, why your new system doesn... |
I have an embedded Linux environment working well and want save the rootfs part, then to flash others new board with empty nand.
So, what I tried. From barebox (before boot of the kernell), I put /dev/nand0.root.bb to the tftp server of my PC.
Then I tried rename it in rootfs.ubifs and at the good place to call the "... | How to get a backup of embedded Linux rootfs? |
This threadmentions:When this error appears, it typically means that the ssh keys have not been configured in all locations.SSH keys will need to be set in both the project setting's page and within the config.yml.Just in case, double-check the URLhttps://app.circleci.com/settings/project/github/<your organization name... | I'm using circle ci to deploy a serverless built innodejs. And I added as dependency of the main repo,a private github repo. E.g:// package.json
.....
"dependencies": {
"my-private-github-repo": "git+ssh://[email protected]:company-name/my-private-github-repo.git",
.....
},
.....The problem is that I need to gi... | I can not use private repo as npm dependency in circleci deploys |
I added a git configuration step to mygo.ymlthat did the trick:- name: Configure git
env:
TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: git config --global url."https://${TOKEN}:[email protected]/".insteadOf "https://github.com/"whereACCESS_TOKENis apersonal access tokenI added instead of the username/password combo ... | I am trying to clone another private repo in Github actions. I have setSECRET_USERandSECRET_PASSWORDin the secrets of the repo I'm running the actions on. In actions I'm running the commandgit clone https://$SECRET_USER:[email protected]/other-organization/other-repo.gitbut getting the errorCloning into 'other-repo'...... | Cloning a private repo in Github Actions |
In NetBeans 7.4 it looks like you can't just click "remote add" from a menu. It seems you can persist a new remote if you click Remote -> Push and go through the wizard. See also:https://netbeans.org/bugzilla/show_bug.cgi?id=191540 | I am working on a fork that I created from a project on Github. I now want to merge changes in the project to my fork, using netbeans.I read onthis pagethat I need to "remote add" the project to my list of remotes.
However, I cannot find a menu command to do so. Is there one?In case there is not:I can of course start a... | 'remote add' in netbeans 7.4? |
It looks like you're sending the PUT request to the bucket itself, without an object name. S3 interprets this as a PUT BUCKET request, and expects the body to be a CreateBucketConfiguration XML document.To upload a file, your XHR open call should look more like:xhr.open('PUT', 'https://bucket-name.s3.amazonaws.com/' + ... | I am trying to upload a picture to my Amazon S3 bucket. Here is the code for my XMLHttpRequest:var form_data = new FormData();
form_data.append(filename, file);
var xhr = new XMLHttpRequest();
xhr.open('PUT', 'https://bucket-name.s3.amazonaws.com', true);
xhr.send(form_data);I have configured the CORS to be as follows:... | Amazon S3 bucket MalformedXML error when uploading |
3
Unfortunately, Cognito does not have a way to allow access to an arbitrary, fluid group of ids. The only way that a group of ids can be given access, as of now, is what was described in this blog, which requires the ids to be hardcoded into the role:
"StringEquals": {
"... |
We are writing an image sharing app using Cognito for identity management and S3 for object storage. When a user uploads an image, they can set the image permission to private, public or friend, where friend is a set of the app users.
Setting the access control on an S3 object seems clear when it’s simply private or p... | Access control on S3 objects for a group of cognito identities |
If you want to squash commits go to HEAD(last) commit and just:git reset --soft HEAD~2 && git commitAfter enter this command you will be asked to write commit message to new commit.This command will squash your last two commits in one with new commit message you write.And then merge your branch how it is describedhere. | I am trying to squash my commits and merge my branch to master as one single commit. This is what I'm trying. I switch to master branch and then i dogit merge --squash <branch_name>And I getAutomatic merge went well; stopped before committing as requested
Squash commit -- not updating HEADAfter that I commit. But howev... | How to squash commits in Git? |
collection.createIndex({createdAt: 1}, {expireAfterSeconds: 60,unique:true});
and
collection.createIndex({createdAt: 1}, {expireAfterSeconds: 300,unique:true});
this is invalid
You cannot use createIndex() to change the value of expireAfterSeconds of an existing index. Instead use the collMod database command in co... |
I'm using MongoDB (v3.4) as a cache and using TTL indexes to expire records. However, the TTL settings don't seem to work properly. Specifically, I tested using an endpoint to insert data (as below).
The endpoint mongoInsert is supposed to expire in 5 min. However, it seems that after ~1 min, the document got removed... | MongoDB TTL expiry doesn't work properly on NodeJS |
When you say ec2 configuration I am sure you mean AWS Elasticbeanstalk application configuration. There is no ec2 configuration that you can save in AWS EB.When you save AWS EB configuration its scope is within the APP. You won't see saved configuration ofApplication-AinApplication-Band it does make sense. If you want ... | In AWS - Elastic Beanstalk, I am trying to move an ec2 instance from one application into another. I saved the environment configuration for the ec2 instance. Then I went to the application that I want to move it to, but when I go to saved configurations, it doesn't show up. Did I miss a step somewhere? I thought I was... | AWS - How do I load a saved environment configuration from one application to another application |
Turns out my nginx config was fine, the error was somewhere else in the app, but it appeared like a nginx error. The above config works totally fine.
|
I have a typical Express.js app with a POST route.
I have nginx acting as a reverse proxy to the Express server.
nginx properly sends incoming requests, but seems to drop the POST request Body.
Here is my nginx conf:
server {
listen 80;
server_name domain.com;
location / {
proxy_pass http://localhost:3000... | How to get POST requests through Nginx reverse proxy to Node/Express.js |
1
For GitLab
create a file .gitlab-ci.yml in the root of your rails app.
Since you're using Capistrano, you want to be sure that ruby is pre-installed
Add image: ruby:2.3 to the .gitlab-ci.yml file
Next we need to install Capistrano when we're deploying
Add these to your .... |
I Have developed a simple application in Ruby on Rails(ROR), pushed it on github and gitlab and deployed it on Ubuntu server provided by Digital Ocean. How can I achieve the continuous deployment such that whenever I pushed the changes on gitlab/github, it should make changes on VPS(virtual private server) i.e. Ubuntu... | ROR application continuous deployment from github/gitlab |
I guess Grafana is really confused by your data.Official documentationon Status history panel says:Status histories show periodic states over time.Status history is supposed to be used for statuses within same windows for all series. Something like this.Based on your screenshot, I doubt your data is in this format.It l... | I have an image that is showing count of occurrences by version over time.The problem is my x-axis is a disaster. Those are dates, but spaced....randomly? Looking around in the settings I'm not seeing the usual "X Label > Spacing" possibility. So how do I get this human-readable? | Get regular x-label values on Grafana > Status History |
YesVectors are implemented using template memory allocators that take care of the memory management for you, so they are somewhat special. But as a general rule of thumb, you don't have to calldeleteon variables that aren't declared with thenewkeyword because of the difference between stack and heap allocation. If stuf... | I have a vector that I fill with pointers to objects. I am trying to learn good memory management, and have a few general questions:Is it true that when I am done with the vector, I must loop through it and call delete on each pointer?Why don't I have to call delete on the vector or any other variable I declare without... | What do I need to do before deleting elements in a vector of pointers to dynamically allocated objects? |
You are serving the site over HTTPS but trying to load jQuery over HTTP. This is not allowed.<!-- wrong -->
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>Replacehttpwithhttpsand you should be good to go. This error is easily discoverable if you open the Javascript Console in yo... | So the javascript used to work on my github pages site but it doesn't work anymore after I delete the repository and tried to re-uplaod the project with some changes. Here is therepo. Here is thesite. | Javascript won't run on github pages site |
This is not possible. If you think how services work, they create X number of replicas of the task. All instances of the task have the same parameters, because the purpose is scaling out the task - they should do the same job. Often the traffic is load-balanced (part of service configuration), so it is undesirable that... | On AWS ECS you can run a task, or a service.If you run a task withrun_task(**kwargs), you have the option to override some task options, for example the container environment variables, this way you can configure the thing inside the container for example. That's great.Now, I can't find a way how to do the same withcre... | How to run a service on AWS ECS with container overrides? |
You can useDynamic Volume Provisioningrunning your workload in aStatefulSetto store your cache.Essentially, when you use it a PVC (Persistent Volume Claim) gets created that is associated with a Physical Volume (The PV also gets created initially) and the PVC is also associated with your pod. So the next time your pod ... | I am currently trying to build a build-pipeline.
the pipeline currently is a job with several init containers.
One of the init containers is the actual image builder.To make use of its cache feature, I'd need a mechanism of having the data remain on the storage, so the next iteration can use the cached data.The only le... | Automatically reusing persistent volume including data |
I finally ended up calling the original entrypoint bash script in my new entrypoint bash script, before doing other extra configuration steps. | Recently, we decided to move one of our services to docker container. The service is product of another company and they have provided us the docker image. However, we need to do some extra configuration steps in the container entrypoint.The first thing I tried, was to create a DockerFile from the base image and then a... | Add a new entrypoint to a docker image |
kubectlexpects exactly one namespace:➜ / kubectl create ns
error: exactly one NAME is required, got 0depending on your shell you could pack it into a loop. here's an example for bash and zsh:➜ / foreach ns (ns1 ns2 ns3); kubectl create ns $ns; end | I want to create multiple namespaces from the Kubernetes CLI (kubectl) without any YAML manifests:kubectl create namespace app1,app2,app3Can this be done? | Creating Multiple Namespaces from the Kubernetes Command Line Interface |
Starting at 15 megabytes and levelling off at 20 megabytes isgreat. This app is tiny, and its memory usage levels off quickly. Problems arise when memory usage keeps rising forever, typically on the level ofgigabytes, i.e. many orders of magnitude bigger! So, don't worry, be happy. | I have done my best to make sure that views are released when they are no longer needed and when pushing the app and then looking at theDebug Memory GraphI see that no objects are present that shouldn't be there. However when I look at the memory graph I can see that although the graph does sometimes bump back down, it... | Some residue memory never released with ARC? |
3
If you want to force Python to run out of memory, this should make it happen very quickly regardless of how much memory is available:
x = [None]
while True:
x += x
This will double the length of x on every iteration until it fails.
Share
... |
I'm working on a system that has about 128KB of RAM, one of my scripts occasionally causes a ERRNO 12 Cannot Allocate Memory error.
I have a few solutions I want to test.
But how can I replicate the problem when it seemingly happens randomly once a day?
Any bad scripts that will cause ERRNO 12 Cannot Allocate Memory e... | How can I cause a Memory Error in python 2.7? |
Based on your example, all you have to do is something like this:RewriteEngine on
RewriteRule ^(.*)$ $1? [L]The final?removes any queryShareFollowansweredDec 22, 2012 at 17:39Felipe Alameda AFelipe Alameda A11.8k33 gold badges3030 silver badges3737 bronze badges21Sure. Put this condition:RewriteCond %{QUERY_STRING} !... | I have a website which uses "Smarty Engine" and "?a=link" linking method (i don't know what this linking method is called)I've already used RewriteEngine in .htaccess to use .php links such as home.php instead of ?a=homebut how can i prevent ?a=home from opening? so the page can only opened with home.php linkEdit: for ... | How to Prevent Specific links such as "?a=page" from opening |
When you allocate/deallocate memory many times, it may create fragmentation in the memory and you may not get big contiguous chunk of the memory.
When you do a realloc, some extra memory may be needed for a short period of time to move the data.
If your algorithm does not need contiguous memory or can be changed to ... |
I'm trying to implement some math algorithms in C on Windows 7, and I need to repeatedly increase size of my array.
Sometimes it fails because realloc can't allocate memory.
But if I allocate a lot of memory at once in the beginning it works fine.
Is it a problem with the memory manager? Can anyone explain me this p... | Disadvantages of calling realloc in a loop |
Running git init on an existing project does not do anything bad (it just copies any new templates), as documented in the man page:
Running git init in an existing repository is safe. It will not overwrite things that are already there. The primary reason for rerunning git init is to pick up newly added templates (or... |
And after that I deleted the git init with rm -rf .git and started a new one with git init, I messed my project? I want my older git configuration on my project, what can I do now?
| I accidentally started a new git init on an existing git project, what do I need to get it back to normal? |
No, at least not as gitolite VREF.On Github side, there are apost-receive hookorwebhooks, but the are after the push.The only way to really guard a directory within one Github repo is to make/export that directory in its own GitHub repo, and declare it as asubmodulein the first repo. | Does github.com has support for adding virual refs like gilote as discussed ingitolite or gitosis: permission on directory inside of the repository?I need to restrict access at directory level inside the repo.Any clues? | Adding virtual refs for repo hosted at github.com |
There are many ways and things to consider however you have to ask a board questions so will write an answer accordingly.You can use the toolveleroto migrate the internal components of the Kubernetes cluster.Velero :https://velero.io/While other all things you have to consider of migrating Databases using DMS, Storage ... | In my organization, I need to migrate the Kubernetes cluster from on-premise to AWS EKS. Can someone please tell me how I can do this? | Migrate Kubernetes from on-premise to AWS EKS |
I misread your question: it is not a git question, it is actually a "go get + git" question.
The locations used by go get are located under the GOMODCACHE directory, not under your working directory.
Here is an illustration using strace on a go get github.com/spf13/cast command (I simulated a private repo by setting G... |
I have two different work folders in my computer one is in ~/Documents/work/companyA other is in ~/work/companyB. I wrote conditional gitconfig that is like
[includeIf "gitdir:~/Documents/work/companyA/"]
path = ~/Documents/work/companyA/.gitconfig
[includeIf "gitdir:~/Documents/work/companyB/"]
path = ~/Docu... | Git config with condifional does not work with url rewrites |
Yes, this is a common use case. You can connect directly to redis without using the SDK. Just make sure you have configured the security group correctly to allow access from your app server.
|
AWS has Redis support via the ElastiCache Service. My question is, can I connect to Redis on AWS Elasticache from node, using the following:
var client = require('redis').createClient(6379, 'elastichache endpoint string', {no_ready_check: true});
Or do I have to use the NodeJS AWS SDK?
I realize I could set up my own... | Node Redis with AWS |
12
If I understand correctly there is a way to do this. Currently, I handle 5-9 AWS Account Concurrently. If you use firefox there is a plugin offered by Firefox officially https://addons.mozilla.org/en-GB/firefox/addon/multi-account-containers/
Source Link - https://gith... |
The AWS console allows one connected session per browser instance. This is bothersome when one is frequently changing between accounts.
How can I have multiple AWS console sessions active at the same time (and be able to easily distinguish between them)?
| How can I have multiple concurrent AWS console sessions logged in to multiple account/role combinations? |
.htaccess codeRewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]you can change the last line if it contains .phpRewriteRule ^([^\.]+)$ $1.php [NC,L] | I learnt that .htaccess file can be used to hide the page url. Example : www.mydomain.com/mypage1.html can be made to appear as www.mydomain.com or www.mydomain.com/mypage1. So I have a few questions regarding this. I have three pages say mypage1.html, mypage2.html and mypage3.html; all within the same folder in cPanel... | Using .htaccess file to hide page extension in cPanel |
Percent-encoding in URIs is really two steps of encoding, not one. Ideally, first text is encoded as UTF-8, and the UTF-8 text is "percent-encoded" to be used in a URI, producing a result like this:
/images/productimage/image-%C3%B8.png
Can you confirm that this URI has been encoded properly? If you start with the ch... |
Im trying to figure out why nginx is trying load some static images with the wrong encoding. E.g.:
From the error.log:
2012/08/08 21:14:46 [error] 17968#0: *71 open()
"/home/www/mydomain.com/WEB-INF/images/productimage/image-ø.png"
failed (2: No such file or directory), client: x.x.x.x, server:
www.mydomain.co... | Nginx: Static files encoding utf8 character results in à |
Keep in mind that thedocker runargument order is mandatory:$ docker help run
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]The environment setting fall under options:-e, --env list Set environment variables
--env-file list Read in a file of environmentHence:docker run... | Given this Dockerfile:FROM alpine:3.7
ENV LAST_UPDATED=2018-02-22
ARG XDG_CACHE_HOME=/tmp/cache/
RUN apk update && \
apk add libxslt && \
apk add sed && \
apk add py-pip && \
apk add mariadb-client && \
apk add bash bash-doc bash-completion && \
pip install httpie && \
rm -rf /var/cache/apk/... | How to pass through environment variables in docker run through an env file? |
I was having an issue similar to this. I found the log output in /usr/local/Cellar/sonar/4.5.1/libexec/logs/sonar.log.My first issue was that I had run "sudo sonar start" so I was getting this:Exception in thread "main" java.lang.IllegalStateException: Temp directory is not writable: /usr/local/Cellar/sonar/4.5.1/libe... | After installing SonarQube 4.3.1 through Brew on Mac OS 10.9 Mavericks, when I navigate to localhost:9000, I could see the console but now after trying to install an Android plugin and restarting the server through terminal I can no longer view the localhost:9000 page? I even tried localhost:9000/setup but I only get p... | SonarQube on mac doesn't start after plugin |
Kubernetesalready gives you a DNS name to select individual StatefulSet pods. Say you have a Servicemy-ststhat matches every pod in the StatefulSet, and the StatefulSet is set up withserviceName: my-sts; then you can access host namesmy-sts-0.my-sts.namespace.svc.cluster.localand so on.If you specifically want a servi... | I have two StatefulSets namedmy-stsandmy-sts-a, want to createa single service, that addressessame-indexed pods,from two different StatefulSets, like:my-sts-0andmy-sts-a-0. But foundk8s docsays:Labels selectors for both objects are defined in json or yaml files using maps, and only equality-based requirement selectors... | kubernetes Service select multi labels |
Have it this way:Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(.*)/kategori/(.*)/(.*)/?$ index.php?p=$1&kategori=$2&sayfa=$3 [L,QSA]
RewriteRule ^(.*)/kategori/(.*?)/?$ index.php?p=$1&kategori=$2 [L,QS... | I have a htaccess file to match all of the occurrences. but it stops at second one. when i load /galeri/kategori/galeri-kategory-albumname/ it loads sayfa.php which has no relation with gallery page itself. It works fine on my localhost but trying to figure out why its not working in server.Options +FollowSymLinks
Rewr... | htaccess rewrite rule stops at first occurrence |
You can configure Jetty to serve clear-text HTTP/2 (also known ash2c), so that your setup will be:browser -- h2 --> kubernetes tls termination -- h2c --> JettyIn order to setup Jetty with clear-text HTTP/2, you just need to enable thehttp2cmodule if you are using Jetty as a standalone server, seehttp://www.eclipse.org/... | I want to set up my web page to make HTTP2 requests to a Jetty API server. I read that browsers will only use the "h2" protocol, that is, HTTP2 with TLS. However, my setup has a kubernetes ingress performing SSL termination, and proxying a cleartext request back to the Jetty server. The dilemma is that I don't think I ... | HTTP2 from the browser with early SSL termination |
I haven't been able to find any existing packages for version 10, here is how I compiled the client tools myself on the 2018.03 AMI
sudo yum install -y gcc readline-devel zlib-devel
wget https://ftp.postgresql.org/pub/source/v10.4/postgresql-10.4.tar.gz
tar -xf postgresql-10.4.tar.gz
cd postgresql-10.4
./configure
m... |
I need to use pg_dump for postgres 10.4 on my EC2 instance. My AMI version is:
$ cat /etc/system-release
Amazon Linux AMI release 2018.03
I've tried to get it from this repo: https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat10-10-2.noarch.rpm, then install postgres tools by command su... | How to install postgres10 tools on Amazon Linux AMI |
If you only have one server and N clientes connected to that server using TCP, the usual way is to map it in the Firewall/Nat. So everything that hits a certain tcp port from outside it's redirected to your server.Hole Punching is used when you have multiple clients that need to be reached from outside their LAN, examp... | I'm doing a project which involves making a server which uses TCP to connect to its clients. In real-life conditions, it could be behind a firewall/nat/proxy.So, how would I establish a connection?I looked into TCP Hole Punching. Is that the way?Are there any existing libraries so that I don't have to code from scratch... | How to Connect To My Server Application which is behind a Firewall/NAT? |
Depending on the image sizes, use cases, etc, I would probably store the images in S3.You can store the S3 path as a database field. You can create a bucket as a domain name (ie, images.example.com), and point the CNAME to the bucket to get direct access to the images. You can also use the various S3 libraries to gener... | I am currently creating a bunch of tables on the MySQL service in Amazon RDS. Several of the tables need to have image links in them. What I am trying to figure out, is where do I put the images? Do they go in RDS somewhere? or do i put them in S3 and link them to RDS? If the latter, how do I do that?I have googled ... | Where to store images in Amazon AWS for use in RDS |
It may be easier to just use environment variables. You can set them using theErewrite flag. Then you can check against the env variable in a rewrite cond:Options +FollowSymlinks
RewriteEngine On
RewriteRule ^(.*)_(.*)$ /$1-$2 [E=DASH:Y,DPI]
RewriteCond %{ENV:DASH} Y
RewriteRule ^([^_]+)$ /$1 [L,R=301]So the first rul... | I want to replace all hyphens inside of an URL before permanent 301 redirection. For example this:http://www.example.com/article_category/article_nameto this:http://www.example.com/article-category/article-nameMy .htaccess file looks like this:Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_URI} ![_]
Re... | Replace underscores to hyphens before triggering 301 |
This is possible from FNH, in the example below see the 'Cache' property:
return Fluently.Configure(fileConfiguration)
.Database(MsSqlConfiguration
.MsSql2005
.ConnectionString(c => c.FromConnectionStringWithKey("Temp"))
.ShowSql()
.Cache(c => c.ProviderClass(typeof(NHibernate.Cache.HashtableCa... |
Is ti possible to configure the L2 cache provider in code via FHN?
Adding a line to the following config is what I'm after:
return Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2005.ConnectionString(c => c.FromConnectionStringWithKey("Temp")).ShowSql())
.Mappings(m => m.Fluent... | NHibernate L2 Cache configuration in Fluent NHibernate |
<div class="s-prose js-post-body" itemprop="text">
<p>for future reference:</p>
<p>I found a - i my eyes - not really nice solution:</p>
<pre><code>sudo echo "apache ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
</code></pre>
<p>Found <a href="https://raspberrypi.stackexchange.com/questions/7365/php-to-execute-python-... | <div class="s-prose js-post-body" itemprop="text">
<p>i'm running Nginx on my Raspberry PI with PHP 5.4.14 (fpm-fcgi). It all works well. But in one script i make a shell call using shell_exec. </p>
<pre><code>echo shell_exec("sudo python " . $file);
</code></pre>
<p>it works well if i use the console with </p>
<pre><c... | Raspberry PI: PHP call python script with sudo |
RewriteEngine On
RewriteCond %{HTTPS} ^on$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/?$ /index.php?_route_=$1 [NC,L]ShareFollowansweredSep 25, 2015 at 13:01Amit VermaAmit Verma41k2121 gold badges9595 silver badges115115 bronze badges1Once I add this code in live site, ... | I need to change all the https (only https urls, not http urls) url like below:1)https://www.domain.com/loginmeanshttps://www.domain.com/index.php?_route_=login2)https://www.domain.com/accountmeanshttps://www.domain.com/index.php?_route_=login3)https://www.domain.com/aboutusmeanshttps://www.domain.com/index.php?_route_... | Htaccess url redirect only https urls |
The simplest case that works:Crontab* * * * * /usr/bin/make -C /var/www/generate/ > /tmp/log.txtMakefile (/var/www/generate/Makefile)deploy-content:
/bin/bash -c "cd /var/www/nuxt/; npm ls"Output should then be atcat /tmp/log.txt | I want to use Makefile and shellscript to generate and render static content using nuxt.Makefile:deploy-content: ## Generate content using nuxt
@echo $(/bin/bash -c cd /var/www/nuxt; npm run --prefix /var/www/nuxt generate)render.sh:#!/bin/sh
# start generating content in background
make deploy-content > /dev/n... | Npm run is not working inside crontab (cronjob) |
You can either backup the prior database or detach the database .mdf (data) and .ldf (log) file and reattach via http://blog.sqlauthority.com/2007/08/24/sql-server-2005-t-sql-script-to-attach-and-detach-database/
or
Backup your database and restore. Six of one, half dozen of the other.
-- Step 1 : Detach Database usi... |
I have just changed my Windows. In the old SQL Server, I had some important databases and I want to find and copy them to new installed windows and SQL Server.
How can I find and copy old databases from old windows and copy them to new SQL Server?
P.S: Actually, my I have changed my hard disk and all of the old files... | Retrieve SQL Server database from old Windows |
1
As you've seen and the comments confirm, the data does persist in a stopped container. You can restart the container and see the data in the container specific filesystem. You can also use docker cp to extract those files from the container. I have submitted the following... |
Docker's storage overview documentation says:
The data doesn’t persist when that container is no longer running, and it can be difficult to get the data out of the container if another process needs it.
A container’s writable layer is tightly coupled to the host machine where the container is running. You can’t easi... | Why my Docker container's writable layer persists after the container exits? |
Yes, the difference is about 30 min. I guess this could be the difference in the timezone. kubectl reports logs in the timezone of the pod where as LogAnalytics might be reports it into UTC timezone or in your browser timezone. Please check the timezones of pod and the browser and see if this makes sense.Hopefully this... | There is an AKS cluster in Azure with a microservices app (NodeJS) deployed.The app is streaming logs to Application Insights (and to Log Analytics) usingapplication insights.All settings are by default:maxBatchSize&maxBatchIntervalMs.When I check the pod logs usingkubectl logs {POD_NAME} -n {NAMESPACE_NAME}I see the f... | Azure AKS pod logs are shown with 30+ minute delay in Log Analytics |
You can try to useWeave Scopeto make a graphical map of your Kubernetes cluster.It will generates a map of your process, containers and hosts in real time. You can also get logs from containers and run some diagnostic commands via WEB-UI.To install on Kubernetes you can run:kubectl apply -f "https://cloud.weave.works/k... | I am looking to map out various network connections between pods in a namespace to understand which pod is talking to which other pods. Is there a way to query the etcd to get this information? | Create Kubernetes Pod Network Map |
0
server {
listen 80;
server_name localhost;
root /var/www/html/ci;
autoindex on;
index index.php;
location / {
try_files $uri $uri/ /index.php;
location = /index.php {
fastcgi_pass 127.0.0.1:6969;
... |
I'm trying to remove the index.php? using Codeigniter whith nginx server, but it doesn´t work. I tryed the official solution of nginx website https://www.nginx.com/resources/wiki/start/topics/recipes/codeigniter/
Actually, in the default file, i have the following code:
server {
listen 99 default_server;
... | How to remove index.php from Codeigniter (nginx) |
You can create git submodule in your git repo with path for example
contrib/LibSourcery and url to github repo of LibSourcery, because of LibSourcery uses cmake you just
need add such line into your CMakeLists.txt: add_subdirectory(contrib/LibSourcery)
So person who want to use your code, just do git clone --recursive... |
I'm trying to create an Open Source C++ project. I want it to be as easy to build as possible, but at the same time cross platform.
I don't need gui or heavy libraries like boost or Qt, so I've settled on using GitHub, CMake, and LibSourcey.
My problem is, I can't find a way to make my project easy to build in windows... | CMake "make install" or including a library in windows |
14
The AWS recommended solution is to rename:
https://aws.amazon.com/premiumsupport/knowledge-center/cloudformation-custom-name/
Share
Improve this answer
Follow
answered Nov 30, 2017 at 19:23
... |
I have the following error.
Serverless: Operation failed!
Serverless Error ---------------------------------------
An error occurred: phoneNumberTable - CloudFormation cannot update a stack when a custom-named resource requires replacing. Rename mysite-api-phonenumber-dev and update the stack again…
I tried deleting ... | Serverless Error, CloudFormation cannot update a stack when a custom-named resource requires replacing |
While it is not exactly what I was looking for, I found a way to do it for the time being, one of the tables in the phpmyadmin (it's own) database is called pma__tracking, which contains a record of all tables being tracked, one of its columns is the data_sql longtext column which writes each report (ascendingly which ... | Using phpMyAdmin I can track a certain table's transactions (new inserts, deletes, etc), but is it possible to change or export it to a SQL table to be imported into my site using PHP. | MySQL table from phpMyAdmin's tracking reports |
There is method availablesetMaxLength()in source code ofPinEntryEditTextto set MaxLengthcheck line number 116public void setMaxLength(final int maxLength) {
mMaxLength = maxLength;
mNumChars = maxLength;
setFilters(new InputFilter[]{new InputFilter.LengthFilter(maxLength)});
setText(nu... | I'm usingthislibrary in my app. I have to set the limit of the edittext programatically.
Right now I'm doing it in xml fileandroid:maxLength="5".But I want to set it differently for different activities and the length will be decided dynamically ., How can I achieve it ? | Set the PinEntryEditText limit programmatically |
Clicking for more information on this bug takes you tohttps://developers.google.com/web/tools/lighthouse/audits/content-sized-correctly-for-viewportwhich defines that this error is due to failure of the condition:window.innerWidth === window.outerWidthThis is a silly bug (reported to Google also) and to prevent it, jus... | The lighthouse audit tool gives the following error:Content is not sized correctly for the viewporteven though this never appears on the normal Chromesame issue in Version 69.0.3497.100 (Official Build) (64-bit)... | Lighthouse on Chrome Canary incorrectly gives the error 'Content is not sized correctly for the viewport' |
There isn't a built-in I/O for Apache POI:https://beam.apache.org/documentation/io/built-in/.You can follow this instruction to create a customize sourcehttps://beam.apache.org/documentation/io/developing-io-java/if needed.You can also write some ParDo withstateful processingto control your throughput.A state is per-ke... | We have multiple spreadsheets. each has 2 to 4 sheets that describe entities. rows in sheet 1 map to rows in sheet 2 and so on.Can use APACHE Poi to read and map these to my POPJOs. I tried with Open CSV but that has CSV support and not POI as a reader?Also when processing this data, need to call an API with attachment... | Bulk ops in Apache beam Java with native throttling |
The Eclipse plugin does not take into account configuration files. All the configuration of the project is retrieved from the server. What kind of specific configuration do you put in your configuration file aside from basic configuration (projectKey, projectName, projectVersion)? | I successfully linked my project to my sonar server with the sonarqube eclipse plugin. I dispose of a configuration file I use with sonar-runner which is not at my project root.How can I make the eclipse plugin use my configuration file ? | Configuration for eclipse sonar plugin |
You can do this usingskopeo, like this:skopeo copy docker://some/image:oldtag docker://some/image:newtagFor example, if I have:$ skopeo list-tags docker://larsks/skopeo-example
{
"Repository": "docker.io/larsks/skopeo-example",
"Tags": [
"latest"
]
}I can run:$ skopeo copy docker://larsks/skopeo-exa... | I occasionally need to do some manual promotion for a docker image.The flow I use is:$ docker pull registry.digitalocean.com/foo/bar:dev-123
$ docker tag registry.digitalocean.com/foo/bar:dev-123 registry.digitalocean.com/foo/bar:prd-123
$ docker push registry.digitalocean.com/foo/bar:prd-123This involves pulling the i... | Can you tag a docker image in a remote repository without pulling it? |
You should avoid the magic strings and usenameofinsteadpublic int Property2 {
get => (int)Properties[nameof(Property2)];
set => Properties[nameof(Property2)] = value;
} | Sample code:public class Foo: Bar
{
protected static readonly string Property1Name = "Property1";
protected static readonly string Property2Name = "Property2";
public string Property1
{
get => (string)Properties[Property1Name];
set => Properties[Property1Name] = value;
}
public... | How to redesign code to reslove SonarQube "Getters and setters should access the expected fields" bug? |
You can make use of the annotation fieldkubectl.kubernetes.io/last-applied-configuration, which holds the resource initial applied configuration without auto-generated fields.Get it manually, or parse it withyq:kubectl get daemonset mydaemonset -o yaml | \
yq r - 'metadata.annotations."kubectl.kubernetes.io/last-applie... | I'm trying to export a daemonset from my kubernetes cluster but I dont want any of the metadata. Is there a way I can export the manifest file without the metadata, likecreationtimestamp,uid_selflink, etc.for example, something like this would be perfect:kubectl get daemonset mydaemonset --no-meta-data -o yaml > export... | How do I export a kubernetes manifest file without the metadata? |
The loader allocates that memory before your process starts executing, and the kernel will automatically reclaim it when your process exits. You do not need to worry about it.
|
If I reserve memory in the .BSS section of an image, am I responsable for deallocating that memory before the process terminates and if so how do I go about doing this?
Here's some example code to clarify
SECTIION .text
GLOBAL _start
_start:
mov edx, buffer
movb [edx], 30h ; Initializes buffer which was reserved in .b... | Who is responsible for deallocating memory reserved in the .bss section of an image? |
The issue
If you compare the commits from the upstream:
With your fork:
You could see that your fork has one extra (merge) commit.
Multiple commits ahead
GitHub tells you you're multiple commits ahead because the merge commit points to other commits which aren't in the upstream
The fix
The easiest way to fix is thi... |
I created my fork https://github.com/jdx-john/ExchangeSharp in order to make changes, which I contributed upstream in a PR and were accepted.
I fetched-upstream on my fork in GitHub, but now it tells me my fork's master 'branch is 4 commits ahead of jjxtra:master' and I must make a PR. However as far as I can see, the... | Why does my fork insist I have changes from upstream and how do I fix this? |
2
what do the &a and &b addresses point to?
&a is the address of a struct of type C, and &b is the address of a struct of type D. It is the same as if the structures were of non-zero size. Why would it be any different?
Why is there one byte offset between them?
Because... |
I've been playing around with C and came across this case.
There's two zero width structs, C and D where D contains C.
As we can see, the pointer to the zero length struct b has an address that is one byte offset from the also zero length struct a (see output below).
In this case, what do the &a and &b addresses point... | Zero length struct: what's the pointer pointing at? |
I prefer to use brewbrew install repo | I just got a new mac like two weeks back.
I am trying to install Google RepoI am not into android development but my company uses this repo to store its codebase.do I still need to carry out all the instructions fromEstablishing a Build Environmenttab? It asks to create a partition etc.also after downloading repo into ... | How to install google repo on mac |
When a script is running via cron the working directory is/- the filesystem root. Use absolute paths in the script:with open("/path/to/tide_data.txt", "r") as file: | I have the following script on a Raspberry Pi to send an SMS. It runs if I type: python tides_sms.pyThe problem is, I can't get it to run via Crontab (* * * * * /usr/bin/python /home/pi/python_files/tides_sms.py). The file is set to: rwxr-xr-xWhen I add code to write to a file, the file gets created via Crontab, but it... | Raspberry Pi Crontab script error |
Yes, it is: These two lines instruct the server to associate any file ending with ".php" to call a specific program, namely php53.Give it a try!You could even writeAddType application/x-hg-php53 .php53to make the "old" PHP execute *.php files, while your *.php53 files will be executed by PHP 5.3.xThe exact option depen... | My shared hosting provider uses PHP 5.2.x. When I contacted them to ask why, and if 5.3.X was available, they said that they maintain 5.2.x so that client scripts don't break, but offer "A handler for PHP 5.3 is added to our shared and reseller servers for those who wish to utilize it."I was instructed to "add the foll... | htaccess and PHP handler |
The problem is you shouldn't change something on the target site. When you create conflicts on that site it can broke your complete site if you have the merge commits in your code.On the Target site you can pull your changes with--forceor you make a hard reset to the last state your need then you can pullt and don't ge... | I know that There is conflicts between my changes and remote branch changes.But how do i overwrite remote branch changes.I tried git push --force.But it says ! [remote rejected] (non-fast-forward). | How to overwrite to remote branch in git even though there is conflicts? |
34
You can set it as JVM arguments the usual way, e.g. -Xms1024m -Xmx2048m for a minimum heap of 1GB and maximum heap of 2GB. JBoss will use the JAVA_OPTS environment variable to include additional JVM arguments, you could specify it in the /bin/run.conf.bat file:
set "JAVA... |
I have an upload files scenario in my project. When I'm trying to upload the large files it's giving me an OutOfMemory error. That error is related to Java heap size.
How can you increase the heap size in Java and which file do I need to alter for this? I'm using jboss 5.1 server for running my application.
| How to increase heap size for jBoss server |
Add the following dependency to your pom<dependency>
<groupId>org.joda</groupId>
<artifactId>joda-convert</artifactId>
<version>1.8.1</version>
<scope>provided</scope>
</dependency>ShareFollowansweredOct 9, 2015 at 20:22user5429174user54291746622 bronze badges25That may help in some cases but it is no r... | I have many errors with sonarqube analyse in the Jenkins job with the analyse success[ERROR] [14:36:44.124] Class not found: org.joda.convert.FromString
[ERROR] [14:36:44.126] Class not found: org.joda.convert.ToString
[ERROR] [14:34:42.441] Class not found: org.apache.commons.logging.Log
[ERROR] [14:34:42.724] Class n... | “Class Not Found” during SonarQube analyse |
Probably the easiest way is to base your rule on the Domain(s) the request is for e.g.RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} yourSecure.domain [NC,OR]
RewriteCond %{HTTP_HOST} yourOtherSecure.domain [NC]
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]ShareFollowansweredOct 11,... | I have a public_html which i want to have https enforced but not include some directories inside this folder since those folders are parent directories that hold files for other domains which don't have SSL installed on them.I used this to enforce https for the entire public_htmlRewriteEngine On
RewriteCond %{HTTPS} !=... | How to enforce https for all directories except a few inside the parent directory for adon domains |
Using Bitbucket's REST API version 1, you can get the SSH keys of a user with this endpoint:
https://bitbucket.org/api/1.0/users/#{user}/ssh-keys
Here is a full reference from the API documents:
https://confluence.atlassian.com/display/BITBUCKET/ssh-keys+Resource
I'm not sure if they plan to include this in version ... |
github provide public ssh key by URL like http://github.com/user.keys.
Is there a way also in bitbucket to obtain public keys via URL?
| Can I get ssh public key from url in bitbucket? |
The parameters toAWS.configareaccess_key_idandsecret_access_key, without theaws_prefix.http://docs.aws.amazon.com/AWSRubySDK/latest/AWS.html#config-class_methodShareFollowansweredJul 20, 2015 at 9:41michaeljosephmichaeljoseph7,06355 gold badges2727 silver badges2727 bronze badgesAdd a comment| | I have written a rake task that does an copy_to from one directory in a bucket to another directory within the same bucket. When I test it locally it works fine, but when I deploy it to an environment it returns AWS::S3::Errors::AccessDenied: Access Denied. I assume that it has something to do with the AWS credentials ... | AWS::S3::Errors::AccessDenied: Access Denied when trying to do copy_to |
Since access tokens are bound to an account and have write access toallits private repos, it's a very bad solution.Instead, usedeploy keys.Deploy keys are simply SSH keys that you can use to clone a repo.Create a new SSH key pair on your computerPut thepublic keyin the private dependency repo'sDeploy keysPut theprivate... | I have 2 private GitHub repositories (say A and B) in the organization (say ORG). Repository A has repository B inrequirements.txt:-e[email protected]:ORG/B.git#egg=BAnd I have the following workflow for A (in.github/workflows/test.yml):name: Python package
on: push
jobs:
build:
runs-on: ubuntu-latest
ste... | Cloning private github repository within organisation in actions |
If you are including them viainclude()orrequire()into your PHP code, there's no need to change the extension. Anything included via theinclude()family is already treated as PHP.Addendum:Please also see @Darhazer's answer configuring Apache to serve.incas PHP if you have a need to do so. (It's not totally clear from yo... | Can somebody tell me how to treat.incfiles as.phpso I can include the .inc files into my php code. You can tell me change their extension to.phpbut it is not easy since there are hundred of pages which use the inc version.Basically I need to declare types and handler in .htaccess.I am running PHP over Apache.Thanks. | Handle .inc files as PHP |
What you are doing here is called premature optimization. By default, std::vector will exponentially increase its memory footprint as it runs out of memory to store new objects. For example, a first push_back will allocate 2 elements. The third push_back will double the size etc. Just stick with push_back and get your... |
I have a long array of data (n entities). Every object in this array has some values (let's say, m values for an object). And I have a cycle like:
myType* A;
// reading the array of objects
std::vector<anotherType> targetArray;
int i, j, k = 0;
for (i = 0; i < n; i++)
for (j = 0; j < m; j++)
{
... | The fastest way to populate std::vector of unknown size |
You could usesemaphoresif you do not like the pid file lock, even though that is a common practice. Also, I would suggest usingflock/fcntlinstead of pid lock files. I think that would be quite good for you.As for bash lock file practices right from the cron job, you could look at a good existing practice in here:#!/bi... | I need cron job which fetch data from wsdl and store in database periodicly.How can I implement it in singleton to be sure no new instance created before latest ended?I used file to store is cron job running or not,but I think better way should be exist.In java we can run Jar as daemon ,so it can controller to be singl... | Cron Job with PHP or Python |
Found out that$ firewall-cmd --get-active-zones
FedoraWorkstation
interfaces: ens4u1u2 wlp59s0
docker
interfaces: br-48d7d996793a
libvirt
interfaces: virbr0
trusted
interfaces: docker0the interfacedocker0seems to be in thetrustedzone.
But there's another zone calleddocker.So I decided to give it a shot and add ... | I'm usingFedora release 33 (Thirty Three)Docker version isDocker version 20.10.0, build 7287ab3First I randocker system pruneand since then docker daemon failed to start.I ransystemctl start dockercommand and gotJob for docker.service failed because the control process exited with error code.
See "systemctl status dock... | failed to start daemon: Error initializing network controller: Error creating default "bridge" network |
I found a 3rd party module that seems to fit my use case more closely. Though I wish it was something I could find "built in"
ngx_http_auth_request_module
http://mdounin.ru/hg/ngx_http_auth_request_module/file/tip/README
http://mdounin.ru/hg/ngx_http_auth_request_module/file/tip/t/auth-request-set.t
The config would ... |
I am trying to use X-Accel to pass information about the request to the internally redirected uri.
location / {
root /web/external;
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $document_root/check.php;
fastcgi_pass unix:/services/.sock/fastcgi.sock;
}
location /internal/... | access nginx x-accel request headers |
Change URL from https to http, for me it worked. There must be problem with ssl tunnel. But currently you can start it by switching to http. | Since this morning, when I try to sync from GitHub Desktop after creating a commit, I sometimes get the message:When I try to push the commit in Git Shell, I get:SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054What could be the issue?It takes around one or two minute between the time I try to push and the... | GitHub Desktop / Git Shell: SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054 |
External access to the demo-service will happen via port 32264, which connects to port 80 on the docker container. | If I runkubectl get servicesfor a simple demo service I get the following response:NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
demo-service LoadBalancer 10.104.48.115 <pending> 80:32264/TCP 18mWhat does the : mean in the port list? | What does the colon mean in the list of ports when running kubectl get services |
Realizing this is an older post, but since I just recently implemented a dev install of MicroK8s, I though perhaps I could provide some of my findings.Wanting a load balancer, I installed MetalLB,https://metallb.universe.tf/, which provides a baremetal LB for a cluster. While MicroK8s does offer an addon for this, I di... | When exposing a service in minikube it is possible to see its url via the following:minikube service [-n NAMESPACE] [--url] NAMEHow do you achieve the same in microk8s?Thank you | Accessing a service using a LoadBalancer in microk8s |
Try add this directives in your *.conf file to enable cache in ldap module:ldap_server {
...
}
auth_ldap_cache_enabled on; # enable cache
auth_ldap_cache_expiration_time 10000; # 10 sec
auth_ldap_cache_size 1000; # max 1000 records in cache
server {
...
} | I have installed nginx with nginx-auth-ldap module, I followed guide on github and now nginx error log show me smth like that:2015/05/13 08:24:31 [error] 18696#0: *56 http_auth_ldap: Authentication timed out, client:***
2015/05/13 08:24:31 [error] 18696#0: *57 http_auth_ldap: Authentication timed out, client:***But lda... | nginx-ldap-auth - authentication timed out, but ldapsearch works fine |
0
git fetch will update your remote tracking branches, but you won't know if your current branch is still compatible.
It is best to rebase your branch on top of upstream/master, with upstream being a remote referencing the original repo you have cloned.
See "Pull new update... |
Presently I forked a project at Github and adding some new features to it. However, it is really active project and codes are always changing around. How should I keep my forked local copy up to date as I do not lose my changes?
From my search I guess I should use git fetch command and stay away git pull since fetchin... | How to keep my fork updated with the changes at the main base as I keep my local additions to the project? |
Sadly, you can't make DynamoDB stream, to stream only deletion or expiration of items. Everything is streamed, and its up to your lambda function to filter the events of interests.For TTL expired items, your function needs tocheck:"userIdentity":{
"type":"Service",
"principalId":"dynamodb.amazon... | I have set up Dynamo table and have enabled stream and also enabled TTL (timetolive) on one of the columns. I also have one lambda which will pull entry from Dynamo Stream.Now either I add, delete, or edit, Or TTL gets expired - all this will cause the lambda invocation.I am not interested in add or edit event, I only ... | Is it possible to invoke lambda only on item expiry from Dynamo |
You just need to set the -Xmx command line option to allocate more memory.
There seems to be a good answer to this here:
http://www.mathworks.com/matlabcentral/answers/92813
Create java.opts file:
Create a text file named java.opts in the $MATLABROOT/bin/$ARCH directory. $MATLABROOT is the MATLAB root directory and... |
Introduction: I have recently been working on a rather heavy computational JAVA program (ODE Solver and numerical optimization). I have implemented multithread and will soon get access to a rather 'large' server here at the university to test the programs performance. I have created the program as a .jar file but I do... | How to allocate more memory to a JAVA program when executed from MATLAB? |
Make sure this isn't cached in your browser, because I do see thelatest changes of theindex.html, like thetitle being changed to Help Ted!.As long as thegh_pagesbranchis updated and pushed, you should see those modifications too inhttps://campmesh.github.io/2048/. | I have just begun working on github. While I was modifying the 2048 repository, part of the commits that I have made are getting synced and can be seen onhttps://campmesh.github.io/2048/, but the changes that I have made in index.html cannot be synced, and thus, make no difference to the webpage. My repository is -http... | Parts of the commits are getting synced, but the commits made in index.html cannot be synced |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.