Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
I think you misunderstand what memory stores like Redis or memcached can do for you.They are not connected to PostgreSQL or any other RDBMS. It is the job of your application to write the data in both stores: the permanent store (PostgreSQL in your case) and the transient one (Redis).Redis and memcached do not offer ma... | I'm new to Redis and wondering how to use Redis and PostgreSql together — specifically using Redis just for LRU caching in Postgres.Is there any special configuration for connecting Redis to Postgres?Then if I want to store data, should I store it in Postgres db? If so, what does Redis do?Thanks. | How can I use Redis for LRU caching with Postgresql? |
Somebody else pointed me to this help page:https://help.github.com/articles/about-commit-email-addresses/Which explains that you can have your personal emailadress hidden from all commits. If you want to hide your email, check the correct setting in github. This will give you a no-reply emailadress from github, which y... | I have a question: I recently made my personal github account to make some open-source projects. As a test, I created a dotfiles repo. From my machine, where the global properties point to my work github account, I have made some commits. That made my work remail show up in the public repo, which I didn't want. With re... | How to link my commits to my github account, without showing emailadress in commit? |
As per K8S documentation (Running in multiple zones), there is no requirement for master and worker node to be in same zone. It can span across multiple zones.It also states that if availability is an important concern, replicas should be created for control plane components and for pods across availability zones.Share... | I am beginner in K8s and searching for information running multiple worker nodes in different time-zones managed bysinglemaster node. Can someone guide me here? | Is it required that master and worker nodes should always run in same time-zone? |
Instead of looping through columns you can try checking their values using exists.
from pyspark.sql import functions as F
columns_list = [f"`{c}`" for c in columns_list]
df_reject = source_data.filter(F.exists(F.array(*columns_list), lambda x: x.rlike("[\"\"]")))
df_cols_add = df_reject.select('*', F.lit('Yes').alias... |
I need to do a double quotes check in a dataframe. So I am iterating through all the columns for this check but takes lot of time. I am using Azure Databricks for this.
for column in columns_list:
column_name = "`" + column + "`"
df_reject = source_data.withColumn("flag_quotes",when(source_data[column_name... | Out of memory while checking string columns and saving error values to Databricks |
Constants have no storage location at runtime. All access to constant identifiers results in the literal value of that constant replacing the identifier when the code is compiled.
|
In my code design, I've included a lot of constants. When a new object is created, is memory allocated for that object's constants, or is it stored permanently in a single instance, like a static variable is? In terms of memory storage, where exactly do static items end up?
In other words, if I define 100 objects, wil... | Does each object allocate memory for constants? |
You need to fix your regex as^and$are not matched in the middle:RewriteRule ^api/geopointsnearlocation/(-?(?:\d+|\d*\.\d+))/(-?(?:\d+|\d*\.\d+))/?$ api/GeoPointsRestController.php?lat=$1&lng=$2 [NC,QSA,L] | I am trying to write aRewriteRulein my.htaccessfile so that it accepts two double arguments (a latitude and a longitude) and redirects to a php webservice controller with those arguments asGETvariables.So far and with the help ofthis answer, I got this rule:RewriteRule ^api/geopointsnearlocation/(/^-?(?:\d+|\d*\.\d+)$)... | a .htaccess RewriteRule that takes to Double arguments and sends it to a webservice in php |
I had the same problem and I followed the official installation guide and it worked. I think my keyrings was outdated or something.https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install ... | The Ubuntu machine contains the latest upgrades, but unable to install docker-compose-pluginsudo apt-get install docker-compose-plugin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package docker-compose-plugin
cat /etc/lsb-release
DISTRIB_ID=Ubu... | sudo apt-get install docker-compose-plugin fails on jammy |
You've misled yourself because as a human, you know that "01", "02", etc are a sequence of numbers. Regular expressions don't care about numbers, they care aboutcharacters.[01-09]doesn't mean "01 to 09", it means "0; or 1 to 0; or 9" - which clearly doesn't make sense.If you break it down character by character, you ha... | I have tried to write the htaccess for the set of rules.below is the rule pattern I want to match0x00|0x01|0x02|0x03|0x04|0x05|0x06|0x07|0x08|0x09|0x0A|0x0B|0x0C|
0x0D|0x0E|0x0F|0x10|0x11|0x12|0x13|0x14|0x15|0x16|0x17|0x18|0x19|
0x1A|0x1B|0x1C|0x1D|0x1E|0x1F|0x7FI have tried as0x([01-09]|[0A-0F]|[10-19]|[1A-1F]|7F) | Pattern for matching a rule |
Had to reach out to BitBucket to clear the repo on their end first before allowing me to push.ShareFollowansweredAug 21, 2018 at 15:46Joe ScottoJoe Scotto11.3k1717 gold badges6767 silver badges142142 bronze badgesAdd a comment| | I accidentally pushed some large files that were supposed to be ignored to git and as a result my repo is over 2gb. I'm trying to clear some files out with BFG and have been able to clear around 400mb but when trying to push I get the following errorCounting objects: 1510, done.
Delta compression using up to 8 threads.... | Can't push to >2gb repo after clearing files with BFG |
.NET 8 ASP.NET Core Docker images have a breaking change - Default ASP.NET Core port changed from 80 to 8080:
The default ASP.NET Core port configured in .NET container images has been updated from port 80 to 8080.
We also added the new ASPNETCORE_HTTP_PORTS environment variable as a simpler alternative to ASPNETCORE... |
I migrated my application to .NET 8.0, ran it locally and it works perfectly.
Then I created an image, the container. As a result, the page that was working before now returns a "1.2.3.4 refused to connect."
Before, when I was in .NET 7.0, the API worked.
My basic DockerFile
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS bu... | .NET 8.0 WebAPI/Swagger Docker Refused to connect |
Your pods might have quality of service class set to Guaranteed, that's possible reason they are not getting evicted.See:https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/#qos-classes | I changed the default eviction policy set by kops to include the conditionmemory.available<1Gi. The--eviction-hardflag is now set as:memory.available<1Gi,nodefs.available<10%,nodefs.inodesFree<5%,imagefs.available<10%,imagefs.inodesFree<5%The available memory on one node right now is at 400Mb and has been like this for... | Kubernetes does not evict nodes despite limit being set |
Just create individual location blocks and include/exclude whatever you want. You can repeat "includes" in each as neededFor example:location ~ ^/front/? {
# Here we only include the common_auth file
include common_auth.conf.inc;
}
location ~ ^/(index|index_(rest|cluster|treemenu_tags))\.php(/|$) {
# Here w... | I have the following .conf in Nginxlocation / {
if ($uri !~ ^/front/? ){
include ez_params.d/ez_rewrite_params last;
}
include common_auth.conf.inc;
location ~ ^/(index|index_(rest|cluster|treemenu_tags))\.php(/|$) {
#bunch of rules here
}
}What I am trying to do here here is excludin... | Nginx excluding directory from redirect rules |
From what AWS claims about RDS proxy:
The same consideration applies for RDS DB instances in replication configurations. You can associate a proxy only with the writer DB instance, not a read replica.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html
|
I created an RDS Proxy with existing Aurora PostgreSQL cluster.
But I want to pair the proxy with specific read replica instance of the cluster. Is that possible?
| Can AWS RDS Proxy be paired with read replication instance directly? |
You can convert the pixel format fromBGRtoBGRASeethisexample. | Whenever i read a colored image with 3 channels via cv::imread; its data alignment is a bit awkward (neither a byte nor an integer) and slows me down when i read a single pixel data on GPU memory. And it seems cv::Mat class's logic behind the alignment is a bit different than what i had initially thought. It does not a... | Packing Pixel Data in OpenCV |
I solve this problem using ssh link instead of https. | I have already cloned repository into my computer from github. For clone I used GitHub client. After that I import my project in Android Studio and say about git linking in settings of Version Control.Meantime my colleague push 1 commit into master branch and ask me for updating project. Usual situation.After that I tr... | Android Studio determines credentials for GitHub as invalid |
5
You can modify or add your /etc/sysconfig/docker
ADD_REGISTRY='--add-registry 192.168.0.169:5000'
INSECURE_REGISTRY='--insecure-registry 192.168.0.169:5000'
then modify /etc/systemd/system/docker.service or /usr/lib/systemd/system/docker.service
ExecStart=/usr/bin/docker... |
I am using docker-registry to pull my own docker images, but I want to do so without the need to specify the host. meanning:
instead of writing:
docker pull <host>:<port>/<dockerImage>
I want to write:
docker pull <dockerImage>
and first it will try to pull the docker from my private registry, before trying to pull ... | Pull Docker from my private docker-registry without specifying the host |
4
I am working with Java AmazonS3 client, but the process should be the same.
There is a strategy that can be used to handle this situation.
You could use a fixed date time as an expiration date. I set this date to tomorrow at 12 pm.
Now every time you generate a url, it ... |
I am generating signed urls on my webapp (nodejs) using the knox nodejs-library.
However the issue arises, that for every request, I need to regenerate an unique GET signed url for the current user, leaving browser's cache-control out of the game.
I've searched the web without success as browsers seem to use the full ... | S3, Signed-URLs and Caching |
You can declare environment vars on YAML as on Docker Files, just with different syntax.Here's the example you requested:apiVersion: v1
kind: Pod
metadata:
name: envar-demo
spec:
containers:
- name: envar-demo
image: busybox
args:
- sleep
- "86400"
env:
- name: spring.datasource.url
... | So the other day I just learned about Docker and I could use in my Docker-Compose YAML file something like:environment:
- spring.datasource.url=jdbc:postgresql://192.168.100.100/my_database
- spring.datasource.username=my_username
- spring.datasource.password=my_password!@#$$I like to implement ... | How do I set the environment for spring.datasource on a spring-boot container using a Kubernetes YAML file ? Is it the same as Docker YAML? |
0
One reason those numbers are so different is that the process can reserve virtual address ranges as inaccessible, simply to prevent future calls such as mmap() from using them accidentally. Such inaccessible ranges are included in VSS, but not in Committed_AS.
Here are... |
I'm running the following two commands on my system and coming up with different numbers:
[root@rhel6 ~] grep Committed_AS /proc/meminfo
Committed_AS: 82964 kB
[root@rhel6 ~]# ps aux | awk '{vsz+=$5}END{print vsz}'
1580824
My understanding is that Committed_AS is the amount of virtual memory currently allocated... | Difference between Committed_AS and sum of the VSZ column in ps |
You will need to add anAccept: application/vnd.github.spiderman-previewheader to your request in order to access the Repo Traffic API whilst it is in preview form. From theAPI docs:APIs for repository traffic are currently available for developers to preview. During the preview period, the APIs may change without advan... | I was using github API in Meteor but could not solved this issue:This code tries to get the total number of traffic for a certain repo.HTTP.call( 'GET', 'https://api.github.com/repos/hackmdio/hackmd/traffic/views',
{
headers:
{
'Content-Type':'application/json',
"Accept":"a... | github API unsupported media type 415 |
You can see an animated gif in thiskellim/farmers-market-finderREADME file.Thesource codeshows that gif embedded as any other picture:You have the same method used in "How to add GIFs to your GitHub README" fromJoe Cardillo. | The animated gif I have is 2.5MB size
Converted it from mp4 video. | How can I add embed animated gif to a github repository README.md? |
You only need to re-examine your algorithms when your customers complain about the slowness of your program or it is missing critical deadlines. Otherwise focus on correctness, robustness, readability, and ease of maintenance. Until these items are achieved any performance optimization is a waste of development time.... | Once again, I find myself with a set ofbroken assumptions. The article itself is about a 10x performance gain by modifying a proven-optimal algorithm to account for virtual memory:On a modern multi-issue CPU, running
at some gigahertz clock frequency, the
worst-case loss is almost 10 million
instructions per VM p... | Algorithms for modern hardware? |
The underlying virtualization solutions are calledproviders. To work with Vagrant, you have to install at least one provider (e.g. Virtualbox, VMWare)Provisioning in Vagrant is the process of automatic installation and configuration of the system within during$ vagrant upand the tools to perform this operation are call... | I think the words "Provider" and "Provisioner" sound very similar which may lead to confusion especially among beginners confronted with documentation where both terms are mixed up or used synonymous (already seen on the net). Even more confusing it gets when beginners seeDocker as ProviderandDocker as Provisionermenti... | What is the difference between a Vagrant Provider and a Vagrant Provisioner? |
Look like the reason why code is not covered is in theFAQCode with exceptions shows no coverage. Why?JaCoCo determines code execution with so called probes. Probes are
inserted into the control flow at certain positions. Code is
considered as executed when a subsequent probe has been executed. In
case of exceptio... | I am writing code coverage for my project and experiencing a weird behavior. I have a function like thispublic void testException(int i) throws Exception {
if (i == 0) {
throw new Exception("exception");
}
}and the test case@Test
public void testException() {
try {
mapper.testException(0);
... | Sonar cannot cover branches calling to Exception throwing function |
It depends a bit on your Bamboo and beanstalk config as well as the type of application you are planning to deploy on AWS Beanstalk.
We did some things for Java Web Apps:
Since Bamboo understands maven, you can have a look at the following maven plugin:
http://beanstalker.ingenieux.com.br/beanstalk-maven-plugin/config... |
I want to integrate Atlassian Bamboo with AWS Elastic Beanstalk. Is there anyway to do this?
| How to integrate Atlassian Bamboo with AWS Elastic Beanstalk |
Unless it's for academic purposes, you rarely see a C++ program using manual memory allocation, you don't need to do it since you have a set of containers in the STL containers library that do this memory management reliably for you. In your particular example, a std::vector is recommended.
That said, to answer your q... |
I have a function like this:
int fun(){
int* arr = new int[10];
for(int i = 0; i < 10; i++){
arr[i] = 5;
}
delete[] arr; //
return arr[6];
}
int main(){
std::cout << fun();
return 0;
}
What am i going to do is to free the memory whick is pointed to by the pointer arr. But the f... | How to free memory allocated in a function without returning its pointer? |
This is probably going to end up fine, and Git will not produce duplicate code.
When you do a merge, Git looks at the two heads (the branches you're merging), plus the merge base, which is usually the most recent common commmit. If both heads have the exact same contents for a file, then the merge is trivial, and Git... |
I have a branch A which i want to merge with branch B (updated), there have been some code/files commit to branch A manually from branch B. Now i want to auto merge complete chages from branch B to A. I have below queries/doubts on this -
When i tried to do automatic merge, git shows new code/files addition/update w... | Git automatic merge on top of maual update/commit from the same branch which is going to be merged |
You needRewriteCond:RewriteModule On
RewriteCond %{HTTP_USER_AGENT} Mac\ OS\ X.*Chrome
RewriteRule .* /path/to/something [L,R] | I need to redirect if the user is accessing the site usingChrome OS X, but notChrome Windowsor any other OS - and the same for Safari.Can I detect, specifically,Chrome OS Xand ignoreChrome Windows? Ithinkthese are the user-agents for the two:Chrome, MAC OS
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.... | .htaccess rewrite for specific browser/operating-system combination |
Yes, you can use VirtualAlloc and VirtualProtect to set up sections of memory that are protected from read/write operations.
You would have to re-implement operator new and operator delete (and their [] relatives), such that your memory allocations are controlled by your code.
And bear in mind that it would only be ... |
Having read this interesting article outlining a technique for debugging heap corruption, I started wondering how I could tweak it for my own needs. The basic idea is to provide a custom malloc() for allocating whole pages of memory, then enabling some memory protection bits for those pages, so that the program crashe... | Is it possible to protect a region of memory from WinAPI? |
usually means bad gateway (there is no connection) and that IP address looks like an internal IP address. GrafanaCloud is a cloud service so it does not have access to internal IP addresses.Your options are:Install Grafana locally if you do not want to open up anything over the internet.Use direct mode instead of proxy... | I'm using grafana cloud for creating visualization but when i'm trying to load the data source with elasticsearch i'm getting 502 error. | Cannot access data source of elasticsearch using grafana cloud |
Periods 4 and 5 are not set globally but on the project level. Double-check your first project to make sure it has a valid Period 5 value. | I have setup a project with a specific date in sonar.timemachine.period5 in my project.properties file. This usually works perfectly, but sometimes the sonarqube runner doesn't make the comparison.sonar.timemachine.period5=2015-11-04Here is a part of the log output from two consecutive sonar-runner analysis:This one is... | Sometimes Sonarqube doesn't compare to period 5 |
As binarygiant requested I am posting my comment as an answer. I have solved this problem by adding No-Cache headers to the response on server side. Note that you have to do this for GET requests only, other requests seems to work fine.
binarygiant posted how you can do this on node/express. You can do it in ASP.NET M... |
I currently use service/$resource to make ajax calls (GET in this case), and IE caches the calls so that fresh data cannot be retrieved from the server. I have used a technique I found by googling to create a random number and append it to the request, so that IE will not go to cache for the data.
Is there a better w... | Better Way to Prevent IE Cache in AngularJS? |
If you want to rewrite url only if the file doesn't exist you can use named location intry_filesdirective.location /services {
try_files $uri $uri/ @service_pages;
}
location @service_pages {
rewrite ^/services/page([1-3]).html /page$1.html;
} | I have the nginx config:server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/site/public;
index main.html;
server_name localhost;
location / {
try_files $uri $uri/ =404;
}At root directory I also have html files:page1.html, page2.html, page3.... | nginx how to configure route to html file? |
You could prepend another rule to exclude only that directory:RewriteCond %{REQUEST_URI} ^/menu
RewriteRule . /club/index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /club/index.php [L]ShareFolloweditedSep 15, 2011 at 1:03answeredSep 14, 2011 at 18:06fcingolanifcingo... | I have a Wordpress website with permalinks with post name. Now I have a new template on a specific page that uses files from exactly the same url path, and I can't change that.
How can I make Wordpress access my requested page (example.com/meniu/) and ignore the folder name with same name? (example.com/menu/swf/)Thank ... | Wordpress - Permalinks and folders (.htaccess ?) |
In the branch protection rules, there's a setting "Include administrators". Make sure to enable that as well.More information can be found in thedocs. | Starting to setup branch protection rules for our Main branches and currently have the following options enabled:Require a pull request before mergingRequire approvals = 1Require conversation resolution before mergingHowever I noticed in a PR there was an option to "Merge without waiting for requirements to be met (byp... | GitHub Branch Protection Disable Bypass |
If a space is used in the URI query, it must either be replaced by%20(percent encoding) or by+(application/x-www-form-urlencodedcontent typefor forms). In your case the data seems to be encoded three times (%is encoded with%25).Try these rules to replace such sequences it with+:RewriteCond %{QUERY_STRING} (.*?)%(25)+20... | When I click on my index'd pages in Google the plus signs in my query string are being replaced (encoded?) for %252520.Anyone know why?Example:lovelakedistrict.com/result/?q=Private%252520car%252520park&page=2should belovelakedistrict.com/result/?q=Private+car+park&page=2I have heard that this is a result of redirectin... | Plus signs being replaced for %252520 |
TL;DR
run it from the root directory:
docker build . -f ./path/to/dockerfile
the long answer:
in dockerfile you cant really go up.
why
when the docker daemon is building you image, it uses 2 parameters:
your Dockerfile
the context
the context is what you refer to as . in the dockerfile. (for example as COPY . /app)... |
I'm having some trouble building a docker image, because the way the code has been structured. The code is written in C#, and in a solution there is a lot of projects that "support" the application i want to build.
My problem is if i put the dockerfile into the root i can build it, without any problem, and it's okay ... | How to navigate up one folder in a dockerfile |
Objectrefers to permissions to access the object (file) itself, such as downloading the object.Object ACLrefers to permissions to access/change the Access Control List of the object. That is, the permissions associated with the object. | I added a file into AWS S3 bucket. The access of the bucket is set to public. In the permissions, I setobjectandobject ACLtoreadfor everyone.But I am not clear about the difference betweenObjectandObject ACL, could you please explain their differences?Thanks | what is the difference between Object and Object ACL in AWS S3? |
Yes. It does have a limit, if you look at thesource code(alsohere) you see that it's defined as anint32in Golang.Then, if you look at theint32docs for the builtin-types you see that it's range is-2147483648through2147483647. In theory, you can specify--maxon the helm command line as a positive number so2147483647would ... | The commandhelm historyprints a list of the past revisions for a release. Is there a limit to the size of this history? i.e. a numbernsuch that if there aren + 1revisions then the first revision is no longer available? I'm aware of themaxflag for thehelm historycommand which limits the length of the list returned, so t... | Does Helm have a limit to the size of its history? |
This function will list the users, just use the aws key and secret, user pool region and id and call the function getUsers().
You can use filters in params to do a more specific request.https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentityServiceProvider.html#listUsers-propertyvar AWS = require('aws-... | I'm developing a web application using Angular 4 (with TypeScript language) front-end side, and using AWS services back-end size.
This application can be only accessed by a group of users (each has its own mail and password). This group of users is defined in AWS Cognito - User Pool.
How can I have the entire list of t... | AWS Cognito: Methods to Get a List of users? |
For htaccessRewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteCond %{REQUEST_URI} !project/public/
RewriteRule (.*) /project/public/$1 [L]Put it into your public_html/ or www/ folder where is the root of example.com/ShareFollowansweredApr 23, 2015 at 16:44... | I have this structure:My domain: www.example.comand this is my laravel's project folder:http://www.example.com/projectand I would like to redirect tohttp://www.example.com/project/publicI know this answer has been answered before but I try to implement it and not work for me.Sorry for my english, I just speak spanish | How to redirect to public folder on laravel |
+50From the comments it appears the docker service was not configured to automatically start on boot. Docker is a client server app, and the server runs from systemd with a separate service for the docker socket used by the client to talk to the server. Therefore it's possible for any call with the docker command to ca... | I have some containers which all of them have the always restart value in the docker-compose file like this:version: "3.7"
services:
container:
image: ghost:latest
container_name: some_container
restart: always
depends_on:
- ...
ports:
- ...
...As soon as the OS (Flatcar Linux / Cor... | Can a docker container 'go to sleep'? [duplicate] |
0
You can try this way.
git clone
https://github.com/zeromq/php-zmq
or download zip archive from repo
RUN apt-get install -y libzmq5 libzmq5-dev gcc unzip && \
unzip php-zmq-master.zip && cd php-zmq-master && phpize && ./configure && \
make && make install && dock... |
What is wrong with this Dockerfile?
FROM php:8.1-apache
RUN apt-get update && apt-get install -y libzmq5
# Install the ZeroMQ extension
RUN pecl install zmq-beta
# Enable the ZeroMQ extension
RUN docker-php-ext-enable zmq
It seems that I cannot install php-zmq extension in PHP 8.1. Any tips on how can I proceed w... | Installing php-zmq extension on PHP 8.1 in a docker container |
As pointed out by Rickard von Essen the answer was to copy my script to /var/lib/cloud/scripts/per-instance which would execute my script on every instance launched from this AMI.
Alternately you can put your script in /var/lib/cloud/scripts/per-boot if you needed this to happen each time the instance boots.
In my c... |
So I'm trying to use Packer to create an AWS image and specify some user data via user_data_file. The contents of this file needs to be run when the instance boots as it will be unique each time. I can't bake this into the AMI.
Using packer I have the following:
{
"variables": {
"ami_name": ""
},
"builders": ... | AWS user_data with Packer |
Had the same issue trying to forward GUI from Ubuntu Server to my Mac.On Ubuntu, installing the swrast driver for OpenGL rendering solved the issue -sudo apt-get install -y mesa-utils libgl1-mesa-glx | I'm running a GUI application in a container in privileged mode on a MAX OS X host.
I'be been successfully able to start the GUI in the container using this link:http://kartoza.com/en/blog/how-to-run-a-linux-gui-application-on-osx-using-docker/Now within my GUI application, I'm trying to pop up another window and I ge... | libGL error: failed to load driver: swrast - Running Ubuntu Docker container on Mac OS X host |
Unfortunately, I don't think you can. Here is what AWS says in theirdocs-To be able to undelete a deleted object,you must have had versioning
enabledon the bucket that contains the object before the object was
deleted. | Unfortunately, this morning I accidentally deleted a number of images from my S3 account, and I need to restore them. I have read about versioning, however this was not enabled on the bucket at the time of deletion (I have now enabled).Is there any way of restoring these files either manually, or via Amazon directly?Th... | Restoring Amazon S3 files that are not versioned |
You need to run the sail up command from inside your WSL2 Ubuntu Image not directly from your terminal. Once you do that it should work okShareFollowansweredFeb 28, 2021 at 23:53MikeBrandlMikeBrandl11611 silver badge33 bronze badges9do i have to cd to the laravel project or just anywhere ? also i saw some ppl say that ... | I installed docker and downloaded an ubuntu distro to run with laravel sail,planing to use swoole php,and made it default,also made wsl version to 2with docker-compose.yml ready from laravel sail docker-compose.yml:but every time I try to run the sail up cmd,it gives me this error " Unsupported operating system [MINGW6... | Unsupported operating system with Docker on windows 10 with wsl2 |
So you're doing this downloading in a view controller (as evidenced by you putting it in a "viewDidLoad" method).
What is likely happening is that when you move to another view, or when the view controller is deallocated from memory, is that the "manager" object that you are using in that dispatch_queue is also being ... |
i have to download large number of web images in my app. now i am trying to download images in my initial class using Grand Central Dispatch.
code:
- (void)viewDidLoad
{
[super viewDidLoad];
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0ul);
dispatch_async(queue, ^{
// ... | How to download web images in Cache before displaying using SDWebimage? |
<div class="s-prose js-post-body" itemprop="text">
<p><strong>Unix</strong></p>
<p>To delete all containers including its volumes use,</p>
<pre><code>docker rm -vf $(docker ps -aq)
</code></pre>
<p>To delete all the images,</p>
<pre><code>docker rmi -f $(docker images -aq)
</code></pre>
<p>Remember, you should remove a... | <div class="s-prose js-post-body" itemprop="text">
<p>I recently started using Docker and never realized that I should use <code>docker-compose down</code> instead of <code>ctrl-c</code> or <code>docker-compose stop</code> to get rid of my experiments. I now have a large number of unneeded docker images locally. </p>
<... | How can I delete all local Docker images? |
3
If you want to force Python to run out of memory, this should make it happen very quickly regardless of how much memory is available:
x = [None]
while True:
x += x
This will double the length of x on every iteration until it fails.
Share
Improve this answer... |
I'm working on a system that has about 128KB of RAM, one of my scripts occasionally causes a ERRNO 12 Cannot Allocate Memory error.
I have a few solutions I want to test.
But how can I replicate the problem when it seemingly happens randomly once a day?
Any bad scripts that will cause ERRNO 12 Cannot Allocate Memory e... | How can I cause a Memory Error in python 2.7? |
If your site is stored in your user'sSitesfolder (i.e./Users/username/Sites/) then you also need to setAllowOveridein the user-specific configuration file in/etc/apache2/users/username.conf. After making the change restart apache by disabling and re-enabling Web Sharing in the Sharing preference pane. | I'm working on a mac running OS X Lion and PHP 5.3.6 and have tried bothAddType,AddHander, andAllowOverridehas been set toALLin the httpd.conf; however, the PHP codes in HTML/JS/CSS files are still parsed as text. Files ending with .php are all good. I'm now getting really desperate after hours of googling.Here are the... | AddType / AddHandler Not Working |
You'll need to usegit filter-branchto modify your whole history, removing thewp-config.phpfile from the repository. See thegithub helpfor an example.ShareFollowansweredJan 29, 2013 at 9:15Michael WildMichael Wild25.4k33 gold badges4343 silver badges4444 bronze badgesAdd a comment| | my wordpress website is on my laptop with a lot of older versions in it using Git.Until today, I've had my own Git server but now I would like to push the repository into Github. So I have edit the.gitignorefile to ignore thewp-config.phpand avoid having my database passwords opened to everyone, but when I push my repo... | public passwords in github |
this section here might help you out:http://developer.android.com/training/displaying-bitmaps/manage-memory.html | I have an application with one activity one fragment class and five viewgroups. To start with I pass the first viewgroup to my fragment class and when a certain area in the viewgroup is touched a call is sent up to the activity to notify it that the next viewgroup should be loaded. I call getFragmentSupportManager().be... | outofmemory error with setimageresource for ImageView |
You seem to have something wrong with your github repository layout. The files that you want to add to your repository must be within the repository source tree.The way I understand it, your git repo is in~/todoand you want to add files from~/public_html/todo, but this is not how git works. Copy your files into~/todo(c... | I made a GitHub repository for my PHP project. All files are located in/home/nikola/public_html/todo/. However, I don't know how to add it. First time I made it by typing this:git add ~/public_html/todoThis time, it just doesn't work. When I try to do:git add ~/public_html/todoand type git status it says that one file ... | How to add folder from public_html to GitHub repository? |
I'd need more info to fully understand the current situation, such as the current size of the repo, how many times you've pushed, how many other colloborators are working in the same repo, but here are several possible courses of action:
If you don't have any collaborators (you are the only user), it's quite possible... |
H!
I installed LFS in my github repository to track my *.csv files but when someone else tried to upload other csv and I wanted to make the pull of my repository this was the result
This repository is over its data quota. Account responsible for
LFS bandwidth should purchase more data packs to restore access.
My ques... | This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access |
You can use the--querylogic to filter the list objects locally to only those that are zero-byte big:aws s3api list-objects-v2 --bucket example-bucket --query 'Contents[?Size==`0`]'Or, if you just want to see the list of keys without other meta-data, you can further filter the list:aws s3api list-objects-v2 --bucket exa... | at the moment there's some files being uploaded where they are getting corrupted. They'll have a filesize of 0 bytes. May I ask how do I query my s3 bucket and filter by specific size, i'm trying to query when byte is 0?At the moment I have two queries.First one list all the files recursively in the bucket but no sorti... | How to get query s3 bucket by specific file size |
The solution is ImageMagick, which will cache sections of extremely large images to disk to keep from running out of memory. A command prompt tool and a Python wrapper for the tool exist. | We have a laser writer in our lab that takes in black and white .bmp images and use those to determine what spots on a plane will be illuminated by a laser. Each pixel is a fixed unit of area, and in order for the total write to be the size we need, we need a .bmp that's about 50,000x50,000 pixels.We need to generate t... | Convert .svg to extremely large .bmp in Python |
If I understand you correctly this is what you're looking for?http://wiki.nginx.org/XSendfileShareFollowansweredApr 23, 2013 at 23:11C.NC.N22811 silver badge1010 bronze badges13Please add more information, or a breve summary of what is on the link, link only answers are generally frowned upon–jsedanoApr 23, 2013 at 23:... | At the moment I try to build a site with public and private area. I use Node.js server-side. Node.js mainly provides data via REST Web Services for the front-end and handle the login. All data will be stored in a MongoDB. The front-end is built with AngularJS. At the moment I use nginx for static files and only REST ca... | How to implement a login with Node.js (behind nginx) and AngularJS |
alpine images doesn't have bash installed out of box. You need to install it separately.
RUN apk update && apk add bash
How to use bash with an Alpine based docker image?
|
I am trying to build a docker image for a nodejs web backend which currently looks like this:
FROM node:10-alpine
WORKDIR /usr/src/smart-brain-api
COPY ./ ./
RUN npm install
CMD ["/bin/bash"]
When I do docker run -it after building an image, I get this weird error
internal/modules/cjs/loader.js:638
throw err;... | Docker cannot find module /bin/bash |
The inability to use wildcards for the Authorized Origin URIs is a bug that we are fixing, the fix should go out soon. If you need to work around this issue ASAP you can use one of our SDKs (like the Stormpath Node SDK) to programmatically add URLs the the application. | I created app with react and express (client-side rendering). I usereact-stormpath.
When I addedhttps://my-app-name.herokuapp.comintoAuthorized Origin URIsin Stormpath Admin it works ok. But when I created pipeline with review apps, it created new subdomain with every request e.g.https://my-app-name-pr-1.herokuapp.coma... | Heroku pipelines with react stormpath |
0
You can use mysqldump utility with --all-databases switch to dump entire databases like below
mysqldump -u root -p --all-databases > TotalBackup.sql
But above command will dump everything in a single file. Found This blog which has a nice solution to it. A script to do... |
This question already has answers here:
Run MySQLDump without Locking Tables
(14 answers)
Closed 8 years ago.
I'm having significant server issues at the moment, and am worried the... | How to back up MySQL databases to SQL files? [duplicate] |
From the docker hostUse thedocker inspectcommand:docker inspect --format='{{.HostConfig.Privileged}}' <container id>And within a bash script you could have a test:if [[ $(docker inspect --format='{{.HostConfig.Privileged}}' <container id>) == "false" ]]; then
echo not privileged
else
echo privileged
fiFrom insi... | Would like to know via bash script, if current running container was started in--privilegedmode frominsidethe container (not from the host machine).For now I'm stuck with passing an env var with the flag but is not an ideal solution. | How to know if a docker container is running in privileged mode |
All you need to need to do is solving the conflict you see mentioned at the end of your pull --rebase.
See "HOW CONFLICTS ARE PRESENTED": you will have to open those files, and remove the conflict markers.
For the .tern-port file, you need to decide if you want to keep your file, and remove it, as it has been removed ... |
I'm trying to push my commit, but couldn't since there is another commit (same-level in the HEAD race :)
I know I need to merge those two commits together, not exactly sure how to do it.
I already tried git pull --rebase.
My GIT-CLI:
| git push rejected, merge conflicts, git pull --rebase |
You cannot count download times for a specific file.You can count download time for a release artifacthttps://docs.github.com/en/rest/releases/releases#list-releases | Is there a way that I can get the download count of a specific file in a repository (downloaded viaraw.githubusercontent.com)?I'm not meaning the Github Releases download count. | GitHub get download count from specific file |
Since you say that at some point in time all tokens need to be freed at the same time, you can go with a memory pool. Write a token allocator that will malloc tokens and store the allocated pointer in some array, linked list or however you want to solve it. When you're done with all the processing, call a function tha... |
I am writing a program that tokenizes a text and transforms it based on the tokenization. The tokens are represented by a struct:
struct token {
enum token_type type;
size_t length; /* as returned by strlen(token.text); */
char text[]; /* 0-terminated */
};
The tokenizer provides an iterat... | How to manage the allocation of many small objects being passed around? |
4
Starting with SqlServer 2005 onwards(and therefore applicable to sqlserver 2008R2 ) , Sql Cache Dependency works by using the query change notification mechanism.They use a notification infrastructure and messaging system that’s built into the database, called the Service... |
My Need is to build a simple configuration framework on top of a Key value table. As this is frequently used and rarely changed, would prefer to cache the table values. One requirement is if the value is changed in DB it should reflect immediately in the App. So, I planned to implement SqlCacheDependency. Doc says
Th... | Does SqlCacheDependency use polling or query notification? |
For Amazon Linux use "0/5" instead of "*/5". This expression means every 5th minute from 0 through 59.Next, do not specify relative paths in your crontab. Use only absolute paths. | I ran a cron job as ec2 user, in AWS server.I set the cron command, like this
*/5 * * * * ec2-user bash ./dailyMailSend.shincrontab -efile.It was set to run after every 5 minutes. But it runs every minute. Don't know why ? | Why does this cron job run every minute? |
One possible solution would be to use theGitHub API for Gists, in order to:list gists for one account,for each gist:clone it via the URL provided bygit_pull_url.create an empty giston your target accountpush the local gist repo to the newly create empty gist via the URL provided bygit_push_url. | I have a lot of github gists on one account and I want to move them to my main account. How do I do that? Surely I'm not the first to want to do that. | How to move my gists from one account to another? |
I've had this problem - and because there's multiple class loaders around in my projects (axis2, tomcat), it can be pretty hard to figure out where to put the cache.ccf file. I ended up not using a .properties file and configuring it directly - here's how I did it...CompositeCacheManager ccm = CompositeCacheManager.ge... | I'm trying to change path of cache.ccf file about an hour...When I'm callingJCS.getInstance("myRegion");I'm getting this error:Exception in thread "main" java.lang.IllegalStateException: Failed to load properties for name [/cache.ccf]I tried to put cache.ccf into src folder. In this case everything's OK. But I want it ... | How to change JCS cache.ccf file's path? |
Vasanthan, if you have just installed docker and all the docker images will be resolved through docker hub, you can set up the same environment in Artifactory by using the default docker remote repository as below,As you can observe that it is by default v2 and hitting the "https://registry-1.docker.io/" which hits the... | Installed Docker version 19.03.12 on ubuntu . using the command docker infoit is showing registry as like belowRegistry:https://index.docker.io/v1Can anyone suggest a method to change the registry to v2 (https://index.docker.io/v2)There is an issue to pull the image from the docker artifactory repository v2 | change the registry in the docker https://index.docker.io/v1/ to V2 |
On Windows, winsock uses closesocket to properly close and cleanup a socket.
|
I have written a very small function in C, opens a socket, accepts connection and immediately closes them.
The problem is, each connections eats some memory without releasing it at anytime to the OS. I ran ab (apache benchmark) with about 300K requests, and the processes memory is continuously growing (at the end few ... | Socket accept is consuming my memory on windows without release |
There are many factors here which may be impacting performance.RegardingcudaMallocPitch, if it happens to be the first cuda call in your program, it will incur additional overhead.RegardingcudaMemcpy2D, this is accomplished under the hood via a sequence of individual memcpy operations, one per row of your 2D area (i.e.... | As mentioned in title, I found that the function ofcudaMallocPitch()consumes a lot of time andcudaMemcpy2D()consumes quite some time as well.Here is the code I am using:cudaMallocPitch((void **)(&SrcDst), &DeviceStride, Size.width * sizeof(float), Size.height);
cudaMemcpy2D(SrcDst, DeviceStride * sizeof(float),
... | In CUDA, why cudaMemcpy2D and cudaMallocPitch consume a lot of time |
Both trust stores and key store are KeyStore objects. Just the usage is different.
So, the example that you found should work for either a key store or a trust store, since they are objects of the same type. | My server program uses the trust store for client certs which works fine for the two way handshake, however I would like to be able to get the certs from the trust store for other things. I noticedthis examplefor Key stores. How do I do about it for trust stores?I setup the trust store in following way for my SSL two w... | How can I access java trust store certs |
Thanks kapep, good advice. Wasn't sure how to phrase as a question - but answering my own question I can do!
First of all to ensure an image IS cacheable you must inspect the Response Headers to ensure the following headers are set to valid values:
'Cache-Control' is set to private or public.
'Expires' is a date in t... |
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
... | Why does firefox not appear to be caching images? [closed] |
BUCKET_NAME = 'enter your bucket name'
KEY = 'enter full path where to store the image'
df = pd.read_csv('./gene_expression.csv')
df.hist(by='Cancer Present', figsize=[12, 8], bins=15)
img_data = io.BytesIO()
plt.savefig(img_data, format='png')
img_data.seek(0)
s3 = boto3.resource('s3')
bucket = s3.Bucket(BUCKET_NAME... | Can you save a graph to s3 without saving the file locally first?from boto.s3.connection import S3Connection
from boto.s3.key import Key
k = Key(bucket)
k.key = "mykey"
plt.savefig(k.key) //?? | Save Matplotlib image to s3 without saving locally using Boto |
I'm not great at preg expressions, but what you're looking for is something like thisRewriteCond %{REQUEST_URI} .*\.domain\.com/.*/.*$ [NC]
RewriteRule ^(.*)\..*/(.*)/(.*)$ master5.php?uid=$1&wid=$2&camid=$3
RewriteCond %{REQUEST_URI} .*\.domain\.com/.*/$ [NC]
RewriteRule ^(.*)\..*/(.*)/$ master5.php?uid=$1&wid=$2The c... | I need to convert the following where website url that user inputs ,var1 is a wildcard set by user to login to his account details.http://var1.domain.com/var2/var3redirect to:http://domain.com/master5.php?uid=var1&wid=var2&camid=var3and another rule i need isvar1.domain.com/var2/redirect to:domain.com/master5.php?uid=v... | Help On Programming .htaccess to redirect to controller |
Finally, I finished my task and I want to share some useful things.
Instead of generate_series I used this hook:
WITH date_range AS (
SELECT trunc(current_date - (row_number() OVER ())) AS date
FROM any_table -- any of your table which has enough data
LIMIT 365
) SELECT * FROM date_range;
To get list of URLs w... |
I'm trying to fill daily data for missing dates and can not find an answer, please help.
My daily_table example:
url | timestamp_gmt | visitors | hits | other..
-------------------+---------------+----------+-------+-------
www.domain.com/1 | 2016-04-12 | 1231 | 23423 |
www.domain.com/1 | 2... | Fill the table with data for missing date (postgresql, redshift) |
Sounds like you've exhausted swap space on your box.
The java.lang.ProcessBuilder.start() ultimately must boil down to a fork or clone system call on a Unix-like OS to create a new process. That takes swap space. And you seem to not have enough. This is more in the Unix system admin realm, not Java.
|
Here's what I believe to be the relevant error message:
Caused by: java.io.IOException: Cannot run program "/usr/bin/git" (in directory "/var/lib/hudson/jobs/Goals/workspace"): java.io.IOException: error=12, Cannot allocate memory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:474)
at hudson.Proc$LocalP... | Why am I getting this java.io.exception "Can't allocate memory" from Hudson? |
See my question and answerhere.Basically it depends on your organization and the application. If your company, developers and customers all speak the same native language and you expect it to stay that way, then it would be extremely counter-productive to have everyone become a part-time translator as well. Considerabl... | Most programming code, I imagine is written in English. But I'm curious how people are handling the issue of naming herein. A lot of programming is done within some bussiness domain, usually with well established terms for certain procedures, items.I'm from Denmark for instance, and something I work a lot with has a te... | Non-English domain naming issues in programming |
You can't really ask a question like this without also specifying a specific python version/implementation. If you're talking about the reference implementation (CPython), you can look at this reference or this one for python3.x.
Specifically:
It is important to understand that the management of the Python heap is p... |
>>p = 5
>>id(p)
140101523888800
>>p = 5.56
>>id(p)
140100617985840
I know on assigning the new value to an existing variable, it points to the new location in the memory at which the new value is stored. But my question is, will the memory location containing the previous value 5 still exists?
If yes, won't it cause ... | Will the reassignment delete the previous value from the memory in Python? |
To sum only positive values, you do not need to sort your initial values, use
thrust::transform_reduce:template<typename T>
struct positive_value : public thrust::unary_function<T,T>
{
__host__ __device__ T operator()(const T &x) const
{
return x < T(0) ? 0 : x;
}
};
float result = thrust::transform_re... | I'd like to use Thrust (as most of my method is implemented using thrust data types) or C CUDA if necessary to sum only the positive floating point elements of a vector. The data is not initially sorted. My initial stab was very bad: basically, copy off the vector, sort it, find the zero crossing by passing it to a ker... | Sum only positive elements of a vector CUDA/THRUST |
There are quite a few approaches. Here are just a few.Number 1.Add thisbeforeyour rules:# do not do anything for js/css/image files
# (will affect ALL such files in ALL folders)
RewriteRule \.(css|js|jpe?g|gif|png|ico)$ - [L]The rule above will leave protocol as is for ALL css/js/image files (anywhere on a site)Number ... | I've got the follow problem.I have a website and for the directories /members and /admin I have a .htaccess which forces these URLs to go to https://
All other URLs are forced to go to normal https://Now, for /members which is https:// I have in the pages a reference to /js/script.js which in imported into the page, b... | https and http combined .htaccess |
Picasso is designed to be a singleton, so there's isn't a new instance created every time.
This is the with() method :
public static Picasso with(Context context) {
if (singleton == null) {
synchronized (Picasso.class) {
if (singleton == null) {
singleton = new Builder(context).build();
... |
Is it okay to create a new instace of picasso for loading every image.For E.g something like:
Picasso.with(context)
.load(url)
.placeholder(R.drawable.placeholder)
.error(R.drawable.error)
.centerInside(
.tag(context)
.into(holder.image);
in getView() of a listAdaptor.Does it not create new Lr... | Is it okay to create new Instance of picasso everytime |
13
"Memory address" of an object reference does not make sense since objects can move across Java Heap.
You cannot explicitly free space allocated by Unsafe.allocateInstance, because this space belongs to Java Heap, and only Garbage Collector can free it.
If you want your ... |
Java Unsafe class allows you to allocate memory for an object as follows, but using this method how would you free up the memory allocated when finished, as it does not provide the memory address...
Field f = Unsafe.class.getDeclaredField("theUnsafe"); //Internal reference
f.setAccessible(true);
Unsafe uns... | How to free memory using Java Unsafe, using a Java reference? |
I'll try one by one:
I. You need to use git filter-branch only if you need to remove the files from your history completely. If those files do not contain any credit card information, then i think the following should be enough:
git rm --cached .DS_Store
git commit -m "{Your message}"
then add this file to .gitignor... |
I can create a repo and use GitHub / BitBucket fine for my own projects. I have had problems when collaborating with other developers or trying to fork a project on GitHub.
I am aware of other answers like Best practices for git repositories on open source projects but there are OSX / Xcode specific problems I want t... | Best practices for Xcode + Git for multi-developer projects |
Yes, you should consider usinglabelsto disambiguate metrics (e.g. Counters) by instance.You'll need to determine a unique identifier to use.Kubernetes provides aDownward APIthat enables you to surface information from the Pod to a container. One of these values should be useful.You can then use PromQLignoringto e.g. su... | I have service A which is a consumer from some queue.I can monitor and count any consumed message, easily with Prometheus :)from prometheus_client import start_http_server, Counter
COUNTER_IN_MSGS = Counter('msgs_consumed', 'count consumed messages')
start_http_server(8000)
while(queue not empty):
A.consume(queue)
... | how to monitor multiple instances of docker using Prometheus? |
It's part of the infrastructure. This container is started first in all Pods to setup the network for the Pod.It does nothing after the Pod has started.Here is thesource code. | I set up thekubernetescluster, and I found thepause-amd64:3.0container on master or minion like this:[root@k8s-minion1 kubernetes]# docker ps |grep pause
c3026adee957 gcr.io/google_containers/pause-amd64:3.0 "/pause" 22 minutes ago Up 22 minutes k8s_POD.d8... | what does kubernetes use the container pause-amd64 for? |
Disclaimer: My experience is with git rather than hg, but as I understand it the concepts apply equally to both systems.
An advantage of backing up to a remote repo is that if your local repo becomes corrupted (perhaps due to a problem with the underlying filesystem), that corruption does not get transferred over to t... |
I'm currently signed up with a third party service that hosts my mercurial repositories as a central hub to push my changes to as a sort of backup.
Now, I'm looking at a system to backup my laptop and am concidering Mozy. I'm a loan developer, and work on a laptop and am usualy connected to my internet via wifi with m... | Can I use "Online Backup" to backup my DVS instead of pushing to an external repo? |
That worked for meRUN apt-get install -y locales
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& sed -i -e 's/# pt_BR.UTF-8 UTF-8/pt_BR.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-genShareFollowansweredApr 29, 2019 at 14:43Rodrigo CrispimRodrigo Crispim13111 silver badge33 bronze ba... | When I try "docker run -p 8050:8050 app1" in docker I get:Traceback (most recent call last):
File "app1.py", line 6, in <module>
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
File "/usr/local/lib/python3.6/locale.py", line 598, in setlocale
return _setlocale(category, locale)My dockerfile looks like this:FROM python:3... | Docker "unsupported locale setting" when running Python container |
According to the logs it looks as if theTaskManagercannot connect to the new leader. I assume that this is the same for the web ui. The logs say that it tries to connect toflink-job-manager-0.flink-job-svc.flink.svc.cluster.local/10.244.3.166:44013. I cannot say from the logs whetherflink-job-manager-1binds to this IP.... | I'm trying to deploy Apache Flink 1.6 on kubernetes. With following the tutorial atjob manager high availabiltypage. I already have a working Zookeeper 3.10 cluster from its logs I can see that it's healthy and doesn't configured to Kerberos or SASL.All ACL rules are let's every client to write and read znodes. When I ... | Flink HA JobManager cluster cannot elect a leader |
The thing about locmem is that it really is just a local memory storage. Looking atthe code, it's clear that the data is just being saved in a module-level variable,_caches, in that module. So you can just dofrom django.core.cache.backends import locmem
print(locmem._caches) | I was trying to use the locmem cache for my web application but couldn't find any documentation on how to see the contents of the cache. I mean I want to check if my keys are being set correctly in the cache. How can I list all the keys in this cache or is that even possible?I found the questionGet list of Cache Keys i... | Contents of locmem cache in Django? |
No, the string is a complete object, with an object header (containing a type reference, sync block etc), length, and whatever characters are required... which will be a single null character (two bytes) and appropriate padding to round up to 4 or 8 bytes overall.
Note that although strings in .NET have a length field... |
How much space does string.Empty take in CLR?
I'm guessing it's just one byte for the NULL character.
| How much space does string.Empty take in CLR |
21
Localhost inside each container (like the nginx container) is different from localhost outside on your container. Each container gets its own networking namespace by default. Instead of pointing to localhost, you need to place your containers on the same docker network (... |
I use nginx in the docker,this is my nginx configure
server { listen 80; server_name saber;
location / {
root /usr/share/nginx;
index index.html;
}
location /saber {
proxy_pass http://localhost:8080;
proxy_redirect off;
proxy_set_hea... | docker nginx appear "502".1 upstream server temporarily disabled while connecting to upstream |
Your syntax for sending the OAuth Token is wrong. You need to use either this formatcurl -H "Authorization: token xxxxxxxxxxxxxxx"https://api.github.com(or)curlhttps://api.github.com/?access_token=xxxxxxxxxxxxxxxxxReference:https://developer.github.com/v3/#authentication | I'm using authenticated Git API request using access token. But still, I get the request rate limit 60 req/hr. But the document says, for authenticated requests the rate limit is 5000 req/hr. Why I'm getting 60 req/hr. or is there any wrongs in curl comment which I'm using?Eg:
curl -H "Content-Type: application/json" ... | Rate limit of authenticated git API request |
You're misinterpreting the post. It doesn't say that looping inference increases GPU utilization - it posits looping inference as a test to see if the bottleneck is loading data. It's a test, not a solution.Looping inference loads data once, then runs inference multiple times, allowing you to see the GPU performance wi... | I was looking for a solution for an issue I was having with my interface speed. I saw thisansweronline but I don't understand what the solution was. The person is using a hugging face model with pytorch and the solution was to loop the real inference call to increase the GPU utilization. This was caused by a bottleneck... | understanding looping real inference call |
A gray folder on GitHub looks like a submodule.
See for instance:
"What is this grey git icon?"
"What does a grey icon in remote GitHub mean"
Try in the parent module a git rm --cached sub-directory (no trailing slash).
Check if you have a .gitmodules file at the root of your main repo, with that same sub-directory ... |
I have just realised I ran a
'git init'
command from a sub-directory by mistake and then created a master repo at the root of my project.
This was a mistake, so I ran the
'rm -fr'
command (delete) on the nested directory '.git' not in the root of the project - thinking that this would solve my issue (how w... | Nested GIT Repository mistake method to remove it? |
There is a GitHub action that could help to maintain the README file base on some data files. For example, you can easily maintain a big Markdown-based table from some YAML files.
See also https://github.com/LinuxSuRen/yaml-readme
|
I'm new to github, and recently I finished an action with auto craw and process data on a daily basis. So, after with the workflow, I can have latest dataset.
My question is, in github readme file, is there a way to show the last date in my dataset.
For example, after my daily workflow finished, the last row of my dat... | How to auto update readme file with specific data in files? |
If you don't need all the feature from the native GitHub issues page, you could consider listing those issue to generate your own include/presentation.
See "possible to embed Github list of issues (with specific tag) on website?"
Kasper Souren proposes below in the comments the following fiddle:
var urlToGetAllOpenBug... |
I'd like to put it in the Progress section of my project's webpage. I tried using an iframe, and I tried using $.load(), but neither of these work.
Any ideas?
| Is there any way to embed the GitHub Issue Tracker in a webpage? |
3
I came across this question when I was looking for the same thing, and now I have found an answer!
You can detect this event by creating a Cloud Trail that logs management events for your account, and looking for an event where the EventName = RunInstances, and the Erro... |
I have a Kubernetes cluster that relies on AWS EC2 spot requests.
I sometimes have this failure message from the aws auto-scaling group:
Could not launch Spot Instances. InsufficientInstanceCapacity - There is no Spot capacity available that matches your request. Launching EC2 instance failed.
I knew the downfall of u... | How to track InsufficientInstanceCapacity from AWS EC2? |
One general solution to this kind of requirement is reactive, not proactive. Write automation based on CloudTrail Logs or AWS Config or by simply enumerating the current state of your AWS account periodically, and raise alerts (or terminate resources) if your policies have not been complied with. | I am trying to see if its possible to restrict(set some max limit) the number of EC2 instances which are created by an IAM user? Can i create custom policy for this?Note:I am looking for IAM user level permission. Not AWS Account level restriction.Similarly i am also looking for restricting EBS storage limit per IAM us... | AWS IAM user - Limit number EC2 instances and limiting EBS storage |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.