113 questions
5
votes
1
answer
102
views
What's the difference between `extern "C" /*...*/` and `extern "C" { /*...*/ }`
Both GCC and Clang reject
extern "C" static void foo() {}
but accept
extern "C" {
static void foo() {}
}
Aren't these supposed to be equivalent?
0
votes
2
answers
51
views
extern storage class output
somy question is,
**Is there two variable named x in the main ,one goes to g() with value 1 go there prints 2 and another one keeps at 1 again prints 2 in main. **
#include <stdio.h>
void f(){
...
0
votes
1
answer
81
views
Which C specifiers may cause ABI incompatibility between the caller and callee?
Suppose there is a file with a declaration of a function which differs from the actual definition in another file i.e.
FileA.c
short foo();
int main(){
foo();
}
FileB.c
int foo(){
//Some code
}...
1
vote
1
answer
157
views
Why are objects uploaded to a bucket showing different storage class than default class?
Objects uploaded to a bucket has different storage class than the default storage class.
I have a Synology NAS. I am using the Hyper Backup application to create an offsite backup of my NAS data. One ...
0
votes
0
answers
753
views
pod has unbound immediate PersistentVolumeClaims
I am trying to install elastic cluster on k8s using helm. k8s cluster is running on AWS ec2 nodes. 1 master and 3 workers.
Getting pod error:
Warning FailedScheduling 59m default-scheduler 0/4 ...
0
votes
0
answers
76
views
In what scope and how should a std::random_device be defined?
I want to run two concurrent threads both of which call a function (e.g. void channel()) and that function needs access to a few objects namely a std::random_device, a PRNG engine, and two std::...
1
vote
1
answer
435
views
VerneMq not retaining messages on restart, even after persistent storage is configured
We're running a cluster with 2 VerneMq brokers. Everything works fine if we start one broker at one time, but as soon as we need to start both the brokers, all the retained messages are lost.
To fix ...
2
votes
2
answers
150
views
How static modifier works in C?
I am trying to understand how the "static" modifier works in C, I went looking for its meaning and everything I found seemed a bit vague.
It is a modifier to allow the values of a variable ...
1
vote
1
answer
131
views
Typedef structure's member being static or not in c
I think this none sense doesnt that? because after creating instance from that variable. It will initialize that variable whole, will not behave differently to members an will initialize all of them, ...
1
vote
0
answers
434
views
"pod has unbound immediate PersistentVolumeClaims" : Issue with Dynamic Volume Provisioning
I have created a kubernetes cluster using 2 droplets (digital ocean machines)
1 machine is set to be master and another is set to be worker
Now, I am running a project which has 2 PVCs. (Their configs ...
2
votes
2
answers
3k
views
Using S3 Glacier Instant Retrieval from AWS CLI
I read about the new storage class S3 Glacier Instant Retrieval and I want to use it when I upload files to S3 using the AWS CLI (command line interface). I read on https://awscli.amazonaws.com/v2/...
0
votes
2
answers
703
views
clang behaves differently with global variables
I have these dummy piece of software made of 3 files:
test.h
int gv;
void set(int v);
test.c
#include "test.h"
void set(int x) {
gv = x;
}
main.c
#include "test.h"
#include &...
6
votes
1
answer
5k
views
storageclass reclaimPolicy vs pv reclaimPolicy
I wanted to know what's the difference of the reclaimPolicy in StorageClass vs. PersistentVolume.
Currently we created multiple PersistentVolume with a StorageClass that has a reclaimPolicy of Delete, ...
1
vote
1
answer
813
views
Invalid according to Policy: Policy Condition failed: ["eq", "$x-amz-storage-class", "STANDARD_IA"]
I am trying to specify the storage class for an AWS S3 object (image file) on its upload from a web page post. All works fine without the storage class specification but when I add it to the policy ...
3
votes
1
answer
3k
views
How to get the storage class of an object stored in aws bucket
I need to check the storage class of an object inside an S3 bucket.
Is there a way to get the storage class of an S3 object using the AWS CLI v2?
0
votes
1
answer
4k
views
Change GKE storage class without losing content
I've inherited a terraform/helm based GKE with a set of deployments and services in production environment. All of them use the default storage class as PVC.
I would like to switch to a more robust ...
0
votes
2
answers
214
views
Why is storage class not checked by compiler on overridden functions?
#include <iostream>
class A{
public:
void printit(register int b) {
std::cout<<"inside A";
}
};
class C:public A{
public:
void printit(int b) {
std::cout<<"inside C"...
1
vote
1
answer
48
views
storage-class specifier static with global data
I'm reading the book C-Primer Plus. Following is the text I would like better understanding -
file - constant.h
/* constant.h -- defines some global constants */
static const double PI = 3.14159;
...
0
votes
2
answers
127
views
Conditional storage class dependent upon template parameter
The following doesn't appear to be valid c++ (-std=c++2a). I want to change the storage class of var based on the template parameter b:
#include <type_traits>
template <bool b>
void f() {...
0
votes
1
answer
87
views
Where the nested function's body kept?
Please check the following code,
#include <stdio.h>
#include <string.h>
void* make_adder_function(int a)
{
char str[64] ={};
sprintf(str,"this function adds %d with input",a);
...
1
vote
4
answers
597
views
Shall I use register class variables in modern C programs?
In C++, the keyword register was removed in its latest standard ISO/IEC 14882:2017 (C++17).
But also in C, I see a lot, that more and more coders tend to not use or like to declare an object with the ...
4
votes
1
answer
170
views
Why register array names can be assigned to pointer variables without compiler error?
I have a question about register keyword in C.
I found that register array name(e.g. array) can be assigned to pointer variable while &array[0] cannot be.
Can you explain why array name can be ...
1
vote
1
answer
1k
views
Unable to set NFS mount as default storage for kubernetes pods on Azure AKS nodes
I have set up AKS cluster with 14 Linux nodes. I am deploying code using helm charts. The pods with manual storageClass get created successfully but the ones that use default storageClass fail to ...
2
votes
1
answer
435
views
What is the explanation behind not being able to change regional buckets to a multi-region bucket in GCP?
I understand that the documentation states that multi-regional and regional are not inter-convertible, but fail to see the technical hindrance to it
2
votes
2
answers
162
views
How to specify storage class specifier for an object of struct without a name?
I am using a struct like:
struct{
int a;
char b[100];
}name;
I want to use static storage class specifier on name.
How can I do that?