Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
Add this to the top of your rules:RewriteRule ^/?(.*)>$ /$1 [L,R=301]You can use>because the URI gets decoded when matching in aRewriteRule.ShareFollowansweredAug 26, 2012 at 6:55Jon LinJon Lin143k2929 gold badges221221 silver badges220220 bronze badges1That's perfect. Thanks a lot Jon.–Mike CAug 27, 2012 at 23:06Add ... | Our current htaccess setup correctly converts urls like this: site.com/page.php?sid=Friend to site.com/FriendHowever, due to an unrelated oversight, we had almost all of our URLs double-indexed as site.com/Friend> Because the greater than sign is a special character it doesn't call page.php so the > needs to be stripp... | Removing unwanted characters from URL in htaccess |
You should expose your service using NodePort:apiVersion: v1
kind: Service
metadata:
name: neo4j
labels:
app: neo4j
component: core
spec:
externalTrafficPolicy: Local
type: NodePort
ports:
- port: 7474
targetPort: 7474
name: browser
- port: 6362
targetPort: 6362
name: b... | When we spin up a cluster with kubeadm in kubernetes, and the service's.yamlfile looks like this :apiVersion: v1
kind: Service
metadata:
name: neo4j
labels:
app: neo4j
component: core
spec:
clusterIP: None
ports:
- port: 7474
targetPort: 7474
name: browser
- port: 6362
targetPo... | How can I access to services outside the cluster using kubectl proxy? |
You can try to cache complicated views like lists etc.
An example: You have a category overview, it shows the name of all categories and the count of items in it. You can cache this view as static html as long as no new item has been inserted or deleted in any category.
So every time you create a new item or delete o... |
I have made a framework for a project. The project does a medium amount of query requests (but the traffic it will be getting will make it more per user). The views are mixed HTML and PHP.
Just looking for the best minimalist ways on how I should go about caching my view files (the controller uses output buffering so ... | PHP Caching (HTML + PHP) |
Your problem is coming frommpstat. When it's run from the command prompt, it outputs the time with AM/PM. It doesn't when it's run bycron. Asennuikillersuggested, it's probably an environment problem. On my systemecho $LANGgives "en_US.UTF-8" at the command prompt, but nothing when run incron. This or some other enviro... | Here's a snippet of a bash script I'm writing to log CPU loads:#!/bin/bash
# ... irrelevant nonsense ...
cmd1="/usr/bin/mpstat -P ALL | egrep '(AM|PM)([[:space:]]+)(0)' | tr -s ' ' | cut -d' ' -f4"
ldsys="$(echo $cmd1 | /bin/sh)"
# ... irrelevant nonsense ...$ldsysis set properly when the script is executed conventiona... | Eval to variable failing (w/Crontab) |
I'm not sure why wouldofficial documentationwork only in a vm and not container, but if it truly not work than you can use webserver to hide your web interface behind it and setup authentication on it. | How to setup basic auth for Prometheus deployed on K8s cluster using yamls??I was able to achieve this easily when Prometheus was deployed on a host locally using tar file. But when it is deployed as a pod in K8s cluster, tried almost everything on the internet but no luck.Any kind of help would be really appreciated!T... | How to setup basic auth for Prometheus deployed on K8s cluster using yamls? |
You've got your logical conditions backwards. You seem to be redirecting when the conditions say: the requested resource is an existing file, or an existing symbolic link, or an existing directory. You want the opposite of that:RewriteEngine On
RewriteBase /
# do not do anything for already existing files
RewriteCond ... | I've found a few answers but none of them seem to be able to answer my problem.
On my server we use non-www for asset serving and www subdomain is cnamed to our bigcartel store. What I'm trying to do is serve files from the non-www page if file is found, else redirect to the www subdomain with original request.eg:redir... | Redirect to WWW if directory and file not found |
This works for me:curl.exe `
--netrc-file C:\Users\Steven\_netrc `
-L `
-o wsldhost.exe.zip `
https://api.github.com/repos/nbdd0121/wsld/actions/artifacts/42682371/zipWhere_netrclooks like this:default login <USERNAME> password <PERSONAL ACCESS TOKEN>https://github.com/actions/upload-artifact/issues/89 | This problem seems really simple. I'm trying to download a pre-built binary for a program from somebody's github repo.They suggest that I can do this:
"You can also download pre-built binaries from GitHub Actions artifacts."But it turns out that I have no idea what that means!The file is not in the actions page (I'm no... | Downloading an artifact from actions on someone else's repository |
In the following lines I'll try to exhibit an idea (It can be considered as solution, at least for the moment), it consist of mounting the configmap values as Volume,spec:
containers:
- name
...
volumeMounts:
- name: config-volume
mountPath: /etc/config #just an example
volumes:
- name... | I have defined an environment variable for a container from a Configmap, But I want to apply changes automatically when changing the variable value in the ConfigMap.
Maybe we can target an environment variable in volume path !? | Dynamic changes of environment variable setted in ConfigMap |
AWS CodePipeline is connected to GitHub via the new "Integrations" concept:https://github.com/integrations/aws-codepipelineThis concept was announced here:https://developer.github.com/changes/2016-09-14-Integrations-Early-Access/GitHub Integrations authenticate using JSON Web Tokens and private/public keys, so I'm not ... | I am currently fiddling around with AWS CodePipeline for the first time and set up the Source and the Build step so far with a demo project.I have connected the Source Step with a GitHub account (a system-account we use), with admin access to all Repos. As the documentation states, the OAuth-scopesadmin:repo_hookandrep... | AWS CodePipeline recognizes my new GitHub commit fine - but how? |
No, you cannot associate a draft issue (project card) without turning it into an issue first.Instead of creating a draft issue, you could create new issues directly and configure a rule to auto-add them to your project. | I am trying to use github Projects to manage my dev, but I can't seem to find info anywhere on how to associate a task (NOT an issue) with a commit. Is there a way to do this similar to how "fix #xxx" line will link to an issue or do I have to convert my tasks to an issue and then close them in my commits in order to ... | Can I connect a Github Projects task to a commit without converting it to an issue? |
1
So far it is not possible, it will be in the Docker v 1.10 (that should be released in a couple of weeks from now).
Edit:
See the PR on GH.
Share
Improve this answer
Follow
answered Feb 2, 2016... |
I'd like to specify a static IP address for my container in my docker-compose.yml, so that I can access it e.g. using https://<ip-address> or ssh user@<ip-address> from outside the host VM.
That is, making it possible for other machines on my company network to access the Docker container directly, on a specific stati... | How to set up container using Docker Compose to use a static IP and be accessible outside of VM host? |
You can run cron without daemon mode.
root@xxxxxx:~# cron -f
I was just trying to test it:
I started /bin/bash in a new container
apt-get install cron nano screen
getty tty -a root
screen, in screen I created 2 terminals:
first: cron -f
second: crontab -e - edit your crontab, save and you can watch that the cron i... |
I have installed cron via apt-get install cron
Trying to start cron fails (as expected) because of upstart not running.
What is the command line for starting cron properly (i.e. it will read users' crontabs, will read /etc/crontab/* etc)?
Please note that I do not want to start the container as a "full" machine, so I... | How do I start cron on docker ubuntu base? |
I don't remember particularly but you should add cron.sh or cron.php file to your OS cronjob.UPDATE 1So the problem isn't with cron jobs itself but wih log cleaning mechanism.As for DB cleaning I have following snippet which might be useful for you:private function cleanLog(){
$write = Mage::getSingleton('core/... | How to setup cron job for log cleaning and re-indexing in Magento? I setup cron job for cron.php and its running but it does not seem that log has been cleared because when I looked into my table "log_url" it is sill has the same data which was in this table before cron running, also even in the "cron_sechedule " table... | Magento Cron jobs: Log cleaning and reindexing |
It seems that you are working on a 64-bit OS.When you compile with "Any CPU" and the "Prefer 32-bit" setting is turned on. Then the process will execute as 32-bit process even if the OS is 64-bit.32-bit processes can have a virtual address space of size 2GB (can be 4GB using the LARGEADDRESSAWARE setting). This is a lo... | I'm experiencing an unexpected behaviour while running some very simple code.First of all I'm using Visual Studio 2015 on a i7-4770 CPU, 32Gb memory (22,6 free)My sample code:int length = 10;
for (int i = 0; i < length; i++)
{
int j = i;
//ThreadPool.QueueUserWorkItem(ThreadProc... | System.OutOfMemoryException using ThreadPool |
I wouldn't worry about your memory not being released, because as you have seen here, we're pretty much agreeing that you're doing the right thing.
My concern is about why the memory is being reported like that. I thought the memory monitor might be reporting allocations (which even released keep accumulating).
My ver... |
I've got a strange problem about [NSString stringWithFormat:@""];
This is my code:
NSString *log;
[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(someFunction) userInfo:nil repeats:YES];
- (void) someFunction
{
log = [NSString stringWithFormat:@"a very big string here....."];
}
this s... | Reassign an NSString doesn't free memory |
As per the discussion and the work done by #Hb_1993 it can be done with a pre-stop hook to delay the eviction, where the delay is based on operation time or some logic to know if the procession is done or not.A pre-stop hook is a lifecycle method which is invoked before a pod is evicted, and we can then attach to this ... | I have sidekiq custom metrics coming from prometheus adapter. Using thoes queue metrics from prometheus i have setup HPA. When jobs in queue in sidekiq goes above say 1000 jobs HPA triggers 10 new pods. Then each pod will execute 100 jobs in queue. When jobs are reduced to say 400. HPA will scale-down. But when scale-d... | Prevent K8S HPA from deleting pod after load is reduced |
Just figured out how to solve this, nowElastic Beanstalk supports running a privileged containersand you just need to add the"privileged": "true"to yourDockerrun.aws.jsonas the following sample (please take a look at thecontainer-1):{
"AWSEBDockerrunVersion": 2,
"containerDefinitions": [{
"name": "container-0",... | I have tried numerous different ways to include the privileged flag in my task definition per the task definition documentation here:http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#container_definition_securityI have also found forum postings over at amazon here:https://forums... | Is it possible to launch privileged docker containers on Amazon elasticbeanstalk? |
Remix purges therequirecache on every request in development to support<LiveReload/>. To make sure your cache survives these purges, you need to assign it to theglobalobject.EDIT: Here's a better way to handle this// utils/singleton.server.ts
// since the dev server re-requires the bundle, do some shenanigans to make
... | I need to fetch data from an API that is pretty slow and seldom changes, so I thought I'd use an in-memory cache. I first tried a very simple approach by just saving it to a variable outside the scope of the loader function in my route:let cache;
export const loader = async () => {
if (!cache) {
// we always end... | How do I use in-memory cache in Remix.run dev mode? |
Turns out I was missing the-fflag:$ git filter-branch --tree-filter "rm -f b-main.js tests/b-tests.js" \
--prune-empty HEADAnd for my own bonus points:$ git remote rm origin
$ git remote add origin[email protected]:username/reponame.git | I have one git repository which I'd like to turn into two git repositories, however the split is not as simple as it seemsgit filter-branch --subdirectory-filterwould like.myRepo/
a-main.js
b-main.js
a-other.js
tests/
a-tests.js
b-tests.jsWhat I'd like to do is get another repository whi... | Splitting a Git repository based on arbitrary file paths |
You can batch change the commit history with the nuclear option git filter-branch. Using --env-filter, you can change author and email info. See Changing Author Info - GitHub for more info. Since you don't have an email info now, you may catch the messy name for judging the necessity of rewriting.
For example,
#!/bin/... |
I was changing the git author information inside the terminal and for whatever reason the update has removed the email from the commit and now I am unable to revert this change and can't add an email address to this commit.
The commit includes an author that I can't amend and the email linked to the commit is <>.
Can... | Change author and email address in Git |
But it is really easy.. once you know where to find the docs :-). I would take the azure docs as a starting point as there are multiple options when it comes to hosting containers in Azure:
If you're looking for this...
Simplify the deployment, management, and operations of Kubernetes -> Azure Container Service (AKS)... |
I have a simple docker container which runs just fine on my local machine. I was hoping to find an easy checklist how I could publish and run my docker container on Azure, but couldn't find one. I only found https://docs.docker.com/docker-for-azure/, but this document kind of leaves me alone when it comes to actually ... | Run docker container on azure |
As stated byvieuxon thisGH issue, this is a bug in Swarm1.0.0. This bug has been solved in the Swarm1.1.0.ShareFollowansweredFeb 18, 2016 at 7:52AuziasAuzias3,7181616 silver badges3636 bronze badgesAdd a comment| | TL;DR: bug present in Swarm1.0.0, solved in Swarm1.1.0.On a four swarm agents cluster, a custom overlay network is run with theweave plugin:user@swarm-master:~$swarm-docker network create --driver weave --subnet 192.168.0.0/16 custom-weaveHowever, with this command and its output we can see an issue:user@swarm-master:~... | How to set static IP address to a container running into a Swarm over a weave-overlay network? |
The comment means that s2 does not have to allocate memory specifically for the three characters "aze". Instead, it can use the memory already allocated for "azerty" by s and remember that its own length is just three characters.
The immutability part is also important: if s were not immutable then it could decide to ... |
I have been reading here
https://developer.mozilla.org/en-US/docs/JavaScript/Memory_Management#Allocation_via_function_calls
and these lines confused me a bit:
var s = "azerty";
var s2 = s.substr(0, 3); // s2 is a new string
// Since strings are immutable value, JavaScript may decide
// to not allocate memory, but ... | Can values be stored without allocating memory? |
Soooo, the problem has seemed to resolve itself. I gave up after hours of troubleshooting and restarting my pc and trying all different things, and when I returned later to try once more it just works.
I still have no idea what caused this behaviour but I'll give an update when I know more... | So I'm just getting started with GIT, but I can't seem to get it to work. I'm trying to publish my local repo on Github, but when I do this I seem to keep losing connection.I can check the origin usinggit remote -vgiving meorigin[email protected]:Yorgv/yorgv.be.git (fetch)
origin[email protected]:Yorgv/yorgv.be.git (pu... | Git loses connection during push |
With which command have you tried to access the website with curl? And does the server listen to 0.0.0.0 or 127.0.0.1? | I want to use my raspberry pi, which runs Manjaro ARM, as a server for my local network. I have a golang server running permanently using systemd services. However, I can't access the website from another computer in the network. I disabled iptables and nftables but it still did not work. The server is running and I ca... | Can't open port 443 for local network |
Gumbo's answer in the Stack Overflow questionHow to hide the .html extension with Apache mod_rewriteshould work fine.Re 1) Change the .html to .phpRe a.) Yup, that's possible, just add#tabto the URL.Re b.) That's possible usingQSA(Query String Append), see below.Thisshouldalso work in a sub-directory path:RewriteCond %... | Yes, I've read the Apache manual and searched here. For some reason I simply cannot get this to work. The closest I've come is having it remove the extension, but it points back to the root directory. I want this to just work in the directory that contains the.htaccessfile.I need to do three things with the.htaccessfil... | Remove .php extension with .htaccess |
Do they use my public_key to encrypt a message and then wait for me to send back the decrypted message?Rather the other way around. You (your local SSH client) encrypt something using your private key. And if they are able to decrypt it using the public key you gave them, it must be you.Obviously this is a very simplif... | When connecting to GitHub using HTTPS they will obviously want to verify me by asking for my password. I enter my password, it checks out, and then they allow me to write to my repo.With SSH keys setup, I create a public_key and a private_key pair. The way I understand it, the public_key I use to encrypt and the priv... | How does sending my public key to GitHub allow them to verify who I am? |
Chances are that as long as you use normal, static files (ending in.js,.gifand so on), your server already does caching for you.You can find out using a tool like Firebug in Firefox, or the built-in developer console in Chrome. The easiest way to get there is by right-clicking an element, and choosing "Inspect element"... | Question ::::::I have been trying to create a site (Hosted on x10hosting). So I have been searching how to build a fast site. And I got a page to improve Jquery codes. Below is the link to the page.
In that page I read that including Jquery framework codes from Google.com can speed up the site. And I also find out the ... | How to cache scripts and images from my site? |
You can move / resize your window using only your keyboard.Type Alt+Space Bar and then resize or move the window using the pointers that appear. | I just installed GitHub desktop on my Windows 10 64bit. The software functions OK but the window of it won't fit in the window. Once I click on maximize button, the right side of the window just go out of the screen. Here is a screen shot, how can I fix it?Thanks a lot for your help!Jason | Github Desktop not fit in the screen windows |
3
You could download the source and run the 2to3 script to see if it proposes changes to upgrade it to python3:
https://docs.python.org/3/library/2to3.html
If there are no changes, then it is Python3 (and maybe also Python2) code.
Share
Improve this answer
... |
I'm interested in running this code from github – how do I know if it was written for python2 or python3?
I'm hoping this is a really basic question and there is just some part of the site which makes this obvious.
| how can you tell if github repository is for python 2 or python 3 |
Usingdocker logs -f <container_name_or_id>might helphttps://docs.docker.com/engine/reference/commandline/logsThe docker logs --follow command will continue streaming the new output from the container’s STDOUT and STDERR. | I have a bash script that's running in jenkins which starts a docker container and runs a simple command (PWD), but the output from that command is not written to the build console. Any ideas what I am misconfiguring? I've tried various docker arguments but nothing seems to work. It seems to really be a problem only... | No logs when running command from docker container in jenkins |
A change in one line of code could generate a bug elsewhere, similarly for code smells, security hotsposts and so on; so, generally speaking, Sonarqube always evaluates all the code base. What changed in this case is the number of code patterns, or "rules", used in the evaluation: if you examine theSonar Rules catalo... | This one is a bit specific.We use SonarCloud, and the "New Code" settings for the relevant project is as following:I.e, on the main branch, only code newer than 2 days is considered.We had a merge request that made some changes, including switching from Java 11 to Java 17. It had a passing pipeline, so we merged, and b... | SonarQube raises error on old code after merging upgrade to java 17 |
Normally, If the PR for branchA is approved (default merge strategy), when you create a new PR for branchB,the new PR will only show the initial commit for branchB. As the commit I in below graph.A---B---C branchA
/
D---E---F---G masterAfter PR for branchA is approved by default merge strategy:I br... | I've forked a repository->created a branch A->made commits and pushed changes to it->I then made a pull request from branch A.->Branch A got merged.Now, I created branch B and pushed commits to it->made another pull request from branch B but this pull request show's commit history from the start of branch A. I only wan... | How to open multiple pull requests from multiple branches without sharing commit history? |
resource "aws_route53_record" "www" {
zone_id = "${aws_route53_zone.primary.zone_id}"
name = "example.com"
type = "A"
alias {
name = "${aws_elb.main.dns_name}"
zone_id = "${aws_elb.main.zone_id}"
evaluate_target_health = true
}
latency_routing_policy {
... |
Do anyone have an example for latency based route53 (AWS) recordset using terraform?
I want to know all the attributes I can pass including evaluate target health-check for alias records.
| terraform example for Latency based route53 (AWS) |
0
Your best option for file system cache/search is probably to use a Lucene index.
However if your content is quite static then could you not perhaps look into using Output caching?
Trivial example
[OutputCache(Duration=10, VaryByParam="none")]
public ActionResult Index()
{... |
We are working on an ASP.Net MVC/Jquery mobile project for a chain of Australian holiday parks. The bulk of park related data is stored in a SQL database.
One of the sections currently in development is 'local attractions'. The data for this section is pulled from a webservice owned by the Australian Tourism Data War... | Extending ObjectCache to create a file-based cache alternative |
ThePOSTGRES_*environment variables are used to define the way that the databases get created and connected. If you have an existing database, you need todefine thePG*environment variablesso that you can connect to it.Therefore, you should also includePGPASSWORDin the.envfile, so that the password that you have defined... | There is a message inDocker PostgresQL docs:Warning: the Docker specific variables will only have an effect if you
start the container with a data directory that is empty; any
pre-existing database will be left untouched on container startup.So when I recreate my postgres container withdocker-compose downanddocker-... | How to make PostgresQL use environment variables from .env file after re-creating the container (without removing the volume) |
So according tothis"NotRemovable" prevents the cache entry from being removed automatically (like when the cache is running out of space) but will be removed when it expires or you manually take it out of the cache.NotRemovableThe cache items with this priority level will not be automatically deleted from the cache as ... | I found myself into aCacheItemthat didn't clean up correctly. While looking at MSDN and correct myself into using Utc-based calculation, I found this confusing information:CacheItemPolicy.PriorityCacheItemPolicy.AbsoluteExpirationAbsolutExpirationis used to set a "keep-alive" of aCacheItem,Priority.NotRemovableis used ... | How do the caching 'Priority' and 'AbsoluteExpiration' work together? |
I suggest you add a health check directly at container level (here)By doing so, docker pings periodically an endpoint you specified, if it's found unhealthy it will 1) stop routing traffic to it 2) kill the container and restart a new one. Therefore you upstream will be resolved to one of the healthy containers. No nee... | We usedocker swarmwithservice discoveryfor BackendRESTapplication. The services in swarm are configured withendpoint_mode: vipand are running inglobalmode. Nginx is proxy passed with service discovery aliases. When we update Backend services sometimes nginx throws 502 as service discovery may point to the updating serv... | Nginx retry same end point on http_502 in Docker service Discovery |
If you are running builds and releases with hosted pipelines, which means the build running
on machines managed by Microsoft, then you are actually using Microsoft-hosted CI/CD.This uses ourpool of Microsoft-hosted agentsto run your builds, which do have some limitations such as below:The ability to log on.The ability... | I have some unit tests that test file accessibility, these are failing on Linux because it's running as the root user and the root user can write to read only files. Is it possible (preferably through yaml) to specify that some or all of the pipeline run as a non-root user? | Is it possible to run all or part of a Hosted Linux VSTS Pipeline as a non-root user? |
The issue was mysuper-dashboard.jsonfile was in the same directories as the templates and helm tried to templatize it. The solution is to have a directory structure like:mychart/
templates/
super-dashboard.yaml
files/
super-dashboard.jsonThen theyamlfile has:{{ .Files.Get "files/super-dashboard.json" | ind... | wise SOers. It turns out Grafana dashboard json files use the same{{ }}to do variable substitution as helm does. I have a grafana chart that is laden with these{{ }}to a disagreeable degree.When I want to put that chart into a template, like so:apiVersion: v1
kind: ConfigMap
metadata:
name: super-dashboard
namesp... | helm template escaped values for Grafana charts |
If I usenativein an image built by Dockerhub, I guess this will use the spec of the machine used by Dockerhub, and this will impact the image binary available for download?That's true. When the docker image is built, it is done on the host machine and using its resources, so-march=nativeand-mtune=nativewill take the sp... | When compiling in a docker image (i.e. in the dockerfile), what shouldmarchandmtunebe set to?Note this is not about compiling in a running container, but compiling when the container is being built (e.g. building tools from source when the image is run).For example, currently when I rundocker buildand install R package... | mtune and march when compiling in a docker image |
You can runthis commandon an EC2 Linux instance to check if the current instance is in an AutoScaling group. You will need to check if the returned value is empty to determine if it is in an AutoScaling group or not.aws autoscaling describe-auto-scaling-instances --instance-ids `curl --silent http://169.254.169.254/lat... | Is it possible to determine from instance if it's a member of AutoScaling Group in AWS?Thanks in advance! | Determine if instance is a part of some AutoScaling Group in AWS |
The 'File name too long' is indeed an error coming from your system. It is not a restriction in Git. I don't think there's a way of testing the maximum branch name lengths of other systems, like GitHub's, without experimenting - although I don't see why you would want to know...
.
Source: the error mentioned is thrown... |
I want to understand what is maximum allowed size of a git branch name.
I am trying to create some long names (as an experiment) so a name with 370 characters was valid, but 380 characters gave me fatal: Failed to lock ref for update: File name too long
So the questions are: what is the maximum number of characters th... | Max length of git branch name |
Do not host that file on github.
Make a requirements.txt file and add required versions there, you can even fix version required to run your code.Whoever downloads it can create a virtual environment (venv) or a docker image and install it aspip install -r requirements.txtFor example:requirements.txthttps://download.py... | I've made a conversation telegram bot with pytorch and I'm trying to host it onto Github. The large pytorch file prevents me from doing so as its too large and I get this error:remote: error: File env/lib/python3.8/site-packages/torch/lib/libtorch_cpu.dylib is 233.61 MB; this exceeds GitHub's file size limit of 100.00 ... | Reducing size of pytorch library |
To get mod_rewrite working not only mod_rewrite must be installed, but also check in the Apache directory config (/etc/apache2/sites-enabled/000-default on Ubuntu installed via apt-get) if the rule "AllowOverride None" exists in your project's directory config. If so, change it to "AllowOverride All".#
# AllowOverride ... | here i am stuck with a small problem. I have a site built in Yii framework. It runs without any problem with http protocol (the index.php in url is hidden and all urls work fine). I have hosted this in amazon ec2 services. i have the following lines in my .htaccess fileOptions +FollowSymLinks
IndexIgnore */*
RewriteEn... | Hiding "index.php" at url in "YII" when using "https" does not work |
crontab -l 2>/dev/null| cat - <(echo "your new crontab entry here") | crontab -Explanationcrontab -lOutputs the current crontab to stdout.2>/dev/null[Optional] Supresses error messages from crontab -l. You'll get an error message if there is no crontab entry for the user. But that's not a problem.cat - <(echo "your c... | I am having a crontab entry in my Python code describing which script should be scheduled in the UNIX remote server at the specified time.I am writing a Python script which will connect to the ssh using Paramiko, it will go to the specified crontab file path in the remote server -> open the crontab file -> add the cron... | How to edit crontab file present in the remote UNIX server using Python |
The main purpose of the branch is that you can leave the master untouched and stable, rather than having part-completed features that may cause issues. You could solve the problem with just one non-master branch for the current in-flight feature - delete all the old ones. You can avoid holding up a release working this... | I'm a single developer. I use git for my projects.For every single feature (Ex. Login/register pages), I create a new branch to implement itLater I merge that branch in my master.Now I have like 20+ branches and I feel like i'm doing it in the wrong way.Is git branches necessary for a single developer? | Is git branches necessary for a single developer? |
It is not possible to return unencoded binary data from a direct invoked AWS Lambda function.Per thedocs:If the handler returns objects that can't be serialized by json.dumps, the runtime returns an error.The reason you can do this with API Gateway is because API Gateway is performing the conversion of the base64 JSON ... | I'm setting up a function in AWS Lambda using python 3.7 and it won't let me return a bytes typePlease notice that this isnot an issue with API Gateway, I'm invoking the lambda directly.The error is :Runtime.MarshalError, ... is not JSON serializableoutput = BytesIO()
#Code that puts an excel file into output...
return... | AWS Lambda Python - Return BytesIO file? |
Can try reset the branch at just the beginning of the red box (older side /bottom) then cherry-pick remaining top commits after the red box (newer side/top).or Can try reset the branch at just the beginning of the red box (older side /bottom) then do rebase with interactive mode and skip the commit which you don't want... | I accidentally merged the develop branch to the main, I revert that using github but the change already applied to the main which is not meant and the develop branch seems like it goes backward for multiple commits.What I wanted is to remove the revert only (arrowed in the image) in the history and maintain the commits... | Can I remove the revert in git? |
There are several solutions on the web includin nginx and thin which is a good combination. Here is one that worked for me:http://blog.expertura.de/posts/17Also one very good but in german (of cause code is still correct):http://www.netzlogger.de/2010/02/rails-applikationen-mit-nginx-und-thin.html | I installed passenger, nginx (1.2.1) and Rails 3.2.3. However I keep using WebBrick as a server for Rails because I can't figure out how to make them work together. In other words, how to run a website, I'm working on, on nginx.Any suggestions? | Rails + nginx - work together |
The host file I was using was incorrect , as I was using git bash I vim into/etc/hostsbut actually the hosts file in windows isC:\Windows\System32\drivers\etcso I updated the host file with 127.0.0.1 marcel.test and it worked | Hi I have followedthis videofrom starting to end. Usingkubectl describeto show the Service that was created yields$ kubectl describe -n ingress-nginx service/ingress-nginx
Name: ingress-nginx
Namespace: ingress-nginx
Labels: <none>
Annotations: <none>
S... | do not get public ip while creating service load balancer |
Try this in your Root/.htaccessRewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/?([^/]+)/([^/]+)/([^.]+)\.php [NC]
RewriteRule ^ /%1/%3 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/([^/]+)/?$ /folder1/php/$2.php [NC,L]ShareFolloweditedJun 1, 2015 at 6:39... | I have searched all the similar topics in the forum and nothing helped me. Here is what I am looking for:
I have a site having a login url assite.com/folder1/php/login.phpNow I want to hide the "php" folder name from url, also remove .php extension so that it will look likesite.com/folder1/loginAlso the folder name "fo... | Redirect to a subfolder using htaccess |
The fix is planned for SonarQube 6.5 (see theticket). | I upgraded my SonarQube from 5.4 to 5.6 LTS then to 6.3.1 then 6.4
On the version 6.4, when I click on the dashboard, I only see the projects' names but no results are displayed.In addition I have a rotating frame of the project as if it loads.Plus, When I click on the project, I have 0 bugs, 0 vulnerabilities .... whi... | SonarQube upgrade to 6.4: cannot display tests results on the dahsboard |
You are currently in the detached HEAD state. The fix is easy, just checkout another branch, e.g. to return to themainbranch do:git checkout mainAs for deleting thefeature1branch, use the following:git branch -d feature1 # to delete the local branch
git push -d origin feature 1 # to delete the remote branch | My project has 2 branchesmainandfeature1. I merged them and then I tried to deletefeature1I thought the command wasgit checkout -d feature1, but it wasn't and now it saysHEAD is now at 71bgr8p (My latest commit message). And it shows that I'm in a branch((71bgr8p...)). When I typegit branchit says that the current bran... | Git I changed the HEAD by mistake, and don't know what to do |
All you are doing is storing a pointer in cache... The actual "table" is still on the heap, where all .Net reference types are stored... You are not making a copy of it...
The variable in cache just acts to stop the garbage collector from erasing the object on the heap...
and no, you don't want to call dispose unti... |
Simple case:
i put a DataTable in Cache
DataTable table = SomeClass.GetTable();
Cache["test"] = table;
then in later calls i use
DataTable table = (DataTable)Cache["test"];
now the question is: should i call table.dispose() on each call, though its stored in the Cache? Means the object is always the same? Or will Ca... | Do I have to call dispose after each use though datatable is stored in cache? |
1
Assuming 64-bit flags are in flags variable
if((flags >> 4) & 0x1)
return true; //page is dirty
I guess this logic should tell if a page is dirty or not
Share
Improve this answer
Follow
a... |
/proc/kpageflags. This file contains a 64-bit set of flags for each
page, indexed by PFN.
The flags are (from fs/proc/page.c, above kpageflags_read):
0. LOCKED
1. ERROR
2. REFERENCED
3. UPTODATE
4. DIRTY
5. LRU
6. ACTIVE
7. SLAB
8. WRITEBACK
9. RECLAIM
10. BUDDY
11. MMAP
12. ANON
13. SWAPCACHE
14. SWAPBA... | About /proc/kpageflags file |
Why do you believe it's a memory fragmentation problem? Fragmentation is typically caused by allocating and deleting a large number of blocks of varying sizes, resulting in holes of available memory in between allocations that are not usable or useful sizes. It does not sound at all like the pattern of memory access ... |
I have been developing my program using malloc() to allocate memory. However, my investigations made me think that I am facing a memory fragmentation problem.
My program needs 5 memory allocations of ~70 MB each. When I run my program using 4 threads, I need 5x4 memory allocations of ~70 MB each (and I cannot use less... | Fragmentation in C++ with big chunks of data (Windows) |
0
Foreman seems to be the culprit. I was facing a similar issue and I managed to solve it by creating new services in the docker-compose file for each service described in the Procfile.
Before:
web:
build: .
entrypoint: ./entrypoint-dev.sh
command: bash -c "bundle exe... |
Developing a ruby on rails app with foreman, docker, pry.
Checked this article already.
How to debug a rails app in docker with pry?
I usually use docker-compose run --service-ports web to debug with binding.pry.
But with foreman, docker-compose run --service-ports web does not work.
docker attach works, but its not u... | How to debug a rails app in docker with pry and foreman? |
So I managed to answer my own questions in the end - here's what I did.
My website is going to be something to showcase a different project I am working on. I could have hosted the website from a /doc directory or gh-pages branch in my project repository and then set up a custom domain from there.
However, there was a... |
I am aware that on GitHub you can create a repository, <username>.github.io, which will be a personal website. I also understand you can link custom domains to this, so example.com would show the website in your GitHub repo.
I have a couple questions though.
At the moment, I have a GitHub project - let's call it FooPr... | Link custom domain to any GitHub repo |
This usually isn't worth the trouble, as the operating system will take care of this for you.All modern operating systems will use unused RAM as"buffer cache" or "page cache". Recently used file system data will be stored there, in RAM, so once a file has been loaded into memory any subsequent reads will be served from... | According tothis questionexpress.static reads files from the harddrive every time. I'd like to cache served files in memory, since they won't be changing, there aren't many and I have plenty of memory to do so.So for code such as this:// serve all static files from the /public folder
app.use(express.static(path.join(__... | How do I cache files served with express.static in memory? |
12
goto Terminal in android studio and type below command –
git remote rm github
Share
Follow
edited Feb 19, 2019 at 10:01
slfan
9,030115115 gold badges6767 silver badges8181 bronze badges
... |
I'm getting this GitHub error in android studio whenever I'm creating a new repository , And I'm not having any GitHub repo. of the same name.
| remote with selected name already exist Android studio , git hub error |
The lifecycle-action-token is provided by Auto Scaling in the message sent as part of processing the lifecycle hook. You need to get the token from the original message.If this is a CodeDeploy hook in your Auto Scaling Group, that message goes to CodeDeploy. You can't manually close the Auto Scaling lifecycle action in... | aws autoscaling complete-lifecycle-action --lifecycle-action-token ???????? --lifecycle-hook-name ReadyForSoftwareInstall --auto-scaling-group-name --lifecycle-action-result CONTINUE | Where can I get a lifecycle-action-token for aws autoscaling complete-lifecycle-action? |
pruneis the best you get, and will need to be automated on every node through something else, as the Swarm internals won't do it for you, yet.But with Services, and a Bash one-liner and global mode, it's a easy fix:90% of the time it's the old images that are taking up space, and since we're using Swarm we wouldn't wan... | is there a way to instruct docker swarm to automatically run garbage collection and remove all dangling images and containers? I rundocker stack rm STACK_NAMEand redeploy the stack but this keeps unused objects. I know I can rundocker pruneto do the cleaning but is there a way to instruct docker to do so automatically?... | how to delete unused docker images and containers automatically? |
EDIT This method solved my problem:
Hold Windows button + R
Type in %TEMP%
Delete the entire content of temp.
|
I've recently upgraded from windows 7 to windows 10 and when installing GitHub desktop, I'm getting the following error:
"Application cannot be started, contact the application vendor."
When I click on details, there is the following error:
"Unable to install this application because an application with the same id... | Error installing GitHub desktop "Application cannot be started, contact the application vendor." |
That's pretty simple:0 0 0/6 * * ?This will fire at 0:00, 6:00, 12:00 and 18:00. If you want a different offset time, e.g. first invocation at 3:45:0 45 3/6 * * ?Check outJavaDoc ofCronTrigger. But in your case a simple trigger will be... well, simpler:trigger = newTrigger()
.startNow()
.withSchedule(simpleSchedule... | i want to run myQuartzjob 4 times all day and i am using cron job to trigger my job and have provided value in xml. Please let me know theQuartz Expressionso that i can trigger my job 4 times all day. | Quartz Scheduler trigger 4 times a day |
12
When building a Dockerfile you would create an image. But you can't create an image with an already running ssh daemon or any running service else. First if you create a running container out of the image you can start services inside. E.g. by appending the start instruc... |
I am having a weird problem.
I am not able to ssh to docker container having ip address 172.17.0.61.
I am getting following error:
$ ssh 172.17.0.61
ssh: connect to host 172.17.0.61 port 22: Connection refused
My Dockerfile does contain openssh-server installation step:
RUN apt-get -y install curl runit openssh-serve... | openssh-server doesn't start in Docker container |
Those are digests of image layers. The same image might be tagged with different names. But the SHA256 digest is a unique and immutable identifier you can reference.If you pull an image specifying the digest, you have a guarantee that the image you’re using is always the same.The more details can be found in docs, here... | If I dodocker inspect {img}, I will get a list of many sha256s. What does each of these sha mean? Here's a list of all the shas fromdocker inspect ubuntu:16.04:"Id": "sha256:0ef2e08ed3fabfc44002ccb846c4f2416a2135affc3ce39538834059606f32dd""RepoDigests": ["ubuntu@sha256:dd7808d8792c9841d0b460122f1acf0a2dd1f56404f8d1e5... | What does each sha mean in a docker image |
It looks like you've supplied double '-' characters to the -m argument. Remove one of the dashes and try again. Post the output from git status if it does fail again.
EDIT: not sure if it's a double dash or just an overly "helpful" font. Are there any files in the directory to actually commit? What got staged when you... |
After install github, and trying to set it up for the first time, I type
git init
and everything's fine. Then I type
git add .
and again, no errors.
However, when I get to the step
git commit –m "first"
It results in the following errors
error: pathspec '–m' did not match any file(s) known to git.
error: paths... | After install github, errors trying to create a commit |
Object instance represents the state of the instance you allocated. So it holds a copy of all fields and properties you define inside corresponding type.
Methods that you define for a given type stay in another data structure, out from the instance itself, called Method Table. Every single instance you allocate has ... |
This question is about .NET but I think it applies generally. When a new object is instantiated, are the functions in that object allocated memory too? Even if they are not called till a later point?
Put differently, will two classes with same member variables but one with more methods inside it occupy more memory at ... | Is separate memory allocated for functions and properties of an object? |
If you don't need theWithCronSchedule, I suggest usingWithSimpleSchedule.ITrigger trigger = TriggerBuilder.Create()
.StartNow()
.WithSimpleSchedule(x => x
.WithIntervalInMinutes(5)
.RepeatForever())
.Build(); | I have a schedule should run in every 5 minutes. Below is my Quartz scheduling source code.IScheduler sched = container.Resolve<IScheduler>();
sched.JobFactory = new AutofacJobFactory(container);
sched.Start();
IJobDetail job = JobBuilder.Create<ProcessInvoiceJob>()
.WithIdentity... | Cron trigger with Quartz run in every minute |
You can deny an ip in csf as below but need to refresh csf because every service apply changes after restart or refresh.Deny IPcsf -d IPaddressRefresh:csf -r | Closed.This question isnot about programming or software development. It is not currently accepting answers.This question does not appear to be abouta specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic onanother Stack Exchan... | CSF Firewall: how to block IPs without restarting CSF [closed] |
1
Docker containers share the host's kernel and some other implementation details like the iptables setup. Containers usually can't install or configure kernel modules and depend on the Docker runtime to fully manage their network environment for them.
For your application... |
In my research, I deployed a number of containers which used a kernel module (named Ipfw3, actually a firewall) loaded on the host machine. This led to a confliction when those containers update their rules on Ipfw3 at the same time. Is there any way to make the Ipfw3 independent on each container? I mean those contai... | Is it possible to isolate a module kernel in containers powered by docker? |
Suposing your module in android studio is called "library" you can simply add the module to your app project locally without the need to upload it to bitray.
You can add a local module as a depedency to your project using AS or manually:1) Using AS:Go toFile -> Project structure. Click on the app module and then depede... | I have an Android app but require to create two Different copies of it with different package names. The reason for wanting two package names is that I want to upload them to two different Stores which requires the developer to provide a different package name.To simplify the update process and fixing the issues I thou... | How To Upload Android Library For Private Use Only? |
Pull Requestsare GitHub specific and can only be done within a repo or amongst repos in GitHub. It is not possible to setup a pull request from a local repo to one on GitHub.Since you are using your repos as gates where you perform some valiadation, I would suggest having another repo on GitHub to which you push to and... | I have a repo on GitHub, but I do all my dev on local repos, and push to a local server when ready for server testing, and only push to GitHub when "live"But what I want todo is, push to local server to test and rather than push to GitHub, I would rather send GitHub a pull request, to pull from my serverIs this actuall... | Send pull request to GitHub |
As pointed out by @Mark B, the AWS Database Migration Service can migrate data between databases. This can be done as a one-off exercise, or it can run continuously, keeping two databases in sync.
The documentation shows that Amazon Aurora can be a source and Amazon Redshift can be a target.
|
I am trying to setup a sync between AWS Aurora and Redshift. What is the best way to achieve this sync?
Possible ways to sync can be: -
Query table to find changes in a table(since I am only doing inserts, updates don't matter), export these changes to a flat file in S3 bucket and use Redshift copy command to insert ... | Sync data from Amazon Aurora to Redshift |
kubectl describedoesn't support-oor equivalent. It's meant to be human-readable rather than script-friendly. You can achieve what you described withkubectl get pods -l <selector_of_your_rc> -o <output_format>, for example:$ kubectl get pods -l app=guestbook,tier=frontend -o name
pod/frontend-a4kjz
pod/frontend-am1ua
po... | kubectl getcommand has this flag-oto format the output.Is there a similar way to format the output of thekubectl describecommand?For example:kubectl describe -o="jsonpath={...}" pods my-rcwould print a JSON format for the list of pods inmy-rcreplication controller. But-ois not accepted for thedescribecommand. | How to format the output of kubectl describe to JSON |
I recommend you to use tool like LENS to have a GUI to have a clarity on what is going on in K8S cluster.Also you can use kubectl get events to know the history of events happened along with age of event,pod info , etc. It can help you to know for what reason the old container has been terminated. | My k8s pod gets terminated/crashed sometimes and restarts automatically. When I try to see the old log to debug for the crash, I get the below error. If terminated container not found, then how can I get the log and debug the crash in this case?My pod has only one container inside it./home/ravi> sudo kubectl logs -p my... | unable to get restarted/crashed pod's log from previous option |
All memory accesses from the CPU go through the MMU; the speed does not depend on the actual location of the pages in physical memory.Physically contiguous memory is needed for other devices that access memory but are not able to remap pages.
In that case, the contiguous allocation is needed to make the device work to ... | What's the benifit of allocating a chunk of contiguous physical memory?Is it faster when access the contiguous physical address than virtual address? And why? | Is it faster when access the contiguous physical address than virtual address? |
You must not delete the newly created node in the addEnd function because it will be used later. The nodes should be deleted when the list is thrown away. (maybe in the destructor and/or something like clear() function).
Also note that the delete temp; in your code is meaningless (no gain, no harm) because temp is set... |
void addEnd(T data) {
if (head == NULL) {
Node<T> *temp = new Node<T>(data);
head = temp;
tail = temp;
temp = NULL;
delete temp;
++size;
} else {
Node<T> *temp = new Node<T>(data);
tail->LinkToNext(temp);
temp->LinkToPrev(tail);
tail = temp;
te... | C++ Double Linked List, should I delete the nodes after dynamically allocating them? |
Use 2 different .htaccess files. One in the root for the root 404 and one in the sub directory also look into rewrite conditions, there may be a condition you can apply its similar to if-else in other languages. Maybe you can do something like the equivlent of if root show this, else show that. I don't know for sure th... | I'm trying to use 2 separate 404 pages depending on what directory the user is currently in. I thought you could do this with an .htaccess file in the directory however it's not working. Is this even possible?Example: user is looking at a document in www.domain.com. This directory should use number1_404.html.Example2:... | Use 2 different 404 pages dependent on directory |
I would say no.As you may not want to constrain an historical value.Why do you need and Id on and audit table?I go one step further and put Ref1Value and Ref2Value (not ID) so I can change it and record the value in history that it was at that time. | I am new to database designing and I am designing a system which creates an identical audit record on every insert, update and delete.Below is the design ofMyTableandMyAuditTableRefId1, RefId2 (both integers) in "MyTable" are reference keys to other tables, with enforced referential integrity.Do I need to have RefId1, ... | issue designing audit table to track changes |
Includes without any excludes are meaningless.
--exclude='*' would exclude everything not explicitly included, from every subfolder, even the included ones.
--exclude='*/' would exclude every directory not explicitly included, but allow copying files within included directories (and the root).
--exclude='/*' would ex... |
I am trying to backup some of the essential folders in the / in my ubuntu system. I am using
sudo rsync -aAXv --delete --include="/etc" --include="/home" --include="/usr/local" // /home/$USER/Desktop/bkup/
This command should only copy /etc, /home, /usr/local dirs and leave the rest of the files. But, when I run thi... | rsync backs up everything |
1
All of this got too confusing.
I just did what I said in the start of the thread.
It seems GitHub Desktop has some Username/Password problem and won't let me "Publish branch".
So I went to GitHub and created a new repository and uploaded all the files from my local folder... |
I created my first GitHub repository using GitHub Desktop (Windows). It is a real mess with many revisions that are quite meaningless and some versions of files that I would rather were never uploaded. This was the result of a lot of experimenting to get the feel for how things would appear on GitHub. I want to get ... | Make the current commit the only (initial) commit in a Git repository that was created with GitHub Desktop |
If you're receiving the PHP errorFatal error: Allowed memory size of ### bytes exhaustedthen that means the single thread ran out of memory - regardless of any other processes. The memory you set for PHP (memory_limit) isn't divided amongst the running processes or anything like that. That amount is reserved for each i... | I've made a CSV parser but sometimes it returns a memory exhausted error. The CSVparser consists of a jquery loop that starts multiple php files with ajax to parse a file. Some of the files return the error and i was wondering if this has something to do with the files running at the same time. So my question is, can i... | memory exhausted php, does this happen because of 1 file or is it possible it happens because i run multiple files at the same time? |
There's far too many unknowns to make such an endeavour worth it. You don't know the route data has taken before it got to you, and where copies have been left in memory but not scrubbed, etc.
If you followed any of the news about iPhone security in the last year, you'll see it's a got a pretty bad rep at the minute -... |
My app temporarily stores a lot of sensitive data and I want to overwrite the data in memory again.
I found a post earlier suggesting this:
char* block = malloc(200);
NSString* string = [[NSString alloc] initWithBytesNoCopy:length:encoding:freeWhenDone];
//use string
memset(block, 0, 200);// overwrite block with 0
[s... | iPhone NSString overwrite sensitive data with zeros |
This ended up being a version incompatibility between the version of JaCoCo that I was running and the version of SonarQube (4.5.4). Upgrading SonarQube solved the issue. | I'm using the Gradle plugins for JaCoCo and SonarQube yet when I executegradle clean jacoco sonarqubeI get an error statingINFO - Analysing ${buildDir}/build/jacoco/test.exec
WARN - Coverage information was not collected. Perhaps you forget to include debug information into compiled classes?build.gradleplugins {
id... | SonarQube plugin not finding JaCoCo results |
You can use the gitlogto view the commits in your repository. This will allow you to see if the commits that you think werepushed truly were$ git fetch # Make sure you're up to date with the remote
$ git log --oneline --graph --decorate --all -20That will show you the last 20 commits made to your repository. You said... | I committed this morning on my own pc at home. And now I am using an university pc. I tried git pull and git merge but nothing happened. It says up-to-date but it is really not.So the origin branch(which can be viewed online), also is the parent branch to the branch on this university pc. It has been changed after the ... | git repo up-to-date but it is really not |
RewriteRule ^home-2016/(.*) / [R=301,NC,L]This rule already does as you require, but it would seem you were putting the rule in the wrong place. Redirects like this would need to go near the top of the.htaccessfile,beforeany existing rewrites (like a CMS front-controller pattern).However, this rule can also be simplifi... | How can I redirect all of the sub pages that include a particular path (/home-2016/) back to my home page? I am using the below code in my .htaccess file, but it is not working. I can't seem to find a solution.I want to redirect the followinghttps://www.example.com/home-2016/tohttps://www.example.comhttps://www.exampl... | Redirect Page Path to Homepage using .htaccess |
As the other answer states,formidableis a very solid library for handling uploads. By default it buffers to disk, but you can override that behavior and handle the data as it comes if, if you need. So if you wanted to write your own proxy, node.js + formidable would be a great way to get uploads to stream as they com... | I've already foundEvent loop for large files?, but it's mostly about downloads. The conclusion I take from that post is node.js might have been adequate for downloads, but Nginx is a battle-hardened solution that "ain't broke."But what about uploads? We have enormous files being uploaded. We do genomics, and human g... | Replacing Nginx with node.js for the import of large files? |
As you can readhere, it currently supports onlyClientIPandNonevalues.sessionAffinitystringSupports "ClientIP" and "None". Used to maintain session affinity. Enable client IP based session affinity.
Must be ClientIP or None. Defaults to None. More info:https://kubernetes.io/docs/concepts/services-networking/service/#v... | First of all request goes to proxy service that i've implemented, service forwards request to pods randomly without using sessionAffinity. I want to send requests to same pod based on custom value that i've set in request parameters using post method. I've used sessionAffinity with my service yml.Here's service yml wit... | Is there a way to provide custom value other than ClientIP for sessionAffinity in kubernetes? |
You do not "reinit" objects — ever. Initialization is meant to be used on a newly alloced instance and might make assumptions that aren't true after initialization is complete. In the case of NSMutableDictionary, you can use setDictionary: to completely replace the contents of the dictionary with a new dictionary or a... |
In the following code:
//anArray is a Array of Dictionary with 5 objs.
//here we init with the first
NSMutableDictionary *anMutableDict = [[NSMutableDictionary alloc] initWithDictionary:[anArray objectAtIndex:0]];
... use of anMutableDict ...
//then want to clear the MutableDict and assign the other dicts that was ... | NSMutableDictionary, alloc, init and reiniting |
You generally shouldn't do custom URL rewiting in Wordpressunless you do it the Wordpress way. Wordpress usually reroutes all requests to index.php and then loads the proper content based on the url. Custom rules might interupt this process and cause no content to load at all.The categories, by default, should appear l... | I'm trying to make a Wordpress rewrite rule and it is the first time I do this. I have got some results, but not the ones that I expected.In my website, I have a blog with many categories (beauty, travelling, etc.). The URL without rewriting is the next one:http://mywebsite.com/blog/?cat=10 //where 10 is the category o... | Wordpress rewriting URLs |
you can't launch twicedocker run -d -p 49160:22as this means you want to allocate the port 49160 on the host twice, of course, the second time, you get you error message, try for the second rundocker run -d -p 49161:22 | I use Docker for running Oracle 11g Express on macOS Sierra 10.12.2https://github.com/wnameless/docker-oracle-xe-11gThis is my error:Last login: Sat Jan 7 22:42:11 on ttys000
➜ ~ docker run -d -p 49160:22 -p 49161:1521 wnameless/oracle-xe-11g
docker: Cannot connect to the Docker daemon. Is the docker daemon running o... | failed: port is already allocated |
As I see in your docker-compose file, you use thebuildoption like below:version: '2.1'
services:
proxy:
image: proxy
build: .
environment:
NODE_ENV: production
ports:
- 3000:3000But in Azure Web App, it does not support thebuildoption currently, so when you deploy it from the Github with ... | I am trying to deploy node.js containerized app to Azure App Services from my GitHub and getting the following error: npm ERR! enoent ENOENT: no such file or directory, open '/home/site/wwwroot/package.json'. This is a link to my GitHub project:https://github.com/dukeace2005/proxy.gitWhen I create docker image manuall... | CI/CD to Azure AppService fails with ENOENT: no such file or directory, open '/home/site/wwwroot/package.json' |
Everything solved with thesudo crontab -u username -ecredits to 9000 | I have a call to a python script that issudo -u user_name python python_scipt.pyand I need to schedule it to run every 30 minutes with crontab. The problem is how can I authenticate it with sudo on crontab? | Authenticate with sudo on a crontab job |
What you're attempting to do (detect mutability of an arbitrary object), I don't think can be done. Even if it could, through some reflective acrobatics, it still seems a bad idea.If you control theProcessingStrategyinterface or its implementors, perhaps you can use a method,isStateless(), or a subinterface,StatelessP... | I'm implementing an object cache:void cache(String request_type, String request_id, ProcessingStrategy request_strategy)
{
if (no_state(request_strategy) == true)
map.put(request_type, request_strategy);
else
map.put(request_id, request_strategy); //no chance of keyspace collision
}
ProcessingS... | Detect if an object stores state or can be shared |
You can use docker/client
https://godoc.org/github.com/docker/docker/client
Example code:
# listcontainers.go
package main
import (
"context"
"fmt"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
)
func main() {
cli, err := client.NewClientWithOpts(client.FromEnv)
... |
I use golang to develop application . I want get container in application.I hava tired by shell.But I want to get container by go. thanks
| How to get container ID by golang |
First, just remove this line:return 404; # managed by Certbotwhich causes 404 error to be returned.If it doesn't help, change whole this block:server {
if ($host = www.mydomain.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name www.mydomain.com;
retu... | I have a http website (with Flask and nginx) which is up and running. I'm trying to install ssl withcertbotand following their steps leads to a successful installation message (congratulations...) but refreshing my webpage leads to404 Not Found nginx/1.18.0 (Ubuntu).
This is thenginx.conffile aftersudo certbot --nginxs... | nginx page not found error after certbot installation |
Tagging each individual rule is currently not supported. You can tag using CLI like:aws elbv2 add-tags --resource-arns <rule arn> --tags 'key=<name>,value=<something>' | I've successfully deployed an ALB Ingress Controller in my Amazon EKS cluster, and it's performing well in creating ALB groups with associated rules.However, I'm currently facing a challenge in specifying tags for individual listener rules. While I've discovered an option to add tags to the ALB itself using thealb.ingr... | ALB Ingress annotation - how to add tags for listener rules? |
At an initial glance without getting deep into both it can cause confusion, but I'll try to break them down below.AWS Billing and Cost Management provides a summarised view of spending i.e. what you spent so far this month, and the predicted end of month bill, this is quite static and gives you a high level overview of... | Closed.This question isnot about programming or software development. It is not currently accepting answers.This question does not appear to be abouta specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic onanother Stack Exchan... | What is the difference between AWS Billing and Cost Management and AWS cost explorer? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.