Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
I missed to add configMapRef inside container where I was trying to access the data.containers:
- name: test-container
image: <image>
envFrom:
- configMapRef:
name: test-app-config | In kubernetes kustomize.yml, when I use configMapGenerator to pass in some values as env, can I access those variables in deployed springboot application, application.properties file?kustomize.yml...
configMapGenerator:
- name: test-app-config
env: ./test/applicationsetup.env
...test/applicationsetup.envsome_key=... | Kustomize configMapGenerator |
The references made here, as per my understanding is towards low-level and high-level interfaces used in API programming. Here it goes,high-level interface, are designed to enable the programmer to write code in shorter amount of time and to be less involved with the details of the software module or hardware device th... | I'm working on some automation using AWS Boto3 SDK. I Couldn't get to know what is the difference between the Client(low-level) and Resource(high-level)What is the difference between Low-Level(Client) and High-Level(Resource) here? | Aws Boto3 Client (Low level) vs Resource (High Level) |
The repo size gets larger with every commit. But git compresses new files. Your repo does not grow 100kb with a new or changed 100kB file.I've got a repo with >4000 revisions - it's still smaller than the content itself. 200MB Repo, 250MB files. | All source code hosting services have size limits. I am wondering that does that mean my files can be up to that size -- or that the repository is limited to that size? Say I have 5 files of 100 kB, if I keep changing them and committing, will the repo size get larger?For example, Github.com smallest plan has a limit o... | Do repository sizes increase within time and revisions? |
An abstraction is a layer that sits between two systems and handles the communication, so neither side needs to know about how the other works directly.
I real word example may be the menu at a restaurant is an abstraction layer between the customer and the cook, I don't need to worry about telling the cook how to coo... |
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 8 years ago.
... | What is an easy definition of memory abstraction? what could be a good analogy? [closed] |
Go to the "Overrides" window on the right side, create a new field override with the query you want to modify, add the porperty "Axis>Placement" and select the "Right" option. | I have a panel. It shows several queries. It shows them all on one Y axis.Now how to put one of the queries to another Y axis? | How to put one of several queries to separate Y axis in Grafana |
The template looks ok. Try runoc create -f openshift/cronJob-template.yml -n test-projectinstead. | I am trying to make acron jobin Openshift but I got this error:error: unable to parse "openshift/cronJob-template.yml", not a valid Template but *batch.CronJobI ran this command:oc process -f openshift/cronJob-template.yml -p namespace=test-project | oc apply -f -Myymllooks like:apiVersion: batch/v2alpha1
kind: CronJob... | Cron Job in Openshift not a valid Template but *batch.CronJob with yml |
You are trying to connect to a website which uses SSL. You can recognize this from the url.
"https", Note the s at the end. This is a indication the website uses a certificate.Most likely when you send auser agentwith your request you are good to go.
More information can be foundhere. This could fix your problem.ShareF... | I try to make response using a particular link.https://www.fastwin.io:9873/getEnvelopeRankBut got bogged down with problem.When I try to make request through the browser I get normal response. But if I try to make request throughrequestslib I will getssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certif... | Can't receive data from particular website via python, SSL error |
You could make a cron script to call $this->db->cache_delete_all(); and run it every 5h. | I was wondering if there is any workaround to deletedatabase cachein codeigniter, say after every 5 hours. by defaultdatabase query cacheis persistent and we have to delete it manually.Can we makedb cachework likepage level cachein CI, where we can specify time for cache! | deleting database cache after some time codeigniter |
2
You can achieve this as follows
Import the repository into Netlify where your project folder is located
While deploying your project in 'Basic Build Settings', you can set your project folder as the base directory
From the image shared in the question, I concluded that ... |
I want to deploy a application which is existing in a folder in a repository to netlify (using import from github feature.). Again I don't want to deploy the whole repository, I just want that particular folder. there are also other folders in the same repo. The catch is all of them are in the same branch. Is it possi... | How to deploy a particular folder from a github repo to netlify instead of the whole repository? |
There is a possibility to use "volumes_from" as a workaround until depends_on feature (discussed below) is introduced. All you have to do is change your docker-compose file as below:nginx:
image: nginx
ports:
- "42080:80"
volumes:
- ./config/docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
vo... | I have recently started migrating to Docker 1.9 and Docker-Compose 1.5's networking features to replace using links.So far with links there were no problems with nginx connecting to my php5-fpm fastcgi server located in a different server in one group via docker-compose. Newly though when I rundocker-compose --x-networ... | Docker Networking - nginx: [emerg] host not found in upstream |
Autorelease pools do not deallocate objects automatically; they need to be manually drained. In Cocoa applications, this is done by the main thread's run loop, so normally most of developers don't have to do anything for that and don't know about it.However, in any long-running functions, like command-line tool'smain, ... | I'm quite new to theObjectivce-Cand I was wondering what is the correct way ofmemory managementin astatic librarywithout ARC.
Lets say my library has a method that returnsNSString*:- (NSString *) foo
{
...
NSString *result = [[NSString alloc] initWithString:@"bar"];
return [result autorelease];
}So as far a... | Memory Management in a Objective-C static library |
You can achieve this by either creating asidecarwhich will intercept the traffic to your original pod, or just creating a second pod in your deployment and a way of automatically trigger the process you wanna do. One caveat about this is that the two pods share the same network so you can not expose the same port for b... | I'd like to be able tocreate a temporary container within an existing podto handle processing arbitrary code from a user (security concerns), howeverthis container must also in the same poddue to data locality / performance concerns.My question is, what is the proper way to achieve this?Ephemeral Containersare describe... | What is the correct way to create additional containers in a Pod during runtime? |
git shortlog has a "feature" (misfeature, in my opinion, but it is documented so it's not technically a bug ):
If no revisions are passed on the command line and either standard
input is not a terminal or there is no current branch, git shortlog
will output a summary of the log read from standard input, without
refer... |
I want to print the shortlog for a specific directory (part of my repository) in my GitHub-Workflow.
I use the git command git shortlog -e -n -s -- myFolder
I use the checkout@v3 action to check out my repo/pull-request as following:
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
... | git shortlog in a GitHub-Workflow for a specific directory |
You can set minimum and maximum file size in the s3Policy you create when setting up the signed upload URK for direct browser to S3 upload.Here is an example (JavaScript from a node.js app) - see the 'content-length-range' part at the bottom:var s3Policy = {
'expiration': expiration,
'conditions': [{
... | I'm building a Web App which can upload files directly to a public S3 bucket using the AWS for Browsers SDK.I would like to restrict the maximum file size which can be uploaded, and although I can do a client-side validation on the file-size, a pure client-side solution is not very robust and I would like to add a serv... | Can you restrict the maximum file size which can be uploaded to a public S3 bucket? |
Assuming that you have defined your django proxy pass
upstream django_server {
server 127.0.0.1:8000;
}
Then you can do this
location /static/ {
try_files $uri @django;
....
}
location @django {
proxy_pass django_server;
}
|
My static and media files are served by Nginx and other requests are served by Django.
I have a custom 404 page which is served by Django. Since Nginx is handling static content any requests to /static/* which throws 404 is also handled by Nginx. I can set static custom 404 page in Nginx but I want Django to handle a... | Serving Static content from Nginx but handling error pages in Django |
You should set Git/SVN interface like below:
The paths for git and svn are the directories which they installed. But you use usr/bin/git and usr/bin/svn instead.
|
In spite of executing several methods and steps, RStudio in my machine still won't detect git and I need to push some of my projects so they remain secure and tracked. I've already made a repository in my github account and cloned it in my main local git folder but I don't see any git interface in RStudio. These are t... | RStudio won't detect git. Running macOS Sierra 10.12 and latest build of git |
6
There could be several causes of this.
The next troubleshooting step is to download the most recent Elastic Beanstalk logs (either from the web console or with the eb logs command line tool.)
Open /var/log/eb-activity.log and look at the last few lines to determine the ... |
I'm hosting an application with AWS, using elasticbeanstalk. I'm using the toolbelt to push my application from my local machine. Up until a couple weeks ago, everything was working fine, but recently my changes aren't taking effect. I can see in the aws management console that my application is being pushed and deplo... | ElasticBeanstalk - application changes not showing |
Nai,
Answers to your questions follow:
From Wiki - Always correct... ? :-). For a more Microsoft answer, here is their description on Buffer Cache.
Buffer management
SQL Server buffers pages in RAM to
minimize disc I/O. Any 8 KB page can
be buffered in-memory, and the set of
all pages currently buffered i... |
Background to question: I'm looking to implement a caching system for my website. Currently we're exploring memcache as a means of doing this. However, I am looking to see if something similar exists for SQL Server. I understand that MySQL has query cache which although is not distributed works as a sort of 'stop gap'... | SQL Server 2005, Caches and all that jazz |
Take a look here maybe it helps. It is a bug in org.apache.jasper.runtime.BodyContentImpl and has memory leak.
A possible solution:
"As Jeff notes, the option
-Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true is available in
5.5.15 onwards"
|
We are experiencing repeated OutOfMemoryError: Out of heap space issues in one of the application deployed on vFabric TC server. When I take a heap dump and analyze it, I find that most of the memory is being occupied by HTML/JSP content under either
org.apache.jasper.compiler.JspRuntimeContext OR
org.apache.jasper.r... | Java OutOfMemory due to huge JSP/HTML content in the heap |
Using all files in your maven repository should work but it might make the analysis slower as the plugin will have to look for classes in high number of jars.You should use the SonarQube scanner for maven. It will automatically pick up the classpath from your maven configuration. | My Jenkins job uses the Sonarqube plugin to start an analysis. It is reported thatsonar.java.librariesis not set and the result may be inaccurate.What value should I assign to this variable? The project is built with a maven build step. So all the dependecies are somewhere on the jenkins node under/var/lib/jenkins/.m2/... | Configuration of parameter sonar.java.libraries when launched from Jenkins |
Unless you launch a container specifying its name (docker run --name), docker will generate one for you.
That is easier than referencing said container with its ID.
You can then make docker commands with its (generated) name instead.
See more at "How does Docker generate default container names?".
(and the source co... |
I was just playing around with docker!!
Ran ps command -a option
docker run -a
C:\Users\sarkan1>docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3d6db385321c busybox:1.24 "sleep 1000" 26 seconds ago ... | Why does the name column of the docker ps -a always different |
1
Okay I figured it out, I have added the submodule, but somehow git messed up and since there were some capital letters in the directory name, but git added the path with small letters it couldn't find the path to that submodule.
After fixing that in .gitmodules I was abl... |
I am trying to add a GitLab repository as a GitHub repository submodule, so that when I clone the GitHub repo, I will clone the GitLab repo as well.
I have already set up the submodule and it appears that all is working, however when cloning I am unable to get the submodule no matter what I do.
The GitLab repository ... | Private GitLab repository as a GitHub repository submodule |
If you are on Linux you can use this to set up a regularly executing service that keeps going until it's done then waits a minute etc.http://code.google.com/p/atomservice/I use it for stuff like this all the time. You could even set a limit of x emails to send per execution. | I am developing a reminder application where users can send a email to themselves by selecting time and date for the reminder.So i would be using cron job for sending the email which will run after every minute and will check if any email is pending to send.Now, my question is, if at any given time i have 50-100 Emails... | PHP Script as Cron Job to Send Email, Prevent Multiple Processes |
VS Code uses SSH Tunnel to connect to remote machine. The port forwarding is simply creating this tunnel.
You can do it without vscode with the command below if you have ssh client installed. You have to run this command from localhost shell prompt.
(I assumed we want to connect to port 8080 on remote-machine using lo... |
When using VSCode Remote Development Open Folder in Container to develop in docker container in Mac, I can not find:
Any info about the port by docker inspect containerId
Any port config in Dockerfile
But I can still access the service in container from host browser.
| How does VSCode [Remote Development] [Forward Port] work? |
Please take a look at the similar problem one of the poster. You could use Apache'sRewriteMapto map URL to external script and process the request based on the code.That way, you don't have to worry about having a controller for each country, but pass it to the script to find the ID or anything that you want them to pr... | I think the title explains it all. The thing is that my application is Zend Framework based and includes a number of controllers. The main controllers are:Companies/
People/
Countries/Initially a country profiles url could ve accessible via a url like:example.com/countries/view/id/KoreaI shorted it by adding a router t... | Want to turn example.com/country/name/Korea to example.com/korea |
Try using another browser. Google and Firefox works for me while Microsoft edge does not. | After upgrading to v7.0 we are unable to login to grafana. At the login screen, after typing in a the username and password, a green banner will pop up which states “Logged In”, but the webpage will refresh and be stuck at the login page. | grafana can’t login after upgrading to v7.0 |
2
I have finally solved the myth of this question, and I did it differently. Instead of relying on the IP to set access permissions to the wp-login.php page, I have configured a Password Authentication with Nginx on Ubuntu 20.04. I have created the password file using the... |
I want to block URL access to wp-admin and wp-login.php using Nginx webserver. To achieve this, I have edited the WordPress VirtualHost file that is located in /etc/nginx/sites-available/domain.com because I have Nginx Server Blocks in place where I host multiple domains and I added the below code to deny all Nginx co... | Secure wp-login.php in wordpress using the nginx configuration file |
First of all, the statement that the third method is only available in C++ is nonsense.
All three methods are possible in both C and C++.
Regarding the "secure" part, it depends on what you're doing. If you're writing a self-contained string class (like eg. std::basic_string), the third method is likely the best bec... |
In the book "Secure Coding in C and C++", the author mentions three different ways to manage strings across a project.
Caller allocates, caller frees (C99, OpenBSD, C11 Annex K)
Callee allocates, caller frees (ISO/IEC TR 24731-2)
Callee allocates, callee frees (C++ std::basic_string)
Then he mentions, "The third me... | callee allocates callee frees |
sizeof(temp)doesn't do what you think it does. It tells you the size, in bytes, of a pointer to char, which is whattempis. Most likely on your system either 4 or 8.This has nothing to do with the length of any particular string, or the size of any particular buffer returned frommalloc.It's pure fluke that you've passed... | char* temp;
temp = (char*) malloc (strlen(window->entry.value)+1);
//strncpy( temp, window->entry.value, sizeof(temp) ); DOESN"T WORK
memcpy (temp, window->entry.value, strlen(window->entry.value) + 1); //WORKS(where window->entry.value is a string.)Thanks. | Why doesn't strncpy work with a string allocated with malloc? |
Usingmod_rewritekeep this rulevery first rulejust belowRewriteEngineline:RewriteEngine On
RewriteCond %{REQUEST_URI} !^/(memorial-photos|videos|images|category)/ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^[^/]+/([^/]+/[^.]+)$ /$1 [L,NE,R=301] | I have a couple of urls I would like to remove the entire directoy section from a url. What would the htaccess 301 redirect be? Can someone assist.Eg.https://example.com/first-lastname-word1-word2/biography/firstnamelastname
https://example.com/first-lastname-word1-word2/activity/firstnamelastname
https://example.com/f... | 301 Redirect Remove first directory |
React Query returns anisFetchedAfterMountflag that can be used to ignore stale data. If you haverefetchOnMount: 'always', you can render a loading spinner or whatever as long as!isFetchedAfterMount. | I don't really like the approach of displaying potentially incorrect data to the user (stale)
until the new data arrives.I prefer re-fetching the data always when the user first enters the page,and then caching it until he performs a reload to the page or enters it again.I can't find a solution using react-query, does ... | React Query - How to always refetch data on first entry and cache it until page reload? |
I had this issue and I fixed it by adding a Service Entry. When we use a headless svc, istio is not sure where to direct the traffic to. U can add something similiar to below.apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: kafka-se
namespace: <If any namespace>
spec:
hosts:
- kafka.d... | I have deployed Kafka as a statefulset with zookeeper configured as leader selector, a headless service. Kafka is running absolutely fine as expected. However I am facing issues while configuring Istio to access kafka.$ kubectl get pods -owide | grep -i kafka
kafka-mon-0 1/1 Running 0 3d1h <IP> ... | Istio ingress not working with headless service |
There are multiple ways on how you can run a cronjob inside a docker container. Here is an example for a cron-setup ondebianusingcronjob files.Create a crontab file* * * * * root echo "Test my-cron" > /proc/1/fd/1 2>/proc/1/fd/2my-cron- This file contains theinterval,userand thecommandthat should be scheduled. In this ... | I have three files which iscrontab : lists of cron job to be executeentrypoint.sh#!/usr/bin/env bashservice cron start
pythonand docker file basically to install the pip and to run crontab on certain folder.My question is :
Why in my docker container, the cron just start once and Exited. have no ways to find the logs o... | Python Cron Job in Docker Container |
Try these rules:# image doesn't exist in /accounts/john/<img>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}/accounts/$1/$2 !-f
RewriteRule ^([\w-]+)/account/(.+)$ default/$2 [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}/accounts/$1/$2 -f
RewriteRule ^([\w-]+)/account/(.+)$ ... | I've created this rule:RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-zA-Z0-9_-]+)/account/(.*)$ accounts/$1/$2 [NC,L]to point an address like this:example.com/john/account/img/1.jpgtoexample.com/accounts/john/img/1.jpgand it works.I know how to make a rule if a url to a phisical file not exists.But now I want, a... | Htaccess - Check if file exists after url rewriting |
The key is 'clusterIP: None'.If clusterIP is not set, k8s will allocate one for the service automatically, also the kube-dns will set a domain name for the service, named mariadb.[namespace].svc.cluster.local, that's your first case.While if clusterIP is set to 'None', that means k8s doesn't allocate a ip for the servi... | I have the following YAML file -apiVersion: v1
kind: Service
metadata:
labels:
name: mariadb
name: mariadb
spec:
ports:
- port: 3306
selector:
name: mariadbWhen this service is created, a ClusterIP is automatically set.
My stateful set 'mariadb' is exposed using this service.
But if I login to anoth... | Kubernetes service not exposed when ClusterIp is set |
Adding ::/0 and 0.0.0.0/0 route to igw in route tables fixed the issue. | I needed an ipv6 address for my ec2 instance so I reconfigured my vpc and subnet to provide ipv6 address. I got a new ipv6 address assigned to my ec2 instance. But now ping6 to any ipv6 address like 2a03:2880:f11c:8183:face:b00c::25de from ec2 instance is not working. Moreover wget command is also not able to connect (... | EC2 ping not working after moving to IPv6 |
Try this:RewriteCond ${QUERY_STRING} ^id=
RewriteRule ^(.*)\.html?id=(.*) index.php/controller/$1/$2 [L]You might need to add a question mark after the second$2if you get the original query string appended somehow after the rewriteShareFollowansweredSep 21, 2012 at 14:25Silviu GSilviu G1,2511111 silver badges3232 bronz... | I have a code igniter site that needs to accept incoming links in the format:http://domain.tld/somename.html?id=IDREFI need to create a rule for mod_rewrite that rewrites this URL to:http://domain.tld/index.php/controller/somename/IDREFI am having trouble writing the rule for the .htaccess file.I thought this should wo... | Mod Rewrite for Code Igniter |
First of all, you can usedeschedulerto redistribute the pods to the nodes. This can become helpful to solve your problem.
Link :https://github.com/kubernetes-sigs/deschedulerSecond, you can analyze your cluster-autoscaler logs to learn the usage of the nodes, then raise the scaling threshold a little bit accordingly.As... | I am using AKS cluster autoscaler to support pod scaling.Let's assume we have 6 pods running on 2 nodes (3 pods on each node).
With pod requirement of 4 GB memory and Each node has 12.8 GB allocatable memory.Autoscaler scales up correctly, when more pods are required. Everything is fine until now.
Now pods have become ... | AKS autoscaler is using more nodes than required |
This is exactly where the*comes in handy. It unpacks the values of a list.Try:list_of_labels = list(labels.values())
g.labels(*list_of_labels).set(val)Here's an example of how*works in pythondef f(a, b):
print a, b
tup = ("Hello", "there")
f(*tup)
# prints "Hello there" | I have a strange problem and was hoping to find a solution here. I am using push_to_gateway module to allow Prometheus to scape some data. There are 2 steps to the process:1) declare a variable as like so:g = Gauge(ctr, '', ['host', 'ip'], registry=registry)host and ip are labels used in the Prometheus DB. registry isn... | How to use variable in parenthesis verbatim |
We finished by adding to activity:@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(null);
}It suppresses any saved data on create/recreate cycle of an Activity and avoids fragments auto re-creation. | We are using Fragments and we don't need them to be automatically recovered when the Activity is recreated.
But Android every time whenActivity::onCreate(Bundle savedInstanceState)->super.onCreate(savedInstanceState)is called, restores Fragments even if we use setRetainInstance(false) for those Fragments.Moreover, in t... | Prevent Fragment recovery in Android |
2
You will have to use a form of cloud storage to achieve that. S3 for example. You can also host your static files just like a CDN. Since you're using django, consider reading this article. It explains how to host static files from within a django app.
As a Laravel user yo... |
How do people tend to handle static assets in web deployment on docker?
For example, in a django app deployed in a container, do you have the app server serve up the static files from the container, or do you sync them to another server for a webserver to serve, or do you use a CDN?
If not serving from the app contain... | Docker, web app static files. Best practices? |
You can now use docker containers to your custom notebook environment on GCP's AI Platform Notebooks. That might serve your means
They offer a base container that you can modify to fit your needs and then use as your active notebook environment
You can find more info about them here: https://cloud.google.com/ml-engin... |
I would like to run a Jupyter notebook from a docker image on GCP. Specifically I would like to run the one from kaggle/python. On my local machine I can get this working with docker pull kaggle/python and then the following docker cli command:
docker run -v $PWD:/tmp/working -w=/tmp/working -p 8888:8888 --rm -it kagg... | Jupyter Docker on Google Cloud |
I was able to achieve what I wanted by having all of the projects share one local git repository. I agree that this is not a best practice or something that should be done lightly, but in my case, I will be submitting my project in a grant proposal that requires all of the code to be in one repository on the same bran... |
I am a university student working on a summer research project with a few colleagues. I am working on one research project that involves an iOS app (built with Swift/Xcode), a Java app (built with IntelliJ IDEA), an Arduino sketch (made with CLion/C++), and a MicroPython file (made with PyCharm/Python). Since I am w... | How can I have multiple projects with their own local git repositories in one GitHub repository? |
I changed my code to:https.createServer({
key: fs.readFileSync('./ssl/private.key'),
ca:fs.readFileSync('./ssl/ca_bundle.crt'),
cert: fs.readFileSync('./ssl/certificate.crt')
}, app).listen(443);and it workedShareFollowansweredApr 23, 2020 at 0:26namkonamko65711 gold badge1414 silver badges2929 bronze badge... | I am trying to add an SSL certificate to my Nodejs website.const fs = require('fs');
const https = require('https');
const options = {
key: fs.readFileSync('./ssl/private.key', 'utf8'),
cert: fs.readFileSync('./ssl/certificate.crt', 'utf8'),
requestCert:true,
rejectUnauthorize... | Adding SSL Certificate to Nodejs |
Yes, since v9.0 is there a new way to take screenshots of panels.1 - Create an alert from the panel, as always2 - Setup alert3 - Keep Dashboard UID and Panel ID annotations.In v9.1 will be compatible with TelegramMore info in this discussion:https://github.com/grafana/grafana/discussions/38030Official doc page: (with c... | Have separately configured grafana image renderer, installed plugin and now can render any graphs.But telegram alerts still without images and no any checkbox "Include image"Grafana v8.4.6
Grafana Image Renderer v3.4.2What should be configured else? | Why Grafana does not include images to alerts? |
Cron runs commands as they would be ran via the shell, so running PHP would use local paths.
You need to use a command like:
php /home/USER/public_html/cron.php
Or if including the query string is necessary, use cURL instead (if it's installed):
curl http://www.wetube.org/cron.php?id=01001
You might want to look at no... |
I have a E-mail schedule runs everyday on php page using cron jobs. The php code workds fine when i run the page using a link.
Now when I run the php script using cron jobs, it also works fine but when I put some query the cron jobs won't understand the link.
for example: http://www.wetube.org/cron.php?id=01001 so now... | how to run php file using cron jobs |
Docker compose create a virtual network on you host and the services are not routable from outside of docker with those IPs. But inside the virtual network all services can access to each other with their names (http://otherservice/).
If you want to access to all deployed microservices on VM you will need a reverse pr... |
I created several Microservices in C# that are running on docker in windows, I need to call Microservice from another Microservice so I used this way to call:
[HttpGet("GetOrder/{Object_ID}")]
public Order GetOrder (int id)
{
string Baseurl = "http://189.29.0.100/";
…..
using (var ... | Call Microservice from another Microservice within Docker |
Images are specified using a "reference" which gets parsed to identify where the image is pushed or pulled from. That reference includes the registry, repository, and tag. If the registry is excluded, Docker Hub is used as the default. And if the tag is excluded,latestis used as a default. The syntax looks like:registr... | I am trying to build a multi-arch image but would like to avoid pushing it to docker hub. I've had a lot of trouble finding out how to control the export options. is there a way to make "--push" push to a registry of my choosing?Any help is appreciated | How do I docker buildx build into a local "registry" container |
There's no such thing as "SSL certificate". The term is misleading. X.509 certificates can be issued for different purposes (as defined by their Key Usage and Extended Key Usage "properties"), in particular for securing SSL/TLS sessions.Certificates don't require anything in regards to sockets, addresses and ports as c... | I've read a bit about SSL certificates, and in particular I've read that an SSL certificate "requires a dedicated IP address". Now, I'm unsure of the meaning of this; does it mean that the certificate requires a dedicated IP address separate from the IP address used for normal HTTP communication, or just that it can't ... | What exactly does "every SSL certificate requires a dedicated IP" mean? |
Given that you use CoreDNS as your cluster DNS service you can configure it tologqueries, errors etc. tostdout. CoreDNS have been available as an alternative tokube-dnssince k8s version 1.11, so if you're running a cluster of version >1.11 there's a good chance that you're using CoreDNS.The CoreDNS service usually™️ li... | I wish to sniff and extract all DNS records from kubernetes: clientIP,serverIP,date,QueryType etc...
I had set up a kuberenetes service.
It is online and running. There I created several containerized micro-services that generate DNS queries (HTTP requests to external addresses). How can I see sniff it ? Is there a way... | How can I sniff all DNS records from kuberenetes? |
Version 5.6 can't be upgraded from a version previous to 4.5.x. It seems to be your case, so you should first upgrade to 4.5.x (the latest 4.5.7 is recommended) then upgrade to 5.6. | I downloadedsonarqube-5.6and configured thesonar.properties. My mysql version is 5.6 and java version is 1.8. when I start sonar getting error current version is too old , while my sonar is 5.6. Here is error log and sonar.properties2016.08.03 18:30:13 INFO web[o.s.s.p.ServerImpl] SonarQube Server / 5.6 / 074f3d1169f9... | SonarQube :: Current version is too old. Please upgrade to Long Term Support version firstly |
3
Kubernetes provides a few fundamental Authentication concepts that actually manage access-control function. OpenID Connect as a part of authentication model represents a flexible way how to handle token ID based verification for user identity through a variety of Identity... |
I am trying to put some kind of authenticator in front of my kubernetes applications. I have been using the nginx-ldap-auth image with the traditional applications on docker containers.
But when on kubernetes and exposing applications on NodePort Services, what is the best way to put authentication around it?
Dex seem... | Difference between nginx ldap auth & CoreOS Dex |
One of the things that makes the Alpine base image small is that it uses a reduced version of core system libraries that can be incompatible with some binaries, apparently including theminikubebinary. Either of these works for me:# The hard way
/lib/ld-musl-x86_64.so.1 ./minikube-linux-amd64# The slightly easier way
a... | Learning kubernetes, I am trying to spin a minikube cluster in an alpine container running on docker. Regardless of whether this is possible or not, I don't understand why kernel is unable to see that "minikube" exists as an executable file, in /usr/local/bin. I am able to execute "kubectl" though which exists at the s... | Why am I not able to execute minikube like other executables, even when it is installed and ready? |
A deployment of an application using Composer usually goes like this:Checkout the appropriate version of the application from Git. You could also rungit archiveand pipe the result intotarto create a version that does not have the.gitfolder.Runcomposer installTransfer the created folder structure onto the target system.... | I have a repository with a bunch of code in it and a composer.json and a composer.lock.When I want to run the website on a different server I have so clone the repo and then runcomposer installin the root of the repo.However I want to be able to download the repo put it on a server and it should just work, without havi... | How to install composer for portable |
Yes, it is possible.There are two ways to add permissions to a bucket and its contents:Bucket policiesandBucket ACLs. You can achieve what you want by using bucket policies. On the other hand, Bucket ACLs do not allow you to give "create" permission without giving "delete" permission as well.1-Bucket Policies:You can c... | ContextI want to have a machine upload a file dump.rdb to s3/blahblahblah/YEAR-MONTH-DAY-HOUR.rdb on the hour.Thus, I need this machine to have the ability to upload new files to S3.However, I don't want this machine to have the ability to (1) delete existing files or (2) overwrite existing files.In a certain sense, it... | AWS: Append only mode for S3 bucket |
What you could do is something like this:server {
listen 80;
server_name a.com;
# ...
error_page 301 302 = @handler;
location @handler {
root /tmp/logo;
try_files /logo.png /dev/null =404;
error_log /tmp/nginx-error... | I have server that implements a 302 redirect to server some content.for example when user requesthttp://a.com/images/a.jpg, my server will make a request toserver B: http://b.com/images/a.jpg, butserver Bmay be return 302. so what I want is whenserver Breturn 302, my server will send aa.logoto user.server {
listen ... | how to send a static file when nginx proxy 302 redirect |
1
How about using --result-file= parameter to mysqldump? It is anyway recommended on Windows to avoid problems with newlines.
Share
Improve this answer
Follow
answered Dec 14, 2009 at 15:17
... |
I have problem when backing up mysql database. When I use the following command, it works fine
C:\Program Files\MySQL\MySQL Server 5.0\bin mysqldump.exe
--user=dinesh
--password=accounting
--host=dinesh
-C
--routines
--default-character-set=utf8
--Opt inventory
> C:\\R14122009_... | IProblem with backing up mysql database |
i found it just now, been find out this problem since yesterday and found out just now,
to resolve it, we should set up the env of RBENV if you are using RBENV and set the version of ruby and it gonna find the ruby-version in your root file app rail
i set it up itset :rbenv_root, '~/.rbenv'
set :rbenv_version, '2.7.1'
... | in myconfig/schedule.rb:set :environment, "development"
set :output, "log/cron.log"
every 2.minutes do
rake "reset_expired_pin:generate"
endthen i runwhenever --update-crontab --set environment='development'thencrontab -li see the cron in that list
and after I refresh my DB every 2 mins, it doesn't update anything ... | Whenever gem for cron in Rails can not be running in Mac and can't found the log |
The default NetworkOut alarms are kind of silly - the <2,000,000 one in particular, since it often leads to frequent termination/rebuild of low-use instances.I believe, however, what the >6,000,000 alarm is alerting on is that outgoing bandwidth from your instance(s) has exceeded 6Mbit/min for five consecutive minutes.... | I have an Elastic Beanstalk app running on t2.medium with autoscaling enabled. EB automatically sets a default autoscale trigger of 6,000,000 bytes over a 5 minute period on NetworkOut. We have a meeting app, so many people load the page at the same time, this causes a spike of NetworkOut data for probably a 10 minute ... | Elastic Beanstalk NetworkOut auto scaling |
removeChild or removeChildAt does not actually remove an Sprite or any other DisplayObject from memory, it only removes it from the displaylist. That means if you create 1000 sprites and add them to the stage (displaylist), and then use removeChild on all 1000 sprites they could still exist in memory forever.
To remov... |
What would be the most efficent way to remove the children from a sprite/movieclip in respect to memory and garbage collection?
I have seen atleast three ways.
Simple re-assigment
sprite = new Sprite();
null and then new
sprite = null
sprite = new Sprite();
or the while removal (which I am fond of)
while(sprite.numC... | Most efficent method for removing children from a DisplayObject in as3? (Memory) |
You're getting a server error because the rule is looping. You don't have conditions to prevent this like you do for the first rule. Additionally,(.*)is too general if you want to be able to differentiate between the two:RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRu... | Well,This is my actual url:http://www.domain.com/wix/t1/index.php?username=foyezbd(this foyezbd is come from variable $username)and I re-write it with .htaccesshttp://www.domain.com/wix/t1/foyezbd.htaccess:RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wix/t... | .htaccess Internal Server Error when i use 2 link structure |
You can't do that in docker-compose. You can however use a very nice feature in docker calledMultiStage BuildBasically, create a new Dockerfile to combine the images into one:FROM my-project:latest as project
FROM tomcat:latest
COPY --from=project /my-project/my-project.war /webappsOnce you build this image usingdocke... | I am trying to create a docker environment for my project. Let me explain.I have a project calledmy-projectwhich produces a warmy-project.war. I created a Docker image calledmy-project:latestwhich contains themy-project.warin the/my-projectdirectory. That was easy.Now I want to combine the Docker imagesmy-project:lates... | Docker-compose: merge/combine two containers |
7
Easiest way to cleanup a namespace is to supply -n namespace with all --all
kubectl delete all --all -n ingress-nginx
Share
Improve this answer
Follow
answered Nov 25, 2021 at 20:44
Muk... |
I’m trying to set up a nginx ingress controller to help validate a configuration. I’m trying to remove all the pieces and re-add the ingress controller to make sure everything I’ve documented works. The Ingress is removed, the service is removed, and pods successfully delete but they come back. The logs complain ab... | Unable to remove kubernetes pods for nginx ingress controller |
It is possible to preventforking of repositories of an organizationby unchecking the box underProfile > Your Organizations > Settings > Member privileges > Repository Forking, as shown in the figure.ShareFollowansweredMay 25, 2021 at 20:40flaxelflaxel4,36344 gold badges1919 silver badges3131 bronze badges2Interesting, ... | After setting up an org. My members of my org have the ability to fork repos into my org. Is there a way to prevent this?If the settings are correct they should see the following:You don't have permission to fork on these organizationsThanks, | Restrict Github Org Forking |
I'm assuming you're going to put the command underUserData.Scripts entered as user data are executed as the root user, so do not use the sudo command in the script. Remember that any files you create will be owned by root; if you need non-root users to have file access, you should modify the permissions accordingly in ... | I am baking an image on top of Amazon linux image.
I need to run a service as ec2-user.
Is it possible to run a launch script of any kind as user other than root? | AWS EC2 cloud-init script run as ec2-user |
There is no reason that they need to be the same size other than to simplify the implementation. In fact, in some systems (such as x86), the p2 field you show can be part of the offset for some pages and not others, to allow multiple page sizes.
|
Let's say hypothetically you have a two-level paging system with a 32-bit logical address and the page offset has been predetermined to be 12-bits. This leaves 20-bits for the page numbers. All the examples I can find online and in textbooks show the page numbers then split into 2 blocks of 10 such that the virtual ad... | Do page table entries at each level in a Two-Level Paging system have to be the same size? |
You can trust that the peer owns the private key of the certificate he supplies, because he also supplies a digital signature which is checked by SSL using the public key in the certificate. Only the owner of the private key can do that.Whether you trust that the peer owns the identity expressed in the subject DN comes... | I am playing around with OpenSSL, and in my server code I have the following:rc = SSL_get_verify_result(ssl);
printf("SSL_get_verify_result(): %i\n", rc);
cert = SSL_get_peer_certificate(ssl);
printf("SSL_get_peer_certificate(): %p\n", cert);
pkey = X509_get_pubkey(cert);
printf("X509_get_pubkey(): %p\n", pkey);SSL_g... | Self Signed Certificate: Can I trust the client being indeed the owner of the public key? |
1
It looks like to pull in a forked repo via Bower you'll have to add a commit hash, or a tag or branch to the end of the path like so:
{
"name": "My App",
"version": "0.0.0",
"homepage": "https://github.com/foo/bar",
"authors": [
"...."
],
"license": "MIT",... |
bower.json file
{
"name": "My App",
"version": "0.0.0",
"homepage": "https://github.com/foo/bar",
"authors": [
"...."
],
"license": "MIT",
"dependencies": {
"my-github-forked-repo": "[email protected]:stoplion/my-github-forked-repo.git#~2.1.4"
}
}
I've forked a Github repo, made my own commits... | Bower refuses to install from github fork |
Static routes defined underset routing-optionsare for Global Routing Table and the ones defined underset routing-instances Main-VR routing-optionsare for the Virtual Router(Main VR).ShareFollowansweredMar 13, 2018 at 17:20Mihir DassMihir Dass47055 silver badges77 bronze badgesAdd a comment| | I have a question about Juniper SRX firewall configuration,
Running 11.4R7My question is about routing table used while processing traffic passing through the firewall,
I have routing configuration part of the routing-instances definition, and it looks like this :set routing-instances Main-VR instance-type virtual-rout... | Juniper SRX firewall routing configuration |
Can you please try this?0 0 0 ? * SUN,SAT *Refer:This | I have a job to execute on Saturday and Sunday, but not on weekdays. This is how I schedule it:myTriggerBuilder.withSchedule(cronSchedule("0 0 0 * * ?")).build();The scheduler in use is Quartz.This will run at 00:00:00 server time each day. However, I would like to make it work only on Saturday and Sunday, however, in ... | How to schedule crontrigger to run on certain days of the week? |
I find the easiest way to generate aniptables-restorefile is to runiptables-save > rules.iptand then edit the file with any required statements. | I'm building a firewall rule generator and i need to apply all the iptables rule atomically. The only guaranteed way to do that is to use an iptables restore file, which has it's own syntax. The only guaranteed way to generate such a file is to run the iptables commands, dump them with iptables save and restore them, w... | Looking for a way to correcly generate an iptables-restore file |
0
No, it doesn't. You may want to backup your projects manually from now on. You may upload them on some online storage device as GoogleDrive or simply copy them on some other physical location.
Share
Follow
... |
Does Adobe Flash save the project automatically in a backup file somewhere? Or do I have to do the entire thing again (not the whole project but what got lost 2+hours)?
If I'm right, even Word creates backups over time.
If flash creates backups, I shouldn't overwrite it by opening the file again and remaking what I ... | Does Flash save automated backups? |
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} .*jpg$|.*gif$|.*png$ [NC]
RewriteRule (.*) /viewed.php?image=$1The above .htaccess entry will rewrite the following request:yourdomain.com/some_image.jpg -> youdomain.com/viewed.php?image=some_image | Is it possible if you access an image on a server that it can execute a script separately by using .htaccess, for example (pseudo code):-> user views http://www.mywebsite.com/images/systems_analysis.jpg;
-> .htaccess gets the image name (systems_analysis.jpg);
-> then executes viewed.php?img=systems_analysis.jp... | Execute a script when accessing an image by .htaccess |
Just found the answerand the fix is to TOUCH the crontab filehttps://github.com/kkpoon/docker-cron-example/commit/6f9938d6a742cf09a33881f07d62eebe22ae71c3#diff-cf427fa2c0d7ad197f95ae145b56db52R4thanks this link:https://github.com/phusion/baseimage-docker/issues/198 | I have a docker, which is based on ubuntu image.https://github.com/kkpoon/docker-cron-example/tree/1733eef9b76d51fda038510f49eebd58d4528c54It runs cron and works well in the docker hosted in ubuntu.When I deploy it to a CoreOS host, it has funny behavior.docker run --rm --name example1 docker-cron-example,
checked the... | docker ubuntu cron in CoreOS not run, funny behavior |
There are various ways of doing this, but perhaps the easiest way is to create a new branch based on upstream, cherry-pick all the commits that you want in the request onto that new branch, and then issue a pull request for that new branch. For example:# Update your remote tracking branches:
git fetch origin
# Create... | Ok so I have a bunch of commits from when I was configuring and testing my git installation and now I am trying to make a pull request back to the main repository but I dont want all the changes I made to be in the request.How can I either remove a selected ranges of commits and leave them in the staging areaormake a p... | removing git commits from local history and pushing to github |
I had the same issue using Gunicorn, nGinx, Django andRequestsevery time I did:response = requests.get('http://my.url.com/here')the workers would timeoutI solved the problem by switching from Syncronous (sync) workers to Asynchronous (eventlet) workers.if you are launching command line add:-k 'eventlet'if you are using... | I have a Django application running in Gunicorn behind Nginx. Everything works fine, exect for one strange thing: I have a "download" view and a RESTful json API. When call the download view I use urllib2 to access the json API to get information. And excactly when I try to do this http get request to the json api, the... | Gunicorn worker timeout |
Of course there is a difference!
0 * * * * - is every hour, when minute == 0.(i.e. 1:00, 2:00,..)
* * * * * - is every minute
Check out the guide for more info.
|
In Jenkins we have the Poll SCM schedule set to * * * * *. But Jenkins suggests Do you really mean "every minute" when you say "* * * * *"? Perhaps you meant "0 * * * *"
Is there any difference between * * * * * and 0 * * * * ?
| Jenkins cron format |
Glue Crawler leaves a lot to be desired. It's promises to solve a lot of situations, but is really limited in what it actually supports. If your data is stored in directories and does not use Hive-style partitioning (e.g.year=2019/month=02/file.json) it will more often than not mess up. It's especially frustrating when... | I have a pretty basic s3 setup that I would like to query against using Athena. The data is all stored in one bucket, organized into year/month/day/hour folders.|--data
| |--2018
| | |--01
| | | |--01
| | | | |--01
| | | | | |--file1.json
| | | | | |--file2.json
| | | | |... | AWS Glue Crawler Creates Partition and File Tables |
I found the solution to my problem in Microsoft's Azure Pipeline documentation.Build.SourceBranchThe branch of the triggering repo the build was queued for. Some examples:Git repo branch:refs/heads/masterGit repo pull request:refs/pull/1/merge | I'm looking to have different stages of my ADO pipeline run depending on the outcome of a condition. For this condition, I want to compare the name of the branch (the one that triggered the pipeline to run) up against a string literal. I can't do this until I can access the name of this branch in a dynamic way.For exam... | How can I know which git branch triggered my ADO pipeline? |
1
You could run docker with user mapping, so any file created with uid 0 (root in the container) is automatically mapped to another uid on the host. This is handled by two files /etc/subuid and /etc/subgid.
Read the official docs
Share
Improve this answer
... |
I own a folder, /me/tmp to which I mount a docker volume: docker run -v /me/tmp/:/root/tmp/. However when my Docker container creates folder and files instead the directory, e.g. /root/tmp/subdir/file.txt that file is created as root, and with no write permissions for other groups or users. This means that outside t... | Docker volume files not writable, written as root |
A bit tricky here. I ran some tests. A couple of comments:
1- You should always typecast the allocated memory:
char *a = (char*) malloc(1024*1024);
2- If you are allocating 1MB above and I see 1GB in the live bytes, this tells me you are using a for loop (1000 times) like this:
for (int i=0; i<1000; ++i)
{
char* a... |
I'm profiling my app, and was trying to see how the app would behave on a low memory situation.
I know that I can simulate the low memory warning using the simulator, but I don't want to simulate how the app will behave if the memory warning is triggered, but instead, see how the app will behave on an actual low memor... | Live Bytes vs Resident Size |
Specify the portin your rule. Change your .htaccess to something like:RewriteCond %{QUERY_STRING} ^(.*)userid=fakepass(.*)
RewriteRule ^(.*)$ https://%{HTTP_HOST}:9000/somedirectory/request.jsp?userid=theuser&password=realpass | I'm using Apache mod_proxy with mod_rewrite to mask some credentials in the query string. The logs show that the rewrite rule is working properly, but the port number (:9000) is being stripped causing the proxy to reject the URL. Aside from security lectures and anything else irrelevant to the actual question at hand, ... | Why does mod_rewrite strip the port number from my request url? |
If your system has a working/usr/bin/sendmail(doesn't have to besendmailsendmail, most mail servers provide a/usr/bin/sendmailwrapper script) then you can use themail(1)utility to send mail:echo "hello world" | mail -s hello[email protected]mail(1)is pretty primitive; there's no MIME file attachments, you're stuck with... | I am writing a series of cron jobs. I want each task to log its output to file, and then I want the contents of the file mailed to me at say[email protected]I think logging the output to file can be done using simple pipe redirection like this:30 0 * * * /path/to/script1 > task1.log
30 1 * * * /path/to/script2 > task2.... | cron: sending output to file then EMAILing file to me |
Your workflow is slightly inconsistent, so I can't say, why git sees no changes.But I would push new branches always like thisgit push origin develop:develop
git push origin new_feature_name:new_feature_name | I cloned a github repo after forking it and didgit remote add upstream (url)
git checkout --track origin/master
git checkout develop
git checkout -b new_feature_namethen some changes andgit commit
git fetch upstream
git checkout develop
git rebase upstream/develop
git checkout new_feature_name
git rebase develop
git pu... | git rebase doesnt show commits |
use this:RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /folder/index.php/$1 [L] | This is what my.htaccesslooks like. The.htaccessis sitting in/www/scriptsdirectory which is the parent of codeigniter'ssystemdirectory and which also containsindex.php. I have enabledmod_rewritein my Apache 2.2.x. This is on Ubuntu 9.10 server.I followed thislink, but it does not work. Is there anything I need to do in... | CodeIgniter - How to hide index.php from the URL |
Thedokku pagementions:Initializing from a private repository requires one of the following:A Public SSH Key (id_rsa.pubfile) configured on the remote server, with the associated private key (id_rsa) in the Dokku server's/home/dokku/.ssh/directory.And:In order to clone a remote repository, the remote server should have ... | I know you can deploy your project to dokku with a GitHub workflow. But I have seen that there is also the function dokkugit:sync, so dokku should capture changes on the master branch and download the new version or? But I always get a permission denied error, which ssh key do I have to enter where? | Deploying GitHub project to Dokku system |
Yes, all equal keys from all mappers get funneled into a single reducer.It's not clear if you have 900GB of only one word, or a bunch of large text documents with a bunch of words.In the later case, the string "Hello" really doesn't take that much data. Neither does a single integer.The reducer will also get a long lis... | I want to understand what to do in the following case.
For example, I have 1TB of text data, and lets assume that 900GB of it is the word "Hello".
After each map operation, i will have a collection of key-value pairs of <"Hello",1>.But as I said, this is a huge collection, 900GB and as I understand , the reducer gets a... | Is reducer bottleneck in MR framework |
1
Try using en_core_web_sm instead en_core_web_lg.
You can install the module by python -m spacy download en_core_web_sm
Share
Follow
edited Nov 4, 2020 at 10:56
noobCoder
9411 silver badge1414 bronze... |
I have a flask python app that uses a spacy model (md or lg). I am running in a docker container in VSCode and all work correctly on my laptop.
When I push the image to my azure container registry the app restarts but it doesn't seem to get past this line in the log:
Initiating warmup request to the container.
If I... | python cannot load en_core_web_lg module in azure app service with docker image |
you can't directly via mappings (or templates), nothe approach Elasticsearch takes is that this is done by the ingestion process. you could do that with an ingest pipeline in Elasticsearch however | can we define multiple choices for a Field when we define a document in Elasticsearch?
I want to create a field for status in my Index with choices.eg. We define choices for our db tables/models in traditional DB. Is their any similar approach available here?status_choices = [
('NW','New'),
('IP', 'In-progress'),
('OH... | do we have option to create Field mapping with choices in Elasticsearch? |
the remainder is that the remained part, which are not as dominant as the previous ones.
For instances:
1) Bitmap occupies 10M
2) Resource occupies 5M
3) RelativeLayout occupies 100K
4) LinearLayout occupies 20K
...
on the map, only 1) 2) show up, and 3), 4) ... are included in the remainder.
|
I just started learning about memory management for Android. After doing a memory dump on the application I am working on and analyzing it with Eclipse Memory Analyzer, I found out that 37MB (out of the 50M retained memory) was taken by a "Remainder". This 50M figure matches my logcat retained memory, so I guess this ... | What is the Remainder in the Eclipse Memory Analyser main pie chart? |
In all likelihood, you're exceeding the size of the heap on the device. You can use a cuda API call to fix this.
cudaDeviceSetLimit(cudaLimitMallocHeapSize, n*100000*sizeof(float));
Make sure you do this before any kernel call though. With that said, you should strongly consider using cudaMalloc once to allocate a si... |
I have a dynamic memory allocation inside my kernel:
float MyLongArray1 = new float [array_size]
float MyLongArray2 = new float [array_size]
where array_size is taken from kernel call. array_size is on the order of 100000, so quite high.
Memory allocation seems to be working fine. Then I try to do something with the ... | cuda, dynamic memory allocation in kernel memory imprint? |
There is no way to add a volume to a running Docker container, so Kubernetes has no way to add a volume to a running Pod. Modifying the Pod to include a newhostPathvolume will recreate the container(s) in the Pod and mount the volumes as specified. | In kubernetes, is there a way to mounthostPath volumeafter pod got started? | kubernetes: Mount hostpath volume after pod start |
You are using wrong variables inside the bodies of your loops (ggandggyinstead ofxxandyy). Among other problems, this causes (almost) all of the allocated memory to be leaked since you're losing thecalloc()ed pointers.ShareFolloweditedNov 8, 2012 at 9:09answeredNov 8, 2012 at 8:59NPENPE493k109109 gold badges956956 silv... | If I'm allocating memory in a loop like sofor(file = 0; file < nfile; file++){
...
...
...
for(yy = 0; yy < ngridy; yy++){
for(xx = 0; xx < ngridx; xx++) {
tmparr1[xx+(ngridx*yy)] = (double *)calloc(nptperf[file], sizeof(double));
tmparr2[xx+(ngridx*yy)] = (double *)calloc(nptperf[file], size... | Failure of free() |
As @Gumbo pointed out, "Apache should already do that for static files".
And that's true, Apache does that, so that kind of stuff works fine:<FilesMatch "\.(ico|pdf|jpg|jpeg|png|gif)$">
Header set Cache-Control "max-age=864000, public, must-revalidate"
</FilesMatch>ps: Sorry @Gumbo, but i asked you to change your a... | I'm serving images two different ways:Using a PHP script for profile pictures for exampleBy pointing to them directly, for icons and backgrounds for exampleI'm in the process of handling their caching properly, and i'm totally new to this.For the PHP script, i'm just adding aLast-Modifiedheader to the response, and del... | HTACCESS image caching rule that checks the image modification time |
All I see is "Find another repository to fork"You can fork any private repository you can access to your user account or any organization on GitHub Team or GitHub Enterprise in which you have repository creation permissions.Maybe this is possible through an organization, where youcan change member privileges.ShareFollo... | I am the owner of a private GitHub repository. Somebody else (student1) forked it a while ago and has done some work on his fork. Now I need somebody else (student2) to pull those changes and work off of them. However, he cannot access student1's fork at all. Trying to git pull provides an error about not being able to... | Accessing forks in private GitHub repository |
Add the following to your.htaccessfile<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L]
</IfModule>Then, in the php:$params = explode('/', $_GET['q']); | All PHP framework I know use routing.My goal is to use that routing technique without any framework:
ex:
Instead of having something like:viewProfil.php?username=tom&id=10I would like to get thatviewProfil/tom/10(for any numbers of get parameters)So I can hangle in viewProfil.php$username = $_GET[0];
$id = $_GET[1];Is ... | How to use .htaccess rewrite rule to simulate routing with no framework? |
1
If your process creates a commit every hour, you can reset the past 23 commits every day and create a single commit:
git reset --soft HEAD~23 && \
git commit -m "Squashed previous 23 commits into one" && \
git push origin
Share
Follow
... |
I have written a simple script to git commit the changes every hour and push the changes But I want to keep only the last commit of each day and remove the previous ones due to the size of commits to save the space. In other words, I need to keep the last commit of 22nd December and remove the previous ones but keep t... | How to keep the last commit of every day |
SSL/TLS is a broad topic, and the question is not so specific. Nevertheless, here you can find basic information:https://www.globalsign.com/en/blog/ssl-vs-tls-difference/Essentially, TLS is a better and upgraded version of SSL, and should be used instead of SSL versions. | This question already has answers here:Difference between SSL & TLS(7 answers)Closed5 years ago.I want to know what is ssl and TLS. Someone in Internet are saying ssl is renamed as TLS both are same. Someone says both are different both are different protocols. I have read one more article that using of ssl and tls wil... | What is SSL, TLS, and SSL/TLS? [duplicate] |
I don't think QImage uses the GPU to generate a jpeg.This probably wouldn't help (except on very limited CPUs) since the transfer time of getting the data back out of the GPU would normally dominate. The reason for using hardware acceleration for display is that the result is then already in the GPU ready for display. | I need to convert an Raw image buffer into a jpg image buffer.At the moment, I do this operation in the following way:QImage tmpImage
= QImage(rawImgBuffer, img_width, img_height, image.format ); //image.format=RGB888
QBuffer bufferJpeg(&ba);
bufferJpeg.open(QIODevice::WriteOnly);
tmpImage.save(&bufferJpeg, ... | QT, convert raw image to jpg using Hardware acceleration (gpu) |
Instead of using docker/build-push-action@v1 use docker/build-push-action@v2 as v1 is an older version.
Modify the GitHub action as below- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }
password: ${{ secrets.DOCKER_PASSWORD }}
- name: build-pus... | I have a docker build action as below- name: build-push
uses: docker/build-push-action@v1
with:
username: ${{ DOCKER_USERNAME }}
password: ${{ DOCKER_PASSWORD }}
repository: <repo>
tags: tag
push: true
dockerfile: ./<path-to-dockerfile>/Dockerf... | Is there a way to set path for docker build with the github action plugin docker/build-push-action@v1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.