Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
You can set an environment variable in your crontab. A line like IS_CRON=1 can be placed at the beginning of your crontab, then check in your php program for get_env("IS_CRON") == 1.
Of course, you should also use file permissions as they're not so easily bypassed. If this is run as part of root's cron, chown root:r... |
How can I ensure a user can not run a PHP script and that it is only ever run as part of a cron job?
| Ensure a PHP script is only ever run as a cron job? |
-vvolume parameter expects path to be absolute.You need to pass full path to the folder like:/var/share/Volumebut not just relative path you did justVolumeI use this trick when need relative path-v $(pwd)/Volume:/data/Volume | Hello I have problem with sharing resources with docker.
I got folderDocuments/Volume/In folder Volume I have file data.txt
Now when I run image like this:docker run -v /Documents/Volume:/Volume -it busyboxI would expect that in folder Volume I will see file data.txt but file is missing.
So I create new file in folder ... | Docker shared folder with Linux |
I don't know if it's necessarily the best way to do it, and I haven't tested it extensively, but I would do something along these lines (assumptions - the branch you want to copy from is calledmybranch):1) In your current repository, create a new orphan branch, containing the contents of the first commit you want to co... | I recently joined a project that has a github repo with a branch that is effectively a fresh start of the entire source tree. I'd like to copy that one branch, starting from just from just that "new source tree" commit, to a new repo, without any remnants of the old source tree lingering in the repo (allowing for the ... | How do I transfer a partial history from a git branch to a new repository? |
I faced similar issues withk3s(v.v1.19.3+k3s3) oncentos8 (not quite sure it has anything to do with the images' OS, though).k3sis a bit less plug and play that other distro likemicrok8s.Use local DNS parameterOn each node, you could say that you want to use the host's resolv parameters. Ifk3sis managed assystemd servic... | I am facing strange problem.What I've done:I deployedRancher K3Scluster and there is a problem in dns resolving with debian based images. Domains are not resolved properly - it adds suffix to it with one of ours domain.What I've found:Debian based imageadds suffix with domain to the end. e.g. I ping google.com and its ... | K3S Rancher - Debian based docker images not resolving dns properly |
To expose a docker application to the public without using compose or other orchestration tools like Kubernetes, you can use the docker run -p hostPort:containerPort option to expose your container port. Make sure your application is listening on 0.0.0.0:[container port] inside your container. To access the service ex... |
I have a web application running in a docker container on production server. Now I need to make API requests to this application. So, I have two possibilities:
1) Link a domain
2) Make requests directly by IP
I'm using a cloud server for that. In my previous experience I linked the domain to a folder. But now I don't ... | How to publish a web site running in a docker container on production? |
Within the container, you have to point to the config file in the mounted volume, so change config_parser.read("C:/dags/file.ini") to config_parser.read("/usr/local/airflow/dags/file.ini").
|
I am running airflow from a docker image called puckel/docker-airflow.
I synchronized my local dags folder with container airflow folder when I started the container using following docker command:
docker run -d -p 8080:8080 -v <local_path>:/usr/local/airflow/dags puckel/docker-airflow webserver
On my DAG I have a Py... | Reading files on local machine from docker container |
After trying the to use the extends option of the docker-compose file and differing variations of its usage I consistently received an error indicating that extends is not supported even after updating to the latest docker version. I did however solve the problem by running this command.
docker-compose -f /path/to/ot... |
I have looked at the docker docs for the answer to this question and I dont see it being laid out simply anywhere. I want to start my app in a docker using docker-compose.yml I want that docker-compose.yml to start up other containers defined in another docker-compose.yml file in a different project.
version: '3.4'
#... | How to run a dockercompose file from another dockercompose file? |
3
This should go in your ~/.ssh/config file on the machine that you're doing the git clone:
Host github.com
IdentityFile ~/.ssh/my_another_private_key_file
If you're doing the clone on the server and the my_another_private_key_file is on local, you might want to add put ... |
I am "trying" this in server:
# ~/.ssh/config
Host github.com
IdentityFile xxxx
What should I put in xxxx so when I do in server:
git clone [email protected]:myuser/myrepo.git
Git uses a identity in my local, NOT in server, which is located in ~/.ssh/my_another_private_key_file and not uses the default key ~/.ssh/... | Select SSH identity file when in a session with agent |
Very comprehensive documentation is here:Docker - sonarqubeEspecially best practices are mentionned in sectionAdvance Configuration.When you need additional plugins, the best practice is to mount dedicated directory, where plugins are located. This saves you maintenance of the docker images, when updating any plugin.Th... | I want to (un)install some SonarQube plug-ins and load a quality profile xml file all within a Docker container.My approach so far is this (part of my Dockerfile):RUN set -x \
&& apk add --no-cache unzip curl \
&& curl --tlsv1 -o sonarqube.zip -fSL https://sonarsource.bintray.com/Distribution/sonarqube/sonarqub... | How to configure SonarQube in a Docker container? |
Well, the final answer to my question isn't going to help everyone that encounters this, but some of my coworkers also encountered this months later on a different system with a different product. The laughed when they found my post here on SO months later and wondered if I actually had solved it or not, since no solu... |
This is a really crazy bug. The following is throwing an OutOfMemoryException, for XML snippits that are very short and simple (e.g., <ABC def='123'/>):
public static T DeserializeXmlNode<T>(XmlNode node)
{
try
{
return (T)new XmlSerializer(typeof(T))
.Deserialize(new XmlNodeReader(node));
... | OutOfMemoryError calling XmlSerializer.Deserialize() - not related to XML size! |
Here is the simplest solution I've found:
1) Log in to your gitHub account on github.com
2) In the main tab click on Settings
3) From the main navigation of Services find Email and click it
4) Fill in your email address in field Address
5) Check the checkbox Send from Author
6) Check the checkbox Active
7) Click on Up... |
I am used to subversion, where the collaborate group would receive an email whenever someone commits.
Is there a similar feature on GitHub, so the people working on the repository receives an email whenever a user pushes their changes?
| Receiving emails on GIT push |
It goes over the internet. And the reason is that your function must invoke a public lambda endpoint:
To connect programmatically to an AWS service, you use an endpoint.
This is the same reason why if one lambda is in a VPC, it can't invoke second one without NAT - can't access lambda public endpoint.
|
I have a lambda which needs to call another lambda in the same account. It could be in the same region or multiple regions. The call is direct lambda call invokeLambda. And both lambdas are not in VPC. I don't know whether the call is going through internet? Or the call is just inside internal network.
| Does a lambda call another lambda go through internet? |
There's not much benefit to using Nginx with Kafka beyond the initial client connection. In other words, yes, you can usestreamdirective, in theory, fortcpreverse proxy, and pointbootstrap.serversat it, but Kafka will return itsadvertised.listenersafter that, and clients then bypass Nginx to communicate directly with i... | I have elasticsearch, filebeat and kibana behind NGINX server and all three of them uses ssl and basic authentication of Nginx reverse proxy. I want to place kafka behind NGINX as well. Kafka is communicating with filebeat. Is there any possible way that filebeat (with ssl) and kafka (without ssl) can communicate?I mea... | Putting NGINX in front of kafka |
After the call from the scanner client completes, SonarQube executes a "background task" in the project that finalizes the computations of measures. When the background task is complete, your measures will be available. This is why adding a "sleep" appears to work for you. In reality, it's just luck that you're slee... | SonarQube: Enterprise Edition Version 9.2.4 (build 50792)
Sonar client: 4.7.0.2747Scan is launched for merge request in gitlab. I am requesting coverage for pull request.Imidietly after scan (using scanner client) is finished I try to get coverage by following call:
http:///api/measures/component?metricKeys=coverage&co... | Sonar Api: After scan is finished on new pull request it’s not possible to get /api/measures/component?metricKeys=coverage |
Hypens are not valid in Prometheus metric names, use underscore instead. | I am trying to use promethues for reporting executes Hystrix commands for mongo db,Everything is working fine except promethues not able to understand below line and shows the target state as down.# HELP rideshare-engine_hystrix_command_latency_total_percentile_995 DEPRECATED: Rolling percentiles of execution times for... | Prometheus : Text format parsing error in line 1696: invalid metric name in comment |
I can answer my own question (after several hours of looking in completely the wrong place). A good readup onAuthlogic::Session::Configdid the trick.class UserSession < Authlogic::Session::Base
allow_http_basic_auth false
end | I am in the early stages of building an app using Rails 3. User authentication is powered by Authlogic which I have setup pretty much as standard (as per the example docs) and everything is working as expected locally.I have just deployed the app to a clean server install of Centos 5.4 / NginX / Passenger so staff can ... | Rails 3, Authlogic, NGINX and HTTP basic authentication no working nicely together |
When you write:run: build
docker run -v $(CURDIR)/project:/project app-serverin a makefile make expects that that recipe will create a file by the name ofrun. make will then check that file's timestamp against the timestamp of its prerequisite files to determine if the recipe needs to be run the next time.Simil... | I playing with Docker and make utility and try to write rule which rebuilds docker image only on Dockerfile change.My project structure looks like:tree .
.
├── Dockerfile
├── Makefile
└── project
└── 1.jsMy Dockerfile is pretty simple:FROM ubuntu
RUN apt-get update
RUN apt-get install -y curl
RUN curl -sL https:/... | Docker with make: build image on Dockerfile change |
You are probably seeing the container memory used and not the heap size, there are other thingsin the JVMlike the GC that require memory. Although,3.2Gseems a bit excessive for that heap 😲, so you might want to check 🔬 that the logstash JVM does indeed have those heap options.$ kubectl exec -t <pod-name> -c <containe... | I am running a logstash Kubernetes pod, I have set LS_JVM_OPTS := -Xmx1g -Xms500m, and monitoring the same using Prometheus grafana, I see memory usage 3.2 Gig. May I know what is happening here? | How to differentiate between RAM and heap usage in logstash? |
Yes, Redis can be safely deployed to a K8s cluster and serve in production. Please note that K8s under the hood is doing very similar things to your current Docker installation, only that container-, storage- and routing-orchestration is automated.In order to install Redis, I recommend using theHelm Chartfrom Bitnami. | Currently we are running our sentinel based redis deployment as docker containers. So far docker containers are working fine but as part of our new enhancement we are moving all our services to Kubernetes (K8S).I am not sure if K8s is officially supported for Redis or not. Please suggest if we can do this in producti... | Migrating Redis to Kubernetes from docker containers |
Go to cpanel->PHPConfig and enable FastCGI , it will work like a charm :)ShareFollowansweredNov 5, 2014 at 17:39AslamAslam9,48444 gold badges3636 silver badges5252 bronze badges0Add a comment| | I have uploaded my application on bluehost server. I have uploaded it on public_html.htacces on root
/.htaccess permission 644<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>/app/.htaccess permission 644<IfModule mod_rewrite.c>
... | 500 error on bluehost server for CakePHP application |
I changed the policy "Retain" to "Recycle" and the volume now is able to be recreated.kubectl patch pv kafka-zk-pv-0 -p '{"spec":{"persistentVolumeReclaimPolicy":"Recycle"}}' | I am trying to delete a persistent volume, to start form scratch a used kafka cluster into kubernetes,i changed the Retain mode to Delete, it was Retain.But i am not able to delete two of the three volumes:[yo@machine kafka_k8]$ kubectl describe pv kafka-zk-pv-0
Name: kafka-zk-pv-0
Labels: type=lo... | host_path deleter only supports /tmp/.+ but received provided /mnt/disk/kafka |
I suggest creating separate remotes rather than changing the URL fororigin. For example, you can dogit remote add bitbucket <URL for BitBucket repo>
git remote add github <URL for GitHub Repo>Now you can pull and push from each remote as you wish. For examplegit checkout master
git pull bitbucket master
git push github... | So I have an Android Studio project that I have on Bitbucket that I'm having trouble moving to Github. So far I've imported the project to Github using its import feature and changed the origin using "git remote set-url". Now every time I try to push & commit using Android Studio I get the error "fatal: Could not read ... | How to transfer git repo from Bitbucket to Github in Android Studio? |
For an updated answer, using1.2.1I was able to remove repos from my drone list by using the API to delete from the db.curl -X DELETE "https://drone.website.com/api/repos/owner/repo?remove=true" -H "Authorization: Bearer token" | i want to remove github repo from my drone ci v0.3 ( standalone ), but i have a problem with authorizing with github. In 0.3 version you could did with./drone delete github.com/foo/bar, but i get such error./drone delete github.com/foo/bar
UnauthorizedThe problem is that 0.3 version is outdated and documentation is l... | How DELETE github repo from drone ci |
To reverse proxy, you need to use thePflag:RewriteRule ^/?products/(.*)$ http://127.0.0.1:9000/$1 [L,P]You need to have mod_proxy loaded for this to work, otherwise it'll redirect the browser instead.ShareFollowansweredNov 13, 2013 at 5:06Jon LinJon Lin143k2929 gold badges221221 silver badges220220 bronze badgesAdd a c... | I'm using an apache HTTPD server as a front, and want to redirect certain urls to another server running locally.For instance I want:http://www.example.com/index.phpto load the file located at/var/www/index.phphttp://www.example.com/products/*proxied to another local server & url, e.g.http://127.0.0.1:9000/I'm trying t... | Apache HTTPD: Proxy url pattern to another server |
When you pass an argument into a function, the function always works on a copy of that argument.
So in your case, load_lines is working on a copy of _array. The original _array is not modified:
char** _array = NULL;
printf("%p\n", _array); // Prints "0x0000"
line_number = load_lines(inname, _array);
printf("%p\n", _a... |
I have a function that scans a file and returns the number of the lines along with the lines in a string array, my function looks like this :
int load_lines(char* _file, char** _array){
FILE *infile;
char line_buffer[BUFSIZ];
char line_number;
infile = fopen(_file, "r");
ine_number = 0;
while... | Allocate a string array from inside a function in C |
This answerwill help you. My understanding is that Cron runs everything relative to itself, so you should always use absolute paths when running something from Cron.Good luck, and happy holidays! | As a customer in Plesk, I am attempting to run:php -q /httpdocs/_external/export/test.phpFrom this tutorial:http://daipratt.co.uk/crontab-plesk-php/I'm receiving the error"php: command not found"Is there something I need to enable from the main user or a different command I would need to use to run the script?(also tri... | Running PHP script with Crontab (Plesk / CentOS6) |
You can solve the issue by explicitely boxing theintinto anInteger:if (Integer.valueOf(1).equals(myObject.getIntegerAttribute)) { // <-- explicit box
// ...
}This will handle correctly the case wheremyObject.getIntegerAttributeisnullby returningfalse.Note that this does not create any overhead: declaringInteger val... | I'm using Sonarqube to analyze my Java code, and I'm getting several issues with the message:String literal expressions should be on the left side of an equals comparisonThis is easy to solve with strings, flipping the order to avoid possibleNullPointerExceptions//From this:
myString.equals("otherString");
//To this:
... | Sonarqube saying "String literal expressions should be on the left side of an equals comparison" for non-String types |
Working off of @kba's comment, here's a solution that works:You can enable sparse checkout for a repo with the following command:git config core.sparsecheckout trueThen edit the repository's.git/info/sparse-checkoutfile to be:/*
!README.mdwhich essentially says "checkout everything, except any file namedREADME.md". The... | How can I excludeREADME.mdfrom all sync/pull/push github requests? I wish to download/sync all filesexceptthat file.Context: I have a repo forStreakyCobra style dotfiles management. I would like to add some notes toREADME.md(showing up on github), but wish to avoid having the file in$HOMEon my computer. | Github: avoid syncing/pulling README.md |
I was able to find the list of deprecated checkstyle rules by selecting appropriate repository and Status ="deprecated" under My Quality profile. Some of rules were missing because the database was corrupted. Its all good. | I am working on an effort which tests sonar upgrade from 3.4.1 to 3.7.4 and some of our custom Regexp checkstyle rules are missing.for ex:
Regexp Multiline ISO 8859 check which comes from Checkstyle "checkstyle:com.puppycrawl.tools.checkstyle.checks.regexp.RegexpMultilineCheck_1395067207"
RegexpMultiline += " (Strin... | Upgrading from sonar 3.4.1 to sonarqube 3.7.4 |
You could setup a catchall server with the following directives:
listen 80 default_server;
server_name _;
If you have multiple server stanzas, you can use default_server to specify the configuration that is used if the hostname doesn't match any of the other server_name entries. Using an ip number fits this scenario.... |
Every once in a while someone is trying to access our website through the public ip instead of one of our domains (yes we have multiple country specific domains .dk, .it, .es etc. however we also have .com as the "general").
Now I would like to redirect those requests coming in on the IP-adress to our www.domain.com ... | How to redirect requests on IP to domain |
As I know, if you want to reach the website in Azure Kubernets Cluster through Load Balancer, you should set Load Balancer rules, not NAT rules. And the rules screenshot here.How to get the traffic logs ?You can use the commandkubectl logs azure-vote-front-7976b7dcd9-m7445like this to get the pods logs. You can get mor... | I created Kubernetes cluster using ACS-engine in Azure and installed Ingress controller.I deployed a service:Inside the cluster running the command curl :/myservice give the expected response.I created a VM with NGinx in order to get external access and using the external IP of the VM such external access to the servic... | How to create loadbalancer (IAAS) in Azure for Kubernetes Ingress controller |
+100It could be done the following way:persVolC := client.CoreV1().PersistentVolumeClaims("default")
data := `
[
{ "op": "add", "path": "/metadata/labels/mylabel", "value": "myvalue" }
]
`
updatedPvc, err := persVolC.Patch(ctx, "name-of-pvc", types.JSONPatchType, []byte(data), meta_v1.PatchOp... | I am trying to update a pvc label using go library's patch option fromthis interface.Is there any example on how to use this? Also if the label is not there will patch also add the label?I am looking to update/add my_label in below object:kind: PersistentVolumeClaim
metadata:
annotations:
pv.kubernetes.io/bind-co... | Patching a pvc using go client |
What they are doing is not correct. The object returned by objectWithData: is possibly simply a reference to something retained inside reader. And by releasing reader, you are potentially deallocating the rootDictionary you got earlier. Depending on the inner workings of the XMLReader class, it is possible that the th... |
I'm needing to quickly and simply parse an XML file in my app. The best solution for me seems to be something along the lines of an XML-to-NSDictionary converter which I can then dig through easier.
I chose to use this small class: http://troybrant.net/blog/2010/09/simple-xml-to-nsdictionary-converter/
However I'm con... | Should I be using [autorelease]? |
No, that would defeat one of the goals of git - that the hash code is based on the contents of the commit and previous commits which can later be verified against changes. You could create a tag to refer to a commit with the tag name being a string, making it easier to reference the commit. See git tag
|
I was just wondering if there was a way to specify the hash code that is generated by Git when you do a commit.
i.e
git commit -m "message"
github has the commit message and the hash code and we use the hash code for referencing the commit. Is it possible to use the commit message or edit the hash code to something th... | Is it possible to edit the git hash code? |
probably axios doesn't give any specific api as per your need but you can create a flag which turns on before making axios.get() and resets on getting response. Inside cron job Skip your task if flag is on, else call(), sample:const CronJob = require('cron').CronJob;
const axios = require("axios");
var isRunning = fals... | I need to run a scheduler every 5 min which will do few http calls .
After first time I want to start the next timer only when all the http calls are finished.
How can I do this cannot find the solution on 'node-cron' documentation.
This is how I am trying to do.const CronJob = require('cron').CronJob;
const axios = re... | Reset timer for already running cron-node job |
Current versions of Grafana support interpretation of time series as tables. This way those can be join similarly to join of SQL.In panel editor, under the query: Options > Type:Table. This should be done for both queries if you are joining Prometheus data with another Prometheus data.Then Transform tab > Join by field... | ExampleI am getting a series for a metric with a label calledstorewhich contains thestoreId. Now I would like to add another labelstoreNameand fill it with external information (API-call/CSV/other Prometheus "metric"/merging from mysql/...). Is this possible? If so, in which ways?GoalTo show the resulting metric in Gra... | How to enrich metric data using external sources? |
Explanation
From the Dockerfile reference.
There can only be one CMD instruction in a Dockerfile. If you list
more than one CMD then only the last CMD will take effect.
That is why the javac command is not executed and starting your container results in no such file or directory was found.
CMD and ENTRYPOINT are u... |
Hi I'm new to Docker and trying out to write a new image from the scratch. I am writing this dockerFile to compile and run a simple java program available in the same directory.
Here is the dockerfile.
FROM scratch
CMD javac HelloWorld.java
CMD java HelloWorld
Docker build is successful as shown below
[root@hadoop01 ... | DockerFile to run a java program |
This is frequently handled by adding a random string or timestamp to the query.
i.e. <img src="/images/image.jpg?timestamp=1357571065" />
|
Consider the minimal example: Using php I have a form that you enter text and it produces an image of the text. When I then change the text and update, I don't see the new image because I assume, it is being cached. Is there some way to automatically remove this one image file from the cache when I update it?
| clear cache of one image |
Your options object does not have the headers option, describing the user-agent. Try this:
var options = {
host: 'api.github.com',
path: '/users/' + username + '/repos',
method: 'GET',
headers: {'user-agent': 'node.js'}
};
|
I'm trying to run this code but getting this error:
Request forbidden by administrative rules, make sure your request has a User-Agent header
var https = require("https");
var username = 'jquery';
var options = {
host: 'api.github.com',
path: '/users/' + username + '/repos',
method: 'GET'
};
var request = https.re... | Request forbidden while accessing github api on node.js program |
Is it throwing errors when you are deploying your site from GitHub or what? I am sure you have created a GitHub repository and logged/signed into netlify with GitHub (and authorize it). And from there(netlify's dashboard) to Team overview > Add new site > Import an existing > GitHub (it will again ask for authorization... | Okay so i recently finished my portfolio and i wanted to host it onnetlifythroughgithubbut it failed.Their docs and build log are so confusing that i do not know how to trouble shoot the problem. However, when i rannpm run buildlocally on my system and then i dragged it onto netlify, it worked.I'm not saying i cant jus... | my application deploys on netlify when i build it locally but it doesnt work when i deploy it from github |
It seems that I changed the port number from 8077 to 80, then it runs well. | apiVersion: apps/v1
kind: Deployment
metadata:
name: farwell-helloworld-net3-webapi
spec:
replicas: 1
selector:
matchLabels:
app: farwell-helloworld-net3-webapi
template:
metadata:
labels:
app: farwell-helloworld-net3-webapi
spec:
nodeSelector:
"kubernetes.io/os": l... | Why unable to access Azure aks Service external IP with browser? |
Have u installedphp-mysql?sudo apt-get install php-mysql | I have a problem with CronJob in Laravel 5.4 with MySQL and Eloquent.When I executephp artisan schedule:runI get the error:[Illuminate\Database\QueryException]
could not find driver (SQL: select ...... )
[PDOException]
could not find driverBut, all drivers are installed. The application work perfect. If I copy al... | CronJob - Laravel 5.4 - Ubuntu |
You're missing an[OR], since the referer can't be BOTH (e.g. AND) of those, you want one or the other to be true:RewriteCond %{HTTP_REFERER} racistsitenamehere\.net [NC,OR]
RewriteCond %{HTTP_REFERER} semalt\.com [NC]
RewriteRule .* - [F,L]Also wouldn't hurt to have anLflag in there. | I am trying to help a black funeral home stop harassment by a racist site. One request they made was that I prevent direct linking from the racist site to theirs.The following is the whole .htaccessWhen I go to the harassing site (name not listed below as it contains racial slurs) and click one of their links to the f... | Referrer not blocked by htaccess |
C++ has no concept of a GPU. You got a great comment pointing you to the right direction of getting some GPU info using OpenGL, I'm sure there are other cross platform libraries as well.Take a look at the source code ofneofetchwhich is a command-line system info tool which, among other things, gets your GPU(s). It uses... | In the case of CPUs, the (linux specific) sys callsgetcpu()orsched_getcpu()can be used inside a program to obtain the ID of the core executing them. For example, in the case of a 4 processors system, the logical index returned by the mentionned calls makes it possible to deduce which one of the 4 CPUs is being used (le... | Is there a way to programmatically find the current used GPU (C, C++)? |
I'm not sure exactly what you're asking, but the catch block that we use around the timeout block is checking for "FlowInterruptedException" (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException). That is what is thrown when the timer expires. | Hello so far I use this rule
for catching exception that are not related to SonarQube code checking.
Can you folks suggest common Exceptions that I should include if WaitforQuality gates for unknown reasons other then code...try {
steps.timeout(time: 10, unit: 'MINUTES') { steps.waitForQualityGate abortPipeline... | SonarQube Exceptions Catch |
I don't know for sure, but CPython uses reference counting and its objects use memory addresses as ids so I would say it does not do compaction... And according to this, "[C]Python does not use memory compaction ... [w]ould Python use memory compaction, implementing C extensions would
be much more tedious and error p... |
I was talking with a friend, comparing languages, and he mentioned that Java's automated memory management is superior to Python's as Java's does compaction, while Python's does not - and hence for long-running servers, Python is a poor choice.
Without getting into which is better or worse, is his claim true - does C... | Does CPython's garbage collection do compaction? |
You can use these 2 rewrite rules in your site root .htaccess:RewriteEngine On
# load newsite if not newsite and not oldsite
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^((?!(?:newsite|oldsite)).*)$ newsite/$1 [NC,L]
# load root if request is newsite
RewriteRule ^oldsite(/.*)?$ /$1 [L,NC] | I recently finished developing a new website for my domain and today I want to push it "live" by making it available to whoever visits the root of my domainexample.com.However, I don't want to be moving moving files back and forth between directories in order to "archive" the old site and have the new one available.Ins... | RewriteRule to show root |
For internal communication ideally, you should be using theservice nameas the hostname.However you can crate the internal ingress it is possible, but it will give you one single IP address. Using that IP address you can call the service.Considering you are already running the ingress controller of Nginx and service.You... | I'm working on helm-charts and it should do the following:Allow external requests over HTTPS only (to a specific service).Allow internal requests over HTTP (to the same specific service).I tried creating two ingress in which:The first ingress is external and accepts only HTTPS requests (which is working as expected). I... | How to configure Internal Ingress to target a specific service |
It's now possible with latest Solr versions.To achieve backup on one Solr Server and restore on another one needs to do the following:For each Solr installation in solr.xml setup backup repository to point to some shared drive. For example, one can use HDFS (this config requires-Dsolr.hdfs.home=...to be added into star... | I want to write a java client based on SolrJ which pulls the entire core data to a file from a remote Solr server. Later on I want to replay this file to another remote Solr server core.What is the best method to implement this functionality? | How to perform a remote Solr core backup through SolrJ client? |
+50It depends on which AWS region you're using. ECS has a "Repositories" host, sibling to the Clusters and Task Definitions, that's available (for now) only to us-east-1 and us-west-2. When you create a repository, at the top of the page there's an expandable header titled, "Build, Tag, and Push Docker Image". It will ... | I want to publish my Docker container to AWS using the Visual Studio interface. I want to specify a custom Docker profile in Visual Studio. I can't seem to connect to AWS that way, though. (Validate Connection always fails.) Is this possible?I am able to docker build, push to Docker Hub, ssh into my EC2 server (living ... | Publishing Docker to AWS from Visual Studio |
I'm not sure that the SQL*Plus configuration elements should be causing problems with the output -- if they are, then open a second question on it.One method you can explore is using a DBMS_Scheduler-driven PL/SQL program to write the data out with UTL_FILE. If you consider the export process to be a part of your datab... | I have a table in Oracle which I need to export as a file, xls, csv or otherwise. I am currently attempting to do so using sqlplus to export the view to csv in a shell script which is setup as a cronjob.This seems to be really inelegant as the separators, line size and pagesize seem to create a lot of errors in the dat... | How can I automate exporting of an Oracle table/view? |
Theprometheus_clientlibrarydocumentationaddresses this case:Prometheus client libraries presume a threaded model, where metrics are shared across workers. This doesn't work so well for languages such as Python where it's common to have processes rather than threads to handle large workloads.I won't copy here the explan... | I have main() function which spawns two separate sub-processes. These both sub-process shares metrics. How can I share metrics for both process and keep it updating?
Here, is my snippet for more understanding.from multiprocessing import Process
import prometheus_client as prom
from prometheus_client import Counter
# M... | How to collect prometheus metrics from multiple python-flask sub-process? |
Unfortunately it is not possible.
As alluded to, you can create a .env file and populate it with COMPOSE_PROJECT_NAME=my_name, but the config option does not present itself in your environment by default.
Unfortunately the env substitution in docker-compose is fairly limited, meaning we cannot use the available PWD en... |
I see lots of questions around setting/changing the COMPOSE_PROJECT_NAME or PROJECT_NAME using ENV variables.
I'm fine with the default project name, but I would like to reference it in my compose file.
version: "3.7"
services:
app:
build: DockerFile
container_name: app
volumes:
- ./:/var/app
... | Can you use the current project_name in a docker compose file? |
As Bruno has mentioned in the comment, certificate needs to be configured on OS level.Here is a goodarticleabout how to create a certificate on Apache.Azure VM is IaaS. It can not configure the settings on OS directly. That's the reason why we need theAzure VM Agents. | I currently have an Azure VM (linux) configuration with a custom domain name. Can someone please provide a tutorial (or explain) how I can go about setting up a SSL certificate?Tried searching but no luck - appreciate all the help! | Set up SSL on Azure VM (Linux) |
Your example doesn't make much sense to me, but I think I can show you a way to split your file into chunks usingGNU Parallel. You give no indication of the content of your file nor of its size, but let's say it is a million lines, then I could use the commandseq 1000000to generate output similar to your file, so I'll ... | I'm trying to mass insert multiple files of data into Redis because inserting the whole data at once, using just one file, didn't work due to it being too large.I'm using following command to insert one file into Redis:cat data.txt | redis-cli --pipeHow can I insert via one command multiple files at once?
I triedcat da... | Mass inserting multiple files into Redis |
Unfortunately it's not that simple.
You are going to need to create an instance of aSSLSocketFactorythat has a customTrustStorethat points to your CA certificate. You then pass thisSSLSocketFactoryto theMqttClientas an option inMqttConnectOptions.Something a little like (this has no exception handling, will need wrappi... | This is an example of what I want to achieve:MqttClient client = new MqttClient("ssl://127.0.0.1:8883", "randomId");
client.setCallback(new MyCallback());
MqttConnectOptions options = new MqttConnectOptions();
options.setConnectionTimeout(60);
options.setKeepAliveInterval(60);
//Something like this
//options.setSSLProp... | Java mqtt client SSL config with self signed certificate |
Unfortunately I don't think it's possible to conditionally add a tag. The best you can do is use the condition to modify the data for the tag - either the key or value or both. If you modify the key, then any automated searching for the expected tag key will not find resources with the modified key. But you will ge... |
I have a requirement to conditionally tag resources based on user response to the downtime parameter and the value of environment defined in map. This tag is later used by the lambda function to turn off the instances at night.
I tried it like this with no luck -
Conditions -
"EnvCheck": {
"Fn::Not": [
... | AWS CloudFormation conditional tagging |
It's not just a matter of performance, but a matter of compliance with the TLS specifications.I guess that most browsers can parse through these files and figure out what the correct order of the chain should be.Some browsers may be tolerant, but theTLS specification explicitly says that you MUST present the certificat... | Closed.This question does not meetStack Overflow guidelines. It is not currently accepting answers.This question does not appear to be abouta specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic onanother Stack Exchange site, ... | Peformance: Does SSL trust chain order matter? [closed] |
In line with the suggestion by @Ariel I checked my .conf files and I keep having the same issue, although I addedExpiresActive on
ExpiresDefault "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType image/svg "access plus 1 month"even if it is working (i assume) for svg fonts. I have n... | I'm having trouble with the browser-caching of SVG-files.In my .htaccess, everything seems to be fine (at least it is rather complete) but no matter what I try, it seems as if the SVG-images aren't making their way into the browser's cache.there's<IfModule mod_expires.c>
ExpiresActive On
...
(various other ... | browser-caching works except for svg-images |
You need to define a log file, which will then receive any output from yourPart.check_status_updatecall (such asputscalls). You can set a default log file for all of your jobs at the top of yourschedule.rbfile, such as:set :output, '/path/to/file.log'For example, to log toRails.root/log/whenever.log:set :output, 'log/w... | I've got the following configuration. I've installed whenever gem, created shedule.rb:# Learn more: http://github.com/javan/whenever
every 6.hours do
runner "Part.check_status_update"
endIn part.rb model I have corresponding method.A.How can I check ifwheneverruns? As I understand it should only modify the crontab... | How to check if whenever gem is working? |
Both locations in PLESK (v12) accomplish the exact same thing. The one added benefit to adding the SSL under the domain name is accessing the IP address via HTTPS (answer from hosting company).I hope it helps someone in the future. | There seems to be two places in PLESK to add SSL certificates. One location is under Domainsand another under Tools and Settings.What is the purpose of the first versus the second location? | SSL certificates in Plesk |
To get rid of everything nginx related (configs etc.) do:sudo apt-get purge nginx | I've gone pretty badly wrong and I want to just uninstall and then reinstall a fresh copy to start over.I've tried#sudo apt-get nginx uninstallthat didn't work as well ascd /usr/local/src
wget http://nginxcp.com/nginxadmin2.3-stable.tar
tar xf nginxadmin2.3-stable.tar
cd publicnginx
./nginxinstaller uninstallwith no lu... | uninstalling nginx? |
AsVonC mentioned in the comments, you can put your libraries under "vendors" or "thirdparty" and the files won't be analysed bylinguist, the tool GitHub uses to analyse the language in your code.# Vendored dependencies
- third[-_]?party/
- 3rd[-_]?party/
- vendors?/
- extern(al)?/Later, they added more folder names.Sha... | GitHub search allows filtering repositories by language. How can I set a repository to a specific language? | How can I change the language of a repository on GitHub? |
2
+25
The problem is that GitHub shows each TAB as 8 spaces :)
I can only think in two solutions:
change your editor to show each TAB as 8 spaces
change your editor to use spaces instead of TAB
Share
Improve this answer
... |
within eclipse when using inline comments // i do, for my sake, align all the comments at the same position using tabulator, i.e:
$this->site=new openRTB_site($mixed->site); //See Site Object
$this->device=new openRTB_device($mixed->device); //See Device Object
but when i comm... | how to align tabs (whitespaces) on github when using eclipse |
Cloud9(not exactly free, past one private workspace) hasGitHub and BitBucket integration, and is all about collaboration.And it does supports the ability torun a Rails app. | Closed.This question is seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. It does not meetStack Overflow guidelines. It is not currently accepting answers.We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-si... | Is there a cloud IDE with Assembla/GitHub integration? [closed] |
You can clone your fork, and asJustin ᚅᚔᚈᚄᚒᚔcomments, add, commit and push.If you try to push from your current local clone, its main remote address (the 'origin') refers to the first GitHub repo, and not your fork.But you could do it from the same repo, by adding to your current local clone the address of your fork:gi... | Ok, so I have a cloned github repo on my local machine, and another forked github repo in my github account.
I would like to push a file from my cloned local repo to my forked repo. I need to push it in the same location (e.g. the file in my local repo is in /folder1/folder2 and I have to push it in my forked repo in /... | Pushing a single file from cloned repo to forked repo |
It does not appear that .dockerignore handles exceptions. If there is a well-known syntax for this, you could propose the change and make a pull request.
In tag 1.3 of commands.go we see this:
ignore, err := ioutil.ReadFile(path.Join(root, ".dockerignore"))
// ...
options := &archive.TarOptions{
Co... |
How does .dockerignore handle exceptions?
For example, I would like to ignore everything from the src/ directory except for src/web/public.
I've tried...
.git
src
!src/web/public
Seems to not work.
docker build . shows Sending build context to Docker daemon 20.63 MB either way.
| Exceptions in .dockerignore |
Kubernetes monitoring is detailed in the documentationhere, but that mostly covers tools using heapster.Node-specific information is exposed through the cAdvisor UI which can be accessed on port 4194 (see the commands below to access this through the proxy API).Heapster queries the kubelet for stats served at<kubelet a... | Without using Heapster is there any way to collect like CPU or Disk metrics about a node within a Kubernetes cluster?How does Heapster even collect those metrics in the first place? | Kubernetes: How to get disk / cpu metrics of a node |
Okay, here's something. I don't know if it's the right way or not but I was able to fix the issue by manually sending theContent-LengthHeader from my RailsController. Here's what I'm doing:def download
@file = Attachment.find(params[:id])
response.headers['Content-Length'] = @file.size.to_s
send_file(@file... | I've a rails app that serves large static files to registered users. I was able to implement it by following the excellent guide here:Protected downloads with nginx, Rails 3.0, and #send_file. The downloads and everything else is working great, but there is just this problem - TheContent-Lengthheader isn't being sent.I... | Content-Length Header missing from Nginx-backed Rails app |
We can usecoalesce,hereis Presto documentation on conditions which is what Athena is built on.select coalesce(myColumn, 0) from my_table_name | In Athena, what is the most efficient way to fill null values with 0?I think I can useCasestatement, but I am also curious if there are other ways to do it. | How to fill null values with 0 in AWS Athena |
Found the problem. The cron is firing through system account, which has access to the script. The user account used to run scripts via a browser was different and did not have permissions. | I have a situation that appears to have been asked several times, but none of them answers my problem, as all of them refer to a ownership problem or something entirely different.I have a cron task that I schedule from within the cPanel cron manager. It currently looks like this:5,20,35,50 0-8,17-23 * * * php /path/to/... | Cron job not firing in cPanel, but runs manually |
My server is on LAMP configuration with PHP 5.3 and fast CGI.You can not set PHP ini directives with the.htaccessmethod with FCGI/CGI. You need to apply the changes within the php.ini or better theuser ini filesDocsinstead.Place a file called.user.iniinto the document root and add theauto_prepend_fileDocsdirective in t... | I have a file calledinit.phpwhich I want to get automatically included in each and every HTTP request coming to my server. My server is on LAMP configuration with PHP 5.3 and fast CGI. Any method to achieve this is welcome.What I have already tried:I have already tried theauto_prepend_filemethod with.htaccessfile but n... | How to include a php script in all HTTP requests coming to the server |
Try adding the following to the.htaccessfile in the root directory of your site.This will rewrite any request tousername.domain.comto the correct folder/subfolder and file.I am assuming thathomeis a directory in the root folder of your site.RewriteEngine on
RewriteBase /
#if request for usename.domain.com/anything
Re... | I am building a download site, An users will be able to register and a folder with their username will be created on my server, something like:home/users/usernameWhat I want to accomplish is, if anyone types:username.domain.comin their browser, it will route them to:home/users/username/, and if they type:username.domai... | Virtual subdomain with wildcard mapping .htaccess |
Worked. The problem was in the "/etc/nginx/nginx.conf" file. After a lot of reading and try - I've found that inside the file it forwards to HTML (instead of my nodejs web server).
Changed the line of "root /path_to_ws", restarted Nginx and it worked.
Thank you for the help!
|
I've created an environment in AWS which includes an EC2 instance with node js web-server and Nginx installed, behind a self-signed application load balancer.
My ALB gets requests from HTTPS (443) and forwards them on HTTP (80) to the Nginx. My Nginx should get the requests from the ALB (in port 80) and forward them o... | Nginx as a reverse proxy behind AWS ALB (self-signed) |
Looking at what you're after, I think you require a temporary302redirect for those URLs. You can do that using:# If you know the directory.
Redirect 302 /directory.html http://domain.com/
#Using the URL
Redirect 302 http://domain.com/index.php?id=123&L=1 http://domain.com/Make sure to clear your cache before testing t... | I've made a new TYPO3 Website,englishandjapanese. The second language isn't ready yet, but the pages are available in google search. My problem the pages with the language parameterLshould temporary not be visible.How can I redirect the pages f.e.http://domain.com/index.php?id=123&L=1to the main URLhttp://domain.com/I'... | Redirect multilingual TYPO3 URLs (L=1) |
This could have been the result of some overzealous emoji autocompletion, which is now a feature with GitHub for Windows (when you type ':'):
(as shown in the article "GitHub for Windows 2.0", which actually takes advantage of those emoji in commit message)
|
I recently began working on project and I committed and pushed it using Github for Windows.
But if you look at the .gitignore , there is a :camel: and a :boom: icon next to the commit. Are these of any purpose? They seemed to have been auto generated by Github for Windows. How can I add these icons to my own commits, ... | What are these icons by my commit |
-1Thank you for trying to help, the solution was to restart the server :-) | I'm trying to install wildCard certificate on a second Windows machine, after exporting it from the original machine i installed it on, when im installing the pfx file on my second iis and binding it to HTTPS port 443 on the second machine the web site gowes down and when i try to start it i get this message:any idea w... | SSL WildCard certificate shut down iis web site |
in short , you can use following commands to create pods and deployments (imperative way) using following commands which are similar to the commands mentioned in that book :To create a pod namedkubiawith imageDave/kubiakubectl run kubia --image=Dave/kubia --port=8080To create a deployment namedkubiawith imageDave/kubia... | I'm working throughKubernetes in Action(copyright 2018), and at least one of the examples is out-of-date with respect to current versions ofkubectl.Currently I'm stuck in section 2.3 on just trying to demo a simple web-server docker container ("kubia"):kubectl run kubia --image=Dave/kubia --port=8080 --generator=run/v1... | What is the current equivalent of `kubectl run --generator=run/v1` |
25
could use this command
for container in $(docker ps --all --quiet --format '{{ .Names }}'); do
echo "$(docker inspect $container --format '{{.GraphDriver.Data.MergedDir }}' | \
grep -Po '^.+?(?=/merged)' ) = $container"
done
Share
Improve this answe... |
If I go to /var/lib/docker/overlay2 and do "ls", then I get something like the following :
0349eb19b8ac737f2a93e33f665ab26d95de636bf48de79e6e7d7cdd76c0cd78
0c32910d4c394834e239f0c8f0776b36d87f7567b3120dff92ccd8d0f98577b0
...
Now one or more of these folders belong to a container. I want to know which folder is used by... | How to find which folder under overlay2 directory belong to which container? |
2
Hailwood, there are a couple modules that touch on this. Might be a good starting point:
https://github.com/silverstripe-labs/silverstripe-securityextras
https://github.com/prij/silverstripe-iprestrictedpage
Share
Improve this answer
F... |
I've been trying to block access to /admin and /admin/{anything} with /admin not being a physical sub directory in silverstripe except for a limited set of IP addresses and have come up with the following .htaccess file section which for the most part works.
<IfModule mod_rewrite.c>
SetEnv HTTP_MOD_REWRITE On
Rewr... | How to block access to a set of url patterns by IP? |
I would rather use the https form to push back to your repo:git remote set-url origin https://github.com/user/repo.git
# in your case:
git remote set-url origin https://github.com/ars/rss.gitgit remote set-urlwouldchangethe url currently associated with origin (seegit remoteman page).Note that I don't have access to rs... | So I ran git remote add origin again to show that it already exists. The error looks self explanatory. How do I makegit push origin masterto work here?(ENV)Benjamins-MacBook-Air:rss Ben$ git remote add origin[email protected]:ars/rss.git
fatal: remote origin already exists.
(ENV)Benjamins-MacBook-Air:rss Ben$ git push ... | Repository not found error, right after `git remote add` |
You can usecom.google.common.util.concurrent.AbstractScheduledServiceto create a consumer thread and add it to the dropwizard's environment lifecycle asManagedTask. Following is the pseudocode -public class YourSQSConsumer extends AbstractScheduledService {
@Override
protected void startUp() {
// may be print s... | What I am trying to achieve:I want to make a dropwizard client that polls Amazon SQS.
Whenever a message is found in the queue, it is processed and stored.Some information about the processed messages will be available through an API.Why I chose Dropwizard:Seemed like a good choice to make a REST client. I need to have... | Polling SQS using dropwizard |
There is little you can do to hide them from your user if the frontend of your application needs to read them.Depending on your use case there are a few scenarios you could take a look at.Firstly you could replace the permanent credentials with temporary credentials, to do this you can make use of the serviceAWS Cognit... | I have an app that uploads files to an S3 bucket as part of it's functionality. I've gotten the app to work but the keys to the bucket are in the app files so a user can just see the keys if sufficiently motivated. I've already configured the key to have limited permissions but what can I do to prevent the user from se... | How can I hide S3 keys in a javascript (react native) application from the user? |
You should use a call to the GitHub API. There's an API endpoint which provides a JSON-encoded response including a Base64-encoded content of the blob, which you can extract from the JSON.
You'll know it's intact because the JSON blob will be complete; if it's not, then your client will fail to parse the JSON. You'l... |
My software written in PHP requires a daily update of a text file which is available on github.
I plan to use php/curl via cron, but my concern is that there is always a chance that network connection fails and the content of download can be partially damaged which will screw the purpose of my software.
Can you recomm... | Safe way to regularly update a local copy of a file residing on github without using a git client |
I want to create an application gateway where I need to attach an ssl certificate for ssl termination is there any another secure or more azure specific way to create the ssl certificate.To attach SSL certificate for an Application gateway you can make use of key vault certificate check the below workarounds.Create a k... | I purchased my domain from namecheap.com. And then I created the DNS Zone in azure where I was able to manage dns records easily. I want to create an application gateway where i need to attach an ssl certificate for ssl termination. But for this i should already have the certificate with. Is there any way i can get or ... | How to create SSL certificate in Azure.? |
2
No! There is no built-in feature in language. An object is allocated when you allocate using new construct.
Share
Follow
answered Jan 30, 2012 at 3:50
KV PrajapatiKV Prajapati
94.1k1919 go... |
Is there a way to batch allocate a bunch of objects?
I have the following slow piece of code and want to make it fast:
final int N = 10000000;
Node[] a = new Node[N];
for (int i = 0; i < N; ++i) {
a[i] = new Node(-1, null);
}
I'm hoping that there's some low-level method (like those available for Arrays) that can d... | Batch object allocation java |
I am afraid this is not possible with a sigle Cron expression.Some people have asked similar questions recently.
You can find more detailshereandhere.Hope it helps. | What would be cron expression for following two cases: | Quartz.NET Cron Expression for recurring after particular weeks |
0
Actually, the simplest way is to use crontab+shell. Of course, there are also many paid software that can be implemented. If you want to back up, it is recommended that you back up your data files and configuration files so that they can be recovered. It is also the safes... |
I know about database backups for MySQL, but how would one go about making a backup of entire MySql configuration along with the databases?
I'm building few set of services/tools and I need to provide instructions so not-so technical people could restore them if I wouldn't be available. One of the things I need to bac... | Making backup of MySQL database and server |
Turns out this was an Apache configuration issue.I needed to explicitly enable domain-named virtualhosts, like so:NameVirtualHost *:80This answer helped.Docker had nothing to do with the matter. | I'm trying to run two different domains on one and the same Docker container and port.The Docker container runs CentOS.docker-compose.ymllooks like so:web:
image: fab/centos
ports:
- "80:80"
volumes:
- ./src/httpd.conf:/etc/httpd/conf/httpd.conf
- ./src:/var/www/html
- ./src/hosts:/etc/hosts
env... | Multiple vhosts on one and the same docker container |
2
Cloning the repo and then uploading to Github (by creating an empty Github repository and setting that as a new remote) is the best answer. Forking is a concept on Github (not Git) that involves the other repository being cloned to a new repository on the server, so you'r... |
I would like to fork this repo, git://git.rocketboards.org/linux-socfpga.git . But the problem is it is not hosted on Github, so there is no fork button. One idea came to me is to clone the repo to local, then upload to Github manually. But what if later I format the PC, will I lost the pull ability from upstream? Or ... | Fork Git repo without fork button |
I found the problem, my Mac keychain had USER_B. I found it when I searched for "github" in the Keychain app. I've updated the question to reflect this is a Mac-specific problem/solution.
|
I think I'm github USER_A, but github thinks I'm USER_B. First, I check who I am:
$ git config --list
color.ui=auto
push.default=simple
user.name=USER_A
[email protected]
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
remote... | github who am I? (OSX) |
Accodring tothisit should be:use-gzip: falsebut this has to go to thenginx ingress config map, not on the ingress file | I have been facing a performance delay in AKS when trying to download the details from Azure blob. When i try do the same from GKE, it is very fast. The only difference is AKS has gzip and GKE has no gzip header.So i would like to remove gzip encoding from the AKS and I have tried the below settings in the kubernetes ... | Remove gzip encoding in Azure Kubernetes Service |
The strange thing is not that on some PCs the application does not work, but that on some it does.The*.contoso.comhost-source allowshttps://*.contoso.com:443on https: pages and allowshttp://*.contoso.com:80on http: pages (onlystandard portsare allowed by default).Therefore you have to addhttps://online.contoso.com:4431... | My company and I have developed a service consisting of two web applications:A collaborative platform (hereinafter called Platform) accessible through an address similar to online.contoso.com, written in ASP.NET and React and running on a Windows Server 2016 server. This platform authenticates and authorizes users and ... | Computer blocks the display of an iframe |
Make a fork and create pull requests. :)
Forking the repository essentially gives you your own workspace on which you can create branches and push, and you can create pull requests from the differences on your fork to the original repository. Pull requests must be approved by the owner of or someone who can write to t... |
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed last year.
The community reviewed ... | How to make code suggestion in github/bitbucket? [closed] |
Registering an event listener all by itself does not keep it from being garbage collected. Something has to actually have a reference to the Bot object itself (so that events could actually be emitted from it) for it to not be garbage collected.
In your Controller class, if nothing else has a reference to the Bot in... |
If I have some code like this:
const EventEmitter = require('events');
class Bot extends EventEmitter {
sendMessage() {
// do something
this.emit('messageSent', 'user123');
}
}
class Controller {
loadBot() {
const bot = new Bot();
bot.on('messageSent', userId => {
// do something
});
... | In Node.js, does listening to an EventEmitter, create a reference to it? |
I posted an issue on the AMS github page and went back and forth with @joaomdmoura and @groyoh until we came up with this temporary solution. It works on my end and it'll do for now until AMS makes an official decision on the best solution.
module ActiveModel
class Serializer
class Adapter
def cache_key
... |
I am using a database-driven solution for labels and translations that I would like to cache at the serializer level. Here is my serializer.
class AppLabelSerializer < ActiveModel::Serializer
cache key: 'app_label', expires_in: 3.hours
attributes :id, :key, :label, :label_plural
def key
object.app_label_dic... | How to use a dynamic value for cache key with ActiveModel::Serializers (v0.10.0.rc1) |
0
As you said: "... take the backup of controlfile ... configure the controlfile autobackup on ... after taking the backup... delete controlfile thinking i ll recover it"
At the time you backup controlfile - the current setting of "CONTROLFILE AUTOBACKUP" is still "OFF", y... |
i was backing up the control file though RMAN.
i put the database in mount mode and take the backup of controlfile .
i configure the controlfile autobackup on.by default it was off. after taking the backup. when i open the sqlprompt and put database in nomount mode, and delete controlfile thinking i ll recover it ,AG... | Oracle Rman configuration parameter |
Perhaps a bit late, but in order to fix this, move yourclient_max_body_size 10M;outside of the location section. Like this:client_max_body_size 10M;
location / {
index index.php;
try_files $uri $uri/ /index.php?$query_string;
}Seehttps://github.com/heroku/heroku-buildpack-php/blob/beta/conf/nginx/heroku.conf.p... | I'm gettingerror 413when uploading a 4MB file. I have already created a.user.inifile on thepublic/folder. to allow up to 10 MB filesSo I usedclient_max_body_sizelike this on mynginx.conf,but I still get 413.location / {
index index.php;
try_files $uri $uri/ /index.php?$query_string;
client_max_body_size 10M... | Heroku Nginx HTTP 413 entity too large |
Try mysqldump with a simple shell script. It can be extended to dump tables. It now only dumps databases.
#!/bin/bash
USER="username"
PASSWORD="password"
OUTPUTDIR="./"
MYSQLDUMP=`which mysqldump`
MYSQL=`which mysql`
# get a list of databases
databases=`$MYSQL --user=$USER --password=$PASSWORD \
-e "SHOW DATABASES;... |
I'm working on Mysql data backup and restore system but stuck that how to go with it.
An Option which i may think of
Table Wise Backup Method
Creating A Directory With Dateandtime and directoy will have one definition text file with all databases and its table names plus seperate file for each table contaning table st... | MySql Table wise Backup and Restore |
That is the designed behaviour of classic 3 tier web apps architecture. Your app code is separated from your app data.
Technically, the MongoDB data of your Meteor project in dev mode (i.e. when you start it with meteor run) is in your Meteor project .meteor/local folder, which is correctly excluded from version contr... |
I uploaded a meteor project on github repository. Once I finished uploading, I downloaded the zip file to check if it is functioning properly. The project runs, however, there is not even a single collection in mongodb. (Note my meteor version is 1.8)
Can someone please help me get why the database collections are not... | Why meteor database(mongo db) contents is not uploaded in the github repo? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.