Questions tagged [interface]
Object interfaces allow you to create code which specifies which methods a class must implement, without having to define how these methods are handled.
15
questions with no upvoted or accepted answers
10
votes
0
answers
2k
views
Geode Contents Predictor StardewValley Mod
The goal
I really enjoy the game Stardew Valley. One of the things that the game has are geodes. Much like real-world geodes, these geodes can be cracked open, and you can find some fun things inside....
7
votes
0
answers
543
views
A* Algorithm in F#
Inspired by this post I looked up A* on wikipedia and went on with my own implementation as seen below where I try to mimic the pseudocode on Wikipedia but in a recursive manner.
I would like any ...
5
votes
0
answers
712
views
Implement OO interfaces in Python
Edit: Whoops! I just remembered there's already an long-lived package for this, zope.interface. I'd like a review all the same.
This is a proof-of-concept ...
4
votes
0
answers
96
views
Determine when a file is no longer being changed by hashing
I have a requirement to essentially scan a filesystem on any kind of filesystem and move a resource whenever it is ready. To do this I have the following code
...
4
votes
0
answers
117
views
Injectable EventLogger for custom application events that are handled differently from normal logs
I am trying to become better at designing classes for dependency injection and IOC in general. It is often not an intuitive concept.
I have the following python interface and implementation for a ...
4
votes
0
answers
336
views
C# Dictionary Wrapper for VBA
I am a technical reviewer/writer and I use VBA for Word a lot to manage issues in Word documents I receive. I have frequently come across niggles when using Collections, Scripting.Dictionaries or ...
3
votes
0
answers
73
views
Extensible Python Interfaces
Some background before the actual code:
My team needs to develop an optimization library for a specific problem. In order to optimize (pun intended) the projects life-cycle I am trying to write some ...
2
votes
0
answers
77
views
Expression validator service
I'm working on a project (in C++98) that uses a grammar validation service to validate mapping expressions for a small DSL. To simplify the project code, I've written a small interface for using the ...
2
votes
0
answers
143
views
Safest Connection pool in Java
I have read the code reviews on this website: this one and this one
So creating the pool in itself might not be that difficult, I'm more worried about the client closing the connection or the ...
2
votes
0
answers
120
views
Interface modelling for a journaling program in Java
My program's Journal consists of unique Pages identified by their Day. Within those pages ...
2
votes
0
answers
96
views
NodeJS, status propagation to interface
If you have an interface served by a NodeJS API, what is the most clean way to propagate status changes to the interface?
For example, I have a page that has 2 statuses, user logged in and guest. How ...
1
vote
0
answers
135
views
.NET Repository Pattern
I'm currently in the process of defining some framework, one of the first things that I thought I could start with was defining some repository pattern/layer.
I generally wanted some input on it, ...
1
vote
0
answers
65
views
Code for creating a dialog for choosing a date
I have code that creates an AlertDialog to select a date by a user. I ran into a problem that this code began to take up a lot of space. Could you offer ideas on how to shorten this code / put it into ...
1
vote
0
answers
900
views
MongoDB database abstraction
Backstory
The company I work, we have the code below that acts as an abstraction of our database layer, which is mongoDB. This ensures our other code is not too dependent on the database. This is ...
1
vote
0
answers
1k
views
Interface for Dapper repository
I'm creating a little proposal for the data access layer using Dapper ORM.
The code is based in an generic interface IStore:
...