Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
you have two options:1.you can always download as project .zip if you can't setup git properly, or doesn't want to use command line.2.use the copy button next to the link and write in command prompt.git clone paste-the-linktip: click right button on mouse to pastetip2:how to setup git on windows | I am working on a project where I need to add a drag and drop in a div, then I started looking at libraries on drag and drop which should work on mobile devices too, and found one such library calledDragula.I tried to clone the repository in my machine. I downloaded git which looks like this but the problem is I am not... | Clone a repository from GitHub |
First of all, with your codeclient = boto3.client('events')
response = client.create_event_bus(you are accessing the CloudWatchEvents, not AWS EventBridge (as the error message states - reason why is stated below)."CloudWatchEvents' object has no attribute 'create_event_bus'"Moreover, EventBridge isn't available in th... | I played around with AWS a little bit and ended up at AWS EventBridge. I tried to write a Lambda for testing and understanding, but got an error just at the beginning.import json, boto3
def lambda_handler(event, context):
client = boto3.client('events')
response = client.create_event_bus(
Name='TestEventBu... | How to use AWS EventBridge with Python Lambda and Boto? |
0
After you did:
docker run -d -p 8333:2375 swarm manage token://cluster_id
... your swarm manager is on port 8333 not 2375; you would need to query the swarm manager with:
docker -H tcp://workstationIP:8333 info
Share
Improve this answer
... |
Hello I created the swarm cluster in the following way
On my workstation:
$docker pull swarm
$docker run --rm swarm create
On another docker host
docker run -d swarm join --addr=nodeIP:2375token://cluster_id_from_step_2
Back on workstation
docker run -d -p 8333:2375 swarm manage token://cluster_id
If I list the no... | Number of nodes appears 0 in a swarm cluster |
Allocatable arrays always retain their bounds, if you access them as allocatables. This means even directly using 'use association' or 'host association', as you show in subroutineuseAR, or if you pass them as allocatable dummy arguments. If you pass them as assumed shape or assumed size arrays, you must specify the lo... | I want to use an array Ar(-3:3, 5), which is an allocatable variable in the module global and allocate it in one subroutine and access it in the next subroutine (see code snippets below). Will the indexing in the second subroutine be from -3 to 3 and from 1 to 5, or do I have to specify that in the subroutine?module gl... | Fortran: Allocatable variables in modules |
You whole attempt has a couple flaws:If your metric is actually a counter, your query should besum by (customer) (increase(requests[1d])).In Grafana$__intervalstand for time corresponding to one "column" on time scale. Based on your description, you probably intended to use$__rangeinstead.To get only last result of the... | Let's say I have a Counter – namedrequests- representing the number of requests my server handles. It has a label namedcustomerindicating which customer made the request.I want to know "How many requests were made over the past 24 hours, per customer" and I've figured out I can get this from Prometheus by querying:sum ... | Display sum of Counter over time period in a Grafana table view |
Depends on Varnish version,
From Varnish 3.0.2 you can stream uncached content while it caches the full object.
https://www.varnish-software.com/blog/http-streaming-varnish
"Basically, his code lifts the limitations of the 3.0 release and allows Varnish to deliver the objects, while they are being fetched, to multipl... |
I'm trying to configure Varnish to cache range requests. I notice the http_range_support option, but everything I've read says that this will attempt to cache the entire file before satisfying the request. Is it possible to do so without requiring the entire file already be cached?
| How can I configure Varnish to cache range requests? |
If you mean to do it manually then:navigate to the project page on your sonarqubeopen Issues tabFilter severity (Blocker, Critical)Filter either Assignee or AuthorCopy URL and send itAlternatively if users have accounts on sonarqube they can use filter My issues along with filter for severity on the same tab.ShareFollo... | I have a requirement that after every scan send only sonar blocker and critical violations issues to particular users .Seeking help to understand the required configuration.
Sonar version is:1.2.1 | How to configure sonarqube to send blocker and crtical issue notification |
You can add the query parameter page_size=X to determine how many tags will be displayed. It won't automatically give you every tag, but you can set it to a really big number to ensure you get what you want.
https://hub.docker.com/v2/repositories/library/ubuntu/tags?page_size=1000
|
I'm trying to get the list of tags for a public image in DockerHub.
I found the following example which works:
https://hub.docker.com/v2/repositories/${reposiroty}/tags
but it's paged, and I need to control the page size and I can't find documentation on this API. It says v2 in the URL, but it does not look like the ... | DockerHub API - listing tags |
Source for this answer:https://stackoverflow.com/a/60492986/12153576The"error": "Request entity too large: limit is 3145728"is probably the default response from kubernetes handler for objects larger than 3MB, as you can seehere at L305of the source code:expectedMsgFor1MB := `etcdserver: request is too large`
expectedM... | We are hitting an error "Request entity too large: limit is 3145728" when trying to update a custom resource object.
That would be very helpful if any one knows how to change the size limit from k8s side.
Is there any exposed parameters for user? | "Request entity too large: limit is 3145728" when trying to update a k8s CR resource |
0
The solution is to use a std::stringstream. std::iostream objects are to abstracted for impelmentation.
Share
Improve this answer
Follow
answered Jun 20, 2013 at 19:49
kseierkseier
5566 ... |
I am writing a C++ application that uses an iostream instance to accumulate and digest large amounts binary data (10M+) from a web service. The stream is preferred for several reasons, but foremost of these is ease of integration with a third-party stream-based API without requiring in-memory copies when converting be... | Explicitly free memory underlying C++ iostream |
Your env should be declared as a part of PodSpec (which you can find in objects like Pod, ReplicaSet, Deployment, etc.) not in a Service which defines only a sort of internal load-balancer/router for your traffic. | I'm new in Kubernetes and helm-charts, and trying to make Keycloak save data in Postgres and not in H2(as he do it by default). Postgres will be created by separate helm chart. First I creating Postgres by command:helm install --name=postgres-keycloak stable/postgresqlThen I look at new Postgres service "Internal endpo... | Add to keycloak k8s helm chart environment parameters of outside Postgres database |
You can achieve what you want by breaking it into two steps:
Manipulating files on s3
Since s3 is a remote file storage, you can't run code on s3 server to do the operation locally (as @Andrey mentioned).
what you will need to do in your code is to fetch each input file, process them locally and upload the results bac... |
I want to concatenate the files uploaded on Amazon S3 server.
How can I do this.
Concatenation on local machine i can do using following code.
var fs = require('fs'),
files = fs.readdirSync('./files'),
clips = [],
stream,
currentfile,
dhh = fs.createWriteStream('./concatfile.mp3');
files.forEach... | Concat MP3/media audio files on amazon S3 server |
Rename your current project folder (the new one you want to put on GitHub) to something like MyProjectBackup.
In Android Studio, go to File > New > Project from Version Control > Git. Then log in with your GitHub username and password and select your old project's repository name from the list of your GitHub repos. ... |
I had an old Android project that I think I had started in Eclipse or some old version of Android Studio. Anyway the project structure was completely different from how Android Studio organizes things now with Gradle. Rather than try to update every file location I just started over with a new project using the same n... | Replace GitHub repository with a new Android Studio project while preserving old commits |
First of all, export your code from the lambda dashboard. Then do the following:Unzip the downloaded package into a directory, for example project-dir.Install any libraries using pip. Again, you install these libraries at the root level of the directory.pip install module-name -t /path/to/project-dirZip the content of ... | I have created the lambda function by using inline code editor for video convert process using zencoder its worked fine.Now i have to Resize the images in 3 different sizes and from one bucket to another bucket.For this scenario i need to import some python modules. But it says error like no module found image .This wa... | How to create a AWS lambda package using python? |
RewriteRule ^profile/$ ./index.php?page=profile [L,NC]The dollar at the end matches the end of the URL. In this case, there cannot be anything else afterprofile/ | Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^profile/(\w+)/*$ ./index.php?page=showuser&username=$1Okay, so I have this code that will rewrite my URL exactly how it want it to (sitename/profile/username).Now let's say I want to acces... | Having some issues with mod rewrite |
The answer here is that an update was made to theAz.CosmosDbmodule so that it specifically requires version 1.9.4 (or higher) ofAz.Accounts. However, on the Azure DevOps hosted agent they use version 1.9.3.To fix, I changed the command that manually installs theAz.CosmosDbmodule -Install-Module -Name Az.CosmosDb -Requi... | I have an Azure DevOps pipeline to rotate Cosmos DB account keys. To do this, I'm using PowerShell and theNew-AzCosmosDBAccountKeycmdlet.For some unknown reason, theAz.CosmosDBmodule is not installed withAz, so it needs to be installed manually each time the pipeline is run.Install-Module -Name Az.CosmosDb -AllowClobbe... | Azure DevOps PowerShell task fails to load 'Az.CosmosDB' module |
Firstly the admin API is not enabled by default in Prometheus 2. This must be made active by starting the server with the option--web.enable-admin-apiThere is a new endpoint in v2 athttps://prometheus/api/v2/admin/tsdb/delete_seriesThis takes aPOSTspecifying the search criteria, e.g. for a time series with the nameALER... | We are getting to grips with alerting so from time to time need to clear out old alerts which we did by calling the HTTP API, to remove the pseudo time series where the alerts were stored, e.g.:DELETE https://prometheus/api/v1/series?match[]={__name__="ALERTS"}We have recently upgraded our Prometheus server from 1.8 to... | How do I delete a time series from Prometheus v2, specifically a series of alerts |
If your app will operate in an environment where they can reach your desired IP address, but cannot trust DNS, then you could hard-code the app to use the target, and then add a "failover server" pre-loader, which you send if you plan to move IP address.When you move, you also should release an update that has the new ... | I know that I can't permanently set DNS servers programmatically on a non-jailbroken device, but I'm searching for a method to route all DNS requests in my app to a specified DNS server (e.g. Google DNS 4.2.2.1) in order to bypass DNS-based government censoring. I know I can hard-code specified IP addresses to hosts by... | Bypassing DNS requests app-wise in iOS |
2
As far as I know String literals end up in the "Perm Gen" part of non-Heap JVM memory. Perm Gen space is only examined during Full GC runs (not Partials).
In early JVM's (and I confess I had to look this up because I wasn't sure), String literals in the String Pool never... |
I read this question on the site How is the java memory pool divided? and i was wondering to which of these sectors does the "String Constant Pool" belongs?
And also does the String literals in the pool ever get GCed?
The intern() method returns the base link of the String literal from the pool.
If the pool does get... | String Constant Pool memory sector and garbage collection |
The scope has a few implications and you should probably look at a user specific role for setting up access tokens without giving access to a user (yourself) as the owner of the org repositories you have.Create a (machine) user that has access to only the one repository or repositories (private) that would limit the ac... | I am currently trying out Netlify function and using Netlify-cli to setup the CD. In the authorizing options, I picked the GitHub Personal Access Token and I want to know if theFull control of private repositoriesscope will include the private repos in the organization that I am apart of as I don't want it to access th... | GitHub Personal Access Token Private repo scope |
A quick google search gave methis bash script. I believe this should work with github.#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete,... | I've added some large binary files quite awhile ago I probably shouldn't have, committed & pushed to Github.Now when myself & others clone, it takes ages - is there a way to fix this, perhaps by deleting those files permanently or deleting those old commits? | Making the git repo smaller |
I think, I have read two different method.
The simple, try that:https://docs.docker.com/compose/gpu-support/https://www.tremplin-numerique.org/en/how-to-run-compose-docker-containers-with-gpu-accessservices:
test:
image: nvidia/cuda:10.2-base
command: nvidia-smi
runtime: nvidiaThe complex,
It run a docker... | I am trying to build service from docker file when start docker compose. The docker-compose.yml looks like:version: '3'
services:
app:
build:
context: .
shm_size: 4gb
# ...The build process need to enable GPU. I know how to enable GPU indeployaccording to thisblog. But it seems docker compose file buil... | In Docker Compose file, how to enable GPU in service build instructions? |
Try${__cell:lucene}instead of${__cell}All special characters should be escaped for Lucene query. Actually, you need URL encode for your case - you may try other advanced formatting options.Doc:http://docs.grafana.org/reference/templating/#advanced-formatting-optionsAnother dirty hackish solution, use JS to urlencode li... | In Grafana I've got a table panel which contains some names (one each row), that, if clicked, open a new window on Kibana passing via URL the name the user clicked (${__cell}) in order to Drill-Down that particular name.This use to works fine, but I'm facing a problem when then name contains a special character such as... | (Grafana Table) ${__cell} containing an apostrophe/single quote breaks the Query String to Kibana |
You need to add selection rules to yourselectorin thefortio.yml, e.q.apiVersion: apps/v1
kind: Deployment
metadata:
name: fortio
spec:
replicas: 1
selector:
matchLabels:
app: fortio
template:
metadata:
labels:
app: fortio
spec:
containers:
- name: fortio
imag... | I ran into the above stated error and the most popular answer for this error is adding 'selector:' to the yaml file. I get this error even after adding it. Can you please help me rectify this issue?deployment.ymlapiVersion: apps/v1
kind: Deployment
metadata:
name: sampleapp
labels:
app: sampleapp
spec:
replic... | Error: missing required field "selector" in io.k8s.api.v1.DeploymentSpec (error despite including 'selector' in the yaml file) |
As nested expression are not supported you can use a trick like below to obtaint the matrix job name.jobs:
test:
env:
# to expose matrix job name to steps, which is not possible with expansions
JOB_NAME: ${{ matrix.name || format('{0} ({1})', matrix.tox-target, matrix.os) }}
name: ${{ matrix.name ... | jobs:
my-name:
name: "My Name"
...
steps:
- name: Slack Notification
uses: my-action
with:
slack-msg: ${{ jobs.${{ env.GITHUB_JOB }}.name }}I want that slack-msg to evaluate to "My Name". I'm using my-action in multiple jobs, and I always want to pass in the job name, but I... | How do I pass the job name into a github action's input? |
Try this:RewriteEngine on
RewriteBase /
RewriteRule ^client$ /clientarea.php [L]
RewriteRule ^client/index.php$ /clientarea.php [L] | I have the following URLs:www.mydomain.com/clientwww.mydomain.com/client/index.phpwww.mydomain.com/client/index.php?a=bwww.mydomain.com/client/index.php?a=b&b=cThe following two htaccess files exist:www.mydomain.com/.htaccesswww.mydomain.com/client/.htaccessI want to edit "www.mydomain.com/client/.htaccess" so that if ... | Htaccess rewrite if address is subfolder? |
11
No you can't do that with Cloudformation.
Your CD pipeline should keep track of any code builds and template configuration and you should rollback with old/archived code by pushing out a new stack with that old code.
Share
Follow
... |
Usecase
I have cloudformation template with resources and lambda functions . Usually the cloudformation will rollback the stack when there is failure in creating it.
But what if i had pushed some resources or lambda functions with wrong logic or with less configurations . In such case i want to rollback the stack to ... | How to move to previous version of stack using cloudformation? |
You need to create a git .ignore file that includes the those files and resources you wish to exclude.
Ignoring files with .ignore file
If you have problems creating your own .ignore file you can use this online generator.
Git Ignore website
Just type your programming language, for instance csharp, and hit the create ... |
How to remove the nuget package from .NET projects so that they are not uploaded to gitlab or github?
| How to remove the nuget package so that they are not uploaded to gitlab or github? |
I have two parts: source code and config files (docker files, docker-compose files...)I put Dockerfile and docker-compose in a folder with the struct like you and push it to a git repository. For source code (and other data), I have to manage it by hand, with separated git repositories for source code to push and pull ... | Right now I have multiple components of my application in the same folder linked together with a docker-composeThis works really well in development, but when I want to push to production it's kind of fuzzy. If I keep this structure I cannot use only dockerhub to host my images because the docker-compose which links th... | How can I structure my docker projects for easy deployment? |
Great question, I must say.You needDPIflagto solve your problem (it needs to discard old path info)The DPI flag causes the PATH_INFO portion of the rewritten URI to be discarded.Keep your rules like this:RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule ^ - [L]
#--------------------------------------------------
# Fo... | I am turning crazy with this .htaccess :SetEnv PHP_VER 5_4
AddDefaultCharset UTF-8
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L,R,QSA]
#--------------------------------------------------
# Format type management --------------------------
#---------... | Two simple RewriteRule's in a row ... but strange result at the end |
You can try by adding a line break. </br>
For example:
<img src="blank.jpg" align="left" alt="drawing" width="400"/>
</br>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of ... |
issue
(the issue is topic 2 should be under the image)
My readme code is this
## Topic
<img src="blank.jpg" align="left" alt="drawing" width="400"/>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown... | How do I clear both with github readme? |
When you write on api.php add api on your url like'/get-list'then you call it/api/get-listShareFollowansweredDec 23, 2019 at 12:21albus_severusalbus_severus3,67411 gold badge1515 silver badges2525 bronze badges11Thanks, I found the problem. The route files were corrupted and I didn't check them. It was a problem of pro... | I have a Laravel project. It works on Mac os with nginx.
I recentlly installed a CentOs 8. I installed Nginx on it and add the configuration bellow:server {
listen 8001;
server_name _;
root /usr/share/nginx/html/reservation_laravel/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-P... | Laravel API route get 404 on Nginx |
2
You are asking a question very special to Github's (at least I assume its github as it looks like) user interface. The interface is showing per default the last commit message of the commit done on this folder/file. This can be translated like: "the file has been changes ... |
How can i give only one commit message to all files in git
eg: if i commit two files say sample.txt and sample1.txt commit message is shows like this
I this it will shows the same commit message (ie added new text files) for two files ,instead of that I want to show the same commit message for two files commonly.
So ... | Only one commit message to all files in github |
He won't be able to push directly to the remote repo because it history will have diverged from said remote.! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/[me]/[project].git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge ... | Simple question let's say i'm working on Feature A of my project and a friend is working on Feature B, we both started from the same master source code. And this happens:I merge my branch onto master. (Feature A)I push the project.Then he merges his branch onto master. (Feature B)He pushes the project.Will my branch (F... | (Github) If I merge feature A onto master and then someone else merges feature B onto master. Will feature A be lost? |
That will be even simpler (array decays to pointer automatically):data.buf = buffer;note thatbuffermust have an ever-lasting lifetime or you have to make sure that it's not deallocated (i.e. routine where it is declared returns) while you're using it or referencing it.Allocating from a subroutine and returning will cau... | I have structure with char pointer. I want to allocate static memory to this struct member. How can I do this?Example:struct my_data {
int x;
bool y;
char *buf;
};How to assign 10 bytes static memory to this char pointer? I know malloc to assign dynamic memory allocation. Is this Ok?struct my_data data;
ch... | allocating static memory for character pointer defined in struct in C |
EDIT: revised for CanCanCanAs of version 1.12 of CanCanCan (the community continuation of CanCan),Ability.new(user).permissionsreturns a hash with all permissions for the given user.Previous answer (CanCan):This might be a little complex...but here it goes..If you pass the specified User into the Ability model required... | I want to cache aPostview, but the view depends on the permissions of the current user (e.g., I only show the "edit" link ifcurrent_user.can?(:edit, @post))So I'd like my cache key to include a representation of the current user's CanCan abilities, so that I can invalidate the cache when the user's abilities changeSO: ... | Get a string that represents a user's CanCan abilities |
I found that I needed to rename the columns in table_1 and then was missing a call to .drop_fields after my Join.apply call to remove the old columns from the joined table.Additionally, you can pass in a list of column names rather than the single 'id' column that I was trying to use in the question. | I have two tables in AWS Glue, table_1 and table_2 that have almost identical schemas, however, table_2 has two additional columns. I am trying to join these two tables together on the columns that are the same and add the columns that are unique to table_2 with null values for the "old" data whose schema does not incl... | Pyspark with AWS Glue join on multiple columns creating duplicates |
Thisis the only solution that worked.It's necessary to overwrite the default nginx file after AWS created it. So there has to be two more files:Write the nginx file.Create a script that overwrites the default nginx file.Run the script after AWS created the default file. | I want a redirect from HTTP request to HTTPS on Elastic Beanstalk with nginx as proxy system.I've found a lot of advices on Google but no one helped, it doesn't redirect.That is my currenttest.configfile in.ebexentionsdirectory:files:
"/etc/nginx/conf.d/proxy.conf" :
mode: "000644"
owner: root
group: root
... | Redirect Elastic Beanstalk HTTP requests to HTTPS with nginx |
As far as setting up your repo after changing remotes goes:rungit fetchto download the state of your "new" remote,rungit branch -u origin/master masterif you want to have git compare your local master branch with its remote counterpartAs far as debugging your ssh access issues: use the command line ssh client to debug ... | I was using SourceTree and ran into an issue with the repository not being found despite the fact that it is there.I tried this trick to fix that:git remote rm origin
git remote add origin
https://GITHUB_USERNAME:[email protected]/GITHUB_USERNAME/REPO_NAME.gitAs soon as I ran this, the1next to master listing all my c... | Git doesn't see any changes I've made to my files between local and remote |
0
Windows does not permit colons : in file names.
You'll have to find an alternative way to mirror your backup. A tar file, perhaps?
Share
Follow
answered Oct 6, 2015 at 10:55
amsams
25.2k44... |
I'm using rdiff-backup for backuping my filesystem on Linux server locally. That seems OK. Then I perform remote backup with rsync to windows machine. All read/write permissions on rsync target directory are set correctly, but still a get following errors...
[2015-09-28 09:39:10] INFO Copying files to remote director... | Rsync cant' copy my rdiff-backup files |
Yes, having multiple instances of Prometheus and Alertmanager, if configured correctly (e.g. have a mesh for the Alertmanager instances to avoid duplicate alerts) is a HA setup. It doesn't matter if it's bare metal or within a replica set in k8s.Have not used CoreOS's prometheus-operator myself but as far as I can tell... | I have been exploring a lot of options to make our Prometheus set up a high available one.
I have boiled it down to two so far:
1. promxy -https://github.com/jacksontj/promxy(For ease & simplicity)
2. Thanos -https://thanos.io/getting-started.md/( For its uber - querier)However, on bare metal, I can still have 2 insta... | Isn't Prometheus with replicas and persistent volume already HA? |
2
I'm not an expert but at first glance it looks like that action might have been built with a single docker container in mind.
Since you're using Docker Compose maybe an action like this could be better? https://github.com/peter-evans/docker-compose-actions-workflow
... |
I am using docker/build-push-action@v2 action in my GitHub actions file to build and push docker images to the GitHub package registry. Building and pushing Dockerfile is working for me.
I have docker-compose file which I want to build and push to the GitHub registry.
How can I do that? Thanks in advance.
| Docker compose with GitHub actions |
If GitHub apps are not working, you can fallback to awebhook approach, which means having a listener which will respond to a JSON payload sent by GitHub on each push.That listener could:apply a commit linterif said linter fails, can:force-push the same branch on HEAD~1 to effectively cancel (refuse) the pushsend an ema... | How do I run commitlint on a GitHub pull request message and description?https://github.com/conventional-changelog/commitlintWe currently run commitlint in our CI. However, this is too late in the process i.e. the invalid commit message is already in the branch.The only approach I've been able to find is with GitHub ap... | Run Commitlint on GitHub Pull Request Message & Description |
One possible reason for such opinion is that the GPU was not originally intended for general purpose computations. Also programming a GPU is less traditional and more hardcore and therefore more likely to be perceived as a hack.
The point that "you convert the problem into a matrix" is not reasonable at all. Whatever ... |
I had started working on GPGPU some days ago and successfully implemented cholesky factorization with good performacne and I attended a conference on High Performance Computing where some people said that "GPGPU is a Hack".
I am still confused what does it mean and why they were saying it hack. One said that this is h... | Is GPGPU a hack? |
[UIImage imageWithData:] is autoreleased object, so it will be freed somewhere in run loop. To release it for sure, use alloc/init constructor.
|
I have created an UIScrollView that contains photos, like in the Photos app.
Photos are downloaded. Images are set through:
imageView.image = [UIImage imageWithData:downloadedImageData];
To save memory, when the user goes far from a photo, I set
imageView.image = nil;
This doesn't clear the memory, though. "Memory L... | Clear memory used by UIImage -- UIImageView.image = nil doesn't do it |
Great start so far! You can simply change thetermquery into atermsone. Also, you need to leverage themissing bucketfeature for the not found result:GET /index1*/_search
{
"query": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"gte": "now-7d",
"l... | I am looking to create a script that will query multiple hostnames and provide a not found result if it is not in the index and provide the host and count of documents on the server if it is found. What I have so far seems to work, but I am unsure of how to make it query multiple servers and provide the correct result... | Elasticsearch script to query hostnames |
This is not possible using job bookmarks. From AWS documentation:Job bookmarks are implemented for a limited use case for a relational database (JDBC connection) input source. For this input source, job bookmarks are supported only if the table's primary keys are in sequential order. Also, job bookmarks search for new ... | I am trying to load the data from the AWS RDS (MySQL) to the redshift using AWS glue. And I want to load the data incrementally. By using Job Bookmarks, glue can track only the newly added data but cant track the updated rows. Is there any way to load only the updated data? may be by using the field updated_at in the s... | aws glue rds incremental load |
It is not guaranteed that object will be GCed as soon as method call is done, but object will become as eligible for GC and on next GC run it may be collected and memory will be free.
EDIT:
Yes you are correct. You don't need to set it to null. Local variables will be created on stack and stack will be removed as soon... |
If I have a method inside a class and I am creating an object inside that method
then would that object be destroyed and the memory allocated to it released
once the method is finished?
eg. -
public void drawFigure(){
Paint paint = new Paint();
paint.setSomeProperty();
canvas.drawLine(startPoint, finishP... | Memory Management for local objects in java |
Your analysis configuration screenshot shows that you've pointed SonarQube Scanner to a.slnfile as the location of your project's source code. Since there's no actual code in the.slnitself... that would be your problem. The analysis is running and "pushing" results into SonarQube, but those results are empty because no... | We've integrated TeamCity with the SonarQube as a part of our build process. When ever I run the sonar job in TeamCity, after the build is complete I see the build version in SonarQube but the code(LOC-Lines of code) is not being pushed.We are using TeamCity 9.1.3 Enterprise version and SonarQube 4.5.7. Please see the ... | Unable to push the TeamCity built code into SonarQube |
You need to add a condition to prevent php extensions from getting rewritten tooops.html. If you want to prevent actual requests for php pages, you can use the%{THE_REQUEST}variable inside aRewriteCond:RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*\.php\
RewriteRule .*\.(php)$ opps.html [L]This way, internally re-written... | Is it possible to use .htaccess to prevent a page from being served unless it is by a rewrite rule?
for example I have clean URLS so a call toxyz.com/hiservesxyz.com/hi.php.I would like to achieve if the called url =xyz.com/hi.phpthat the pageopps.htmlgets served, but the normalxyz.com/histill works.thx ArtDirectoryInd... | use htaccess to prevent calling page except with RewriteRule |
The Zip download is not a Git repository, it's only a collection of the files at that moment in time. Here's a way you might be able to get your changes into the repository:Clone the repository properlyCopy your current files into the cloned directorygit statusandgit diffto check that the changes are what you expectgit... | I'm working on arepositorythat has twobranches:Master, andRelease1.The branch I need isRelease1. I went to the site and tried to clone it, but no matter what I did I got theMasterbranch cloned.So I gave up and downloaded the branche's zip to my file system. I added it toEclipseand worked on it.Now I need to commit my c... | Committing changes to branch I got by downloading zip from GitHub |
0
One way to break the live site is if you make an unintended git pull, once you managed to push it to GitHub!
Plus you would need to fiddle with the proxy in order to access to GitHub, all on the production platform.
I would really recommend having nothing on the productio... |
There is a website in production.
I want to push the files in Git.
I think the client did copy all the files from his computer to the server using ftp.
I think he pushed his git perso files, cause I can see a .git folder in live.
I tried "git status" on the live server, It returns a list of files.
I did:
git remote s... | Best way to add an existing repo to git to a different branch behind proxy |
1
Here's what I have people on my team do after upgrading Prettier, changing its config, adding it for the first time, etc to prevent merge conflict headaches on their branch:
git fetch origin master:master
# rebase against stage, choosing your code in case of a conflict, ... |
I've recently updated our code base to ES6. Following this I am improving the linter rules, and working to have a set standard in the code base. My plan was to commit an initial branch which just had the eslint and prettier setup in them. Then directly following commit another branch with eslint --fix and prettier run... | Lint & Prettier repo without mass merge conflicts |
You will not receive Lambda notifications for objects moved from S3 to Glacier via the Lifecycle rules.When an S3 object is moved to Glacier, the object is not removed from S3. Instead, it's storage type is simply changed from Standard/RR/IA to "Glacier". And there is no notification type for storage type changes.Also,... | I am working on a POC where I have setup a Lifecycle rule on S3 to move objects to glacier after certain no of days (if objects have specified tag). Rule is working fine for me, objects are getting moved to glacier by lifecycle rule and storage type is change to Glacier from Standard. (so far so good).As I need to rest... | AWS Lambda for objects moved to glacier |
Yes, the best thing is to build your image in such a way it has the python modules are in there.
Here is an example. I build an image with the build dependencies:
$ docker build -t oz123/alpine-test-mycoolapp:0.5 - < Image
Sending build context to Docker daemon 2.56 kB
Step 1 : FROM alpine:3.5
---> 88e169ea8f46
Step... |
I have an image called: Image and a running container called: container.
I want to install pytorch and anaconda. What's the easiest way to do this?
Do I have to change the Dockerfile and build a new image?
Thanks a lot.
| How can I install python modules in a docker image? |
I have an idea that might help you: Sonar has a clean RESTful interface that can be seen in action via Firebug for example. When you change this project setting (Configuration > General Settings > Code Coverage), peek the HTTP communication and learn how to configure this property via HTTP. It is hopefully not like roc... | I am using Sonar 3.2 with Ant. I have read that it should be possible to use Cobertura for unit test analysis and JaCoCo for integration test analysis. I have however not found a clear guide on how to do this with Ant. I have set the code coverage engine to be Cobertura like this:<property name="sonar.core.codeCoverage... | How to use Cobertura for unit tests and JaCoCo for integration tests simultaneously? |
You might be using an old version of the Python Prometheus client.I tried the most recent version 0.19.0 with Python 3.8, and this code is working just fine for me (server listens on IPv6):from prometheus_client import start_http_server
if __name__ == '__main__':
start_http_server(9999, addr='::')
while True:
... | I am writing a custom exporter for my application using the officialPython client for PrometheusMy code works fine with the below snippet, (I'm redacting the rest of the code as I think it is irrelevant to the issue I'm facing.)from prometheus_client import start_http_server, Gauge
start_http_server(9669)I'm able to ge... | Using Python client for Prometheus on IPv6 |
If I am not mistaken the/in the element is what you are looking for.As perServiceManifest.xmlschema:Pass a comma delimited list of commands to the container.The schema excerpt:
The repo and image on https://hub.docker.com or Azure Container Registry.
Pass a comma delimited list of commands to the container.
... | I've a docker imagewiremock.net-nanowhich accepts additional commandline parameters like--Portand--AdminUsername.The normal docker commandline looks like:docker run --rm -p 9091:80 sheyenrath/wiremock.net-nano --ReadStaticMappings true --AdminUsername x --AdminPassword y --RequestLogExpirationDuration 24But how can I c... | How to specify commandline arguments to a docker container in Azure Service Fabric |
The decoded URI can be found inngx.var.uri. It does not contain the query string, if you need it seengx.var.query_string.EDIT: if you cannot use this, here is a simple way to unescape a URL in Lua.local hex_to_char = function(x)
return string.char(tonumber(x, 16))
end
local unescape = function(url)
return url:gsub... | When I usengx.var.request_uriI'm getting back a string that contains %20 in place of spaces. Is there a urldecode() function or similar to decode my string? | how to urldecode a request_uri string in Lua |
The answer to this particular problem was to ssh into our Jenkins server and to sudo apt-get install all the necessary packages.
Packages cannot be installed from the shell commands in the build configuration.
|
I am very new at Jenkins and trying to build my first pipeline.
What I want is for Jenkins to go to a git repo, compile all the .tex files into .pdfs and then save those .pdfs somewhere
I have figured out the first part for connecting to the git repo. my new problem is trying to compile the pdfs
right now my shell sc... | Install a package in Jenkins? |
Cognito federated identities and Cognito user pools address different use cases.With Cognito user pools, you explicitly manage the users which can access your service. This is useful when you want to limit access to your API to a fixed set of users.With Cognito federated identities, you delegate user management to an i... | Problem:I want to authorize myAmazon API Gatewayhosted REST API users using Facebook Authentication.My Understanding:I knowAmazon Cognitocan be used to authenticate users, calling as Federated Identities. Then, I sawAuthenticate API Clients with Amazon Cognito Your User Pool, which authenticates for Cognito User Pool. ... | How to authenticate API Gateway calls with Facebook? |
Yes, Scheduler should not assign a new pod to a node with a DiskPressure Condition.However, I think you can approach this problem from few different angles.Look into configuration of your scheduler:./kube-scheduler --write-config-to kube-config.yamland check it needs any adjustments. You can find info about additional ... | We are running a kubernetes (1.9.4) cluster with 5 masters and 20 worker nodes. We are running one statefulset pod with replication 3 among other pods in this cluster. Initially the statefulset pods are distributed to 3 nodes. However the pod-2 on node-2 got evicted due to the disk pressure on node-2. However, when the... | Kubernetes pod eviction schedules evicted pod to node already under DiskPressure |
setVersionIdwould be something the SDK library itself uses to populate the versionId returned by the service when the object is created, so that you can retrieve it if you want to know what it is.Version IDs in S3 are system-generated opaque strings that uniquely identify a specific version of an object. You can't ass... | I want to upload an object to Amazon versioned bucket (using Java AWS SDK) and set a custom version to this object (goal is to set the same version to all objects, uploaded at once)PutObjectResult por = amazonS3Client.putObject(...);
por.setVersionId("custom_version");So, is it the right way to set a version to the upl... | Upload an object to Amazon S3 with custom version id |
By using the REST API, you can get the latest release at:https://api.github.com/repos/$org/$repo/releases/latestShareFollowansweredFeb 12, 2017 at 21:15user4088314user40883141I didn't know about the API. Thank you @Missali.–user7554724Feb 12, 2017 at 21:17Add a comment| | From thisquestionI would like to know if there's a way to check current version of a repo directly from the website (without Git command line). I need this for a web scraping bot. | Get current project version of repository Github |
You can use any subversion software like Tortoise SVN or GIT..
You need to checkout the code from the domain the code is hosted upon.. Every colleague of yours will commit their code on the same domain and you can use "SVN merge" option to merge their code.
You can read more the following link:
http://en.wikipedia.o... |
I am working in one company there are 15 people working i have to merge their work in my PC everyday.
Its very time consuming can you provide some good resource which could work in LAN with good performance i am sorry if i have added this question on a wrong place but i have no ideas about it my colleague told me that... | How to take a backup in lan? |
FromWebMvcTags always reports "root" as uri when servlet Filter handles the request #17147In a Spring-MVC Boot app,http.server.requestsmetrics are always reported with a root uri if the request, which would be mapped to Spring-MVC controller under normal circumstances, is handled by a servlet Filter instead. This happe... | In our Prometheus metrics in our Spring Boot API, there is a very mysteriousroot"endpoint" that appears to be called sometimes. Thislookslike someone probing our API, but the endpoint does not exist. The really strange part is that I don't see how this "URI" can even be called, since it doesn't start with a forward sla... | Unexplainable "root" uri in spring boot prometheus metrics |
From the terminal, check the URL used:cd /path/to/local/repository
git remote -vIf it is an HTTPS one, and you want to use SSH:cd /path/to/local/repository
git remote set-url origin[email protected]:MyAccount/MyRepositoryOnce that works from command-line, you can switch back to RStudio. | I'm not sure what the issue is, since I'd done this without a problem a long time ago.Basically whenever I try to pull / push through the terminal or RStudio, I'm asked for my username and password (didn't use to be the case). When I supply them, I get an error message saying that this was disabled. It used to be that ... | Unable to pull / push through git with SSH in RStudio? |
Short answer : no, it's not possible to get more than 500 issues in a single web service call.Long answer : you should try to use ahook(either by using a plugin or by using a web hook) that is triggered on each project analysis => You'll then be able to browse all project's issues using pagination :api/issues/search?co... | I'm using the SonarQube API in a java tool to process issues and add comments to them/change the issue status (e.g. wont fix)The api/issues/search function has a page size limitation of 500 max. I have more than 500 issues and need to read this. I thought of performing mulitpule queries, but the issue keys are not numb... | How to get more than 500 issues from SonarQube api |
The short answer is you need to initialize git flow after every git clone.
The initialization of git flow operates on two sides:
create the correct branch structure (ex. the missing develop branch).
You gonna need to push the new branch.
update the local .git/config file with all the information given to git flow.
T... |
Suppose I have cloned a remote repository (which again belongs to me, say from github.com) and I have initialized git flow. As you may know, git flow init will create develop branch and create the prefixes for feature, bugfix etc. So far fine.
If I try to execute git flow init again on the same repository, git alread... | Usage of git flow init when team members clone the remote repository |
1
The error indicates that the path doesn't exist. Does C:\Temp exist? If so, does the service account have access to the folder?
Other things might be storage is full, etc.
See related question:
SQL server 2008 backup error - Operating system error 5(failed to retrieve te... |
I want to backup a database from our main server. But this error happens
System.Data.SqlClient.SqlException (0x80131904): Cannot open backup device 'C:\Temp\sample.bak'. Operating system error 3 (The system cannot find the path specified.).
BACKUP DATABASE is terminating abnormally.
at Microsoft.SqlServer.Managem... | Error in backing up database |
The registrar is responsible for setting the Root DNS entry that says, "When someone asks for stackoverflow.com, tell them that the authoritative DNS is xxx.xxx.xxx.xxx". They have an interface that allows them to make changes to the records they own.Then the requester must go to the authoritative DNS (Which is the on... | I understand how I can change thednssettings for my domains by editing my bind configs, when I run my own name-servers. I know that I can define the name-servers with my registrar via their online control panels. But I have no idea how that part works...How does my registrar store the data about the name-servers? Is it... | Setting Nameservers - how? |
Both essentially serves the same purpose. Deployments are a higher abstraction and as the name suggests it deals with creating, maintining and upgrading the deployment (collection of pods) as a whole.
Whereas, ReplicationControllers or Replica sets primary responsibility is to maintain a set of identical replicas (whic... | I am aware about the hierarchical order of k8s resources. In brief,service:a service is what exposes the application to outer world (or with in cluster). (Theservicetypeslike, CluserIp, NodePort, Ingress are not so much relevant to this question. )deployment:a deployment is what is responsible to keep a set of pods run... | In Kubernetes, what is the real purpose of replicasets? |
Option 1: Squash the commits on your remotedevelopbranch.Option 2: Since you merged yourfeature-branchbefore deleting it, you should still have access to all those commits. You couldgit reverton yourdevelopbranch back to the commit right before your merge commit. Then checkout the last commit you did on yourfeature-b... | Consider this scenario:I am working on my local feature or defect branch which is created
from develop branch.Then I released my changes as multiple commits
to my remote branch (as it happens in the PR review process).My PR is finally approved by team reviewing my changes. But I forgot to
quash all my commits on my rem... | Is there a way to squash a commits in already merged pull request? |
1) docker run -ti --rm golang echo $GOPATH
docker run -ti golang echo $GOPATH
/Users/me/go
I removed the --rm flag to be able to inspect the container. Then, I did docker inspect container-id:
"Env": [
"no_proxy=*.local, 169.254/16",
"PATH=/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/... |
Can anybody explain why this doesn't work:
# docker run -ti --rm golang echo $GOPATH
# docker run -ti --rm golang echo \$GOPATH
$GOPATH
when this works:
# docker run -ti --rm golang bash -c "echo \$GOPATH"
/go
| echo environment variable with docker run |
In order to get more details, you'll need to set the ResponseGroup parameter in your request. See the ResponseGroup section of the ItemLookup documentation to see the different Response Groups that you can use.
For example, setting the ResponseGroup parameter to Large or Medium or Small or even ItemAttributes will gi... |
I am querying Amazon's Product Advertising API for Instant Video (streaming) results. Everything is working fine -- except that there is some missing information:
Descriptions are not included in results. For example, on Amazon's website the movie "Food, Inc" (http://www.amazon.com/Food-Inc/dp/B002VRZEYM) has the des... | Instant Video results |
There is no docker environment variable named “MODEL_CONFIG_FILE” (that’s a tensorflow/serving variable, see docker image link), so the docker image will only use the default docker environment variables ("MODEL_NAME=model" and "MODEL_BASE_PATH=/models"), and run the model “/models/model” at startup of the docker imag... |
Having seen this github issue and this stackoverflow post I had hoped this would simply work.
It seems as though passing in the environment variable MODEL_CONFIG_FILE has no affect. I am running this through docker-compose but I get the same issue using docker-run.
The error:
I tensorflow_serving/model_servers/server... | Serving multiple tensorflow models using docker |
When you update the AWS.config, it updates the AWS object. Any AWS Service objects (S3, EC2, DynamoDB, ...) objects created since then will have the updated credentials. It will not update any service objects created before the update to AWS.config.
As AWS Guru @johnrotenstein suggested, you should create your service... |
I am using Node with lambda and the AWS Javascript SDK. I have a role attached to the lambda function that allows the access I need to do. I want to be able to accept user input of access and secret keys and update my AWS config to perform new actions with those updated credentials. So far
let AWS = require("aws-sdk"... | Nodejs AWS Lambda switching to another accounts access and secret key to perform functions |
If you're just wanting to cache your database, you can just use the built in .NET cache provider, and use the SQL Cache dependency. This way, if any data in your database, it will evict your cache on both servers.The drawback with a distributed caching mechanism is that there's still a lot of network traffic that occu... | Closed. This question isopinion-based. It is not currently accepting answers.Want to improve this question?Update the question so it can be answered with facts and citations byediting this post.Closed9 years ago.Improve this questionI am currently in the process of investigating the various different caching mechanisms... | AppFabric vs Unity vs Memcached or possibly any other multi server caching mechanisms [closed] |
So it seems you're not using a "VPC-native" cluster and what you need is "IP masquerading".Fromthisdocument:"A GKE cluster uses IP masquerading so that destinations outside of the cluster only receive packets from node IP addresses instead of Pod IP addresses. This is useful in environments that expect to only receive ... | I'm wondering if anyone can help with my issue, here's the setup:We have 2 separate kubernetes clusters in GKE, running on v1.17, and they each sit in a separate projectWe have set up VPC peering between the two projectsOn cluster 1, we have 'service1' which is exposed by aninternal HTTPS load balancer, we don't want t... | Unable to access Kubernetes service from one cluster to another (over VPC peerng) |
Add autocomplete="off" to the form (not the select element):<form autocomplete="off">
<select> <option value="" selected="selected">Select Quantity</option>
<option value="6" autocomplete="off">6</option>
<option value="12" autocomplete="off">12</option>
<option value="18" autocomplete="off">18</option>
<option value="... | I have a select menu.
Example:<select autocomplete="off"> <option value="" selected="selected">Select Quantity</option>
<option value="6" autocomplete="off">6</option>
<option value="12" autocomplete="off">12</option>
<option value="18" autocomplete="off">18</option>
<option value="24" autocomplete="off">24</option>
</... | Chrome caches select menu |
Replace yourRewriteRulewith this:RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|ipad|iemobile" [NC]
RewriteRule ^((?!mobile/).*)$ /mobile/$1 [R=301,L]Problem is that you're unconditionally prefixing/mobile/before any URL even ones that already start with/mobile/. | Hey there StackOverflow Community, i searched a lot on stackoverflow to fix my "too many redirect" Error.
But couldn't find anything that helps. I want to redirect to a mobile directory via .htaccess and the UserAgent Condition. Found a high voted Solution that looks like this:RewriteEngine On
RewriteCond %{HTTP_USER_... | .htaccess Redirect 301 to mobile directory - too many redirects ERROR |
If you need to check if a kernel module has leaked memory and your machine has x86 architecture, you can useKEDR system, it includes a memory leak detector.KEDR does not require you to rebuild the kernel. The online docs (see "Getting Started", for example) describe how to install and use KEDR. In short, the procedure ... | For testing the behavior of the kernel when it leaks memory, I am writing a kernel module that continuously allocates memory e.g. the code looks likeint bytesLeaked = 128000;
char *var = kmalloc(bytesLeaked, GFP_KERNEL);
if (var != NULL)
printk("leaked %d bytes at address %x\n", bytesLeaked, (unsigned int)var);This co... | how to determine if a Linux kernel module is leaking memory |
based on your screenshot you will an alert of get the average of a single metric resulting from query A over the last 192 hours is above1and one if it is above1.Please note, that you have only a single alert per panel, this will result in an always-on alert. | im confused about avg() at grafana alert, i did not found any document explain the meaning of this.How does avg() calculate? If I set Evaluate every 5m for 0m, will the avg() same as sum()?
any one can explain how does avg() calculated at this case? | what does avg() mean at grafana alert? |
I am using Cadvisor to collect Docker metrics and info.
Add cadvisor to your prometheus.ymlThen, I add this piece of code in prometheus.yml- job_name: "docker"
docker_sd_configs:
- host: "unix:///var/run/docker.sock"
refresh_interval: "1s"
relabel_configs:
- source_labels: ['__meta_docker_co... | How to create Dashbosrd on Grafana that displays status of docker container UP or DOWN?
Example:
Name Status
Container1 UP
Conteiner2 DownSolution
The way of creation the dashboard with the name of docker container and status | Grafana docker container status UP or Down |
The nginx proxy at the office can be configured to pass the client's IP address using theproxy_set_headerdirective.The nginxreverse proxydocs here show an example:location /some/path/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8000;
}In the config blo... | I am running NGINX as part of a Docker package. It is both a webserver and a reverse proxy, and the container has PHP bundled in with it. The front-end web application is built with Laravel. There are some instances where I want to get the client's IP address, and this seems to a little problematic in some cases. T... | How can I get the remote IP / Client IP using NGINX in Docker ?? Also using Laravel |
add the below line in .htaccess<FilesMatch "\.(?i:jpg|gif|png)$">
Header set Content-Disposition attachment
</FilesMatch> | I want force to download image instead of opening in the browser. I tried with the following code with php//set the content as octet-stream
header("Content-Type: application/octet-stream"); //
// tell the thing the filesize
header("Content-Length: " . filesize($download_path.$file));
// set it as an atta... | force to download images using htaccess |
You can drag the root folder of a git repo (the one under c:\ in your case) from Windows Explorer onto the start screen in GitHub for Windows. Then it can see your repo and can manage it in your non-default location. | ALL,I am managing multiple projects. All of them located on the GitHub and I'm using GitHub for Windows GUI and GitHub Shell.Recently one of the projects got updated with the really big file name and so in order to keep the GitHub happy I had to move it from the standard place: c:\documents and settings\\My Documents\G... | GitHub support for multiple directories |
If _viewA is in a view hierarchy, it is retained by its superview, so doing _viewA = nil will not release it, and it will still be there when the viewWillAppear method gets fired.
Then, in your viewWillAppear you are adding a "duplicate" of your viewA, with its own collectionView inside, placed just over the original... |
I'm going through my iOS app, using "Simulate Memory Warning" as my hammer of justice, and it's causing some unexpected problems (naturally). But this is one problem that has me stumped: objects are seemingly no longer equal.
Say my view controller (we'll name it VCBob) has…
two separate custom UIViews as subviews (l... | didReceiveMemoryWarning and re-built instance variable equality checking |
Use forward slashes instead and it works. C:/Users/user/Documents/git-xlsm-project/xlsm-git-diff-test/git_diff_xlsm.py
|
When I try to git diff a file using my custom python script I get the error can't open file and shows the directory with all '\' being removed.
.gitconfig:
[diff "zip"]
textconv = python C:\\Users\\user\\Documents\\git-xlsm-project\\xlsm-git-diff-test\\git_diff_xlsm.py
Gives this error when I try to do a git diff... | Git Diff Python: Python can't open file. Removes all '\' from directory |
One simple way is to bind the MySQL port only to the localhost address. That assumes the host has a mysql client available outside of Docker.
ports:
- 127.0.0.1:3306:3306
You could also omit the ports section completely (no port binding at all), and use the mysql client that's already inside the container.
docker-c... |
When I try to tunnel via SSH to the Host Mashine (vServer) and then try to connect via the internal docker Container-IP then I can't connect to MySQL.
This is my docker-compose file.
version: '2'
services:
mysql:
build: ./mysql
environment:
MYSQL_ROOT_PASSWORD: test
volumes:
- ./db:/var/lib/m... | How to connect to a MySQL Docker Container via SSH? |
1
[__NSDictionaryM dealloc]
A dictionary is being deallocated.
CFRelease
When a dictionary is being deallocated, every key and value gets a release message.
However, one of the objects inside the dictionary has already been deallocated, that means that sending another relea... |
I have a rare (anonymous namespace)::AutoreleasePoolPage::pop(void*) crash in [pool drain]. As I understand its caused by over-release of some object owned by the autorelease pool.
I tried using NSZombieEnabled = YES, and using Instruments with zombie tracer. The bug is not reproducible with these. There is no over-re... | Crash in autoreleasePool drain |
To ignore changes in a file, usegit update-index --assume-unchanged .htaccessThis command sets a flag on the file such that Git treats it as if there are no uncommitted changes to the file, regardless of the contents of file your working copy.You need to undo the previous before you can stage and commit new changes.git... | Here's the scenario:I want to track .htaccess in my repo, since it contains essential configuration.I want to keep prying eyes away from my dev site, so I add HTTP auth directives to .htaccess in dev.During development, I don't want Git to constantly tell me that .htaccess is modified, nor do I want .htaccess to be inc... | Git: ignoring .htaccess… just not always |
That doesn't seem to be possible at the moment, take a look at this bug:https://issues.jenkins-ci.org/browse/JENKINS-18313My first answer included this suggested workaround, which doesn't work:H H(18-23,0-2) * * * | I wanted to schedule a job in Jenkins to run sometime between 18pm till 2am.So I entered the following formula inBuild periodically/Schedule field:H H(18-2) * * *However, when I save the job, there is an exception:javax.servlet.ServletException: java.lang.IllegalArgumentException: n must be positive
at org.kohsuke.stap... | Jenkins/Hudson build schedule period spanning over midnight (9 p.m. till 2 a.m.) |
21
shell_exec() fail silently because only report STDOUT and not STDERR.
Try with:
echo shell_exec("cd /var/www/git-repo && /full/path/to/bin/git pull 2>&1");
Normally is a permission error, and could be fixed adding permission to the user that execute php (apache?)
chow... |
I have create a webhook in my github repository which post on the hook url on my live server to run pull command for update my repo files on the server.
The problem is the hook file which i have created is in the /var/www/site/web/hookfile.php (the post request is going there. i am getting the body response also)
and... | 'git pull' command work from terminal but not with php shell_exec() via git repository hook |
Try/bin/bash -l -c 'cd $OPENSHIFT_REPO_DIR && bundle exec bin/rails runner -e production'So that it will use your bundled gems when running the commands. | When generating tasks via thewhenevergem, the resulting line incronformat looks something like this:0 13 30 * * /bin/bash -l -c 'cd $OPENSHIFT_REPO_DIR && bin/rails runner -e production "puts \"test\""'Now, when I SSH into the OpenShift app and try to execute that bash command for testing purposes, I get an error:# /bi... | How can I run my rails "whenever"/cron tasks on OpenShift? |
Your Deployment object looks correct using name and path as keys. You can see an example onhow to mount a GCS bucket on kubernetes hereapiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: gcsfuse-test
spec:
replicas: 1
template:
metadata:
labels:
app: gcsfuse-test
spec:
cont... | I am getting the error:error validating "mysql.yaml": error validating data:
ValidationError(Deployment.spec.template.spec.volumes[0]): unknown
field "path" in io.k8s.kubernetes.pkg.api.v1.Volume; )apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: mysql
labels:
app: mysql
spec:
replicas: 1
... | I am trying to use gcs bucket as the volume in gke pod |
2
Easy one, install this package in your Docusaurus project
https://www.npmjs.com/package/react-gist
the in your markdown add the import statement along with a Gist JSX code with your Gist id as shown below:
---
title: yourtitle
---
import Gist from 'react-gist';
<Gist id=... |
I'm new to Docusaurus and wonder is there a way to embed GitHub gists into docusaurus docs?
I found this module: https://github.com/winoteam/docusaurus-gist-embed but I don't seem to get it to work.
| Embeding GitHub gist into Docusaurus v2 docs |
From this GitHub issue, it seems that the answer is that adding or removing containers to a pod is not possible, since the container list in the pod spec is immutable.
|
I have a number of Jobs
running on k8s.
These jobs run a custom agent that copies some files and sets up the environment for a user (trusted) provided container to run.
This agent runs on the side of the user container, captures the logs, waits for the container to exit and process the generated results.
To achieve ... | How to add containers to a Kubernetes pod on runtime |
3
This line:
char **array = malloc(10);
allocates 10 bytes, however, remember that a pointer is not the same size as a byte.
Therefore you need to make sure you allocate an array of sufficient size by using the size of the related type:
char **array = malloc(10 * sizeof(ch... |
I have a char** which is designed to hold and unknown amount of strings with unknown length
I've initially allocated 10 bytes using
char **array = malloc(10);
and similarly, before adding strings to this array, I allocate
array[num] = malloc(strlen(source)+1)
I've noticed that my program crashes upon adding the 6th ... | Amount of memory to allocate to array of strings? |
How is your directory setup? Do you have a folderstaticin/home/user/www/oil/oil_database/static_files? In that case, the directive should look like this (note the trailing slash in/static/):location /static/ {
autoindex on;
root /home/user/www/oil/oil_database/static_files;
}If you want to map the path/home... | I'm running Django on Ubuntu Server 9.04.Django works well, but nginx doesn't return static files - always 404.Here's the config:server {
listen 80;
server_name localhost;
#site_media - folder in uri for static files
location /static {
root /home/user/www/oil/oil_database/static_files;
... | Nginx doesn't serve static |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.