Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
As yippie-flu and Vishesh Kumar Singh
answered inMongoDB server doesn't start at gitlab runner using gitlab-ci, instead oflocalhost:27017, you have to usemongo:27017because the mongo service is running in its own Docker container. | I am trying to create a docker test enviroment for our opensource hobby project. Our python and angular code is running without errors. I need a little help with configuring the docker runner to include mongodb.stages:
- build
- test
services:
- mongo
variables:
MONGODB_URI: "mongodb://mongo/projekt_eszkozok"
... | Mongodb gitlab CI docker connection refused |
To handle this rewrite, you may use this rule just belowRewriteEngine On:RewriteEngine On
RewriteRule ^api/(?!.+\.json$)(.+)$ $1.json [L,NC](?!.+\.json$)is a negative lookahead that skips matching URIs that end with.json(to avoid a rewrite loop)Pattern^api/(?!.+\.json$)(.+)$matches URIs that start with/api/and capture... | I want to know how to use.htaccessto redirect a certain path to a certain extension. To be more clear, I want to redirect something like this:http://www.example.com/api/some/pageTo this:http://www.example.com/some/page.jsonI understand that I could just do this using the router that is supplied by CakePHP, however, how... | Using htaccess to redirect to certain extension |
You have to integrate a monitoring system likePrometheusand then you can use Grafana to create dashboards having promotheues as a datasource | I need to create a dashboard to monitor all http erros that thrown by my rest api application. My application uses embedded spring-boot tomcat and I don't know how to retrieve thoses metrics.If anyone know a solution, please, help-me. | Monitoring http errors from tomcat with Grafana |
Pod is an ephemeral environment. Everything in the Pod is cleared when the container is down. You need to use Persistent Storage to store file, core and so on.If you have a nfs storage, you can use it to create PV and PVC. And then, you need to mount it on the Pod.See the following documentation.https://access.redhat.c... | I have setup the environment in my OC config maps for generating the heap dump. However, whenever there is a OOM error, it terminated the pod and restarted the container. Please assist me, how can i get the heap dump now.sample reference of my configuration - -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dump123.hpr... | Heapdump creation in openshift (OCP 3.11) |
Here's how I solved it:I simply went toAzure DevOps>Project>Project settingsNext, I went toPermissions>Endpoint Administrators>MembersThen I added my user to one of the groups under theEndpoint Administratorsgroup.
You are also allowed to add your user directly, but permissions are better managed in groups and not indi... | I'm trying to create a newKubernetes Service ConnectionforAzure DevOps, but when I try to create it I get the error:You don’t appear to have an active Azure subscriptionI've tried a few ways to fix the issue but it's not working. | You don’t appear to have an active Azure subscription when creating new Kubernetes service connection in Azure DevOps |
2
For GitHub, you can use a URL like this
https://raw.githubusercontent.com/antirez/redis/unstable/README
Or this
https://rawgit.com/antirez/redis/unstable/README
RawGit
Share
Improve this answer
Follow
... |
How do I download one specific file from a git repo, instead of cloning the whole repository?
Is it possible to download a specific file from GitHub git repos?
| Download a specific file from .git repo |
You need to:move that file onto an emptyDir volume (or hostPath I guess but use emptyDir) and thenrun fluentd/bit as a sidecar which reads from that volume andforwards to the rest of your fluentd setup. | I've a application Java/Spring boot that is running in a Kubernetes pod, the logs is configure to stdout, fluentd get logs from default path:<source>
@type tail
path /var/log/containers/*.log
pos_file /pos/containers.pos
time_key time
time_format %Y-%m-%dT%H:%M:%S.%NZ
tag kubernetes.*
format json
read_from_head... | Configure Kubernetes logs in different path with Spring Logback |
Docker doesn't run native on Windows. It actually creates a Linux VM where it runs the docker daemon. You can see this VM with VirtualBox (assuming you like many others use VirtualBox for virtualization).For this reason, in order to get your setup you need to modify this VM. You need to make sure its network interface ... | I'm new to Docker. My Docker Desktop for Windows version is 19.03.5.
I want to expose port 2375 from Docker desktop for windows, but if I use the GUI setting,that only can be accessed via tcp://127.0.0.1, My inner IP address 192.168.3.9 doesn't work.https://learn.microsoft.com/en-us/virtualization/windowscontainers/man... | how to expose 2375 from Docker desktop for windows |
It's hard to say but if this was bind-mounted into a container and that container was running its process as root (uid 0) then files it created would be owned by uid 0 even outside the container. Gotta get your sudo on.
|
I am unable to delete ‘test/deployment/sandbox-v2/tmp/dns’ after deleting the github repository 'test'. I am unable to reclone it in my CentOS system. Even after recloning in other folder,running site.yml file of sandbox fails at logs. So i'm trying to completely remove test repository and reclone it for fresh run. I ... | rm: cannot remove ‘test/deployment/sandbox-v2/tmp/dns’: Permission denied |
When you create your Elastic Cache cluster, you have to define a Security Group. A Security group is a set of rules that define what IP addresses are authorised to connect to your cluster.
Should you want to connect to your cache cluster from your local machine, be sure to add a rule to authorise your local IP address... |
Is there any way to access cache nodes from local development environment? Although the same cache nodes are accessible from EC2 instance.
I'm using Enyim memcache client library with C#. I found few article saying this is not possible then what should be best approach. Should i need to setup memcache locally for de... | Access ElastiCache memcache instance from local development environment |
According to this, its not limited to ECS:Amazon ECR is a regional service and is designed to give you
flexibility in how images are deployed. You have the ability to
push/pull images to the same region where your Docker cluster runs for
the best performance.You can also access Amazon ECR anywhere that
Docker r... | Is ECR only working with ECS or is it possible to use it in a 'custom' docker-swarm/docker-machine deployment to EC2 or other vendors? | Amazon Container Registry Only with ECS? |
if you want to rename a file, you can usegit mv oldfile newfileOtherwise, if you stage all the files, git wll detect that one file is deleted and the other is new. Note that some operating systems are not case sensitive for filenames (e.g. windows) | I created a project folder and push its content to GitHub
Now I decided to change files names ( from Structure to structure for example) Once I push again, the name of the file still the same on Github.
Any help would be appreciated.Regards | How can I push an already existing file on GitHub, but this time with a different name? |
There are two parts to your question:Copying your settings between Eclipse installsCopying your installed plugins between Eclipse installs#1 is easy to do. You can export your Eclipse preferences from the File -> Export... -> Preferences. The resulting file contains all of your preferences for each installed plugin. ... | I'm using Eclipse and have plenty of plugins installed and configured to my needs. Is there any good way to backup these plugins and the configuration of them. I want to be able to replay these plugins in futures eclipse version (as long as they are compatible) and on different PCs.I know I could simply archive the who... | Backup Eclipse plugins and settings |
Physical backup is a backup made with RMAN or copying datafiles on the OS. A logical backup is a term used for data dumps using tools like datapump, export. Technically a logical backup is no a backup because you can not do a point in time recovery.
A physical backup contains logical data (for example, tables or store... |
What is difference between Oracle Full database Backup vs Physical/Logical?
Does Physical backup include logical?
I want to Backup Whole database what backup should i tell to DBA?
| Oracle Whole Database Backup |
.Open youSonarQubeserver in browser (default URL ishttp://localhost:9000/)2.Perform log in (default login - admin, password - admin)3.Then go toQuality Profiles:4.CopyJavaprofile and name it as you like:Newly created profile will open immediately.5.Open activeCode Smellsrules:6.Search required rule and clickdeactivate... | I'm integrating Sonar to generate a report for one of Android-Kotlin project.It's done but it generated the report with Code Smells & most of are related with message "Checks whether files end with a line separator." which are nothing but just a warning message at the end of the file.Any suggestion how this can be avoi... | How to get rid of Sonar Report message 'File does not end with a newline.' |
The slash (/) character is used to specify "every n increments". If you want your trigger fired once an hour at 55 minutes past the hour, your syntax should be:55 * * * * ruby /Users/Supersize/Desktop/test.rbShareFollowansweredAug 13, 2015 at 16:31MureinikMureinik302k5353 gold badges319319 silver badges362362 bronze ba... | So I got the following Cronjob:*/55 * * * * ruby /Users/Supersize/Desktop/test.rbwhat I expect is, that it fires any:55th minute of an hour. Problem: It does the job, but fires another one5minafter. That means twice per hour with a delay of 5 minutes.Any idea on this? | Cronjob is firing twice |
As far as I can tell,no, GitHub does not provide the feature to duplicate a pull request. It actually has the opposite feature and allows you tomark a duplicate pull request.This, however, won't stop you from making as many duplicate PRs as you wish. It's not clear from your question if you want to create a PR fromfeat... | I have a pull request that I want to create a copy of. Like another pull request that does the exact same thing but exists as a separate pull request.The reason is that I want to merge the two copies into two different branches. And I don't want to pull the stuff locally, merge into another local branch bla bla.Does Gi... | How do I clone/copy/duplicate a pull request in Github |
Another option is php with the gd extension. Have a look at the manual pages for imagestringhereand imagegifhere.ShareFollowansweredNov 9, 2009 at 17:59fvufvu32.7k66 gold badges6161 silver badges7979 bronze badgesAdd a comment| | Alright,What Im looking for is a script that would automatically add a date to a .gif, which I can run daily as a cron job. I don't know perl very well, but It seems that Perl & Gimp might be a way to get the job done. Can anyone point me in the right direction so I can create such a scriptthanks! | Automatically add date to .gif |
Let's walk through each step you're asking about in your requirements:Pull from GitHub - You won't pull a docker image from here, however you may pull a Dockerfile from here, which would be used to build an image. The command to do this would be just like cloning any other repository:git clone <repository url>Build the... | My actual requirement is pull docker image from GitHub and build a docker image in ec2 instance and push that image to ecr. So, am just trying to clear my first step by asking help to pull image from git, very new to all this. | How to pull docker image from github and build image in ec2? |
The simplest and most accurate solution is to check the size of the persistent store directly.
Use -[NSFileManager attributesOfItemAtPath:error:] and then the fileSize key of the returned dictionary.
|
My app is caching content so that user can read it when offline.
I wrote everything of the cache into a database file (using CoreData) in iPhone.
However, the storage size is limited in iphone. So I would like to control the disk size my app is using.
How can I check the disk size I am using?
thanks
| iphone - how to know the storage size an app used? |
So I somehow overlooked a constructor for PoolingHttpClientConnectionManager that takes a TimeToLive value. This seems to set an expiration time for each created connection. I tested it out and it definitely picks up the change in my local hosts file after this TTL value. I just don't know if this is the right way to s... | So I seem to be having an issue related to the caching of DNS host name resolution when using PoolingHttpClientConnectionManager. I have an api that makes calls out to an outside service. This service uses Akamai edge caching so it's possible for the ip address to change. This api is under heavy load. I have 100 connec... | HttpClients PoolingHttpClientConnectionManager and DNS caching |
Risk of k8's on premise: Maintenance. On top of your existing workload to manage the servers you now have to patch k8's as well, while ensuring you don't bring the whole thing down. Security, who can call the servers. Firewalls. Auth etc etc. Usually these things are much easier on a managed k8s.vendor or inhouse: Look... | For a medium-sized enterprise, we want to deploy RH Openshift (or any other K8 platform) - on-premise - due to security related policiesWhat are the risks associated with on-premise Openshift (or K8 in general) setup?Is it better to have Openshift (or K8) installed by the vendor (in the case of Openshift, its RH) or by... | Openshift on-premise deployment by in house Devops teams advisable? |
TLDR: Just skip the step 2:
Under Type of key to generate, choose RSA.
If you're using an older version of PuTTYgen, choose SSH-2 RSA.
The AWS documentation is wrong here. To convert an existing private key file (pem to ppk) in PuTTYgen, you do not need to select key type. PuTTYgen will automatically detect key ... |
I've been accessing my AWS EC2 instance from Ubuntu for years with no issues. I'd like to also connect to it from a Windows machine. The procedure seems straight forward... copy my *.pem file to the Windows machine and convert to *.ppk using PuTTYgen.
The Amazon instructions provide the following...
But when I open... | PuTTYgen doesn't give me the option for SSH-2 RSA |
1
You can use "dd" for each partition (need to get their start blocks and active sizes, you may use fdisk for that). Also you need to use "dd" to get boot sector. Then you can create partition table with 4 partitions on second SD card and copy 4 partition images there using... |
I have a 32GB drive (SD card) with 4 partitions. Total partitioned space is <2GB.
I need to make an *.img file so that I can clone it to other SD cards which are smaller than 32GB.
If I just use "dd" I get an image file that is the full size of the card - 32GB.
This is all under Linux and the SD card is bootable, so ... | Drive image only partitioned space |
First, you're evidently talking about a 32-bit machine since your pointers and values are 4 bytes. Obviously, that's different for a 64-bit machine.
Second, the value needn't be 4 bytes. Frequently the value is a pointer or an int, in which case it is 4 bytes (on your 32-bit machine). But if it was a double, for ex... |
I understand that a node is usually 8 bytes, 4 for a value, 4 for a pointer in a singly linked list.
Does this mean that a doubly linked list node is 12 bytes in memory with two pointers?
Also this book I'm reading talks about how theres 8 bytes of "overhead" for every 12 byte node, what does this refer to?
| What does "overhead" memory refer to in the case of Linked Lists? |
66
Following the FAQ article "How to Rename the master branch to main in Git", and the GitHub documentation itself, you can:
rename your local branch from master to main: git branch -m master main
push to main: git push -u origin main
update your default branch on GitHub ... |
Because of github changing the default branch from master to main all of my pushes end up in a separate branch instead of the main one and I can't change the default. When I start a program and make my first push, git tells me main doesn't exist and I always have to push to master instead.
| git how to change default branch for everything I do? |
Your request values seems overestimated.
You need time and metrics to find the right request/limit for your workload.Keep in mind that if you change those values, your pods will restart.Also, It's normal that you can find some unbalance nodes on your cluster. Kubernetes will never remove a pod if you don't ask.For exam... | I have a bunch of pods in a cluster that is almostrequestingall (7.35/8) available CPU resources on a node:even though their actual totalusageis almost nothing (0.34/8).The pod that is currently requesting the most only requests 210m which I guess is not an outrageous amount - also I would like to enforce some sensible... | High total CPU request but low total usage (kubernetes resources) |
It turns out that the connection string in the base appsettings.json configuration file was not being overwritten by the environment-specific settings file (appsettings.Development.json). Our DevOps group set the environment variable for the container and it correctly connected using the SQL Server credentials. | A .Net Core 2.2 application running in a Linux Docker container fails to authenticate to SQL Server on a different machine using SQL Authentication. The error message is:Cannot authenticate using Kerberos. Ensure Kerberos has been initialized on the client with 'kinit' and a Service Principal Name has been registered f... | .Net Core Linux Container Won't Connect to SQL Server Using SQL Authentication |
4
After some playing around and testing I managed to achieve this using the following statement:
rewrite "/blog/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)" /blog/$4 permanent;
The first part matches the following expression:
/blog/2013/01/01/
Anything after the last slash will... |
I have an issue where I am trying to use nginx to remove some legacy information from a URL however it's a date but it always follows the same format:
http://example.com/blog/xxxx/xx/xx/this-is-a-blog-post/
To..
http://example.com/blog/this-is-a-blog-post/
I wonder if this is possible? I've had a go at trying to wri... | nginx rewrite to remove date path of legacy URLs |
I had the same problem.
Just use CloudWatch Logs Insights.
You should have a sample query provided by Amazon, but the one below works perfectly.
fields @timestamp, @message
| sort @timestamp desc
| limit 200
|
Is there a way to filter CloudWatch log streams by 'most recent' to oldest within the AWS console? I am having to scroll incredibly far down to get to my most recent log messages.
I have tried filtering by 30s - 5mins which works for now, I just thought there may be an easier way to list all of the log streams starti... | How do we sort CloudWatch stream logs by 'most recent' in AWS console? |
Edit your startup sequence to run a command or script that captures the interface's IP address and writes it to a file in the formatlisten :80or whatever port you want:echo "listen $(ip -o -4 a s eth0 | awk '{ print $4 }' | cut -d/ -f1):80;" > /path/to/some/fileThen just have your nginx config include that file:include... | Is there a way to make Nginx 1.11 bind to a specific interface regardless of the IP address?I've got a home gateway to an ISP provider; it uses DHCP client to obtain its dynamic IP address. I do not know what that IP address is at NGINX configuration time.Surely, there must be a way to make such a fine HTTP server bin... | NGINX bind to a specific network interface, regardless of IP address |
I think that Safari doesn't cache audio files even if listed in the manifest file. Have you tried encoding the audio as BASE64 string and decode/convert back to audio at startup? Have a look at the WepApi, it can probably help you with that process.
|
I am building an HTML5 web game, a spin on the classic asteroids game to be precise. The problem I'm running into is that Safari, unlike Chrome or Firefox, will NOT automatically cache and use .wav sound files. This is causing substantial lag if there are an abundance of sounds occurring. On each instance of needing a... | Safari not utilizing application cache manifest |
Solution 1: If you are searching free tool for auto backup mysql then you should check this Auto MY SQL Backup
Features:
Email notification of backups
Backup Compression and Encryption
Configurable backup rotation
Incremental database backups
Solution 2:
Another Solution will be Cron Jobs
5 0 * * * /path/to/mysqldu... |
I'm trying to backup MYSQL automatically on specified time every day, i searched for a free tool but i didn't find any thing !
Is there any free tool or application for backup a MYSQL database from my domain?
| Application for backup a MYSQL |
To configure the domain in the Bitnami instances you can runsudo /opt/bitnami/apps/sonarqube/bnconfig --machine_hostname YOUR_DOAMINRename this tool so that it does not change again at boot timesudo mv /opt/bitnami/apps/sonarqube/bnconfig /opt/bitnami/apps/sonarqube/bnconfig.disabledYou can check this in the documentat... | I have recently installed bitnami sonarqube 8.6 on AWS, and then configured DNS to serve it via my domain. I have also gone to sonar settings and changed the default host to point to my domain name as well. What happens is that the moment I hit sonar.mydomain.com it reroutes to the IP address.I believe bitnami uses apa... | Bitnami SonarQube when accessed via URL routes to the IP instead |
to sum up I want to say that the root of the problems was logging. Logs were sent to the stream and not flushed. After switching the logs off - everything was fine.
|
I have an interesting problem. I am using Ant which executes JUnit tests (test suite composed with 50 tests) via build.xml element. The problem is that I receive OutOfMemoryError.
I have enlarged heap space using ANT_OPTS arguments but it did not help. When I execute the same test suite in Eclipse - everything is fi... | Ant with JUnit task - OutOfMemoryError |
27
I encountered the same problem when building a go app using an alpine image. Installing gcc fixed the problem. Here is how your Dockerfile should look like:
FROM golang:alpine
RUN apk add build-base
RUN mkdir /app
WORKDIR /app
ADD . /app
RUN go build -o main .
EXPOSE 808... |
I have gcc on windows.
C:\Users\jkrov>gcc --version
gcc (MinGW.org GCC-8.2.0-5) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
My docker file:
FROM golang:al... | When trying to build docker image, I get ""gcc": executable file not found in $PATH" |
61
Neither of solutions above worked for my but I found that when I set region in ecr login command it worked.
aws ecr get-login --region us-west-2
Share
Improve this answer
Follow
answered Apr... |
I'm trying to push a docker image to the AWS ECR repository using the aws-cli.
I just run the get-login command
execute the output (which returns login succeeded)
then try to push a docker image then I get the
message:
denied: Your Authorization Token has expired. Please run
'aws ecr get-login' to fetch a new one.
... | `Authorization Token has expired` issue AWS-CLI on MacOS Sierra |
2
According to the docs:
You can use torch.manual_seed() to seed the RNG for all devices (both CPU and CUDA):
import torch
torch.manual_seed(0)
Share
Improve this answer
Follow
answered Nov 29... |
How do I set up a manual seed for mps devices using pytorch?
With cuda devices the code should work like this:
if torch.cuda.is_available():
torch.cuda.manual_seed(0)
I'm using an apple m1 chip. The following statement returns True:
torch.backends.mps.is_available()
But following statement is not possible:
torch.b... | manual_seed for mps devices in pytorch |
There is callback in NSURLConnectionDataDelegate that may help.- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse;connection:willCacheResponse: gives the delegate an opportunity to inspect and modify the NSCachedURLResponse which... | Is there any way I could specify certain to use a different NSURLCache? My application is dealing with potentially private information. I would like to keep multiple caches so that I can clear the private cache more frequently than the default sharedCache.I've seen the[NSURLCache setSharedCache]method, but I'm wonderin... | Can I specify an NSURLCache for a specific UIWebView or NSURLConnection? |
Then my question is, isn't there redundancy between directive #1 and part of #5?No it is not a redundancy actually. It is only because you're using absolute URL here which tellmod_rewriteengine to use absolute URL in rewrite instead of relative one.If your 5th line becomes:RewriteRule . index.php [L]ThenRewriteBasewill... | I keep seeing this (for neatness, I'm omittingIfModuleandRewriteEnginedirectives):RewriteBase /somedir/ #1
RewriteRule ^index\.php$ - [L] #2
RewriteCond %{REQUEST_FILENAME} !-f #3
RewriteCond %{REQUEST_FILENAME} !-d #4
RewriteRule . /somedir/index.php [L] #5From thedocumentation(and my ... | mod_rewrite: Demystifying RewriteBase (once and for all) |
Unfortunately you are not mentioning which OS and package version you are using. But I guess it's openSUSE Leap 15.3 with package firewalld-0.9.3-150300.3.3.1. If yes, it's a known bug which is already reported.
We are working on it, already found missing patches and new version of package will be soon released.https:/... | I got an error onsystemctl status firewalld.servicewhich looked like this:firewalld[18072]: ERROR: Calling pre func <bound method Firewall.full_check_config of <class 'firewall.core.fw.Firewall'>(True, True, True, 'INIT', False, '', {}, [], True, True, True, False, 'off')>(()) failed: check_config_dict() takes 2 positi... | firewalld: ERROR: Calling pre func <bound method Firewall.full_check_config of <class 'firewall.core.fw.Firewall' |
3
Instead of localhost, use boot2docker ip. First do boot2docker ip and use that ip:
<your-b2d-ip>:8080. Also you need to make sure you forwarded your port 8080 in VirtualBox for boot2docker.
Share
Improve this answer
Follow
... |
I am trying to host a simple static site using the Docker Nginx Image from Dockerhub: https://registry.hub.docker.com/_/nginx/
A note on my setup, I am using boot2docker on OSX.
I have followed the instructions and even I cannot connect to the running container:
MacBook-Pro:LifeIT-war-games-frontend ryan$ docker buil... | Unable to connect to Docker Nginx build |
The resulting role that SAM creates for you is just the name of your function with "Role" added to the end. You can use this information to get the Role or properties of it using normal CloudFormation functions.For example, if you wanted to access the role ARN ofMyFunction, you would use!GetAtt MyFunctionRole.Arnin you... | I like how a role + inline policy is created when I deploy my template:Resources:MyFUnction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Properties:
Description: Ente... | How do I get the name of a dynamically created lambda role? |
You can build distributed locking mechanisms on AWS using DynamoDB withstrongly consistent reads. You can also do something similar using Redis (ElastiCache).Alternatively, you could use Lambda scheduled events to send a request to your load balancer on a cron schedule. Since only one back-end server would receive the ... | I have a Laravel application where the Application servers are behind a Load Balancer. On these Application servers, I have cron jobs running, some of which should only be run once (or run on one instance).I did some research and found that people seem to favor a lock-system, where you keep all the cron jobs active on... | AWS - Load Balanced Instances & Cron Jobs |
So from our discussion regarding the NS server records always make sure that the local NS records matches the Parent NS records.In your case there there were 2 extra NS records associated with your domain that was the reason why your domains and sub domains were acting unhealthy. once you deleted those records the doma... | I createdthis questionearlier but was told that it is a DNS issue as apposed to an issue with HSTS. Regardless, here is what I need help troubleshooting:Issue:
A single site (one that I own), is showingserver DNS address could not be found. DNS_PROBE_FINISHED_NXDOMAINwhen I try to connect to it via chrome, firefox, or ... | DNS_PROBE_FINISHED_NXDOMAIN for single website |
Is image downloading on a background thread? If yes then where is NSAutoreleasePool? You have to add:
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
// your downloading thread code here
[pool release];
Or for ARC:
@autoreleasepool {
// your downloading thread code here
}
Also if image download hap... |
first of all, I am not using ARC as I had even bigger problems with it and I need full control of my memory management.
Here is the situation: I need to load a lot of remote JPEG images from a server and display them in a scrollview. The top images in the scroll view get released once the user scrolls down a bit. That... | Loading a lot of remote images - memory problems |
1
An easy solution to solve your issue is to use the non-FPM PHP image for Alpine.
You can replace:
FROM php:7.2-fpm-alpine
with:
FROM php:7.2-alpine
Share
Follow
answered May 19, 2020 at 20:22... |
I try to build and run a docker container, but the symfony serve process crashed immediately after the start:
Jul 19 19:14:05 |INFO | PHP listening path="/usr/local/sbin/php-fpm" php="7.2.20" port=43115
Jul 19 19:14:05 |DEBUG| PHP started
Jul 19 19:14:05 |DEBUG| PHP ERROR: cannot get uid for user '_www'
Jul... | "symfony serve" crashes with php 7.2 (docker/alpine) |
It's actually really simple, just point your 404 error page in IIS to your HTTPHandler.
Request.RawUrl will look like:
http://yourdomain.com/yourhandler.ashx;originally/requested/url
|
I have a system which sits on a web server and generates files on the fly in response to HTTP requests. This is currently implemented as an HTTPHandler.
Once the files are generated, they don't change very often, so I'd like to implement a cache.
Ideally, I'd like the web server to look at the cache folder and serve t... | How can I implement a Read-Through File Cache in ASP.NET? |
Try addinghandler.proceed()inonReceivedSslErrormethod of web view client. | I have to open a website inside a webview, I got error certificate auhtority un-trusted, but when I open the same web inside mobile browser it works fine,
and I don't want to show a dialog inside onReceivedSslError handler.proceed | The certificate authority is not trusted, in android webview but works fine in mobile browser |
My recommended approach is to use a rabbitmq queue where your cron will send messages. Then set up a couple of consumers(scripts that will wait at the other end of the queue) that will take the message one by one, compose email and send it to the customer.
This way, you can scale the number of consumers to match the vo... | I'm working on an existing custom eCommerce PHP application which is currently running a very resource intensive CRON every 15 minutes.The gist of it is: Customers can set up complex filters for products they are interested in, and receive emails based on these filters. The CRON which runs every 15 minutes, checks for ... | Scheduled task PHP alternatives |
A hacky solution:git push # ensure that you push all your last commits from all branches, and
# take care about your stashes as well because we are going to delete
# everything.
cd ..
rm -rf online-shop
git clone --depth 1[email protected]:giorgi-m/online-shop.gitThis last line will clone the reposito... | There is sucha question, albeit an old one, but it didn't seem to help.I havea repository. In the repository, I have a GIF file which is roughly 6 MB. It happened so that I pushed different versions of this GIF and apparently all of them were stored in the.gitfolder, which made the size of the Git folder around 40 MB.F... | Reduce '.git' folder size |
I figured out the issue. I was attempting to gather metrics from AWS namespaces that didn't have metrics available. Once I added metrics that were available data started showing up.. | I have Prometheus CloudWatch Exporter setup and pointed to our prometheus instance. I'm working through building out a config but I can't seem to get all of my metrics to show up in Prometheus.I currently haveaws_applicationelb_request_count_averageandaws_ec2_network_packets_in_sumworking but nothing else..This is my c... | Prometheus Cloudwatch Exporter Config |
You can either:Push to a different branch. For example, the following command will push your local branchmasterto a remote branch callednewbranch.git push origin master:newbranchThen, you can fetch on another computer and work on that branch from there.Add one of your repositories as a remote to the other. If you have ... | I have a remote git repo (on github) and a working copy on my local workstation. Due to travel, I now want to continue this work on another computer. I have committed all my changes locally. How do I grab this latest code from another git client without pushing to master on github? | I have committed changes to git locally and now want to work off this on another computer without checking in to master |
You need to make sure that the permissions that you are giving to the users through Cognito are restricted as possible. The most obvious one is that they will have read-only permission, otherwise, users will be able to tweak your code to delete, update or put items into your table.The other risk is that users will be a... | The client app (web app using client-side javascript) accessing directly to AWS DynamoDB ( using aws-sdk) and DynamoDB accessibility is authenticated by AWS Cognito. All the user must login with AWS Cognito to access AWS DynamoDB.For the above serverless (client javascript application - accessing from browser), what ar... | What are the security vulnerabilities for AWS DynamoDB accessing directly from client (web app) using AWS Cognito & IAM role based |
-fcheck requires full filesystem path. You can do this using%{DOCUMENT_ROOT}variable:RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{DOCUMENT_ROOT}/post/$1.php -f
RewriteRule ^(.+)$ post/$1.php [L] | I would like the URL:http://domain.com/category/subcategory/titleTo point to:http://domain.com/posts/category/subcategory/title.phpMy .htaccess file looks like this:RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{QUERY_STRING} !^.+
#RewriteCond post/%{REQUEST_URI}.php -f
RewriteRule ^(.... | Using RewriteCond with %{REQUEST_URI} for mod_rewrite |
update:Looking at thesource code for ASIHTTPRequest, it doesnotretain its delegate, so your code will either have to ensure that the delegate has not been released, or set the request's delegate property tonilbefore releasing your controller.If you are going to have several asynchronous HTTP requests running, it may be... | I have a view that will be displaying downloaded images and text. I'd like to handle all the downloading asynchronously using ASIHTTPRequest, but I'm not sure how to go about notifying the view when downloads are finished...If I pass my view controller as the delegate of the ASIHTTPRequest, and then my view is destroye... | Memory management, and async operations: when does an object become nil? |
So you first runhelm install coreos/kube-prometheus --name kube-prometheum --namespace monitoring -f kube-prometheus.ymlwith your values file set to point at 1.0 of the image:prometheusconfigReloader:
image:
tag: 1.0Then you change the values file or create a new values file or even create a new values file containing... | Below is Helm code to installhelm install coreos/kube-prometheus --name kube-prometheum --namespace monitoring -f kube-prometheus.ymlby this way we can override the value.yml values with the values present in kube-prometheus.yml.Is there any way by which we can first install and then update the value.yml from kube-prom... | How to upgrade the helm chart deployment using a file |
Could you please try following, where you need to look for condition if variable%{HTTPS}is on or not, add this condition with already existing condition. Also please don't mix it with already existing URL as it may get expose to client/browser(taking example from your shown current example).RewriteEngine on
RewriteCond... | I would like to force https on my site but that it is compatible with the current rule of my .htaccessHere is my htaccess file at the moment :RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]Thanks | Force HTTPS on my rewrite and rule .htaccess file |
In your crontab you need to set the path to point to the artisan file in your project's root directory.* * * * * php /path/to/project/artisan schedule:runIf you're having trouble finding the absolute path to your project route then open terminal,cdinto your project's route directory and then use thepwdcommand, which wi... | I've create a laravel task and added to my crontab fileapp/Console/Kernel.php<?php
namespace App\Console;
use Carbon;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your appli... | Configure Laravel task scheduling with Crontab |
I am running into the exact same issue. I did find that flushing stdout causes the logging to appear when it otherwise would not. Looks like a bug in Cloud Run to me.
print(json.dumps(entry))
import sys
sys.stdout.flush()
Output with flushing
|
I followed this guide https://firebase.google.com/docs/hosting/cloud-run to setup cloud run docker.
Then I tried to follow this guide https://cloud.google.com/run/docs/logging to perform a simple log. Trying to write a structured log to stdout
This is my code:
trace_header = request.headers.get('X-Cloud-Trace-Cont... | Simplest way to perform logging from Google Cloud Run |
When FireHose accesses your Redshift cluster, it does so from outside of your VPC.In order for FireHose to access your Redshift cluster, the following must be configured:The Redshift cluster must be in a public subnet, meaning it's in a subnet with an Internet Gateway.The Redshift cluster must have a public IP address.... | We are trying to use AWS Kinesis Firehose with Redshift output. We have created the Firehose Delivery Stream. We have a Redshift Cluster in a VPC Security Group.
But it seems like Firehose is not able to connect to the cluster.This is a snippet where we create the VPC Security Group."RedshiftVPCSecurityGroup": {
"Ty... | How to unblock Kinesis Firehose CIDR/IP on Redshift Cluster in a VPC? |
GC_FOR_ALLOC means there was not enough free memory to fulfill an allocation request, so a garbage collection was necessary !
A lot of those in the Logcat means that you're doing some memory expensive operation, which will eventually be halted. When the application's heap has grown as big as it is allowed, then GC_FO... |
At the moment, I have a thread that is constantly sending data over a local network. Below is a snippet of the current code:
@Override
public void run() {
while(!interrupted()) {
byte[] data = new byte[16];
int b = 0;
try {
intToByteArray(acx[0][0], data, 0);
intToBy... | Transferring realtime data over a local network |
*a = new char; means that you create a single char variable using its default constructor.
It's equivalent to *a = new char(); And you assign the address of the just created variable to the pointer a
|
I am just trying to get my head around various pointer concepts and I have the following code:
char** a = new char*; // assign first pointer to point to a char pointer
char b[10] = "bla bla";
*a = new char; //assign second pointer a block of memory. -> This looks wrong to me!!
(**a) = b[2];
So what i... | Pointer to pointer memory allocation, why is this wrong? |
Does that imply that I'm responsible for clearing [...] them once they aren't needed any more?Often, but not always. To be sure, you need to check the the documentation for the particular API that you are using.In your own APIs you should give preference tosmart pointersover raw pointers. This makes the intent clear an... | Inthis questionthe OP explores the idea of a function which returns a reference on a dynamically created object.intArray& createArray()
{
intArray *arr = new intArray(10000, 0);
return(*arr);
}The answers are that even dough this will compile, it will confuse the programmer who is using the function. He will be... | When a function returns a pointer, is it impling that i'm responsible for the pointers memory management? |
+50PTR record is for reverse DNS lookup or reverse DNS resolution is the determination of a domain name that is associated with a given IP address using the Domain Name Service (DNS) of the Internet. DNS is not capable of acting like an HTTP redirect in any way. I think you should create "A" record for WWW and setup s... | I have a problem with a PTR (Pointer) in Route53.I wanthttp://tradehubz.comto redirect tohttp://www.tradehubz.com.From what I gathered, the way to do it is via the PTR record which should do aHTTP Redirect (301)?Example of Configuration on Route53Ping Result | Amazon Route 53 Pointer Record not working |
I tried Reload and restarting nginx service to enable the new configuration, but in vain.
Rebooting my windows pc with the same config file, did the trick.
|
I have successfully hosted an angular website on nginx and my nginx.conf file looks like below,
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root C:/Angular-Project/angular2-trial/di... | Binding IP address to Angular site hosted on nginx |
I suspect that future CPU generations will still handle cache coherence for you. Without this, most mainstream programming methodologies would fail. I doubt any CPU architecture that will be used widely in the next ten years will invalidate the current programming model - it may extend it, but it's difficult to drop ... | I'm designing a program and i found that assuming implicit cache coherency make the design much much easier. For example my single writer (always the same thread) multiple reader (always other threads) scenarios are not using any mutexes.It's not a problem for current Intel CPU's. But i want this program to generate in... | Do you expect that future CPU generations are not cache coherent? |
The problem is that, in the context of a bash conditional expression, false is true. Or rather, bash doesn't assign any special meaning to the string "false", it's just treated like any other string. In a conditional expression, a plain string is treated as though it had was the target of a -n ("is this string nonblan... |
Could you please tell me what's wrong with this script?
if [[ " ${all[*]} " =~ " gcc " && \
" ${all[*]} " =~ " release " && \
false ]]
then
additional_opts="gpu-compute-sanitizers"
else
additional_opts=
fi
false comes from GitHub extensions while the actual script in the .yaml file is:
if [[ " ${all[*... | Logical operations in Bash do not work as expected when matching a pattern |
but I can't find any trace of the new branch in my gists at https://gist.github.com or in my git repo's.
Not only gists do not support branches, but the default branch has just (Feb. 2022) changed:
Gists Now Support Alternative Default Branch Names
As you may or may not know, gists are actually Git repositories.
Ne... |
I created a gist and cloned it locally where I am happily managing it. I also created a development branch and committed/pushed it (mainly as an exercise to understand git). I can see and manage all of this using posh~git locally, but I can't find any trace of the new branch in my gists at https://gist.github.com or... | Managing and viewing branches in a GIST |
I figured out it was my Power Query Settings . I used the below to reconcile the issuehttps://community.powerbi.com/t5/Desktop/Formula-Firewall-Query-references-other-queries-so-it-may-not/td-p/18619ShareFollowansweredJun 12, 2020 at 19:22Mike MirabelliMike Mirabelli41233 silver badges1717 bronze badgesAdd a comment| | I have the below code which pulls txt data from a file and gets used in an Excel lookup.let
Source = Csv.Document(File.Contents("J:\Accounting\Dallas\2020 Finance\BPC Trial Balances\BPC Upload text files\05.MAY\2020.MAY_USA_v2.txt"),[Delimiter="#(tab)", Columns=5, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"... | Power Query - Dynamically pass a file path into File.Contents function |
If this is in an application that you're making where you can supply code to it, you can set up a Render Target and output the result to a BMP or TGA file. | Is there a way to capture a screenshot directly from the GPU without the need to actually display the screen on the monitor? I check lots of posts here, but only found answers for capturing screen images remotely and so forth. | Capture image from GPU |
By using the triggeron:
pull_request:
types: [closed]You're running the workflowon the source branch(e.g.feature/xyz) once the pull request has been closed (and merged in your case, because you included another condition in the job).Since you want to run this job on thedevbranch, I suggest changing your condition... | I have setup one Github Action workflow. In which I want to trigger job when Pull request is merged from feature to dev branch. I have use Github Action environment with one protection Rule. Github Action is throwing an error message Branch"feature" is not allowed to deploy to dev due to environment protection rules.At... | Github Action Branch "feature" is not allowed to deploy to dev due to environment protection rules |
-1
If you wish just to print them on screen as suggested before: git ls-remote --tags
If you want to fetch them to your local repo you simply fetch all:
git fetch --all --prune. All will fetch all branches and tags, prune will remove the deleted ones.
Share
... |
I am wondring if it's possible to grep a repo's tags from the github or gitlab without having to clone it, I have a ssh keys to that repo.
For terminal I use this command to list tags for a specific repo I have cloned:
git --git-dir=/root/project-test/.git tag
This didn't work:
git ls-remote [email protected]:s1868/p... | Grep tags for a git repo from gitlab/github |
Since your container doesn't handle any http request you dont needreadinessProbe.readinessProbe: Indicates whether the container is ready to respond to
requests. If the readiness probe fails, the endpoints controller
removes the Pod's IP address from the endpoints of all Services that
match the Pod.When should you use ... | I have written a job scheduler service in go, which uploads files under a periodic interval. There is no HTTP service is running inside that service.Normally, for HTTP service, below are liveness and readiness probe configuration, need to be added at the deployment file.readinessProbe:
httpGet:
path: <http_get_pa... | How to configure readiness and liveness probe of pod in kubernetes, where a standalone go service is running? |
Read the documentation. Specifically, the second paragraph of the documentation for BackupRead:
You must set the variable pointed to by lpContext to NULL before the first call to BackupRead for the specified file or directory.
Your code is also in dire need of error handling--you do no checking for errors at all, w... |
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
... | How to backup using backup API's in c++ [closed] |
Drupal6 does this (which works in every browser known by me):Expires: Sun, 19 Nov 1978 05:00:00 GMTLast-Modified: Fri, 12 Jun 2009 08:01:46 GMT (the actual modification date)Cache-Control: store, no-cache, must-revalidate, post-check=0, pre-check=0No pragma header in this instance. I'm not sure why your example doesn't... | I'm using a simple servlet filter that forces the browser to skip caching for some server resources:Cache-Control: private
Pragma:This works fine in Internet Explorer but it doesn't works well with Firefox 3.0.10. I ended to write this code:Cache-Control: no-cache, no-store, must-revalidate, max-age=-1
Pragma: ... | Best way to disable client caching |
This is similar to writing hand-crafted assembly version with vectorization or other assembly instructions, while maintaining a C/C++ version as well. There is alotof experience with doing this in the long-term out there, and this advice is based on that. (My experience with doing this with GPU cases is both shorter ... | Closed. This question needs to be morefocused. It is not currently accepting answers.Want to improve this question?Update the question so it focuses on one problem only byediting this post.Closed6 years ago.Improve this questionThis is a bad title, but hopefully my description is clearer. I am managing a modeling and ... | Risks of maintaining/sustaining two code sets, one for CPU one for GPU, that need to perform very similar functions [closed] |
AWS Elastic Beanstalk's default configuration setsWSGIPathtoapplication.py, you either need to rename your file with mappings to application.py or configure the environment to point to your mappings script.Detailed information can be found in AWS Elastic Beanstalk Python Container Options:Option ValuesYou can set it wi... | I'm attempting to deploy my first Django app to Elastic Beanstalk. The Beanstalk created successfully via command line tools, I uploaded from my Mercurial via ZIP, that seemed to work just fine. But I'm getting a 404 when attempting to access it.Elastic Beanstalk HTTP Error (the log is huge, I can parse more, but I onl... | Django Elastic Beanstalk Deploy showing 404 |
You can use destructing assignment
let data = [{'id':120,'title': 'hello','link': '#', 'score': 24,'tags': 'tags blah blah','location': 'US','price': 120,},{'id':12,'title': 'hello wprld', 'link': '#','score': 125,'tags': 'tags blah blah', 'location': 'SO','price': 12,}
]
const format = data.map( ({id,link,title,s... |
I get information from github's api, but some of the returned data I don't want.The following is my code for filtering json data.
However, it is too complicated to write every field. Is there a more convenient way to write it?
result => {
var obj2 = {
items: []
}
function ObjectCreate(id, ta... | How to Copy Part of json? |
you might have this solved by now but I would guess the problem could be you're not returning the __typename in your code, so AppSync does not know what type within the union it's being returned. It should be returning, for instance:
{
__typename: 'Stream',
pk: 1,
starts_at: '2022-01-07'
} | I have two typesStreamandVideoand alistResourcesquery that returns a mixed list of streams and videos:type Stream {
pk: String!
starts_at: String!
}
type Video {
pk: String!
created_at: String!
}
union SearchResult = Stream | Video
type Query {
listResources(code: String!): [SearchResult]
}and be... | Appsync query union return type throws 400 |
Stackbrew is the official images project, all images owned by the stackbrew user are curated and verified by people at Docker. There's more info on the project available on our Github repo.
The dockerfile namespace is not official or supervised by us. It does have some repositories that are not (yet) available as an ... |
There are two users dockerfile and stackbrew on docker hub site. Both of them have a lot of "standard" repositories, for example mongodb repository.
What are the differences between them?
Which of them is more "official"?
| What are the differences between dockerfile and stackbrew users on docker hub |
For AWS CLI v1, the cleanest solution is:
export AWS_DEFAULT_PROFILE=user2
Afterward, commands like:
aws s3 ls
... are handled from the appropriate account.
For AWS CLI v2, the following will work:
export AWS_PROFILE=user2
|
Updated answer (7/10/2021): For AWS CLI v1, do this:
export AWS_DEFAULT_PROFILE=user2
For AWS CLI v2, the following will work:
export AWS_PROFILE=user2
The full question is below for context:
(1.) After successfully configuring a second profile for the AWS CLI, I unsuccessfully tried to set the profile to user2 in ... | How to temporarily switch profiles for AWS CLI? |
I believe you have two options to handle situations where new EC2 instances are being created automatically for you:Eithercreate a custom AMIfor your EC2 instances, orCustomize your AWS EB environment.Amazon issues a notice about using custom AMI:s:"After you are running on your own custom AMI, you will no longer recei... | I'm trying to figure out how to install and use GeoIP libraries on AWS (Elastic Beanstalk).
As far I know EB has an "ephemeral filesystem", but I could store the CeoCity binary in S3… but what about MaxMind C libraries? Has anyone configured EB to use MaxMind's api?(My stack is based on Python/Django) | MaxMind GeoIP libraries and database on Amazon Elastic Beanstalk |
I found the answer I was looking for. It turns out that you don't query the device for this information, you query the kernel object (in OpenCL). My source is:
http://www.hpc.lsu.edu/training/tutorials/sc10/tutorials/SC10Tutorials/docs/M13/M13.pdf
(Page 108)
which says:
The most efficient work group sizes are likel... |
In CUDA, there is a concept of a warp, which is defined as the maximum number of threads that can execute the same instruction simultaneously within a single processing element. For NVIDIA, this warp size is 32 for all of their cards currently on the market.
In ATI cards, there is a similar concept, but the terminolo... | OpenCL - How to I query for a device's SIMD width? |
Alerts in Prometheus are evaluated periodically, and you can't really set a schedule for them.I think it can be acheived with some PromQL Kong Fu:scalar(clamp(hour() > 9 and hour() < 15, 1, 1)) * <alert_promql>hour() > 9 and hour() < 15Define a range of time based on hour of the day (you can add minutes too)clamp(..., ... | I want to set an alert in Prometheus alertmanager that has to be triggered between a given time
Eg: Condition to be checked between 09:15 to 15:30 | Time based alerts in prometheus alertmanager |
Just include a script as part of the container startup (e.g., yourCMDor potentially yourENTRYPOINT) that grabs the container ip address and places it in a file. E.g.#!/bin/sh
myaddr=$(ip addr show eth0 | awk '$1 == "inet" {print $2}' | cut -f1 -d/)
sed -i "s/^ALLOWED_HOSTS=.*/ALLOWED_HOSTS=$myaddr/" /path/to/config/f... | I have planned to deploy my Django application in Docker.
For host validation, we need to set the ALLOWED_HOST variable to a domain name or IP address.How can I add the IP address of the container where my application is being served, to the allowed host?I don't want to use wildcards or IP range for security reasons. W... | How to dynamically add Docker Container's IP to the Django's ALLOWED_HOST |
The error was 'this tool requires the "new ARN resource ID format"'. This was reported as an issue on the original repohttps://github.com/docker/ecs-plugin/issuesPlease seehttps://github.com/docker/ecs-plugin/issues/175to resolve the issue. Basically you need to set ARN formats to new from your ECS Console in AWS by go... | I am following below docker documentation link in order to directly deploy my docker project on AWS ECS without changing anythinghttps://docs.docker.com/engine/context/ecs-integration/I have successfully configured docker ecs plugin on my machine (Ubuntu 20.04).docker ecs versionreturnsDocker ECS plugin v1.0.0-beta.2 (... | Docker ECS Plugin AWS Context not setting docker ecs setup |
make sure your current php.ini contains:extension=iconv.soand check ificonvextension is installed.you can check it it phpinfo withphp -i | grep -i "iconv support"ShareFollowansweredDec 11, 2017 at 12:54Vladimir SamsonovVladimir Samsonov1,34422 gold badges1111 silver badges1818 bronze badges3Already installed. Please ch... | In my System, PHP version is 5.6.32
Cron is running and Found message in cron_schedule table like below:TRIGGER: shutdown function
Last error:
Array
(
[type] => 1
[message] => Call to undefined function iconv_get_encoding()
[file] => /home/fanfan/public_html/lib/Zend/Validate/Hostname.php
[line] => 111... | Call to undefined function iconv_get_encoding() |
0
If remote repo is already exist at https://github.com/myuserid/projectname.git, you better use git clone instead of git init.
If you use git clone,
Don't need to init the repo. It initializes the repo with the copy of remote repo.
Don't need to add remote. By default,... |
I have never worked with version control systems before. I am planning to use git and github for a new project I will be working on. I have gone through git tutorials on Pluralsight. I understand how the system works but as I am new, I find it a bit confusing and want to verify whether I have understood it correctly.
... | Basic git/github workflow for project which I will be working on alone at the beginning |
2
I worked around this kind of issue by doing multiple redirects:
request comes in to URL - start background job
after 60 seconds redirect to URL?stage=2
after 60 seconds redirect to URL?stage=3
...
while job is running, every 60 seconds redirect to URL?stage=N
when job ... |
I am using nginx + cloudflare. I run a long php script that should take like 1-2 mins before it completes and redirect on another page. After completely running, cloudflare gives me a timeout occured. Here are my current settings on nginx.conf;
client_body_timeout 12;
client_header_timeout 12;
client_body_buffer_size ... | Running a long PHP script on cloudflare gives me a timeout (using nginx) |
As described in theDocker documentation, to set the docker daemon directory to<folder>:Create/etc/docker/daemon.jsonwith the following contents:{
"data-root": "<folder>",
"storage-driver": "overlay2"
}Restart the docker daemon.Note that this will not move existing docker data over to the target folder - you wil... | I followed the following tutorial to transfer and permanently move where docker saves data previously inside /usr/bin:https://linuxconfig.org/how-to-move-docker-s-default-var-lib-docker-to-another-directory-on-ubuntu-debian-linuxHowever upon restarting docker and rebuilding all containers, there seems to be activity in... | Move Docker /var/run/docker data to different directory |
It can be found here:https://doc.s3.amazonaws.com/2006-03-01/AmazonS3.xsd(See alsohttps://docs.aws.amazon.com/AmazonS3/latest/dev/UsingSOAPOperations.html) | An application of mine, interacting with the Amazon S3 server using REST API, performed a "Delete Multiple" operation against the server and encountered an error response:<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>MalformedXML</Code>
<Message>The XML you provided was not well-formed or did not validat... | Where can I find Amazon's published S3 XSD (XML Schema Definition)? |
If you're using NVIDIA's OpenCL implementation for their GPUs, you can do the followings to disassemble an OpenCL kernel:
Use clGetEventProfilingInfo() to dump the ptx code to a file, say ptxfile.ptx. Please refer to the OpenCL specification to have more details on this function.
Use nvcc to compile ptx to cubin fil... |
I'm not sure if it's possible. I want to study OpenCL in-depth, so I was wondering if there is a tool to disassemble an compiled OpenCL kernel.
For normal x86 executable, I can use objdump to get a disassembly view. Is there a similar tool for OpenCL kernel, yet?
| Disassemble an OpenCL kernel? |
npm says that you published only once and it was version 0.9.0 on 2013-11-26. github says that you update package.json to 0.9.2 18 days ago. So, did you npm publish after you released 0.9.2?
|
tl;dr : the reported version in npmjs.org is not the same as the one in package.json. Why ?
I have a javascript module that I released in both npm and bower : https://github.com/Offirmo/network-constants.js
It has a package.json for npm and a bower.json for bower. Both files have a version field, currently set to "0.... | npm reports an incorrect version for my module |
A fork makes sense if you intent to contribute back to the original repository, through pull request.In your case, I would recommend the following process, which you can replicate as many time as you need:make a new repository on GitHub, for your next projetgit clone locallyhttps://github.com/RPi-Distro/pi-genrename th... | I use the tool from Raspberry Pi to create images of the Raspbian OS (https://github.com/RPi-Distro/pi-gen).My workflow is to fork their repository and then start building my project on top of the OS. It comes handy in order to burn the final project on a SD card for the hardware.My problem comes when I have a second p... | How to fork a repository multiple times on Github? |
At which point is the memory on the data-sequent, occupied by the
static variable, freed? Does the runtime magically notice when I no
longer need it, like some kind of garbage collection?It would be freed at program exit, not sooner. Also, it's guaranteed that destructors would be called. | What happens to a static variable when returned as a reference and passed as a pointer directly to another function? Obviously, the variable persists after the function returns, but something about this whole concept just bothers me. At which point is the memory on the data-sequent, occupied by the static variable, fre... | Returning static local variables as references |
For me
long[] l = new long[Integer.MAX_VALUE];
yields Exception in thread "main" java.lang.OutOfMemoryError: Requested array size exceeds VM limit
PS: if you need to produce the exception for the purpose of testing, you could also just throw new OutOfMemoryError("Requested array size exceeds VM limit") yourself.
|
I used the Out Of Memory help from sun's site. Where it is quoted as
Out Of Memory : Requested array size exceeds VM limit
This indicates that the application attempted to allocate an array that is larger than the heap size. For
example, if an application tries to allocate an array of 512MB but the maximum heap size ... | How to simulate the Out Of memory : Requested array size exceeds VM limit |
Even if the question is not new, maybe this is worth a look:https://chibisov.github.io/drf-extensions/docs/#caching | I'm googling a lot to find out what Django Rest Framework can do with Cache. Since now, all I got was this pagehttp://django-rest-framework.org/api-guide/throttling.htmltelling me nothing about their policy.My needs with the API are simple: keep all their features, and apply cache when nothing has changed. When somethi... | Django rest framework cache policy |
Finally managed to fix this. Solution is upgrading the EB Command Line tools and resetting all of the places it is referenced. Here's what we did.Install the latest EB Command Line Tools. This includes updating the bash profile to point to the new instanceGo to the application source directory, remove .git/AWSDevTool... | I have had a working AWS EB environment for many months across a few projects.Today "git aws.push" stopped working.There have been a number of updates recently for xcode and os x yosemite but I believe these happened days ago and git aws.push was still working then. It has stopped working across my projects.The error s... | git aws.push returns "error: RPC failed; result=22, HTTP code = 400" |
Answering the two questions in-order:
Should I write custom allocator_traits to interface my allocators for the various STL containers?
Yes, for easy manipulations. Pretty soon in the implementation, situations such as controlling memory overlaps would arise. For example, while stress-testing the implementation at ful... |
I want to write a custom memory manager/allocator for learning. I'm tempted to have a master allocator that requests n bytes of ram from the heap (via new). This would be followed by several allocator... Adaptors? Each would interface with the master, requesting a block of memory to manage, these would be stack, linea... | Why would I write custom allocators for STL containers when I could just overwrite new and delete? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.