Any idea how to put this code smaller?
This code how it is don't run on VBA
How to aplly sub procedures here?
Private Sub Worksheet_Change(ByVal Target As Range)
For J = 17 To 19
Select Case Target.Address
Case "$J$17"
If Not Intersect(Target, Range("J17:J19")) Is Nothing Then
T...
@JeroenVannevel Still it needs to be compared against living costs, and my gut feeling is that living costs ordered from high to low are something like: (Norway,) London, Berlin, Belgium, Poland
Ah... I see... As stated it was my "gut feeling"... Berlin being close East Germany could be part of the explanation of why I'm wrong! (or maybe Belgium has higher living costs than I believe :) )
@Mat'sMug if Outlook is (Not Responding) while trying to import all those messages, should I leave it be until it does respond, or kill the process and try to restart it?
I've written some classes to encapsulate the limits given for datasheet parameters, e.g. for the classic 741 op amp:
As the above example datasheet snippet shows, there are some challenges for representing the values in the "min", "typ" (typical), and "max" columns -- including cases where the...
Do we have canon evidence that occam's razor exists in the Star Wars universe? — Plutor23 hours ago
@Plutor I think it's known as Occam's Lightsaber in that universe, as it cuts through many things, but also burns the unwary wielder. — pcurry14 hours ago
I recently submitted a code-challenge for an interview according to the following guidelines:
About
Write a function or method that accepts two mandatory arguments and returns a result.
Requirements:
Use Ruby or another language of your choosing, and write production quality code.
Your funct...
So, I kept refactoring my Sage300 API wrapper - I wanted the client code to feel just like using Entity Framework - this is the closest I got to it:
using (var context = new SageContext(/*redacted credentials*/))
{
context.Open();
var header = context.PurchaseOrderHeaders.Single(po => ...
Nested parenthesis are not supposed to be used: "(in terms of pointers this means the owner is responsible for calling delete on the pointer (usually in the destructor)"
The second parenthetical phrase can just be set off with commas.
Last sentence in this paragraph: "If you are not the owner of a resource you should not have access to the resource object directly (as it may be destroyed by the owner without other objects knowing)."
Put a comma after "resource" (subordinating conjunction), and remove the parenthesis.
@LokiAstari Didn't read all, but I'm confused to why you have that long list at the start. I would rather start with what is the main point/theme of your article, and possible state that "there were X arcticles on this topic the last months...". Similarly I'm expecting a statement stating what the "Rule of Zero" actually is, not just used as a section title. Similar for the other rules
Same paragraph: "Yes this does make the performance for self assignment worse. But it make the normal operation even more efficient." > "Yes this does make the performance for self assignment worse, but it make the normal operation even more efficient." (Join sentences.)
Just before "Allocating more storage":
> If we know that certain operations are exception safe them we can optimize resize operations and maintain the strong exception guarantee.
Change "them" to "then" and add a comma after "safe".
Other than that, it looks good, @LokiAstari. Nice article.
@Liam: I think it would help you a lot if you submitted your working code to Code Review. You will be treated very gently there unless you post crap like code that won't even compile, and it may well help you to learn some of the subtleties of the language — Borodin32 secs ago
Strings
Strings
Strings
On my machine, this looks like:
That is... less than ideal and almost had me going in to fix the 'how in the world did I type strIngs?!'. Instead it will be ### to ##.
Isn't that part of the issue, that mods don't consider it to be "the hassle of being a mod"? I'm thinking most of the reason why we're here most of us is due to inner motivation
I am trying to save on localstorage the markers that I create on click in leaflet and delete them using a buttom. The problem is that I don't know how to delete just one marker at time and remove them from the main layer without affecting the others.
I want to add a unique id to each marker crea...
I'm having a problem with figuring out why my code won't print the entire sentence. It will only output and reverse the order of the first word's characters in the sentence. How do I get this to output the reverse order of the entire sentence?
package Stack;
import java.util.StringTokenizer;
i...
I have this code and at the end of it, FastMM show that there were memory leaks with all the objects of TSinc and it.
unit sinc_int;
interface
uses
Classes,
log_listener_list_int,
tick_listener_list_int;
type
ISinc = interface;
ISincList = interface;
ISinc = interface ['{5381423...
I don't get it, my code work. Its just missing a small feature (a working delete markers from localstorage), that's why I am asking help... That's why want someone to review my code to point me how to make it better. I have everything it needs to work there. — RogerHN44 secs ago
Code Review questions are considered off topic on this site. Try posting it on the Code Review Stack Exchange site which is set up for such questions. — Tot Zam6 secs ago
The goal for this code is to provide a semi-secure and privileged method of user registration via a secret code that is stored as a key in the Firebase database.
Subscribers to a mailing list were all sent a 'secret' registration code. Upon completion of the registration form, RegisterFactory.re...
I am a math student who just started learning Java a week ago.
I want to write a program in Java that return a prime factorization of any natural number greater than one.
After spending some time coding and debugging, the program runs fine.
Since I am new to Java and programming in general, I don...
My code currently generates a 2-variable truth table and lets the user select to AND/OR/NOT the variables. I was looking for advice on how to make it more concise, handle bad inputs better, and ignore case while going through.
CODE:
#include <iostream>
#include <string>
#include <iomanip>
using...
This code works for me, but I am trying to improve my coding and am looking for advice on how to improve it. Specifically I want to simplify this so that perhaps I can have a dynamically updating dataframe that tracks the "site" that I am on, and the "cutoff" value that I am on, and records the c...
@200_success There was more wrong than just an indentation problem here. Is following the rules against common sense? I'm having trouble parsing your comment.
Just speaking for me, but if I'm code review, I'm not going to like the original (illegal) code or even the valid solution. A traditional "if" is going to be much more obvious as to both the intent and utility of the method. — Anthony Pegram6 secs ago
I've created a linked list template class which contains a copy constructor that deep copies the list.
LinkedList.hpp
template <class T>
class LinkedList {
protected:
struct Node {
T value;
Node *next;
Node(T val, Node *nxt=NULL) {
value = val;
...
I'm contemplating how to read an int using Scanner.nextInt(), and at the same time ignore the rest of the line or flush the input buffer to be ready for inputting the next number. Typical usage would be to read a number where the user is likely to add units or similar after the number, and I want...
I'm voting to close this question as off-topic because this belongs on Code Review. — Tunaki8 secs ago
@borodin I agree, it's more consistent. And I agree with the code review as well. Maybe I should head over to CR a bit more often, but the Perl tag seems very slow and then people jump on new questions even more than here. — simbabque48 secs ago
hahaha :) ... It's a queue that doesn't "wrap around" the end of the array and instead "runs out" of queue space, so it can queue up to a finite number of items and not one more
I'm hoping that "NonCircular" is not a part of the actual name of the queue, as it seems somewhat strange to have a class name indicating what it isn't! Then you could get really long class names like "NonLinkedListNonStackNonDynamicNonCircularQueue", as it most likely isn't any of those...
One suggestion could be to make a subclass of your class, and as such get a concrete possibility to call the method. See this answer related to unit testing abstract classes.
> If there are methods on this abstract class that are worth testing, then you should test them. You could always subclass the abstract class for the test (and name it like MyAbstractClassTesting) and test this new concrete class.
KISS. I have a fake implementation - nothing keeps me from making it have a public bool IsComposed method that gets set to true in the OnModelComposing implementation
the fake implementation is instrumental to the test. right?
I started writing a set of tests for my SageContextBase class, which needs to be abstract because the client code must derive from it (think of it as EF's DbContext - it can't be instantiated directly, but it packs a truckload of functionality) - I have 5 passing tests covering everything that sh...
I've made a quick game in C++ where you race down a vertical track and dodge 'X's or obstacles. The player is represented as a 'v', and the score is counted by how far you manage to get down the track. The obstacles are randomly generated at the bottom of the map and slide up each time the player...
Maybe FixedQueue or FiniteQueue to focus that it has a given size? ExhaustibleQueue gives me a slightly bad feeling that at some random point the queue might be exhausted...
I see the caveat here is the maximum queue size. So to answer the question on how we should call it, we should probably ask what happens if I try to enqueue into a full queue.
I understand the en- and dequeue operations. Don't like the expression "exhausted the queue". And still think "ExhaustibleQueue" gives me a somewhat random feeling as to when it will become exhausted. That's what I read into that name