instruction stringlengths 34 36.1k |
|---|
In my database, I store task data (id, timestamp, input data), and information about the state of the multi-step processing (e.g. prepare, execute, summarize). The program moves from one state to another. If the program breaks, the last state remains persistent. I am thinking in terms of a finite state machine (fsm).
N... |
I have some doubts about having rich domain model without having other entity objects inside it.
Let's imagine that we have a product feed with no more than 10 products.
Each product is made by some vendor from some country.
For some reasons we want to hide all products from some country.
With having other objects ins... |
Currently working on a Ruby-on-Rails codebase, testing is done with Rspec. We use BuildKite to run tests.
We are in a situation where sometimes tests will fail, and upon a retry or two, pass. AKA, we have flaky tests.
Initially, we thought there would be some quick way to add a related rspec gem that recorded all test ... |
I might start by saying that I am aware that usually there's a Repository layer
bookRepository.persist(book)
that abstracts the interaction with the database, but something about using the model directly feels really tempting, as in
book.persist()
This second option would also allow for the model to persist itself wh... |
I have the following scenario:
I am listening file requests and when one arrives, I am starting download task in a new thread. After download task ends, a process task starts but this is important, process task must wait for download task. To do that, I can use dt_thread.join() or just stop using thread and download in... |
I have an Accessor and Repository interface. Accessor abstracts over where to store JSON documents (local file system, NoSQL database, etc). Repository abstracts over the representation of my domain objects and does my object-relational mapping. Accessor is injected into a Repository.
I have a UserRepository that is in... |
Let T be a superclass, and S derives from it:
abstract class T{
public virtual byte[] Foo(string str){...}
}
class S : T{
public override byte[] Foo(string str){....}
public byte[] Foo(string str, bool b){...}
}
As per the LSP, if:
S s = new S();
var data = s.Foo("dt", false);
I should be able to substitute S with T... |
I have a txt file from where I want to create new files based on the data which is up to '$'character.
My input file looks like:
string1
string2
string3
$string4
string5
$string6
string7
... (and so on)
My first output file should be:
string1
string2
string3
My second file should be (without "$"):
string4
string5
and s... |
This is going to sound like a trivial question, but I like to think it's actually a deep one. The simple quesiton is, "What is the normal form of a typical JSON object?" For reference, I put an example below, but consider any typcial JSON object you've dealt with, same question applies.
I ask this theoretical questio... |
Application component 1(ap1) record/insert/update a new state in graph database(neo4j)
For every new state change in the database, application component 2(ap2) needs to be informed/notified that a new entry(event) is made. ap2 would not like to poll database and track/find for state change.
ap2 should not know the ex... |
background: so, I am working on an NLP problem. where I need to extract different types of features based on different types of context from text documents. and I currently have a setup where there is a FeatureExtractor base class, which is subclassed multiple times depending on the different types of context and all o... |
Let's say I am developing an ecommerce application. And I have modules organized in certain way.
Products
Coupon
Tag (can be used as brands and linked data)
Offer
Now what I want to achieve is user can enable certain of these modules and get the features related to these modules. But how can I truly achieve this with... |
I came across a problem: given an array (can be huge 10^8) and an integer, K, find the count of pairs in the array whose Xor equal to each value in the range 0 to K.
eg:
Arr = 1 2 3
K = 2
since K=2, possible values of x are 0, 1 or 2.
x = 0
There are 0 pairs whose Xor=0.
x = 1
There is 1 pair {2,3}, whose Xor=1.... |
If I expect specific arguments for a command call, and its called wrongly by the user, should the program throw an exception?
In python I would like to write something like:
assert 'author' in args, 'error: author not given'
the programm has to end, because the command call was wrong, but its not really unexpected tha... |
I've seen this in the context of Microsofts SDL (Secure Development Lifecycle).
Is it just those 12 practices and if the team follows those, you can say you implemented them? Are there any "hard" checks? Any software solutions one should use?
|
I'm wondering if there is a commonly used term similar to "upsert" or "merge" but for the case of "find or create". Ideally with a single word, something shorter that "find or create" itself and more specific.
I have tried to find it but I couldn't find anything like it. I don't care if it's a made up word, just like "... |
So all four of these approaches to structure data on their surface work more or less the same to keep data well structured.
Are there any reasons, be they hidden performance issues/enhancements, stylistic preferences, or just plain ol' pythonic/un-pythonic ways of doing stuff to prefer one approach over the others?
fro... |
My understanding of the TDD methodology is that (failing) test cases are written promptly after finalizing the requirements.
My understanding of the open-closed principle (in the context of OOP) is to structure the class hierarchy so that any new features involve writing new code instead of modifying old code.
Those tw... |
Overview:
I have performed 2 experiments to understand the implementation of asp.net core libraries with regard to the CORS specification
The experiment 1 shows an web page (html) is not able to make an AJAX request to another end point (asp.net core).
The experiment 2 shows that after allowing CORS in the asp.net cor... |
I am working on dev branch and I merged dev into master so all the commits not appear on master but I am not very confident about some thing. Should I do pull request and then merge or this way is fine? Because master branch looks dirty now with other branches commits. Should I do revert and then do this?
|
I have 2 domains Customer and Address using using EventSourcing and CQRS in our Monolithic app, below is my query:
Customer Domain:
class Customer { //Aggregate class
String custId;
CustAddress custAddress;
}
class CustAddress {
String addressId;
String city;
}
Address Domain:
class Address { //Aggreg... |
I use xjc to compile XSD files to Java Classes, and want to edit/extend them to make them persistable through JPA.
I cant figure out what the best "Coupling?" would be and how to organize it, if I modify the xjc compiled Classes to be persistable, I would lose the Ability to recompile the XSD if there are any changes.
... |
My company has about 200 repos for microservices and libraries that we share. It's largely been great, but it's hard to keep DRY at the organizational level. We'll often have a large amount of package.json, webpack.config.js, .babelrc, .github/workflows and similar infrastructure-level code that gets copied in though t... |
We use Dependency Injection extensively using the Ninject library in our .NET based products. Most of our code is neatly packaged in Ninject modules. Some of these modules contain background services that should start as soon as the system is started or when a DI module is loaded. The way we've gone about it is to have... |
I know that a fact table in dimensional data model consists of measures and flags for an event or transaction. I also understand that it may contain date of the event. I have to design on fact table where I need to include one field for snapshot month. this snapshot month will tell that a transaction record is pertain... |
There seems to be a lot of question regarding "when to mock". But I did not get an answer on my question so far. It can be, I do not know a specific search request that would point me to the answer.
Imagine we have a class (MyClass). Imagine that this class has methods that can return both std::string and a wrapper cla... |
Good day,
I'm having difficulty structuring how I should set up email notifications for a Django app that I built.
As I'm seeing an increase of users in the app, it increases the occurrence of email notifications being sent out. The app sends out email for every important event, examples are registration, confirmation,... |
I'm hoping the experienced Java developers here can share some insight about this problem we have been trying to solve for so many months.
We're currently building a Java web application that uses Jetbrains Xodus as its database. The web application itself is pretty much "done" except for a major issue which the databa... |
If this question is too broad for Q&A format, I'd appreciate a pointer on where to ask it.
Suppose that you're using Stripe (or some similar service) to manage the payments for a service of some sort. Stripe has built-in support for recurring payments, a payment gateway.
What I'm struggling to understand is how much of... |
Yesterday I asked myself if the database is part of the back-end.
On the one hand the back-end includes everything the user doesn't come in contact with, if you look at it that way the database clearly belongs to the back-end.
But I personally can't really get used to it because there is no business logic in the databa... |
With a single publisher(go-routine) and multiple subscribers(go-routine) on same machine, below message hub help create pubsub model:
type PublisherHub struct {
subscribers map[*subscribmediator.Subscription]struct{} // each subscriber is local to same machine
Register chan *subscriptionmediator.Subscription //... |
MVP best practices recommend using parameter-less methods when view and presenter communicate. Even if using events, it is recommended not to use event parameters. It is recommended to change class state thru properties, which can be examined to read/write information. What is the reason for this? Does it help with tes... |
Im usually working with line of business desktop software. Mostly based on a single database.
Pretty often one of the requirements is to keep track of some files. Or the only way to implement a certain feature is to save actual files somewhere on the system and keep track of them via the database.
Is there any general ... |
Let's say there's the class Book, with different models in different endpoints:
Endpoint A (consumer):
class Book{
Map<string,string> chapterName_content
}
Endpoint B (provider):
class Book{
string [] chapterNames
string [] content
}
Let's also assume that these are the structures that make the most sense withi... |
Uncle Bobs Fitnesse application uses huge Context object as a way to pass different read only constants and dependencies. He also uses same approach in his code casts. For example his Context object may have static variable repository.
As I see it, it is an alternative to classic DI and it prevents constructor of objec... |
I am in a team developing Android applications in an enterprise corporate .One of team members suggested that we should create our own classes, so extending every classes of UI kit (Material Design).
So, if we are going to use a view called Button, we should create class MyPrefixButton extend Button.
It's a huge kit an... |
i am trying to figure out what is the best practice on doing POST calls when creating new complex objects.
example assume this is the complex object i wish to send:
{
"firstname": "John",
"lastname": "Doe",
"mainEmployer": {"name": "Imaginary LLC", "website": "www.imaginary.com"}
}
essentially the above is... |
I have an XML looking like this:
<?xml version="1.0" encoding="utf-8"?>
<n0:OrderConfirmation xmlns:n0="http://company.org/interface/MVSI"
xmlns:ord="urn:company.com:Order:XYZ:001">
<MessageHeader>
<ID>001</ID>
<CreationDateTime>2020-09-10T07:39:26.697Z</CreationDateTime>
</MessageHeader>
... |
I'm working on a larger, older project. Our code is littered with classical singletons, i.e. classes like
public class ABCService {
private static final instance = new ABCService();
public static ABCService getInstance(){ return instance; }
public void doTheThing(){ /* business logic */ }
}
And naturally th... |
Consider the following function:
def get_api_status(api_client):
response = api_client.get('/status/')
return response.content
and the test for it:
def test_get_api_status():
mocked_api_client = MagicMock() # depth 0
mocked_response = MagicMock() # depth 1
mocked_response.status = 'ok' # depth 1... |
With C#, I am defining the physical structure and behavior of a robot.
For the physical structure: I wrote an abstract "Unit" class. Other classes such as "Factory" or "Arm" are derived from Unit. So there is a hierarchy/tree of Unit objects that defined the physical makeup of the robot. For example, the constructor of... |
I'm developing a web service that have following structure:
Web Server: this is implemented with NextJS which do Server-Side Rendering and serve server-side rendered webpage data to Client.
API Server: and this one is implemented with NestJS. Clients will send graphql queries/mutations to this server.
Client: any cli... |
I basically want to be able to "turn on debug logging" like you can do with many applications that run in a shell. The naive way of implementing it would be to insert a statement like this in every one of my functions:
if (DEBUG) console.log('Executing <name of function>');
But having this in every function seems a bi... |
I'm actually reading about the Proxy design pattern (https://refactoring.guru/design-patterns/proxy) and I'm wondering about what does prevent the Client to call directly the RealSubject class.
I give you this illustration that i've found on this post :
I can't understand how to prevent client for making the mistake ... |
There can be some approaches regarding releasing a software product:
Perfection before launch to generate a technical gap with rivals
Progressive frequent releases and getting user feedback
...?
Assuming the user base is divided into multiple groups:
Enterprise
Professional
Home / hobbyist / educational
I wonder wh... |
For example if you have a single UUID with a collision probability of x, if you concatenate 2 UUIDs, does the collision probability become x^2?
val0 = generate_uuid()
val1 = generate_uuid()
final_val = val0 + val1
So with each additional uuid, does it reduce the probability of collision exponentially? My x, and x^2 m... |
So... The architecture has recently been put under the reign of a Reference Architect.
The Reference architect, I will refer him as RA, started to work and the results were immediately visible: we stopped calling microservices microservices, but blocks.
As we used to be a mixed Java/Linux and C#/.net shop things were w... |
Say I have a reader and a producer that share a buffer. I have a wait queue for the reader to put itself in if there is no contents in the buffer when it reads. I also have an atomic variable for keeping track of the number of readers.
The producer wakes readers when contents are added to the buffer.
Is it cleaner to d... |
I have been thinking about this for a while and could not get to a conclusion.
I need to convert a object to another (that will end up serialized as XML).
Both objects have many fields, let's have an example:
SourceObject
- String field1
- Integer field2
- SourceObjectChild1 field3
- String child1Field1
- Stri... |
Below is my understanding of the projects involved .However my confusion comes from the difference between Application/Core/Domain . Is it also correct to say Core = Application + Domain because i have come across some projects without core?
Api
Accepts input in the form of http requests over the network (e.g., GET/PO... |
There is a rather large data flow engine - more than 2000 different flow definitions of "what to do with inbound data". The engine deals with various data formats (flat-file, CSV, JSON, XML, or even binary), performs filtering, transforms data formats, etc.
The flow engine consists of a number of libraries and tools in... |
I have been researching microservices and monolithic architectures, and I can't seem to find the answer to this question.
From my oversimplified understanding, a monolithic applications uses the same code base for the whole application.
Does this mean that it can only provide one API? Or is running multiple processes/s... |
The Argument
Some say that if you write a method that receives a buffer, iT MUST RETURN VOID -> the buffer is your exit point.
Do not abuse the methods by receiving buffers AND returning a another object.
Example (BAD):
Object myMethod(String param1, String param2, Map<K,V> bufferMap)
Example (Better):
void myMethod(S... |
I'm trying to create an android application for personal use to do the following:
Get ads from the Facebook ad library (commercial ones) not the ones with politics topics etc. and then insert them into a spreadsheet for further processing.
Get my personal business account's current billing data by clicking on a simple... |
The following is a contrived example of a potential code smell
that I've repeatedly encountered when implementing a GUI with which instances of a class created by letting the user fill out a form. The question is if the pattern I use is correct, or if there is a better way.
The app's core logic contains a class Data th... |
Let's assume we have two services - user and auth with a message broker in between. user service handles CRUD action on user entity and auth service handles authentication. When a user is created/updated/deleted the user service publishes an event that the auth service consumes and writes in its own database.
If someth... |
At my company we have a central auth server running IdentityServer. There are a number of applications providing some API to client applications. API requests are authenticated with JWT tokens issued by said auth server. It works fine for our purposes.
We have a new requirement that basically needs a secondary verifica... |
I am working on a service in a sprint boot microservice application. The consumer for my service can be another service, as well as a UI component.
The are 5 entities in my service, each entity having it's own set of CRUD APIs. Four of these entities have two datetime fields - event_start_date_time and event_end_date_t... |
I think the answer to the first part of my question is, "yes" -- no point in making objects immutable in a single-threaded application (or I guess in a multi-threaded application if that particular object will not be shared among threads). If I am wrong, please explain why immutable objects are useful in a single-threa... |
I'm working on a complex system that follows the principles of microservices, but with one exception - my services are more 'generalized' and big (I refer to them as macroservices further down the post).
For example, instead of having very precise services:
users
news
articles
posts
threads
matches
items
I have the f... |
If this is better suited for StackOverflow let me know and I'll head over there... I think it belongs here though.
I'm writing an ASP.NET Core REST API that returns 201s and 202s after kicking off long running asynchronous jobs using Hangfire. If the jobs fail mid way Hangfire will pick things back up, run retries, etc... |
A little history - skip to the TL;DR if you so wish to.
So I have an UWP application written in C++ that utilizes V8 and have synthetic module which allows calling native methods from the embedded JS code.
Now until recently I was writing Node.JS tool that parses C header files and creates JS modules which can be used ... |
Consider the following classes...
public abstract class Option<T>
{
public T Value { get; protected set; }
}
public sealed class Some<T> : Option<T>
{
public Some(T value)
{
Value = value;
}
}
public sealed class None<T> : Option<T>
{
}
public sealed class Error<T> : Option<T>
{
/*
* ... |
How to make sure that data specific to particular region remains in the closest data center to ensure low latency?
Lets consider Amazon e-commerce as an example . It sells products all over the world and not every product and product's seller is available in every region. So there is no point in showing , lets say ABC ... |
I'm learning about "Functional Core, Imperative Shell" as espoused by Gary Bernhardt in his talk about "Boundaries". In reality, it seems like these ideas have been known for a long time, and put into practice with languages like Elm or Haskell. Gary has just articulated them very well and to an audience that is unfami... |
If immutability is "good" and yet you can in effect change the value in an Integer or String variable (never mind that you get a new reference -- the value has changed) what good is it that Integer and String are immutable?
If Integer were mutable, what sort of bugs would be harder to find (etc.) than in the case that ... |
I'm trying to expose RESTful API endpoints for creating user accounts to access my API. So, this would be one of the first things my consumers would use. I'm trying to figure out if this is how I should implement the endpoints, so any feedback / guidance (particularly in complying with REST principles) is highly apprec... |
Mild pickle. I have a project which has components that are difficult to test/mock. It might look something like this:
class Contenxt;
class Server : public SomeOtherClass
{
public:
ServerPlugin(const Contex&) {
a.registerCallback([this](int i){ handleData(i); });
}
void handleData(int i)
{
... |
In my software engineering career I have never worked with pull requests. Probably because I only ever worked in relatively small teams (5-16 people) and only on projects that were structured well enough and had a small enough code base, which made it quite easy to keep track of all the changes other developers are mak... |
DDD was chosen as an architectural pattern to tame a wild database model, as well as ubiquitous language. However, there is a sticky part of our model -- many of the rules are dynamic, and I don't know how to reconcile them with what I understand of DDD.
class Account {
private Mailing[] mailings;
void Subscr... |
I have a requirement to design a notification system for multi-user(~1000 users) application, here are the high level requirements.
System event gets triggered on specific operations.
On event trigger, individual notification for all(or sometimes only for relevant) users gets generated and stored in database.
While us... |
Goal:
Have a common and same menu content link (for instance Home, about, consumer product, support) when you are using Angular, NativeScript and Android.
Background:
The menu contain seven different name. Each name is distinguish.
The backend is .net core with SQL server.
Problem:
Two approaches:
First solution:
Shou... |
I am working through MIT 6.006 OpenCourseWare as taught in Fall 2011. Problem 1.2c asks for the time complexity of an algorithm1 which finds a peak element (i.e. all neighbors are less than or equal) of an M x N matrix. My complexity analysis does not match theirs and appears to hinge on the complexity of a nested lo... |
This question comes when there are changes during development and some entity of the business changes its name or its purpose. When it comes the time to develop, it can get very confusing during meetings, development, or any process that you mention that entity that has just changed.
Suppose we're in a business of plas... |
var file_extension = 'txt';
if (file_extension === 'txt')
alert('plain text');
else if (file_extension === 'md')
alert('markdown');
var file_extension = 'txt';
if (file_extension === 'txt')
alert('plain text');
if (file_extension === 'md')
alert('markdown');
The second example is wrong: there is no ... |
I know about the LSP, which requires that objects of a superclass shall be replaceable with objects of its subclasses without breaking the application.
However I've been building frontend applications for 5 years now and I have never come across a situation where I would replace an object of a superclass by an object o... |
Using Kafka I understand that it makes little sense to simply pass events in and out of a Kafka cluster, and that the real benefit comes when doing some processing in the events received in the cluster. So there is processing that can be done in the cluster itself.
Using Kafka Streams we can do some processing too, but... |
I am looking for a way to configure TFS to enforce triaging of PBIs and bugs. At present, although "proper" practises have been discussed and agreed many times, they are not followed reliably, so I am looking for a way to enforce them via TFS configuration and security.
In our organisation, a large number of people acr... |
I have inherited a project via laravel that uses its database migration mechanism coming from the framework. The application has the following table named actions:
action_log_id SERIAL PK
user_id INT
action_desc VARCHAR
awarded_points INT
date
And I want to add a column that records that awardee hence, I did the foll... |
tl;dr - I've settled on the terminology Traversable for the container type which includes List and Dict but excludes str, and Atom for anything which is not traversable, e.g. cannot nest indefinitely. This makes the top-level type signature of json.loads something like Union[Traversable, Atom]. I still need to figure ... |
There are many instances of software developmet where we seem to solve problems differently than from a mathematical perspective. For instance, consider the classical example of calculating Fibonacci numbers. Why do we implement Fibonacci numbers naively using its definition instead of using the explicit formula https:... |
Let me start by saying that of course conventions are important, there should be a rule of thumb for some cases that is representing the best action to follow by, in order to prevent mistakes and make stuff more simple.
Now for the topic of the question/discussion.
I am working on a side project of a DNS server written... |
I've recently been developing a networking application layer (or at least attempting to) for my game I've been working on. I think I've got a decent basic idea for the system now, but there is multiple ways of implementing it (I refer to the two difference ways as class-inheritence and struct-interface) and I'm at a cr... |
In variables/classes/methods naming, sometimes "of" preposition is omitted and word order changing, for example:
"Absolute path of source file of entry point" -> "entryPointSourceFileAbsolutePath"
Now I am considering the renaming of above variable to:
absolutePathOfSourceFileOfEntryPoints
Which other approaches exist... |
I have a piece of code where I need to assign a value to a variable, but base on condition, it could take other values. It can be done in multiple ways, but need to know which would be preferred in terms of optimization.
1. Assigning the default value in the last else
if (deviceInfo.pop) {
this.forms = getPopFormMo... |
I've gone through AUTOSAR Layered Software Architecture and understood that it is something like a file structure in which it is defined to have all the hardware abstraction in one directory and called as MCAL, and so on. Am I correct? Does a proper File Structure make a project AUTOSAR Compliant?
If it is a file struc... |
Given an array of integers, we want to find how many explicit pairs can be made such that their sum is divisible by 60. The pairs are not necessarily non-unique.
For example, let's say the input into our function ReturnPairCount() was as follows:
[29, 20, 30, 100, 30, 121, 160, 31, 20]
our function would return x bec... |
I'm using a client library for an HTTP API. The client exposes objects and methods matching the domain, e.g. Api::Document.download, but the return value is just the http response from the API. As the user I have to parse the JSON response value and check the http response code for errors.
That seems like it's exposing... |
(Disclaimer : I'm asking this question here because as it is opinion-based, it have been closed from https://stackoverflow.com/questions/64050308/an-action-in-my-controller-has-too-much-responsibility)
Summarize the problem
This question has come to me because I write a function to set a current cart for a user.
Specif... |
Lets say you created an order. Since Uber is a very dynamic system, one should constantly check if there are available drivers for you.
If orders are saved as a some collection (e.g. in MySQL table and etc), then one should iterate that collection again and again and try to match client with driver, because some driver... |
OVERVIEW
We have multiple data providers who provide us information from a large set of data sources. These end data sources provide data in CSV format.
Since, the CSV formats are not consistent across different sources, we currently have a manual process in place where a human goes through each CSV file we receive and... |
Setup
Consider the following models (pseudo-code)
Place:
type: const = "Place"
id: str
name: str
lat: float
lon: float
# other fields
Event:
type: const = "Event"
id: str
name: str
start_date: timestamp
location: Place
# other fields
I am using Python for the BE and CouchDB as DB System.
When ... |
I have written the following code which takes a coord_list of points in a 2D coordinate system, a center and a radius and returns a list of all points from the list having distance at most radius from center.
def points_in_rad(coord_list, center, radius):
distances = [distance(coord, center) for coord in coord_list... |
Python is very specific language which gives developer huge flexibility.
So if I have class like this:
class Car:
def __init__(self, engine: Engine):
self._engine = engine # dependency injection
self.speed = 0
def accelerate(self, target_speed: int):
if self._engine.can_accelerate_to_s... |
I'm building a todo list app and using react-beautiful-dnd on the frontend to allow users to reorder tasks. I'm trying to work out how to persist changes to the database when a user reorders items.
With react-beautiful-dnd, when a reorder occurs, there's an onDragEnd callback which provides me with the following inform... |
I have been in two software product houses for three years in a row.
The first is a small company maintaining a fairly small management system with a monolithic legacy code base (almost twenty years). Tightly coupled code is everywhere without sufficient unit test coverage. However, the management usually does not want... |
For example, the Scrum Guide states (emphasis mine):
The Scrum framework, as outlined herein, is immutable**. While
implementing only parts of Scrum is possible, the result is not Scrum.
Scrum exists only in its entirety and functions well as a container
for other techniques, methodologies, and practices.
This appear... |
This question is not so much about how to implement a solution as I've already implemented a working solution, but more about how to improve how I implemented it. The implementation process of the requirements was haphazard. That was partly due to unclear requirements and partly due to an unclear preexisting partial so... |
The 1 logic is that due to inheritance. But, except that how does Object Oriented Systems helps in reusability?
I have read this article below. https://www.drdobbs.com/a-realistic-look-at-object-oriented-reus/184415594 But, this fails to explain exactly how "Being object oriented, reuse became possible".
That is, you c... |
There are a lot of examples over Internet that show why you should use guards.
For example:
public double getPayAmount() {
if (isDead){
return deadAmount();
}
if (isSeparated){
return separatedAmount();
}
if (isRetired){
return retiredAmount();
}
return normalPayAmount();
}
The author compare... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.