Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
0
Currently, there doesn't appear to be a built in way to do this but I think I have found a solution by chaining together a couple of commands.
You will need to install this grep extension to the GH CLI: https://github.com/k1LoW/gh-grep
gh extensions install https://github... |
We have a number of repositories within an organization but I would like to be able to filter by codeowner which is defined in .github/CODEOWNERS file like
@organization_name/team_name
The gh cli command I am currently using is:
gh repo list organization_name
| Github cli (gh) filter repos by codeowner |
Yes the cache coherency mechanisms will take care of this. This is calledFalse sharingand should be avoided by better separating the data to increase performance.ShareFollowansweredFeb 1, 2013 at 7:09hansmaadhansmaad18.6k99 gold badges5454 silver badges9595 bronze badges13Example of cache coherence protocol:MESI.–Matth... | Suppose I have a C++11 application where two threads write todifferent but nearbymemory locations, using simple pointers to primitive types. Can I be sure that both these writes will end up in memory eventually (probably after both have reached aboost::barrier), or is there a risk that both CPU cores hold their own cac... | Concurrent writes to different locations in the same cache line |
Download SonarQube, unzip it and executebin/macosx-universal-64/sonar.sh consolein a terminal. Now open a browser, got tohttp://localhost:9000and follow the instructions. | Closed.This question does not meetStack Overflow guidelines. It is not currently accepting answers.Closed6 years ago.This question does not appear to be abouta specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic onanother Sta... | How to use Sonarqube as a service locally on mac? [closed] |
14
Very first example they have in the documentation is...
Example: Run the tasks.add task every 30 seconds.
from datetime import timedelta
CELERYBEAT_SCHEDULE = {
"runs-every-30-seconds": {
"task": "tasks.add",
"schedule": timedelta(seconds=30),
... |
Is it possible to run the django celery crontab very 30 seconds DURING SPECIFIC HOURS?
There are only settings for minutes, hours and days.
I have the crontab working, but I'd like to run it every 30 seconds, as opposed to every minute.
Alternatively...
Is it possible to turn the interval on for 30 seconds, and turn ... | Django celery crontab every 30 seconds - is it even possible? |
You can create a custom IBundleTransform class to do this. Here's an example that will append a v=[filehash] parameter using a hash of the file contents.
public class FileHashVersionBundleTransform: IBundleTransform
{
public void Process(BundleContext context, BundleResponse response)
{
foreach(var fil... |
I've got an MVC application and I'm using the StyleBundle class for rendering out CSS files like this:
bundles.Add(new StyleBundle("~/bundles/css").Include("~/Content/*.css"));
The problem I have is that in Debug mode, the CSS urls are rendered out individually, and I have a web proxy that aggressively caches these u... | MVC4 StyleBundle: Can you add a cache-busting query string in Debug mode? |
No. pthread_create() has no way of knowing that the thread pointer passed to it was dynamically allocated. pthreads doesn't use this value internally; it simply returns the new thread id to the caller. You don't need to dynamically allocate that value; you can pass the address of a local variable instead:
pthread_t th... |
Suppose I have the following code:
while(TRUE) {
pthread_t *thread = (pthread_t *) malloc(sizeof(pthread_t));
pthread_create(thread, NULL, someFunction, someArgument);
pthread_detach(*thread);
sleep(10);
}
Will the detached thread free the memory allocated by malloc, or is that something I now have to do?
| Will pthread_detach manage my memory for me? |
I think the policy you have above needs to be in the IAM role for an authenticated user, not part of a bucket policy. | What I want is to let groups (families) of aws cognito users to read/write to S3 buckets which should be only available for those families of users.I created a user with boto3 python library. Now I need to grant this user access to their folder in the bucket.I found a few posts which suggested to create bucket policy l... | How can I allow cognito users to access their own S3 folders |
To install specific version of the package it is enough to define it during theapt-get installcommand:apt-get install -qy kubeadm=<version>But in the current casekubectlandkubeletpackages are installed by dependencies when we installkubeadm, so all these three packages should be installed with a specific version:$ curl... | I install the latest version of Kubernetes with the following command on Raspberry PI 3 running Raspbian Stretch.$ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && \
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list && \... | How to install specific version of Kubernetes? |
I found the answer , It was Quite simple as i guessed .
One has to set the root directory once and use the sub-directories as the locationserver {
listen 80;
server_name QuadraPaper;
access_log /home/gdev/Projects/QuardaPaper/access_log.log;
root /home/gdev/Projects/QuardaPaper;
location /site... | I am looking for a simple configuration to serve all files and directories inside a particular folder.To be more precise I am trying to serve everything inside the pinax/static_media/folder and/media/folder as it is with the same url, and preferably auto index everything .by the way I have runpython manage.py build_med... | Nginx , SImple configuration for serving all the files in a Directory and all the directories within |
1
Just use the command copy must easy.
take a look:
for /F %%a in (computerslist.txt) do (
copy \\%%a\c$\users\administrator\desktop\%%a\*.txt c:\mycollecteddata\%%a
)
that will copy all files *.txt for all computers that are on computereslist.txt; the copy will be with th... |
I am trying to gather files/folders from multiple computers in my network into one centralized folder in the command console (this is the name of the pseudo server for this set of computers)
Basically, what i need is to collect a certain file from all the computers connected to my network and back it up in the console... | Gathering Files from multiple computers into one |
A branch in git is just a pointer to a specific commit, nothing more.
When you fork a repo you take a copy of it and suddently you've two master branches. Our master branch, and the one in the forked repo.
Hence, you don't need to create a new branch. Let's say you forked the project foobar, did a commit to the master... |
I created a fork on Github, worked on the fork and now I want to create pull request for the original project to take my changes.
All the documentation I can find here, GitHub and Google refers to a branch being selected for the pull request, but I did not create one.
How can I proceed?
| How can I create a pull request from a fork without having created a branch on the fork? |
0
I'm not aware of any way to do this with nginx. You'll have to build your own "composer" or use a different tool.
If you want a tool specifically for this purpose, you may want to look at GraphQL.
Share
Improve this answer
Follow
... |
I haven't found a way to implement API Composition using nginx,
the architecture am trying to get working looks like this:
Link: https://microservices.io/patterns/data/api-composition.html
the goal is from one endpoint, call multiple endpoints behind it;
localhost:3000 -> [localhost:5000, localhost:6000, localhost:70... | How to implement API composition in NGINX? |
Use the namespace param to kubectl :kubectl --namespace kube-system logs kubernetes-dashboard-rvm78 | How do you get logs from kube-system pods? Runningkubectl logs pod_name_of_system_poddoes not work:λ kubectl logs kube-dns-1301475494-91vzs
Error from server (NotFound): pods "kube-dns-1301475494-91vzs" not foundHere is the output fromget pods:λ kubectl get pods --all-namespaces
NAMESPACE NAME ... | Kubernetes Logs - How to get logs for kube-system pods |
Full disclosure: My current team has only been using git for 6 months, and I've only been using it in a team environment for about a year. My use of git before that was always copying something out of ClearCase, dropping agit initon top of it, and tracking my offline changes...That said, my team does what you mention ... | Let's say I have three branches:master,feature-Aandfeature-B. I've added some commits to thefeature-Abranch and created a pull request that waits for code review.Now I want to work onfeature-B, but I'd like to use the code I've added infeature-A.So, will it cause any problems if I:create branchfeature-Afrommasteradd so... | Is it OK to merge another branch into mine and then merge both into master |
Sure,mod_rewritewill serve up another page in the place of the requested without changing the url. There aremany questions herecovering the topic ofmod_rewritethat you can browse.Example:RewriteEngine on
RewriteRule ^page1.html$ page2.htmlThis will serve the content ofpage2.htmlwhenpage1.htmlis requested while leaving ... | I just wanted to know if there is someway to use the htaccess file to chnage the content of a page(s). Maybe something sort of like the redirect, but instead of sending the user to another page, it would just change the content of the whole page. | Is there someway to change the content of a page with the htaccess file? |
You'll need to download the library files from here for Glue 0.9 or here for Glue 1.0 (Check your Glue jobs for the version).
Put the zip in S3 and reference it in the "Python library path" on your Dev Endpoint.
|
I've created a Sagemaker notebook to dev AWS Glue jobs, but when running through the provided example ("Joining, Filtering, and Loading Relational Data with AWS Glue") I get the following error:
Does anyone know what I've setup wrong/haven't setup to cause the import to not work?
| AWS Glue Sagemaker Notebook "No module named awsglue.transforms" |
A segfault occurs when you access a memory address that isn't mapped into the process. Callingdelete []releases memory back to the memory allocator, but usually not to the OS.The contents of the memory after callingdelete []are an implementation detail that varies across compilers, libraries, OSes and especially debug-... | I have the following program://simple array memory test.
#include <iostream>
using namespace std;
void someFunc(float*, int, int);
int main() {
int convert = 2;
float *arr = new float[17];
for(int i = 0; i < 17; i++) {
arr[i] = 1.0;
}
someFunc(arr, 17, convert);
for(int i = 0; i < 17; i++) {
... | Memory management in C++. |
Kubernetes Secrets are mounted as a directory, witheach key as a filein that directory. So in your case, theconfig-volumessecret is mounted to/home/code/config, shadowing whatever that directory was before.You could specify your volume mount as:volumeMounts:
- name: config-volumes
- mountPath: /home/code/config/con... | I have a volume with a secret called config-volume. I want to have that file in the /home/code/config folder, which is where the rest of the configuration files are. For that, I mount it as this:volumeMounts:
- name: config-volumes
- mountPath: /home/code/configThe issue is that, after deploying, in the /home/code/... | mountPath overrides the rest of the files in that same folder |
you can add command like this.command:
- "sh"
- "-c"
- >
nohup /bin/ecr-refresh-token &
sleep 10
exit 0Is there a reason why your putting this in the background? | I've been trying several options to escape&in a kubernetes deployment manifest ("command": ["sh","-c","nohup /bin/ecr-token-refresh \&;sleep 10; exit 0"]with no luck yet.pod.beta.kubernetes.io/init-containers: '[
{
"name": "token-refresh-prestart",
"image": "{{ .Values.images.ecrrefresh }}",
... | Escape & in Yaml |
Github has removed the option to use a username-password combination.https://github.blog/changelog/2021-08-12-git-password-authentication-is-shutting-down/You should switch to ssh instead which is much better | This question already has answers here:Message "Support for password authentication was removed."(50 answers)Closed2 years ago.I can login to github using myusernameandpassword. I recently cloned one of my repos using HTTPS and did a change. However, when I want to push:I am shown the promptUsername for 'https://github... | I can login to github with my username and password but can not push code with them using HTTPs [duplicate] |
By default, Kubernetes starts to send traffic to a pod when all the containers inside the pod start, and restarts containers when they crash. While this can begood enoughwhen you are starting out, but you can make your deployment more robust by creating custom health checks.By default, Kubernetes just checks container ... | I wanted to know what kubernetes does to check liveness and readiness of a pod and container by default.I could find the document which mentions how I can add my custom probe and change the probe parameters like initial delay etc. However, could not find the default probe method used by k8s. | Kubernetes default liveness and readiness probe |
delete any default storage class (nfs) and try creating PV & PVC againkubectl get sc
kubectl delete scShareFolloweditedSep 27, 2018 at 16:53Rico59.8k1212 gold badges114114 silver badges147147 bronze badgesansweredSep 27, 2018 at 10:37Ari GoldAri Gold7111 silver badge66 bronze badges1This did not work for me. Running 1... | Attempting and failing to use NFS storage for Kubernetes volumes.persistentvolumeclaimis unable to bind to already createdpersistentvolume, see belowCreating persistentvolumeapiVersion: v1
kind: PersistentVolume
metadata:
name: nfs
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
nfs:
serve... | Kubernetes no provisionable volume plugin matched |
Short answer: No
Longer answer:
Background
For there to be a cycle involving a block the block must reference another object, and that object must (directly or via a longer chain) reference the block.
A cycle in of itself is not bad, it is only bad if it results in the lifetime of objects in the cycle being extended p... |
Let's say I want to do @synchronized(self) within a block. I suppose this will lead to a retain cycle, so normally we would re-write it like this:
-(void)myMethod
{
__weak TheClass * weakSelf = self;
dispatch_async(dispatch_get_main_queue(),
^{
TheClass * strongSelf = weakSelf;
if(strongSel... | Does @synchronized(self) in a block lead to a retain cycle? |
May be you should go to Team Explorer and watch Untracked Files section. All files that you add to your project should be there. You just need add them to commit. | I use GitHub for my MVC 4 project on Visual Studio. But some pages that I've added, I can't commit to GitHub.You can see on the image, there are lock symbols for check-in, but others have not. I can commit the pages with lock symbols but I can't commit without lock symbol. How can I fix it? How can I commit these pages... | Visual Studio 2013 GitHub Commit Trouble |
59
get_execution_role() is a function helper used in the Amazon SageMaker Examples GitHub repository.
These examples were made to be executed from the fully managed Jupyter notebooks that Amazon SageMaker provides.
From inside these notebooks, get_execution_role() will re... |
I am getting error when i call get_execution_role() from sagemaker in python.
I have attached the error for the same.
I have added the SagemakerFullAccess Policy to role and user both.
| The current AWS identity is not a role for sagemaker? |
Short answer, I would tryhelm upgrade. | When we runhelm install ./ --name release1 --namespace namespace1, it creates the chart only if none of the deployments exist then it fails saying that the deployment or secret or any other objects already exist.I want the functionality to create Kubernetes deployment or objects as part of helm install only those objec... | How to make Helm install to use 'kubectl apply' instead of 'kubectl create' |
Creating a database backup will not cause rows to be deleted. Something else must be happening to cause that behavior.
Do you know that the rows disappear at (about) the same time as the backup is being made? Perhaps within +/- minutes, hours, or days? Can the problem be replicated, or does it appear to occur randomly... |
I just noticed two months after switching out a backup drive that one table in one of the backed-up databases is losing records past a certain point.
The database is backed up weekly.
Prior to the new drive, the table had records from 3/11/2010 to 6/8/2010.
After the first backup ran, the table was missing all records... | SQL Server backup causes recent table records to disappear for one table |
Such functionality is not yet supported. There is some work done (Add proposal for transfer of VolumeSnapshot #2849) for similar feature, but it's not yet ready.As of today, explicitly copying files is your best bet. | Please tell me the best way to clone PV between namespaces.
Ireadthat cloning is only possible in a single namespace.So far the best way I see is to explicitly copy the files from one folder to another after creating the PVC.But I would like to create one PV and use it as a template for deployments.
I use Longhorn for ... | Kubernetes way or Operator to clone PV between namespaces |
Just use the emoji character itself in the code block, like this:
POST /api/yo HTTP/1.1
Content-Type: 🔵
[email protected]&message=Yo
|
I am making a documentation project on GitHub, so I have edited all the contents in my Markdown file, but I am facing an issue. I don't know how to insert GitHub emojis in the code section of the Markdown file.
POST /api/yo HTTP/1.1
Content-Type: :large_blue_circle:
[email protected]&message=Yo
:large_blue_circle: is... | How can I insert a GitHub emoji in a code section of a Markdown file? |
There's no real hard rule other than everything about your environment should be represented in a git repo (e.g. stop storing config in Jenkins env variables Steve!). Where the config lives is more of an implementation detail.
If your app is managed as a mono repo then why not use the same setup for the deployment? It... |
Firstly this is in the context of a mono-repo application that runs inside Kubernetes.
In GitOps my understanding is everything is declarative and written in configuration files such as YAML. This allows a full change history within git. Branches represent environments. For example:
BRANCH develop Could be a deployed... | GitOps - Config in same repo or seperate repo? |
I want to push my local version and overwrite the remote version. I dont need the remote version. How could I do that ?
That's exactly what
git push -f
… ("force") is for. However, before you do, I strongly encourage you to set a tag on top of both your current local and remote branches, so you'll be able to retrie... |
I want to save all the local changes. But there is a remote version on my GitHub. GitHub force me to pull before I can push. But when I pull the remote version, my local version become corrupted. I want to push my local version and overwrite the remote version. I dont need the remote version. How could I do that? I do... | Why GitHub force me to pull when I want to save local? |
We've upgraded toSonarQube 5.6.2andJava Plugin 4.2and now it seems work. | I'm trying to suppress the warning "Either override Object.equals(Object), or totally rename the method to prevent any confusion." because it is implemented because of Hibernate's UserType.Neither of the following works:@SuppressWarnings(value = "squid:S1201")or@SuppressWarnings(value = "S1201")or@SuppressWarnings("S12... | SuppressWarnings doesn't work with Sonarqube |
If you want to use c# SDK to create SSL certificate, please refer to the following stpesCreate a service principal and assignContributorto the spaz login
az ad sp create-for-rbac -n "MyApp" --role contributor \
--scopes /subscriptions/{SubID} \
--sdk-authCodestring clientId = "<sp appid>";
string c... | How can I upload a ".pfx" file (SSL Certificate) for an Azure app service using Azure SDK?There is a command inAzure CLI (Certificates - Create Or Update), but I would like to know if there are any features in Azure SDK. | Upload SSL Certificate file (.pfx) for Azure web app using Azure SDK |
Simple answer, you can't actually, because that part is never sent to the server to begin with, the only way to process this is to use Javascript, using location.hash
|
How do I match a # character in a url using location directive? I understand that we can use regex(PCRE), but their docs say that :
The location directive only tries to match from the first / after the hostname, to just before the first ? or #. (Within that range, it matches the unescaped url.)"
In short, How to ma... | how to match # character in a url in nginx through location directive |
Search forcommenter:usernamein the mainGithubsearch box.For examplecommenter:gavinandresenTo see recent activity, selectRecently updatedfromSortdropdownYou can also narrow the search:is:issue commenter:gavinandresenShareFolloweditedJun 4, 2017 at 5:56answeredMay 14, 2017 at 8:09ToolkitToolkit11k88 gold badges6060 silve... | It's easy to see someone'scommithistory on GitHub, at least the recent one, but is there a way to see allcommentsthey've made there? | How can I view someone's comment history on GitHub? |
Most likely you haveMultiViewsenabled, disable it by using this line on top of .htaccess:Options -MultiViewsOptionMultiViewsis used byApache's content negotiation modulethat runs beforemod_rewriteand and makes Apache server match extensions of files. So/filecan be in URL but it will serve/file.php. | I am attempting to use my.htaccessand mod_rewrite to redirect requests for mp3 files inside a directory calleddownloadto a PHP file calleddownload.php. This file makes a Google Analytics request and then does a server side redirect to the actual mp3 file located in thefilesdirectory.The rewrite should specify the mp3 n... | $_GET parameter after mod_rewrite |
The git:// protocol is read-only.
This should explain so many issues. You used the read only URL instead of read-write one.
Example. I cloned the github repo of apt-offline and then then do a
$ git remote show origin
It shows
* remote origin
Fetch URL: [email protected]:manish/apt-offline2.git
Push URL: [ema... |
I have been getting the following issue when I do a ssh [email protected]
PTY allocation request failed on channel 0
After this usually we receive a confirmation message saying you are authenticated which I did not receive
I have tried restarting issues
Now I have replaced my ssh key ( which is not a solution ) and t... | ssh login issues at github and authentcation issues while doing a git push |
Git distinguishes between authors and committers (seeDifference between author and committer in Git?). Authors are the people who wrote a specific piece of code - committers are the people who put these changes into the git "history".Normally both are the same (and doesn't change on merging, cloning, pushing or pulling... | For example,this commitis claimed to be authored bymattcaswelland committed byrichsalzWhat usage flow could have caused this? Suppose I want a commit which is authored by someone else and committed by me to appear in a repo where I'm a contributor - how would I have that? | What flow causes Github commits that are "authored" by one user but "committed" by another? |
The fact that you cannot see more than 1000 lines is a bug in SonarQube 5.3, reportedhere. It is fixed (bythis commitI guess) in SonarQube 5.4.The number of lines shown by default in the Component Viewer is not configurable. | How to configure themaximum number of lines of source codeshown in theComponent Viewerin SonarQube? I must be blind but I cannot find it either in SonarQube itself or on Internet.Component Vieweris the heart of SonarQube: it displays the source code of a file, and its high-level statistics. However, it displays maximum... | SonarQube 5.3: Configure number of lines of source code displayed in Component Viewer |
Found good explanationhereA "multi-zonal" cluster is a zonal cluster with at least one
additional zone defined; in a multi-zonal cluster, the cluster master
is only present in a single zone while nodes are present in each of
the primary zone and the node locations. In contrast, in a regional
cluster, cluster ma... | Anyone know difference between those two?
For now only difference I see is that regional require >= 3 zones. | Google Cloud GKE multi-zone cluster vs regional clusters |
17
This restrictive IAM policy grants only list and upload access to a particular prefix in a particular bucket. It also intends to allow multipart uploads.
References:
https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations.html
https://docs.aws.amazon.com/Amazo... |
I want to restrict the access to a single folder in a S3 bucket, and I have written an IAM for it. However I am still not able to upload/sync the files to this folder. Here, bucket is the bucket name and folder is the folder I want to give access to.
{
"Version": "2012-10-17",
"Statement": [
{
... | How do I restrict access to a single folder in a S3 bucket? |
I wasn't able to figure out why git's bundled ssh isn't working on my laptop, but I've found a stable workaround.
Installed OpenSSH for Windows (OpenSSH_for_Windows_7.7p1) from http://www.mls-software.com/opensshd.html. I've just found out that it's also available through the Windows 10 Creators Update
After install... |
I've done a fresh install of Git (version 2.20.1.windows.1) on a new laptop but I'm not able to clone any of my Github repositories. I've also tried Gitlab and am having the same issue.
This is the error I get when I try to clone the Github debug repository:
$ git clone [email protected]:github/debug-repo debug-repo-s... | Git clone using SSH not working on windows - Received disconnect, could not read from remote repository |
I should have been more specific in the previous question and should have said to useManagedPolicy. Here is a the solution you are looking for :const role = new Role(this, 'MyRole', {
assumedBy: new ServicePrincipal('ec2.amazonaws.com'),
});
const policy = new ManagedPolicy(this, "MyManagedPolicy", {
statement... | As per doc :https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-iam.Policy.htmlI could create my own policy and attach to role but it is not creating a new policy rather attached as inline policy to the role. I want to create a custom policy with an arn so that I can attach to other roles I wantThings I triedn... | create custom AWS IAM policy using CDK |
From kubernetes documentationConcurrency Policy specifies how to treat concurrent executions of a job that is created by this cron job. The spec may specify only one of the following concurrency policies:Allow (default): The cron job allows concurrently running jobsForbid: The cron job does not allow concurrent runs; i... | I need a cron job to run every 5 minutes. If an earlier cron job is still running, another cron job should not start. I tried setting concurrency policy to Forbid, but then the cron job does not run at all.Job gets launched every 5 minutes as expected, but it launches even if the earlier cron job has not completed yets... | How to prevent a Cronjob execution in Kubernetes if there is already a job running? concurrencyPolicy:Forbid stops the cron job execution altogether |
You must be from restricted countries which are banned by docker (from403status code). only way is to use proxies in your docker service.[Service]...Environment="HTTP_PROXY=http://proxy.example.com:80/
HTTPS_PROXY=http://proxy.example.com:80/"...after that you should issue:$ systemctl daemon-reload
$ systemctl restart ... | When i runsudo docker-compose buildi getBuilding web
Step 1/8 : FROM python:3.7-alpine
ERROR: Service 'web' failed to build: error parsing HTTP 403 response body: invalid character '<' looking for beginning of value: "403 Forbidden\nSince Docker is a US company, we must comply with US export control regulations. In an ... | Using proxy on docker-compose in server |
The simplest approach is just to have a cron job set to run every 10 minutes and determine via a database query which flights now require a reminder e-mail. You can have an additional field in the database such as "REMINDER_SENT" so that you only send an e-mail once.If you are already using delayed job then the cron jo... | I'm creating flight booking website in Rails. Booking information is stored in database in the following table:USERNAME|FLIGHT FROM|FLIGHT TO|DATE OF FLIGHT|TIME OF FLIGHT|some additional information not relevant to this task ...|I'm looking to send an email an hour (or some specific time) before theTIME OF FLIGHTon aD... | Ruby on Rails - Automated Email Sending - Flight Reminder |
2
I pass the junit test modifying the class of the object input from DynamodbEvent to Object at the test method:
public class LambdaFunctionHandlerTest {
//private static DynamodbEvent input;
private static Object input;
@BeforeClass
public static void createInput() thr... |
In Eclipse, i created a new Amazon lambda function to a dynamodb event. I didn't implement anything, the code is as the Amazon wizard creates the project.
When i run the test as junit, it returns:
com.fasterxml.jackson.databind.JsonMappingException: Conflicting setter definitions for property "eventName": com.amazona... | JsonMappingException when run as junit at Eclipse Amazon lambda function |
The command to use whan a file is not added/committed is:git check-ignore -v -- public/index.htmlThat will tell you if there isanygitignore/exclude/core.excludesfilefile with an ignore rule.Typically, an IDE can add its own ignore rules in a global gitignore file. | Thanks for reading my question in advance.The Git always ignores the public/index.html file.
I created a project by create-react-app and it works successfully.But when I push it to Github, the public/index.html was lost.Take this project for example.the .gitignore is:# See https://help.github.com/ignore-files/ for more... | Git ignore public/index.html |
You can access the stats viaa AdvancedCache.getStats().For example, from aCacheinstance:cache.getAdvancedCache().getStats().getHits() | I trying to get the cache statistics programmatically in infinispan without JMX.I used Ehcache in the past, it has a nice way to get the statistics programmatically like cache.getHitCount().Any ideas on how to do the same in infinispan?Note: I'm using Infinispan 6.0.2 version which comes by default with Wildfly 8.2.0.F... | How to get the infinispan cache statistics without using JMX? |
You can't control client behaviour and pushing a client to a specific IP address is a bad idea. And clients might even change between protocols during a single session. Either because their mobile device connected to a different network or because how browsers implement the happy eyeballs standard. There are so many di... | So I have a NGINX web server with php and I need a way to force all clients to connect over IPv4 if they have Dual Stack IPv4+IPv6, and still be able to connect if they support only IPv6 OR only IPv4.How would I go about this?If not possible, is there anyway I could use java script to get a client's IPv4 (when connecti... | Get user ipv4 when client supports dual stack ipv4+ipv6 |
There's nothing wrong with it AFAIK, though people with more Kubernetes experience than GCP/Terraform/... might find it a little unusual.See the discussion ofLoadBalancer type servicesin the Kubernetes documentation for some background. In particular, this notes for LoadBalancer servicesNodePortandClusterIPServices, t... | Is it advisable to use a normal Google Cloud Load Balancer pointing to my Kubernetes services?I'm new to Kubernetes and I feel way more familiarized with the way normal Google Cloud Balancers are configured. | May I use a normal load balancer to expose a Kubernetes Service? |
Make sure you've passed the nodeSelector/affinity from Custom Resource (CR) spec to Pod spec.While creating the Pod,pod.spec.containers.nodeSelector = crd.spec.<your-path>.nodeSelector | I am new to Kubernetes. Is there a way to assign pod by CRD to the specific Node under the Operator pattern?I tried to use bothnodeSelectorand affinity foroperator.yamland eachCRDs.yaml,
but it is effective for the operator only.How can I assign pod by CRDs to the specific node?Thanks. | Is there a way to assign CRD to deploy pod to the specific node? |
I'm guessing you've already tried counting how many bytes will be allocated to the StringBuffer and the byte array. But the problem is you can't really know how much memory your app will use unless you have upper bounds on the sizes of the CSV records. I'm If you want your software to be stable, robust and scalable, I... |
I am creating two CSV files using String buffers and byte arrays.
I use ZipOutputStream to generate the zip files. Each csv file will have 20K records with 14 columns. Actually the records are fetched from DB and stored in ArrayList. I have to iterate the list and build StringBuffer and convert the StringBuffer to by... | Memory required by JVM for creating CSV files and zip it on the fly |
you can use keytool tool that comes with java.https://www.sslshopper.com/article-how-to-create-a-self-signed-certificate-using-java-keytool.htmlhere is a explanation.the command is :keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass password -validity 360 -keysize 2048ShareFollowansweredJan... | I am searching a way to create/sign certificates in java.
At the moment I am usingopenSSLand I want to avoid to call this process from java code.In detail I am using the following lines of code inopenSSLexport ALTNAME=$altname;export SUBJECTALTNAME=email:$email;$openSSL genrsa 2048 > $serverKey;
export ALTNAME=$altnam... | OpenSSL toolset in native Java |
From thedoc, both function return error object as the 2nd return value.func BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*restclient.Config, error)func NewForConfig(c *rest.Config) (*Clientset, error)So I believe theconferrthere refer to the conf error. Andclerrefer to client error.Both areerrorobject. | I am trying to connect to akubernetesclient usinggolangand I saw this code:var config, conferr = clientcmd.BuildConfigFromFlags("", kube_config_path)
var clientset, cler = kubernetes.NewForConfig(config)What doconferrandclergive? | return types for clientcmd.BuildConfigFromFlags |
Yes this is the standard and recommended way of building a base image from a parent image (CentOS in this example) if that is what you need Python3.8.3(latestversion) on CentOS system.Alternatively you can pull a generic Python image with latest Python version (which is now3.8.3) but based on other Linux distribution (... | I created a Dockerfile and then built it for my team to use. Currently I am pulling from the CentOS:latest image, then building the latest version of Python and saving the image to a .tar file. The idea is for my colleagues to use this image to add their Python projects to the /pyscripts folder. Is this the recommended... | CentOS with Python as base image |
NoStrings will ever be interned at run-time unless you call.intern()on them.You're not in any danger of blowing up the intern pool.It might help speed things up if you assembled your strings withStringBuilder, but it won't make any difference in overall memory consumption. Every string you are making is gone and forgo... | So say I have this code that streams back string back to a client with millions of rows of data. Would all the strings on each write be interned and thus give a hit on the java memory? If so, why in my case would it be or not be interned?I can't really tell if I should use a stringbuilder here to append all the things... | Would writing millions of strings through a Writer be a memory and performance concern for the java string pool? |
As @Valery Viktorovsky's answer says, you can't use a * forserver_name. You can designate aserverblock as the "default" to receive all requests which don't match any others. Seethis postfor an explanation. It would look like this:server {
listen 80 default_server;
server_name wontmatch.com; # but it doesn't mat... | Is there a way to proxy all traffic to a certain serverunlessthe domain is something different?Basically a*for theserver_nameproperty?server {
listen 80;
server_name foo.com
}
server {
listen 80;
server_name *
}Or, is there a way to set a "default" server, and then it would use it if none of the other specific... | nginx and asterisk server_name? |
Two things to check :Are you looking in the correct region? Maybe your CLI is starting the cluster in another region than the one you're looking at in the web console.If you are using different users between web console and CLI, are you using the---visible-to-all-usersoption in the CLI ? Seehttp://docs.aws.amazon.com... | I am working with the AWS CLI to run some map reduce steps. If I use list-clusters I can see my cluster was started:aws emr list-clusters
{
"Clusters": [
{
"Status": {
"Timeline": {
"CreationDateTime": 1418219740.791
},
"State": "STARTING",
... | Why do Amazon EMR clusters started with CLI not show up in the web console? |
Let's take a look on a simple example:apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: myresources.stable.example.com
spec:
group: stable.example.com
versions:
- name: v1
served: true
storage: true
scope: Namespaced
names:
plural: myresources
sing... | Assuming I have a custom resource on myk8scluster exposed on a proprietary api endpoint, e.g.somecompany/v1Is there a way to validate a.yamlmanifest describing this resource?It his a functionality the custom resource provider should expose or it is natively supported byk8sfor CRDs? | kubernetes: validating a yaml file against a custom resource |
6
Stop. Just stop. Never look at the retainCount of an object. Ever. It should never have been API and available. You're asking for pain.
There's too much going on for retainCount to be meaningful.
Share
Improve this answer
Follow
... |
NSNumber* n = [[NSNumber alloc] initWithInt:100];
NSNumber* n1 = n;
In the code above, why is the value of n's retainCount set to 2? In the second line of the code, I didn't use retain to increase the number of retainCount.
I found a strange situation. Actually the retainCount depends on the initial number:
NSNumber... | Why has NSNumber such strange retainCounts? |
This isn't possible because you set the header type to application/octet-stream which means that it is a binary file that must be opened using an application.instead, you can display the text then redirect the user using HTML or Javascriptin HTML you can use the following<META http-equiv="refresh" content="NUMBER_OF_SE... | I am using this PHP code to start a download but want to show "HTML" before/after initiating the download but the following code results in a blank page :Function to output html :function writeMsg($msg)
{
echo "<html><body><h2>$msg</h2></body></html>";
}Called using :if(file_exists ($fullpath)) {
//Start Download
o... | Display message using php before starting file download |
this error is happening because you usedLoadBalancerNamesfor Application loadbalancer as it is notedhereto fix it : remove theLoadBalancerNamesand keepTargetGroupARNsin the propertiesLoadBalancerNames:- Ref: "LoadBalancer"so the yml file will be like :AutoScalingGroup:
Type: AWS::AutoScaling::AutoScalingGroup
... | when I try to create Autoscale group with Application load balancer with the following cloudformation yml fileLoadBalancer:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Properties:
Type: application
Subnets:
Ref: VPCZoneIdentifier
AutoScalingGroup:
Type: AWS::Aut... | How to Fix CloudFormation error "Provided Load Balancers may not be valid. Please ensure they exist and try again |
Hereyou can find the documentation aboutcached_property.TheBaseHandlerclass will be later on called often. My understanding is that to avoid the overhead of callingjinja2.get_jinja2(app=self.app)each time, such reference is evaluated the first time only, and then returned many times later on, i.e. every time a view is ... | The webapp2 site (http://webapp-improved.appspot.com/api/webapp2_extras/jinja2.html) has a tutorial on how to usewebapp2_extras.jinja2, and the code is below.My question is: why cache thewebapp2_extras.jinja2.Jinja2instance return byreturn jinja2.get_jinja2(app=self.app)? I checked the code of@webapp2.cached_propertyan... | why decorate Jinja2 instances with @webapp2.cached_property |
After doing some research on google I find its answer and it is very easy.Just include a particular hour or range (between 0,23) in hour column i.e 2nd columns* 22-23,23,0-9 * * *This will run a con job for every minute starting from10:00 PMto09:00 AM | I am setting aCron Jobto run every minute between10 PM to 11 PMas below and its working fine.*/1 22-23 * * *But when I want to set up it between11PM to 12AM (Midnight)as below*/1 23-00 * * *Its showing error as low limit value no. (i.e 23) should be less than higher limit (i.e 00).
I have searched on google... | How to set cron job to run every minute between 11 PM to 12AM Midnight |
I had the same problem. I found out that I didn't have the rights to run Sonar in my computer. Had to go and ask someone from IT with administrator rights.ShareFollowansweredNov 18, 2016 at 16:22BrisaBrisa11I can't figure it out why. But easiest way is. Just dockerize it. Download docker and install it. That simple :)–... | I tried to install SonarQube on my laptop. But when I run theStartSonar.batfile, I get the following output:wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Rese... | Issue while installing SonarQube |
I am using Sonar 7.9.3 version and faced similar issue. Changing the JDK version from 1.8 to jdk-11.0.9 Fixed the issueShareFollowansweredNov 17, 2020 at 6:03KarthikKarthik11166 bronze badgesAdd a comment| | ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console... while trying to start Sonar Qube local instance. | Log4j2 could not find a logging implementation while trying to start Sonar Qube local instance |
Project Dashboards aredroppedin SonarQube 6.1. I suggest to not put too much effort on writing widgets.Moreover, Ruby code is being dropped and we don't know yet how it will be replaced or if it will be. I've notified our documentation team to make things clearer.Regarding your question, you can assign the result offor... | How can I get the numeric value of a metric in SonarQube?For example:<%= format_measure('ncloc') -%>will display the number of lines of code.But I need to get the value (number of lines) in some variable to process further.Thanks in advance. | How can I get the numeric value of metric in SonarQube? |
You would need to get the pod logs, and extract the token.
Given that the pod is already runningk get pods
NAME READY STATUS RESTARTS AGE
mininote 1/1 Running 0 17mk get pod mininote -o json | jq '.spec.containers[].image'
"jupyter/minimal-notebook"you could do this:
[my pod's name isminin... | I am creating a k8s deployment, service, and ingress using the k8s Python API. The deployment uses the minimal-notebook container to create a Jupyter notebook instance.After creating the deployment, how can I read the token for my minimal-notebook pod using the k8s Python API? | How can I read a Jupyter notebook token from the k8s Python API? |
Another simple solution would be to write a custom MIDDLEWARE which will give the response to ELB before the ALLOWED_HOSTS is checked. So now you don't have to load ALLOWED_HOSTS dynamically.
The middleware can be as simple as:
project/app/middleware.py
from django.http import HttpResponse
from django.utils.deprecatio... |
I'm using Django and I have the ALLOWED_HOSTS setting to include my EC2's private IP as per below:
import requests
EC2_PRIVATE_IP = None
try:
EC2_PRIVATE_IP = requests.get('http://169.254.169.254/latest/meta-data/local-ipv4', timeout=0.01).text
except requests.exceptions.RequestException:
pass
if EC2_PRIVATE_I... | Django ALLOWED_HOSTS for Amazon ELB |
Add two lines below in ~/.gnupg/gpg-agent.conf (Create one if you don't have one)
default-cache-ttl 34560000
max-cache-ttl 34560000
The default-cache-ttl and max-cache-ttl is set to a really high value - 400 days to be precise. GnuPG will now cache the passphrase for that length of time or until you next restart your... |
I use my GPG key to commit to GitHub but every time I want to commit again (for the first time in a new terminal) It asks me for a password every time.
How do I fix that I don't need to enter my password every time on my own machine.
I am using MacOS with ZSH terminal.
EDIT: I don't have a conf file. I don't know wher... | GPG key works only for a few minutes |
I had a related problem where, after a deployment, users would need to hard refresh in certain browsers. It was due to blindly caching all build files, including the index.html.Here's how we resolved it:app
.use(express.static(BUILD, {
maxAge: '30 days',
setHeaders: (res, path) => {
if (express.static.mime.look... | What is the best way to make sure all users get a fresh index.html instead of cached index.html?So last week I tried to make the user cache the js and css bundles for a Single page application. I did it adding max age in the server.js file:app.use(express.static('build', { maxAge: '365d' }));The problem is that the ind... | Force refresh cached index.html file in Node express |
You don't need docker build context location known inside yourdockerfile.What you need to know is:Location of you build context. (sayC:\work\Personal\mycontextwhich contains files and folders that you need to copy inside docker container)Location ofdockerfile(sayC:\work\Personal\API\api-service\Dockerfile)Also you need... | I have Dockerfile defined in a directoryC:\work\Personal\API\api-serviceDockerfileFROM maven:3.6.1-jdk-8 AS BUILD_IMAGE
COPY api-service /usr/src/app/api-service
COPY pom.xml /usr/src/app
RUN mvn -f /usr/src/app/pom.xml clean installI am trying to rundocker build C:\work\Personal\API\api-servicefromC:This results in... | How to access Docker build context path inside Dockerfile |
You need to pass the parameter by reference, if you want to manage this pointer outside this function. Otherwise a copy of the pointer is passed to the function allo. This copying changes the pointer.
Try like this (if I understand the essence of the question):
void allo(TreeNode*& ptr, int val)
{
ptr = new TreeNo... |
for example I have a struct now
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
I first have a pointer, but I do not allocate space for it, so just
TreeNode* p;
I want to allocate the space later, for example, in the other function, like be... | How to allocate the space without changing address in cpp? |
You can have user emails on the domain in one of two ways. If you want to keep it at aws, spinup an ec2 instance and run the mail server of your choice, or else just use a third party mail host/provider (like gmail, or rackspace email which I use) and just point your mx records to those external mail servers.
I also w... |
I'm just looking into Amazons Web Services and I've used Elastic Beanstalk to set up a Ruby web app. It all works great but with one big exception. I cannot have user email accounts for the domain and cannot have incoming emails.
Is there a technical reason why this is the case (no incoming mail service), or am I m... | Why isn't there an imap aws service? |
1
Is this supposed to be a grading system for a programming contest or for exercises in a university course? There might exist open-source systems for that, so google it first if you haven't already. If you have to / want to make one yourself, I'm not sure if Java lets you ... |
dear all,
i am new in Java and at now i am trying to develop an application under Java to do such these things:
assumption:
there is a file contains source code in Java.
let's assume that the file contains a main class (and it's main method with several additional methods) and some inner classes which will be used dur... | auto-compile, auto-run, auto-compare result in Java |
You can configure error message in SSI. The answer is<!--#config errmsg="Put here your error message, HTML or other code" --> | How to make redirect to 404 or root page when user types query to not existing page and SSI include gets error?Or how to check if HTML-document exist on server and if doesn't then also make redirect?If user typesdomain.tld?anyquerystringon my site then it includesanyquerystring.htmlHTML-page by SSI.If user types query ... | How to make redirect if HTML-document doesn't exist on server |
According to GitHub API docs, the content of the file is returned encoded in base64. So basically you need to decode it in base64:
First install the package js-base64 (run npm i js-base64)
Add the following code to the file where you're doing the GET request:
const base64 = require('js-base64').Base64;
// Some cod... |
I am trying to work with github api to get access to raw README.md file using /repos/{owner}/{repo}/readme, I am able to make the call using thunderclient in vscode and seeing the raw file.
but when I am making the same call from within my react application I am receiving a json object of this form
{
"name": "READM... | How work with github api to retrieve a repository's readme file? |
At present, the easiest interface is provided by thrust::reduce.
As you noted, there is also Mars.
|
So far, I'm aware of the Mars, though what about alternatives?
| Are there MapReduce implementations on GPUs (CUDA)? |
"SonarQube for MSBuild" is currently designed to use in "Build" process. So you will see some errors when use it in Release Management. You can submit a feature request on this page:http://visualstudio.uservoice.com/forums/330519-team-servicesIf you do want to use it in Release Management for now and your are using you... | I have a release configured in Visual Studio Team Services using Release Management to run a SonarQube for MSBuild task. The task starts and then fails with the following error:Executing the powershell script:C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\SonarQubePreBuild\1.0.29\SonarQubePreBu... | Exception calling "GetFullPath" with 1 argument(s): "The path is not of a legal form." |
7
You may be better of leaving the notification server on its own for modularity and scalability and reusability. But if you insist on going with a single server, you could use Django channels in place of the Node server and the Redis instance as the Channel layer so you ... |
My game app uses Vue frontend and Django backend with DRF. Several clients connect to same game session. Sometimes some user does something which has to be reflected also for other users. For that purpose server has to have means to request client to refresh data.
Django application is deployed on Elastic beanstalk. T... | Simple way to integrate websockets to Django Rest Framework application? |
I found the answer to my own question.I needed to use this to get yesterday's date:53 11 * * * /path/to/python /path/to/python/script /path/to/file/$(date -v-1d +"\%Y\%m\%d")_$(date +"\%Y\%m\%d")_xxx_yyy.csv >> /path/to/logfile/cron.log 2>&1Hope it helps somebody!ShareFollowansweredMar 8, 2016 at 20:32anveshaanvesha119... | I need a cron job to work on a file named like this:20160307_20160308_xxx_yyy.csv
(yesterday_today_xxx_yyy.csv)And my cron job looks like this:53 11 * * * /path/to/python /path/to/python/script /path/to/file/$(date -d "yesterday" +"\%Y\%m\%d")_$(date +"\%Y\%m\%d")_xxx_yyy.csv >> /path/to/logfile/cron.log 2>&1Today's da... | crontab : yesterday's date not showing up |
8
This is perhaps a bug, I'll open a ticket on their github to know.
Edit: I did it here.
Edit2:
Someone answered a better way of doing this on the github issue.
* is a shell metacharacter. You need to invoke a shell for it to be expanded.
docker run somecontainer sh -c 'd... |
Working with Docker and I notice almost everywhere the "RUN" command starts with an apt-get upgrade && apt-get install etc.
What if you don't have internet access and simply want to do a "dpkg -i ./deb-directory/*.deb" instead?
Well, I tried that and I keep failing. Any advice would be appreciated:
dpkg: error proc... | Dockerfile manual install of multiple deb files |
6
Just disable default config:
rm /etc/nginx/sites-enabled/default
systemctl reload nginx
Share
Improve this answer
Follow
answered Jan 18, 2019 at 12:29
QtebQteb
49344 silver badges1414 ... |
I have Django + Nginx + Gunicorn on Ubuntu. Certificates generated with Letsencrypt.
In /etc/nginx/sites-available/myproject I have:
server {
server_name myproject.com www.myproject.com;
listen 80;
return 301 https://myproject.com$request_uri;
}
server {
server_name myproject.com www.myproject.com;
... | Django + Nginx configuration (getting "Welcome to nginx!") |
You can use this, and change the shape to app:cropme_overlay_shape="circle"
https://github.com/TakuSemba/CropMe
|
Closed. This question is seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. It does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions see... | How can I crop a picture in a circular shape just like Instagram profile picture [closed] |
0
I think it should work by enabling multi-site and adding a line to your $sites array in sites.php so it looks like this:
$sites = array(
..existing code..
'externaldomain.com.path_to_resource.article_dev' => '<site>',
);
Share
Improve this answer
... |
we have a web server with drupal 8 running on nginx + php-fpm. We would like to use a reverse proxy server to publish the d8 website as www.somedomain.com/drupal8
The nginx config works just fine:
location /article_dev/ {
proxy_buffers 32 32k;
proxy_buffer_size 32k;
proxy_pass http://192.168.158.148:80/;
... | Drupal 8 + Nginx reverse proxy as subdir |
You can safely delete the WSDL cache files. If you wish to prevent future caching, use:
ini_set("soap.wsdl_cache_enabled", 0);
or dynamically:
$client = new SoapClient('http://somewhere.com/?wsdl', array('cache_wsdl' => WSDL_CACHE_NONE) );
|
In through php_info() where the WSDL cache is held (/tmp), but I don't necessarily know if it is safe to delete all files starting with WSDL.
Yes, I should be able to just delete everything from /tmp, but I don't know what else this could effect if I delete any all WSDL files.
| In PHP how can you clear a WSDL cache? |
15
Because &A is a char *. A string, represented by a char *, is required to have a '\0' terminating byte.
&A points to a single char, without a following '\0'. As such, attempting to print this text string results in undefined behavior.
Share
Improve this answer
... |
Consider the output of this code:
char A = 'a';
char B[] = "b";
cout<<&A;
It outputs "ab" (the concatenation of A and B) and I wonder why. Please, explain me this.
| Strange thing with C++ memory management |
You need to manually trigger a new deployment after you update the config map for the pod to get the new values.Or you can use this featurehttps://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deploymentsto automate it. | I want to ask how to add Grafana admin password configuration in helm chart.I have followed this linkgithubFrom the link, I put below values in (values come from above github page)[security]
# default admin user, created on startup
admin_user = admin
# default admin password, can be changed before first start of grafan... | How to add grafana's admin password in values yaml |
I made a pull request to this problem:
https://github.com/laravel/socialite/pull/41
|
I'm trying to use Laravel Socialite extension.
The URL it generates for github has scope=user%3Aemail:
https://github.com/login/oauth/authorize?client_id=111111&redirect_uri=http%3A%2F%2Flocalhost%3A8880%2Fauth%2Fcallback%2Fgithub&scope=user%3Aemail&state=222222&response_type=code
Then is requests https://api.github.... | github API oauth with laravel/socialite: doesn't return email |
I'd clone it on the host, using the ssh-agent you already have running, before you rundocker build.If you really have to have the private key in the image (which you've acknowledged is dangerous) then you should be able to have it at its default location$HOME/.ssh/id_rsawhere you have it in your code; don't try to laun... | I'm trying to build a docker image from Dockerfile and one of the steps that need to be taken is installing a dependency that is only available via private Gitlab repository. This means the container will need to have access to SSH keys to do the clone. I know this isn't the most secure approach, however this is only g... | How to pass local machine's SSH key to docker container? |
The error message actually describes the problem well - there was no classification for the table being queried.
Tables created via Glue are registered with a Classification - csv, parquet, orc, avro, json. See Creating Tables Using Athena for AWS Glue Jobs.
The table I created 'manually' via Athena did not have a cl... |
I have a dataset registered in Glue / Athena, call it my_db.table. I'm able to query it via Athena and everything generally seems to be in order.
I'm trying to use this table in a Glue job, but am getting the following fairly opaque error message:
py4j.protocol.Py4JJavaError: An error occurred while calling o54.getCat... | AWS Glue unable to access input data set |
In git, you can't delete the content of a branch. All you can do is to push a commit that removes all your files.If you want to start over from a clean repository, you have to delete the current one a create a new one with the same name for example. | I wrongly pushed my code using Xcode toolbar into my repository on github. now, I want to delete all files in my master branch, but not the repository. Then I want to pull my code into repository this time instead of pushing. Does any one know how to delete all contents of master branch? | How to delete the content of github repository? |
Most likely your node.js application is listening onlocalhost, or127.0.0.1(IPv4) or[::1](IPv6). These addresses are assigned to the loopback interface which means that only connections from inside the computer are accepted.The solution is to change your code to listen to all network interfaces. This is defined as the p... | I have a small GCE VM setup w/ npm and a node.js app running on port 8080. I can do:'''curl http://localhost:8080'''and get the index page back so the server is running.I have made the IP address static (not ephemeral).Here are the filter rule settings:However I cannot connect externally and it just says the site can't... | Issue configuring Google Compute Engine VM ingress firewall rule |
You would:either need toactivate LFS(see "Configuring Git Large File Storage" on GitHub), but thereare limits in placeor split your file in smaller files (using afile splitter), and push them individuallyShareFollowansweredMay 23, 2021 at 8:00VonCVonC1.3m539539 gold badges4.6k4.6k silver badges5.4k5.4k bronze badgesAdd... | I have a project (around 2GB) that contains large size of files (e.g.140MB), which cannot be uploaded to GitHub using its free account.https://github.com/Is there a way around this?https://wersm.com/you-can-now-upload-videos-to-github/ | Uploading large size of files of 140MB+ erroring in Github |
the solution is to use kubernetes service accountShareFollowansweredSep 17, 2019 at 15:20comettacometta35.4k8181 gold badges218218 silver badges325325 bronze badgesAdd a comment| | I use.kube/configto access Kubernetes api on a server. I am wondering does the token in config file ever get expired? How to prevent it from expire? | will .kube/config token expired |
I know this problem from VirtualBox.. you could try to add this into your nginx.conf:sendfile off;Nginx DocsShareFollowansweredJan 27, 2017 at 16:02opHASnoNAMEopHASnoNAME20.4k2626 gold badges9999 silver badges147147 bronze badgesAdd a comment| | I have docker container with Nginx and data container with static (JS,CSS) files only.
At app start Nginx mounts volume from data container using volume_from.
The problem appears when I want to update my static files because Nginx container can't see that volume has changed.
Is it possible to fetch static volume change... | How to make docker container be notified when volume from another container was updated? |
Your else clause is broken. If prev was null, then you are trying to insert before the first element.
else {
cell *oldHead = head;
head = newOne;
head->next = oldHead;
logSize++;
}
Setting tail->next = NULL is the core error.
|
The two lines of code at the bottom tail = head;
tail->next= NULL; causes the program to crash, when I call the extractMin() function. If i comment them out, everything is happening as supposed. Is this happening cause they are pointing to addresses in memory that has been freed?
The only clue the compiler... | C++: Pointers pointing to freed memory space |
Yes. Attach IAM role to your EC2 instance. No need to place the AWS credentials in the EC2 instance. Your application/CLI will get the credentials automatically.
IAM Roles for Amazon EC2
Create an IAM role with necessary privileges.
Specify the role when you launch your instance, or attach the role to a running or st... |
I have an API server running on a docker container, and the docker container runs on an AWS ec2 instance.
Is it possible to make the server execute AWS CLI commands without putting my aws credentials on the docker container?
Because I think the aws credentials should only be placed on my local machine.
I don't thin... | Is it possible to execute AWS CLI commands on an EC2 instance without placing AWS credentials on the EC2? |
-1
By default it is mounted as rw (read-write mode) , Howver in case you need a readonly volume it is possible.
docker run -v volume-name:/path/in/container:ro my/image
In Docker-Compose
version: "3"
services:
redis:
image: redis:alpine
read_only: true
Take refe... |
docker -v host_dir:container_dir ...
I know from the above, when we're running scripts inside the container, writing to container_dir copies the written files to host_dir. But are all host_dir files also synced into the container?
| Is a docker volume a 2 way connection |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.