The problem is this
A Decent Number has the following properties:
Its digits can only be 3's and/or 5's.
The number of 3's it contains is divisible by 5.
The number of 5's it contains is divisible by 3.
If there are more than one such number, we pick the largest one.
Ouput in console Print the...
Thanks for clarifying. Unfortunately it's still an independent solution that doesn't relate to the OP in any way and, as such, doesn't constitute a code review. — Mat's Mug ♦6 secs ago
The following is the top-level procedure for aggregating, analysing and reporting my company's submitted business from 2015 - present. Reviewing the entire project is unfeasible, so I am just seeking opinions on Variable/Method naming and general readability.
For reference, CLS_Data_Report is a ...
I have been working on a cache that can handle multiple reads at the same time, but the write is blocking.
Is this code overkill by using a ConcurrentHashMap and a ReentrantReadWriteLock? Could I get away with just the lock?
Are there any other optimizations I could make.
Papa Bless!
public...
I just uploaded 2k commits to a remote repo. took TFS 2 hours to download each changeset. Took 3 minutes to upload it to a remote Git repo. TFS vs Git.
After reading a great answer about the comma operator in C/C++ (What does the comma operator do), I wanted to know which is the most readable, maintainable, preferred way to implement a while loop. Specifically a while loop whose condition depends on an operation or calculation, and the conditio...
@Pimgd 'Public Function KeepOrRemoveArrayRowsWhereComparisonIsTrue(ByRef sourceArray As Variant, ByVal colIndex As Long, ByVal operator As ComparisonOperator, ByVal comparisonValue As Variant, ByVal hasHeaders As Boolean, ByVal keepOrRemoveOnTrue As KeepOrRemove, Optional ByRef arrayOfRemovedRows As Variant) As Variant'
Delegate
This class module defines what I'm calling, in this context, a Delegate - here a function that can take a number of parameters, evaluate a result, and return a value. Close enough to the actual "delegate" thing I find.
Example usage
Set x = Delegate.Create("(x) => MsgBox(""Hello, "" & x
also, @Kaz you'll be happy to hear that Rubberduck 2.0 will help you experiment with renaming functions on a whim. 1.4.3 might already do it, but so many bugs have been fixed since July that I don't even consider 1.4.3 release-ready...
This is a follow-on to a global enum for comparison operators. I wanted to pass a logical expression E.G. >= someValue as a parameter to a function, so I made an Enum and an accompanying function to analyse logical expressions.
Is my approach a good way to implement this functionality in VBA?
...
Maybe it wants to be good but it has to perform fast so it can make enough money to feed its family, even sacrificing correctness in a few corner cases
it just has to, in order to survive, even if some people don't make it into Arstotzka
The following function, as evidenced by its name KeepOrRemoveArrayRowsWhereComparisonIsTrue is probably trying to do too much.
How can I better structure/refactor/split it to be cleaner whilst retaining the original intent: "Here's an array, filter it based on the values in this column"?
Pub...
I'm voting to close this question as off-topic because it's not about non-functioning code. This is more approriate for CodeReviewbut check their guidelines first. — Paulie_D24 secs ago
Select Case keepOrRemoveOnTrue
Case KeepOrRemove.keep
removeCounter = 0
For ix = startRow To UB1
sourceValue = sourceArray(ix, colIndex)
If IsNull(sourceValue) Then sourceValue = 0
If IsNull(comparisonValue) Then...
There you go
Dim remove as Boolean
remove = False
If keepOrRemoveOnTrue = KeepOrRemove.remove Then
remove = True
End If
can you guys who work in multiple teams see other projects? like if you are in team A and work on project A, can you see project B which is being worked on in team B?
@Vogel612 So I work in internal apps and I have a colleague who works in customer facing stuff. Both projects use the same technology. But I can't see their project, and they can't see mine.
I would like to make a portable thread pool using boost::thread. Some one could tell me to look at boost::thread_group and boost::asio. I know, but I am not really familiar with these things so I don't know if they are suitable for my purpose.
Please give me comments on what I supposed to do her...
What is the point of having LastUpdate datetime fields in tables if the only way they will ever be accurate is if you manually update them each time you write to a record. /rant
@PinCrash I have DateInserted and DateUpdated columns in ALL my tables. But the only write operations happening on my DB's happens overnight with an SSIS package. During the day, only SELECT is done on them.
DateInserted and DateUpdated are nothing but an annoyance in a transactional db. they're tremendously useful in a data store though </BoldAndProbablyWrongStatement>
@Vogel612 lol, Sage is used by the accounting dept. I need to make a process to transfer purchase orders from that legacy system into Sage.
> A final note is that the word var is proposed to be a reserved type name and not a Java keyword. This means that code that uses var as a variable, method, or package name will not be affected; code that uses var as a class or interface name will be affected (but these names violate the Java naming conventions anyhow)
that's dumb. Java tries to be like C#, and fails miserably.
I'm in the process of learning SQLite in C# and I've come up with some generic methods for finding and updating data. I would appreciate any pointers with the design of my methods and/or my SQL syntax.
FYI: I'm using System.Data and Mono.Data.SqliteClientfor C# Mono 2.0 (Unity3D).
Here is an ex...
var is not a keyword according to this list.
it is a contextual keyword, so from the context the compiler is be able to decide which is your class and which is the contextual keyword, and no confusion arises.
a contextual keyword is:
used to provide a specific meaning in the code, but it is...