Questions tagged [redundancy]

Redundancy is the duplication of critical components or functions of a system with the intention of increasing reliability of the system, usually in the case of a backup or fail-safe.

Filter by
Sorted by
Tagged with
0 votes
4 answers
75 views

Is it possible to handle multiple exceptions with one @ExceptionHandler in spring boot?

I have this code where I'm supposed to return a customized error message and error code. It works fine but the problem is that it's extremely redundant. I was wondering if it's possible to handle all ...
0 votes
2 answers
44 views

Remove redundant tuples from dictionary based on the score

I wonder if there is a fast way to remove redundant tuples from dictionary. Suppose I have a dictionary as below: a = { 'trans': [('pickup', 1.0), ('boat', 1.0), ('plane', 1.0), ('walking', 1.0), (...
  • 315
0 votes
0 answers
29 views

Angular minimize redundant calls

Currently have a component thats calling the api call in a multiple places and its showing in the network tab when the page loads. Is there a way to use ngrx/store to minimize the redundant calls? Its ...
  • 336
1 vote
0 answers
17 views

Inorder to avoid redundancy in CSS code in an Angular App among the various parent child components, what solution is possible?

I am working on an Angular application that has multiple parent and child components. Now from the point of view of code optimization and performance, in parent and child CSS files many classes and ...
0 votes
0 answers
31 views

KeepAlived Web Cluster in GCP

I want to make a redundancy on 2 ReverseProxy with KeepAlived in GCP. KeepAlived works with VirtualIP, i saw that multicast wasn't available on private cloud environement so i configured it with ...
1 vote
1 answer
30 views

R: Determine redundancies and unique values in a set of columns

I'm hoping to determine when the values in a set of columns are redundant, documenting it in a new column multi? where 0 means only a single value is seen, 1 means multiple values are seen. When the ...
  • 391
-1 votes
1 answer
107 views

Efficiently refactoring piece of Swift code to be less redundant

In the code below, A key is remapped to B key, and vice versa. The remapping is activated via a SwiftUI toggle switch. In example presented here the same block of code is used in three different ...
  • 5,112
0 votes
0 answers
6 views

How to choose an appropriate null-space velocity vector when solving inverse kinematics problem of rendundancy robots?

Recently I'm reading 《Morion Control of Rendundant Robots under Joint Constraints:Saturation in the Null Space》 and have a few questions. 1.In the end of Section 2, the author mentioned that they can ...
0 votes
1 answer
30 views

Remove repeated code in function definition

this is my first question, so I may miss the "correct structure". Anyway, I have a header file, with a function. This function (void readFile()) is defined in a cpp file. Within this ...
-1 votes
2 answers
31 views

Remove business logic from html and avoid redundance code Angular

I wrote this code in HTML, which is very very long. I used ngSwitch for 3 cases and in the default case I have 4 different small cases. All of these cases used the same structure of icon. How could I ...
1 vote
0 answers
78 views

Can I build a globally distributed lock with Cloudflare R2?

From the docs, R2 seems to be globally replicated and strongly consistent: https://developers.cloudflare.com/r2/data-access/workers-api/workers-api-reference/#bucket-method-definitions Does that mean ...
  • 45
-1 votes
1 answer
46 views

remove redundance HTML in Angular

I use ngSwitchCase for 3 cases, which inside every case I used the same part code, which I don't want. How could I remove this redundancy? The redundancy code is inside "app-device" <div ...
2 votes
1 answer
48 views

Redundancy in function imports

I think there is some redundancy in my import but I cant really figure out another way to do it main.rs mod lib; use lib::calc::med_calc; fn main() { let mut numbers = vec![1,21,22,4,2]; ...
0 votes
1 answer
208 views

Use terraform to create identical parallel infrastructure for failover purposes

I have a requirement to use terraform to provision identical copies of the same infrastructure in different places for failover purposes. For example, I have 2 Kubernetes clusters A and B; I want to ...
-1 votes
2 answers
47 views

I would like to check physical ports redunducy check with python

would like to check physical network ports with python scripts ports information as following, Python scripts can check if ServerID has 2 or more physical network lines to differents network devices. ...
0 votes
0 answers
83 views

Active active failover via route53 and Azure DNS in parallel

I know that I can set up Route53 to resolve DNS queries to destination IP addresses in an active-active or active-passive fashion. I was thinking how to achieve DNS redundancy in case AWS Route53 ...
  • 45
0 votes
0 answers
101 views

SWUpdate: is it possible to combine both the A + Rescue and A + B Strategies?

I'm familiar with both the A + Rescue and A + B (Dual Copy) strategies supported by SWUpdate for embedded software updates. Both strategies have their advantages and disadvantages. One key ...
  • 12.1k
-1 votes
1 answer
52 views

Why do I have to package my IntelliJ-project twice to get it exported?

Currently I am working on a plugin for a minecraft-server. I use maven, so when I made a change and I want to test it out on my server, i double-click on 'package' on the right hand side. Then my Jar ...
-1 votes
1 answer
72 views

Pattern problem in C programming language

I have the following pattern to print in the C programming language. BBBB BAAB BAAB BBBB I have tried the following code, but it's not working. My code : #include <stdio.h> int main() { // ...
  • 856
0 votes
0 answers
53 views

What's the use of rate/redundancy of language in breaking XOR cipher?

There's a XOR breaking algorithm described in Applied Cryptography (Bruce Schneier) (part 1.4 Simple XOR). The first part is clear. As for the second, I can't figure out what's meant by the last ...
1 vote
2 answers
54 views

which is best practice? Redundant loop, or calling the same if statements?

I'm in the process of learning how to write the most optimal and readable code. The first way I wrote this has redundant for-loops but only checks eviction policy once. While my second way doesn't ...
0 votes
1 answer
85 views

SQL Server Data redundancy

I'm trying to find out the pitstop strategy followed by teams in F1 and which strategy on average yields the better winning results. However every time I try to execute the query I just get redundant ...
  • 11
-1 votes
1 answer
454 views

Best way to force a try-except to fail (Python)?

I am writing a code that asks users to make two inputs, then will use try: to check that they are both integers, then use an If statement to check that they are both above 0. If either of these ...
1 vote
1 answer
34 views

Azure authentication when using redundant environments

Hi, This is what our setup looks like. We have 2 identical App instances that have dynamically allocated IP & Port, for redundancy. However the problem is when we request authorisation from Azure, ...
0 votes
1 answer
254 views

Could a parallel redundancy protocol "PRP" be implemented over Debian?

I want to connect a PC to an existing PRP topology, this PC have two Ethernet ports. I have been reading up a lot about PRP protocol, but i don't know if i can setup the PRP protocol over a linux ...
1 vote
1 answer
159 views

Javascript for loop innerhtml doesn't work

class GenerateArray { constructor() { this.arrayCode = document.getElementById('code'); this.BaseCode = document.getElementById('preCode'); this.startCode =...
  • 131
1 vote
1 answer
289 views

How to optimise cost when architecting for high availability in a single region Multi AZ set up in AWS?

All, I designing an application with HA, that will be deployed across multiple AZs in a single region of AWS. Its come to my attention that (even after purchasing a reserved instance), AWS cannot ...
0 votes
3 answers
65 views

avoiding code redundancies for a calculation in Java

I have a calculation where i can sum or subtract something but this depends on a simple condition. My problem is, that I don't know how I can change the code, so i don't need to write the calculation ...
0 votes
1 answer
96 views

Algorithm that can check for errors in a array of numbers

I have been given a task of writing a simple algorithm that checks the data inside an array, if the data has been altered then to show an error message. I thought about counting the number of items ...
  • 1
1 vote
1 answer
69 views

Redundant elements to simplify in the following code manipulation

I have tried to use the dplyr library to merge to different spreadsheet and make the following manipulation. db0 <- t0 %>% mutate(GROUP = ifelse(GROUP == 'CONTROLLO', 'CONTROL','TRAINING')...
  • 1,065
0 votes
2 answers
49 views

Should I include an if statement to prevent a redundant iteration in a loop?

You see, I've return this code to reverse the elements of an Array. This array takes two extreme elements and exchanges them like say [1,2,3,4] => [4,2,3,1] => [4,3,2,1]. However when there are ...
  • 1
0 votes
1 answer
146 views

Is blob storage account "Redundancy" important when I use CDN?

I am using Azure CDN with blob storage account as endpoint. My data is static and changes only once per year. I am not sure: does it has some impact when I choose blob storage account "Redundancy&...
1 vote
1 answer
366 views

How is this calculating CRC-A using polynomial - x^16 + x^12 + x^5 + 1

I came across this piece of code. But I am not sure how is CRC calculated here. I know the theoretical way of calculating CRC but I guess here it is using some kind of different logic, maybe. Please ...
0 votes
1 answer
60 views

C# avoid redundancy - convert derived type to base generic type and access common property

I am beginning in C# and having some difficulties to solve the following problem. Context : I have three classes (let's say A, B and C) that share some properties. Therefore they all are derived ...
1 vote
1 answer
47 views

How to consolidate redundant data while retaining other unique info (see pic attached)?

What I'm trying to do is consolidate all of the redundant data into one, while retaining the unique information under John Smith and his unique ID. Obviously only so much can be done about human data ...
  • 55
1 vote
1 answer
50 views

How does elasticsearch prevent cascading failure after node outage due to disk pressure?

We operate an elasticsearch stack which uses 3 nodes to store log data. Our current config is to have indices with 3 primaries and 1 replica. (We have just eyeballed this config and are happy with the ...
  • 273
1 vote
3 answers
859 views

Uniting multiple rows in R data frame into one row

I have an R data frame with many zeros in it. It basically looks like this: Year Gender BMW VW Mercedes 2018 Male Max 0 0 2019 Male Peter 0 0 2019 Male 0 Peter 0 2019 Male 0 0 Peter One line in ...
user avatar
0 votes
1 answer
55 views

MariaDB Catastrophic Bug

I have been using MariaDB for the past three years as a spatial database with no issues. Suddenly on the update 10.3.29 where they introduced new spatial feature, it caused spatial index not to work ...
0 votes
1 answer
238 views

asp.net core application redundancy

I need that an asp.net core application in azure to have redundancy. If one application fails another, take over your tasks online. I didn't find anything that I can use as a guide. Thanks for your ...
0 votes
0 answers
188 views

replicas of quartz batchs in docker containers

I have a quartz batch which is deployed in a docker container. The service is configured to run every minute. I need to deploy at least 2 replicas of each service (including batch) to ensure ...
  • 21
0 votes
1 answer
546 views

What will happen for an Openstack instance if a server (Node) go offline?

I'm new to OpenStack and have a basic question about it. Assume that we have 3 Master node (Controller) and 10 Slave node (Compute node) in our cloud. We make 50 VMs (Instances) on the cloud. What ...
-3 votes
1 answer
51 views

Need help in reducing the complexity or duplication in the function mentioned

Hi can someone please help me in reducing the complexity of the below mentioned code as I am new to this I need it to reduce the amount of code and improve the code and to improve simplicity and ...
1 vote
1 answer
46 views

Need help in reducing the complexity or duplication in the function

Hi can someone please help me in reducing the complexity of the below mentioned code as I am new to this I need it to reduce the amount of code and improve the code and to improve simplicity and ...
0 votes
0 answers
264 views

Setup secondary redundant failover Node.JS server

Introduction So I made a discord bot and hosted it on Heroku server. The bot is basic, it just listens to new messages and responds to them. I am using a free tier of heroku and discovered that there ...
  • 181
0 votes
1 answer
125 views

Data redundancy - JOIN with large result set

I have an issue with data redundancy. My JOIN query in MySQL creates a very large data set (~8mb) while a lot of the data is redundant. After analysis, I can see that the query is fast, but the data ...
0 votes
0 answers
30 views

Do we have to put all passed in arguments into its own self. variable before using them in another expression in the class?

In the following code: class Game(object): def __init__(self, screen: pygame.Surface, states: dict, start_state: str): self.done = False self.screen = screen self.clock = ...
0 votes
2 answers
298 views

How to write to Azure storage when the primary region down?

Our application uses RA-GZRS for storage which enables to read data from the secondary when the primary is down, but can't write to it. Is there a solution which enables application to do both read ...
0 votes
1 answer
93 views

Can you use Azure availability set without load balancer

Is there any point in using availability sets without having a load balancer in front to distribute the traffic. As per my understanding for availability sets you will then have several VM's ...
  • 1
2 votes
0 answers
36 views

Why aren't clang++ and g++ de-duplicating these instructions?

Consider the following function: std::string get_value(const bool b) { if (b) { return "Hello"; } else { return "World"; } } g++ 11.0.1 20210312 ...
  • 113k
4 votes
3 answers
144 views

Should I opt for code repetition or consolidation with api service - JS

I'm working on a large CMS system where a particular module and its submodules take advantage of the same backend API. The endpoint is exactly the same for each submodule aside from its "document ...
  • 359

1
2 3 4 5
10